mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-20 06:24:28 +08:00
удален лишний код, фиксы ошибок git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@65494 954022d7-b5bf-4e40-9824-e11837661b57
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
#pragma once
|
|
#include "../Reader/Records.h"
|
|
|
|
class CRecordTextBytesAtom : public CUnknownRecord
|
|
{
|
|
public:
|
|
std::wstring m_strText;
|
|
|
|
public:
|
|
|
|
CRecordTextBytesAtom()
|
|
{
|
|
}
|
|
|
|
~CRecordTextBytesAtom()
|
|
{
|
|
}
|
|
|
|
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
|
{
|
|
m_oHeader = oHeader;
|
|
|
|
//UTF-16 Unicode character whose high byte is 0x00.
|
|
unsigned short *pUTF16 = new unsigned short[m_oHeader.RecLen];
|
|
unsigned char *pUTF16_low = new unsigned char [m_oHeader.RecLen];
|
|
|
|
if (pUTF16 && pUTF16_low)
|
|
{
|
|
pStream->read(pUTF16_low, m_oHeader.RecLen);
|
|
|
|
for (int i = 0 ; i < m_oHeader.RecLen; i++)
|
|
{
|
|
pUTF16[i] = pUTF16_low[i];
|
|
}
|
|
|
|
m_strText = NSFile::CUtf8Converter::GetWStringFromUTF16(pUTF16, m_oHeader.RecLen);
|
|
|
|
}
|
|
|
|
RELEASEARRAYOBJECTS(pUTF16_low);
|
|
RELEASEARRAYOBJECTS(pUTF16);
|
|
|
|
//std::string tmpStrTextA = string2std_string(StreamUtils::ReadCStringA(pStream, m_oHeader.RecLen));
|
|
|
|
//std::wstring tmpStrTextW (tmpStrTextA.begin(), tmpStrTextA.end());
|
|
|
|
//m_strText = std_string2string(tmpStrTextW);
|
|
}
|
|
|
|
};
|