mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-14 23:31:38 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@61935 954022d7-b5bf-4e40-9824-e11837661b57
42 lines
1019 B
C++
42 lines
1019 B
C++
#pragma once
|
|
#include "../Reader/Records.h"
|
|
|
|
class CRecordTextHeaderAtom : public CUnknownRecord
|
|
{
|
|
public:
|
|
UINT m_nTextType;
|
|
|
|
public:
|
|
|
|
CRecordTextHeaderAtom()
|
|
{
|
|
}
|
|
|
|
~CRecordTextHeaderAtom()
|
|
{
|
|
}
|
|
|
|
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
|
{
|
|
m_oHeader = oHeader;
|
|
m_nTextType = (UINT)StreamUtils::ReadDWORD(pStream);
|
|
}
|
|
virtual CString ToString()
|
|
{
|
|
XmlUtils::CXmlWriter oWriter;
|
|
CString strName = GetRecordName((DWORD)m_oHeader.RecType);
|
|
|
|
oWriter.WriteNodeBegin(strName, TRUE);
|
|
oWriter.WriteAttribute(_T("length"), CDirectory::ToString(m_oHeader.RecLen));
|
|
oWriter.WriteAttribute(_T("type"), CDirectory::ToString(m_oHeader.RecType));
|
|
oWriter.WriteAttribute(_T("instance"), CDirectory::ToString(m_oHeader.RecInstance));
|
|
|
|
oWriter.WriteNodeEnd(strName, TRUE, FALSE);
|
|
|
|
CDirectory::WriteValueToNode(_T("TextType"), (DWORD)m_nTextType, &oWriter);
|
|
|
|
oWriter.WriteNodeEnd(strName);
|
|
|
|
return oWriter.GetXmlString();
|
|
}
|
|
}; |