mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 05:24:10 +08:00
Added image conversion to hwp, bug fixes, and refactoring
This commit is contained in:
@ -22,14 +22,19 @@ CNoteShape* CNoteShape::Parse(int nLevel, int nSize, CHWPStream& oBuffer, int nO
|
||||
CNoteShape* pNoteShape = new CNoteShape();
|
||||
|
||||
if (nullptr == pNoteShape)
|
||||
{
|
||||
oBuffer.Skip(nSize);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
oBuffer.SavePosition();
|
||||
|
||||
pNoteShape->m_eNumberShape = GetNumberShape2(oBuffer.ReadByte());
|
||||
|
||||
BYTE chAttr;
|
||||
HWP_BYTE chAttr;
|
||||
oBuffer.ReadByte(chAttr);
|
||||
|
||||
pNoteShape->m_chPlacement = (BYTE)(chAttr & 0x03);
|
||||
pNoteShape->m_chPlacement = (HWP_BYTE)(chAttr & 0x03);
|
||||
pNoteShape->m_eNumbering = GetNoteNumbering((chAttr >> 2) & 0x03);
|
||||
pNoteShape->m_bSuperscript = CHECK_FLAG(chAttr >> 4, 0x01);
|
||||
pNoteShape->m_bBeneathText = CHECK_FLAG(chAttr >> 5, 0x01);
|
||||
@ -48,6 +53,8 @@ CNoteShape* CNoteShape::Parse(int nLevel, int nSize, CHWPStream& oBuffer, int nO
|
||||
oBuffer.ReadByte(pNoteShape->m_chNoteLineWidth);
|
||||
oBuffer.ReadColor(pNoteShape->m_nNoteLineColor);
|
||||
|
||||
oBuffer.Skip(nSize - oBuffer.GetDistanceToLastPos(true));
|
||||
|
||||
return pNoteShape;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user