mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-15 21:49:48 +08:00
[x2t] For bug 42422
This commit is contained in:
@ -212,7 +212,7 @@ namespace OOX
|
||||
}
|
||||
return nLen;
|
||||
}
|
||||
_UINT16 CFormulaXLSB::toXLSB(NSBinPptxRW::CXlsbBinaryWriter& oStream)
|
||||
_UINT16 CFormulaXLSB::toXLSB(NSBinPptxRW::CXlsbBinaryWriter& oStream, bool bIsBlankFormula)
|
||||
{
|
||||
_UINT16 nFlags = 0;
|
||||
if(m_oCa.ToBool())
|
||||
@ -266,6 +266,10 @@ namespace OOX
|
||||
{
|
||||
nFlagsExt |= 0x1000;
|
||||
}
|
||||
if(bIsBlankFormula)
|
||||
{
|
||||
nFlagsExt |= 0x4000;
|
||||
}
|
||||
return nFlagsExt;
|
||||
}
|
||||
void CFormulaXLSB::toXLSBExt(NSBinPptxRW::CXlsbBinaryWriter& oStream)
|
||||
@ -369,9 +373,11 @@ namespace OOX
|
||||
case SimpleTypes::Spreadsheet::celltypeStr: nType = XLSB::rt_CELL_ST; break;
|
||||
}
|
||||
}
|
||||
bool bIsBlankFormula = false;
|
||||
if(XLSB::rt_CELL_BLANK == nType && bWriteFormula)
|
||||
{
|
||||
nType = XLSB::rt_CELL_ST;
|
||||
bIsBlankFormula = true;
|
||||
}
|
||||
|
||||
_UINT32 nLen = 4+4+2;
|
||||
@ -446,7 +452,7 @@ namespace OOX
|
||||
_UINT16 nFlags = 0;
|
||||
if(bWriteFormula)
|
||||
{
|
||||
nFlags = m_oFormula.toXLSB(oStream);
|
||||
nFlags = m_oFormula.toXLSB(oStream, bIsBlankFormula);
|
||||
}
|
||||
|
||||
if(m_oRichText.IsInit())
|
||||
@ -990,6 +996,11 @@ namespace OOX
|
||||
m_oFormula.Init();
|
||||
}
|
||||
m_oFormula->fromXLSBExt(oStream, nFlags);
|
||||
if(0 != (nFlags & 0x4000))
|
||||
{
|
||||
m_oType.reset(NULL);
|
||||
m_oValue.reset(NULL);
|
||||
}
|
||||
}
|
||||
if(0 != (nFlags & 0x2000))
|
||||
{
|
||||
|
||||
@ -62,7 +62,7 @@ namespace OOX
|
||||
void Clean();
|
||||
void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
_UINT32 getXLSBSize() const;
|
||||
_UINT16 toXLSB(NSBinPptxRW::CXlsbBinaryWriter& oStream);
|
||||
_UINT16 toXLSB(NSBinPptxRW::CXlsbBinaryWriter& oStream, bool bIsBlankFormula);
|
||||
void toXLSBExt(NSBinPptxRW::CXlsbBinaryWriter& oStream);
|
||||
public:
|
||||
bool m_bIsInit;
|
||||
|
||||
Reference in New Issue
Block a user