mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
DocFormatReader - перемещение математических формул (oMath) из Run объекта во вне.
This commit is contained in:
committed by
Alexander Trofimov
parent
f68a3f1521
commit
d012433a40
@ -382,6 +382,12 @@ namespace DocFileFormat
|
||||
{
|
||||
m_pXmlWriter->WriteNodeEnd(_T("w:ins"));
|
||||
}
|
||||
|
||||
if (!_writeAfterRun.empty())
|
||||
{
|
||||
m_pXmlWriter->WriteString(_writeAfterRun.c_str());
|
||||
_writeAfterRun.clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -571,6 +577,12 @@ namespace DocFileFormat
|
||||
|
||||
RevisionData oData = RevisionData(chpxPic);
|
||||
|
||||
CharacterPropertiesMapping* rPr = new CharacterPropertiesMapping(m_pXmlWriter, m_document, &oData, _lastValidPapx, false);
|
||||
if(rPr)
|
||||
{
|
||||
chpxPic->Convert(rPr);
|
||||
RELEASEOBJECT(rPr);
|
||||
}
|
||||
XmlUtils::CXmlWriter OleWriter;
|
||||
OleWriter.WriteNodeBegin (_T( "w:object" ), TRUE);
|
||||
|
||||
@ -607,16 +619,12 @@ namespace DocFileFormat
|
||||
|
||||
if (!oVmlMapper.m_isEmbedded && oVmlMapper.m_isEquation)
|
||||
{
|
||||
m_pXmlWriter->WriteString(oVmlMapper.m_equationXml.c_str());
|
||||
//нельзя в Run писать oMath
|
||||
//m_pXmlWriter->WriteString(oVmlMapper.m_equationXml.c_str());
|
||||
_writeAfterRun = oVmlMapper.m_equationXml;
|
||||
}
|
||||
else
|
||||
{
|
||||
CharacterPropertiesMapping* rPr = new CharacterPropertiesMapping(m_pXmlWriter, m_document, &oData, _lastValidPapx, false);
|
||||
if(rPr)
|
||||
{
|
||||
chpxPic->Convert(rPr);
|
||||
RELEASEOBJECT(rPr);
|
||||
}
|
||||
m_pXmlWriter->WriteString(OleWriter.GetXmlString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,5 +111,6 @@ namespace DocFileFormat
|
||||
bool _writeInstrText;
|
||||
unsigned int _fldCharCounter;
|
||||
IMapping* _caller;
|
||||
std::wstring _writeAfterRun;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user