mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 01:11:43 +08:00
49 lines
1017 B
C++
49 lines
1017 B
C++
#include "CharShape.h"
|
|
|
|
namespace HWP
|
|
{
|
|
CCharShape::CCharShape()
|
|
{
|
|
}
|
|
|
|
CCharShape::CCharShape(int nStart, int nID)
|
|
: m_nStart(nStart), m_nCharShapeID(nID)
|
|
{
|
|
}
|
|
|
|
std::list<CCharShape*> CCharShape::Parse(int nTagNum, int nLevel, int nSize, CHWPStream& oBuffer, int nOff, int nVersion)
|
|
{
|
|
BYTE *pOldCurentPos = oBuffer.GetCurPtr();
|
|
|
|
#define CHECK_SIZE (nSize - 8 >= (oBuffer.GetCurPtr() - pOldCurentPos))
|
|
|
|
std::list<CCharShape*> arCharShapes;
|
|
|
|
int nStart, nCharShapeID;
|
|
|
|
while (CHECK_SIZE)
|
|
{
|
|
oBuffer.ReadInt(nStart);
|
|
oBuffer.ReadInt(nCharShapeID);
|
|
|
|
arCharShapes.push_back(new CCharShape(nStart, nCharShapeID));
|
|
}
|
|
|
|
return arCharShapes;
|
|
}
|
|
|
|
int CCharShape::FillCharShape(int nTagNum, int nLevel, int nSize, CHWPStream& oBuffer, int nOff, int nVersion, const VECTOR<CCtrl*>& arParas)
|
|
{
|
|
if (arParas.empty())
|
|
return 0;
|
|
|
|
// std::list<CCharShape*> arCharShape = Parse(nTagNum, nLevel, nSize, oBuffer, nOff, nVersion);
|
|
|
|
//TODO:: перенести реализацию
|
|
|
|
oBuffer.Skip(nSize);
|
|
|
|
return nSize;
|
|
}
|
|
}
|