+Math, +Media, +Settings
This commit is contained in:
Vikulov Dmitry
2022-11-22 21:14:38 +03:00
parent 2fe7f309af
commit 00d9ed438b
23 changed files with 5182 additions and 4194 deletions

View File

@ -34,6 +34,9 @@ namespace OOX
{
namespace Logic
{
COMathPara::COMathPara(OOX::Document *pMain) : WritingElementWithChilds<WritingElement>(pMain)
{
}
COMathPara::~COMathPara()
{
}
@ -53,5 +56,58 @@ namespace OOX
return sResult;
}
void COMathPara::fromXML(XmlUtils::CXmlNode& oNode)
{
XmlUtils::CXmlNodes oChilds;
if ( oNode.GetNodes( _T("*"), oChilds ) )
{
XmlUtils::CXmlNode oItem;
for ( int nIndex = 0; nIndex < oChilds.GetCount(); nIndex++ )
{
if ( oChilds.GetAt( nIndex, oItem ) )
{
std::wstring sName = oItem.GetName();
WritingElement *pItem = NULL;
if ( _T("w:r") == sName )
pItem = new CRun( oItem );
else if ( _T("m:oMath") == sName )
pItem = new COMath( oItem );
else if ( _T("m:oMathParaPr") == sName )
pItem = new COMathParaPr( oItem );
if ( pItem )
m_arrItems.push_back( pItem );
}
}
}
}
void COMathPara::fromXML(XmlUtils::CXmlLiteReader& oReader)
{
if ( oReader.IsEmptyNode() )
return;
int nCurDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nCurDepth ) )
{
std::wstring sName = oReader.GetName();
WritingElement *pItem = NULL;
if ( _T("m:oMath") == sName )
pItem = new COMath( oReader );
else if ( _T("m:oMathParaPr") == sName )
pItem = new COMathParaPr( oReader );
else if ( _T("w:r") == sName )
pItem = new CRun( oReader );
if ( pItem )
m_arrItems.push_back( pItem );
}
}
EElementType COMathPara::getType() const
{
return et_m_oMathPara;
}
}//namespace Logic
}//namespace OOX