Commit 21f7f6ed authored by ElenaSubbotina's avatar ElenaSubbotina

fix bug #36335

parent 80863ae2
......@@ -608,7 +608,7 @@ namespace NSPresentationEditor
{
if (bIsNamespace)
{
return _T("<a:prstGeom xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" prst=\"line\"><a:avLst/></a:prstGeom>");
return _T("<a:prstGeom xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" prst=\"ellipse\"><a:avLst/></a:prstGeom>");
}
return _T("<a:prstGeom prst=\"ellipse\"><a:avLst/></a:prstGeom>");
}
......
......@@ -60,9 +60,6 @@ namespace OOX
virtual ~CMathArgNodes()
{
}
public:
const CMathArgNodes &operator =(const XmlUtils::CXmlNode& oNode)
{
ClearItems();
......@@ -75,11 +72,8 @@ namespace OOX
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
return *this;
}
virtual void fromXML(XmlUtils::CXmlNode& oNode);
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
virtual std::wstring toXML() const
......
......@@ -39,6 +39,143 @@ namespace OOX
{
namespace Logic
{
void CMathArgNodes::fromXML(XmlUtils::CXmlNode& oNode)
{
sNodeName = oNode.GetName();
if(sNodeName == _T("m:deg"))
eType = et_m_deg;
else if (sNodeName == _T("m:den"))
eType = et_m_den;
else if (sNodeName == _T("m:e"))
eType = et_m_e;
else if (sNodeName == _T("m:fName"))
eType = et_m_fName;
else if (sNodeName == _T("m:lim"))
eType = et_m_lim;
else if (sNodeName == _T("m:num"))
eType = et_m_num;
else if (sNodeName == _T("m:oMath"))
eType = et_m_oMath;
else if (sNodeName == _T("m:sub"))
eType = et_m_sub;
else if (sNodeName == _T("m:sup"))
eType = et_m_sup;
else
eType = et_Unknown;
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("m:acc") == sName )
pItem = new OOX::Logic::CAcc( oItem );
else if ( _T("m:argPr") == sName )
pItem = new OOX::Logic::CArgPr( oItem );
else if ( _T("m:bar") == sName )
pItem = new OOX::Logic::CBar( oItem );
else if ( _T("w:bookmarkEnd") == sName )
pItem = new OOX::Logic::CBookmarkEnd( oItem );
else if ( _T("w:bookmarkStart") == sName )
pItem = new OOX::Logic::CBookmarkStart( oItem );
else if ( _T("m:borderBox") == sName )
pItem = new OOX::Logic::CBorderBox( oItem );
else if ( _T("m:box") == sName )
pItem = new OOX::Logic::CBox( oItem );
else if ( _T("w:commentRangeEnd") == sName )
pItem = new OOX::Logic::CCommentRangeEnd( oItem );
else if ( _T("w:commentRangeStart") == sName )
pItem = new OOX::Logic::CCommentRangeStart( oItem );
else if ( _T("m:ctrlPr") == sName )
pItem = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("w:customXmlDelRangeEnd") == sName )
pItem = new OOX::Logic::CCustomXmlDelRangeEnd( oItem );
else if ( _T("w:customXmlDelRangeStart") == sName )
pItem = new OOX::Logic::CCustomXmlDelRangeStart( oItem );
else if ( _T("w:customXmlInsRangeEnd") == sName )
pItem = new OOX::Logic::CCustomXmlInsRangeEnd( oItem );
else if ( _T("w:customXmlInsRangeStart") == sName )
pItem = new OOX::Logic::CCustomXmlInsRangeStart( oItem );
else if ( _T("w:customXmlMoveFromRangeEnd") == sName )
pItem = new OOX::Logic::CCustomXmlMoveFromRangeEnd( oItem );
else if ( _T("w:customXmlMoveFromRangeStart") == sName )
pItem = new OOX::Logic::CCustomXmlMoveFromRangeStart( oItem );
else if ( _T("w:customXmlMoveToRangeEnd") == sName )
pItem = new OOX::Logic::CCustomXmlMoveToRangeEnd( oItem );
else if ( _T("w:customXmlMoveToRangeStart") == sName )
pItem = new OOX::Logic::CCustomXmlMoveToRangeStart( oItem );
else if ( _T("m:d") == sName )
pItem = new OOX::Logic::CDelimiter( oItem );
else if ( _T("w:del") == sName )
pItem = new CDel( oItem );
else if ( _T("m:eqArr") == sName )
pItem = new OOX::Logic::CEqArr( oItem );
else if ( _T("m:f") == sName )
pItem = new OOX::Logic::CFraction( oItem );
else if ( _T("m:func") == sName )
pItem = new OOX::Logic::CFunc( oItem );
else if ( _T("m:groupChr") == sName )
pItem = new CGroupChr( oItem );
else if ( _T("w:ins") == sName )
pItem = new CIns( oItem );
else if ( _T("m:limLow") == sName )
pItem = new OOX::Logic::CLimLow( oItem );
else if ( _T("m:limUpp") == sName )
pItem = new OOX::Logic::CLimUpp( oItem );
else if ( _T("m:m") == sName )
pItem = new OOX::Logic::CMatrix( oItem );
else if ( _T("w:moveFrom") == sName )
pItem = new OOX::Logic::CMoveFrom( oItem );
else if ( _T("w:moveFromRangeEnd") == sName )
pItem = new OOX::Logic::CMoveFromRangeEnd( oItem );
else if ( _T("w:moveFromRangeStart") == sName )
pItem = new OOX::Logic::CMoveFromRangeStart( oItem );
else if ( _T("w:moveTo") == sName )
pItem = new CMoveTo( oItem );
else if ( _T("w:moveToRangeEnd") == sName )
pItem = new OOX::Logic::CMoveToRangeEnd( oItem );
else if ( _T("w:moveToRangeStart") == sName )
pItem = new OOX::Logic::CMoveToRangeStart( oItem );
else if ( _T("m:nary") == sName )
pItem = new OOX::Logic::CNary( oItem );
else if ( _T("m:oMath") == sName )
pItem = new OOX::Logic::COMath( oItem );
else if ( _T("m:oMathPara") == sName )
pItem = new OOX::Logic::COMathPara( oItem );
else if ( _T("w:permEnd") == sName )
pItem = new OOX::Logic::CPermEnd( oItem );
else if ( _T("w:permStart") == sName )
pItem = new OOX::Logic::CPermStart( oItem );
else if ( _T("m:phant") == sName )
pItem = new OOX::Logic::CPhant( oItem );
else if ( _T("w:proofErr") == sName )
pItem = new OOX::Logic::CProofErr( oItem );
else if ( _T("m:r") == sName )
pItem = new OOX::Logic::CMRun( oItem );
else if ( _T("m:rad") == sName )
pItem = new OOX::Logic::CRad( oItem );
else if ( _T("m:sPre") == sName )
pItem = new OOX::Logic::CSPre( oItem );
else if ( _T("m:sSub") == sName )
pItem = new OOX::Logic::CSSub( oItem );
else if ( _T("m:sSubSup") == sName )
pItem = new OOX::Logic::CSSubSup( oItem );
else if ( _T("m:sSup") == sName )
pItem = new OOX::Logic::CSSup( oItem );
if ( pItem )
m_arrItems.push_back( pItem );
}
}
}
}
void CMathArgNodes::fromXML(XmlUtils::CXmlLiteReader& oReader)
{
sNodeName = std::wstring(oReader.GetName().c_str());
......
......@@ -76,24 +76,45 @@ namespace OOX
CMathArgNodesEx(COMath, OOX::et_m_oMath)
CMathArgNodesEx(CSub, OOX::et_m_sub)
CMathArgNodesEx(CSup, OOX::et_m_sup)
//-------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
// CAcc 22.1.2.1 (Accent)
// CCtrlPr 22.1.2.23 (Control Properties)
//--------------------------------------------------------------------------------
class CAccPr;
class CAcc : public WritingElement
class CCtrlPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CAcc)
CAcc()
WritingElement_AdditionConstructors(CCtrlPr)
CCtrlPr()
{
}
virtual ~CAcc()
virtual ~CCtrlPr()
{
}
public:
virtual void 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:rP") == sName )
m_oRPr = new OOX::Logic::CRunProperty( oItem );
else if ( _T("a:rPr") == sName )
m_oARPr = new PPTX::Logic::RunProperties( oItem );
else if ( _T("w:ins") == sName )
m_oIns = new OOX::Logic::CRPrChange( oItem );
else if ( _T("w:del") == sName )
m_oDel = new OOX::Logic::CRPrChange( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -103,28 +124,54 @@ namespace OOX
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:accPr") == sName )
m_oAccPr = oReader;
else if ( _T("m:e") == sName )
m_oElement = oReader;
if ( _T("w:rPr") == sName )
m_oRPr = oReader;
else if ( _T("a:rPr") == sName )
{
std::wstring sXml = oReader.GetOuterXml();
XmlUtils::CXmlNode node;
node.FromXmlString(sXml);
m_oARPr = node;
}
else if ( _T("w:ins") == sName )
m_oIns = oReader;
else if ( _T("w:del") == sName )
m_oDel = oReader;
}
}
std::wstring toXML() const;
virtual std::wstring toXML() const
{
std::wstring sResult = _T("<m:ctrlPr>");
if ( m_oRPr.IsInit() )
sResult += m_oRPr->toXML();
if ( m_oARPr.IsInit() )
sResult += m_oARPr->toXML();
if ( m_oIns.IsInit() )
sResult += m_oIns->toXML();
if ( m_oDel.IsInit() )
sResult += m_oDel->toXML();
sResult += _T("</m:ctrlPr>");
return sResult;
}
virtual EElementType getType() const
{
return et_m_acc;
return et_m_ctrlPr;
}
public:
//Childs
nullable<OOX::Logic::CAccPr> m_oAccPr;
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CRunProperty> m_oRPr;
nullable<PPTX::Logic::RunProperties> m_oARPr;
nullable<OOX::Logic::CRPrChange> m_oIns;
nullable<OOX::Logic::CRPrChange> m_oDel;
};
//--------------------------------------------------------------------------------
// CAccPr 22.1.2.2 (Accent Properties)
//--------------------------------------------------------------------------------
class CCtrlPr;
class CAccPr : public WritingElement
{
public:
......@@ -139,6 +186,24 @@ namespace OOX
public:
virtual void 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("m:chr") == sName )
m_oChr = new OOX::Logic::CChr( oItem );
else if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -167,22 +232,40 @@ namespace OOX
};
//--------------------------------------------------------------------------------
// CArgPr 22.1.2.5 (Argument Properties)
// CAcc 22.1.2.1 (Accent)
//--------------------------------------------------------------------------------
class CArgPr : public WritingElement
class CAcc : public WritingElement
{
public:
WritingElement_AdditionConstructors(CArgPr)
CArgPr()
WritingElement_AdditionConstructors(CAcc)
CAcc()
{
}
virtual ~CArgPr()
virtual ~CAcc()
{
}
public:
virtual void 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("m:accPr") == sName )
m_oAccPr = new OOX::Logic::CAccPr( oItem );
else if ( _T("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -192,50 +275,57 @@ namespace OOX
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:argSz") == sName )
m_oArgSz = oReader;
}
if ( _T("m:accPr") == sName )
m_oAccPr = oReader;
else if ( _T("m:e") == sName )
m_oElement = oReader;
}
virtual std::wstring toXML() const
{
std::wstring sResult = _T("<m:argPr>");
if ( m_oArgSz.IsInit() )
sResult += m_oArgSz->toXML();
sResult += _T("</m:argPr>");
return sResult;
}
std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_argPr;
return et_m_acc;
}
public:
//Childs
nullable<OOX::Logic::CArgSz> m_oArgSz;
nullable<OOX::Logic::CAccPr> m_oAccPr;
nullable<OOX::Logic::CElement> m_oElement;
};
//--------------------------------------------------------------------------------
// CBar 22.1.2.7 (Bar)
// CArgPr 22.1.2.5 (Argument Properties)
//--------------------------------------------------------------------------------
class CBarPr;
class CBar : public WritingElement
class CArgPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CBar)
CBar()
WritingElement_AdditionConstructors(CArgPr)
CArgPr()
{
}
virtual ~CBar()
virtual ~CArgPr()
{
}
public:
virtual void 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("m:argSz") == sName )
m_oArgSz = new OOX::Logic::CArgSz( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -245,24 +335,32 @@ namespace OOX
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:barPr") == sName )
m_oBarPr = oReader;
else if ( _T("m:e") == sName )
m_oElement = oReader;
if ( _T("m:argSz") == sName )
m_oArgSz = oReader;
}
}
virtual std::wstring toXML() const;
virtual std::wstring toXML() const
{
std::wstring sResult = _T("<m:argPr>");
if ( m_oArgSz.IsInit() )
sResult += m_oArgSz->toXML();
sResult += _T("</m:argPr>");
return sResult;
}
virtual EElementType getType() const
{
return et_m_bar;
return et_m_argPr;
}
public:
//Childs
nullable<OOX::Logic::CBarPr> m_oBarPr;
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CArgSz> m_oArgSz;
};
//--------------------------------------------------------------------------------
// CBarPr 22.1.2.8 (Bar Properties)
//--------------------------------------------------------------------------------
......@@ -276,10 +374,27 @@ namespace OOX
virtual ~CBarPr()
{
}
public:
virtual void 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("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("m:pos") == sName )
m_oPos = new OOX::Logic::CPos( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -308,23 +423,39 @@ namespace OOX
};
//--------------------------------------------------------------------------------
// CBorderBox 22.1.2.11 (Border-Box Object)
// CBar 22.1.2.7 (Bar)
//--------------------------------------------------------------------------------
class CBorderBoxPr;
class CBorderBox : public WritingElement
class CBar : public WritingElement
{
public:
WritingElement_AdditionConstructors(CBorderBox)
CBorderBox()
WritingElement_AdditionConstructors(CBar)
CBar()
{
}
virtual ~CBorderBox()
virtual ~CBar()
{
}
public:
virtual void 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("m:barPr") == sName )
m_oBarPr = new OOX::Logic::CBarPr( oItem );
else if ( _T("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -334,8 +465,8 @@ namespace OOX
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:borderBoxPr") == sName )
m_oBorderBoxPr = oReader;
if ( _T("m:barPr") == sName )
m_oBarPr = oReader;
else if ( _T("m:e") == sName )
m_oElement = oReader;
}
......@@ -344,14 +475,14 @@ namespace OOX
virtual EElementType getType() const
{
return et_m_borderBox;
return et_m_bar;
}
public:
// Childs
nullable<OOX::Logic::CBorderBoxPr> m_oBorderBoxPr;
//Childs
nullable<OOX::Logic::CBarPr> m_oBarPr;
nullable<OOX::Logic::CElement> m_oElement;
};
};
//--------------------------------------------------------------------------------
// CBorderBoxPr 22.1.2.12 (Border-Box Properties)
//--------------------------------------------------------------------------------
......@@ -365,10 +496,41 @@ namespace OOX
virtual ~CBorderBoxPr()
{
}
public:
virtual void 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("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("m:hideBot") == sName )
m_oHideBot = new OOX::Logic::CHideBot( oItem );
else if ( _T("m:hideLeft") == sName )
m_oHideLeft = new OOX::Logic::CHideLeft( oItem );
else if ( _T("m:hideRight") == sName )
m_oHideRight = new OOX::Logic::CHideRight( oItem );
else if ( _T("m:hideTop") == sName )
m_oHideTop = new OOX::Logic::CHideTop( oItem );
else if ( _T("m:strikeBLTR") == sName )
m_oStrikeBLTR = new OOX::Logic::CStrikeBLTR( oItem );
else if ( _T("m:strikeH") == sName )
m_oStrikeH = new OOX::Logic::CStrikeH( oItem );
else if ( _T("m:strikeTLBR") == sName )
m_oStrikeTLBR = new OOX::Logic::CStrikeTLBR( oItem );
else if ( _T("m:strikeV") == sName )
m_oStrikeV = new OOX::Logic::CStrikeV( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -417,68 +579,39 @@ namespace OOX
nullable<OOX::Logic::CStrikeV> m_oStrikeV;
};
//--------------------------------------------------------------------------------
// CBox 22.1.2.13 (Box Object)
// CBorderBox 22.1.2.11 (Border-Box Object)
//--------------------------------------------------------------------------------
class CBoxPr;
class CBox : public WritingElement
class CBorderBox : public WritingElement
{
public:
WritingElement_AdditionConstructors(CBox)
CBox()
WritingElement_AdditionConstructors(CBorderBox)
CBorderBox()
{
}
virtual ~CBox()
virtual ~CBorderBox()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
XmlUtils::CXmlNodes oChilds;
if ( oNode.GetNodes( _T("*"), oChilds ) )
{
if ( oReader.IsEmptyNode() )
return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
XmlUtils::CXmlNode oItem;
for ( int nIndex = 0; nIndex < oChilds.GetCount(); nIndex++ )
{
std::wstring sName = oReader.GetName();
if ( _T("m:boxPr") == sName )
m_oBoxPr = oReader;
else if ( _T("m:e") == sName )
m_oElement = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
if ( oChilds.GetAt( nIndex, oItem ) )
{
return et_m_box;
}
public:
// Childs
nullable<OOX::Logic::CBoxPr> m_oBoxPr;
nullable<OOX::Logic::CElement> m_oElement;
};
std::wstring sName = oItem.GetName();
WritingElement *pItem = NULL;
if ( _T("m:borderBoxPr") == sName )
m_oBorderBoxPr = new OOX::Logic::CBorderBoxPr( oItem );
else if ( _T("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
//--------------------------------------------------------------------------------
// CBoxPr 22.1.2.14 (Box Properties)
//--------------------------------------------------------------------------------
class CBrk;
class CBoxPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CBoxPr)
CBoxPr()
{
}
virtual ~CBoxPr()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -488,37 +621,23 @@ namespace OOX
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:aln") == sName )
m_oAln = oReader;
else if ( _T("m:brk") == sName )
m_oBrk = oReader;
else if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = oReader;
else if ( _T("m:diff") == sName )
m_oDiff = oReader;
else if ( _T("m:noBreak") == sName )
m_oNoBreak = oReader;
else if ( _T("m:opEmu") == sName )
m_oOpEmu = oReader;
if ( _T("m:borderBoxPr") == sName )
m_oBorderBoxPr = oReader;
else if ( _T("m:e") == sName )
m_oElement = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_boxPr;
return et_m_borderBox;
}
public:
// Childs
nullable<OOX::Logic::CAln> m_oAln;
nullable<OOX::Logic::CBrk> m_oBrk;
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
nullable<OOX::Logic::CDiff> m_oDiff;
nullable<OOX::Logic::CNoBreak> m_oNoBreak;
nullable<OOX::Logic::COpEmu> m_oOpEmu;
nullable<OOX::Logic::CBorderBoxPr> m_oBorderBoxPr;
nullable<OOX::Logic::CElement> m_oElement;
};
//--------------------------------------------------------------------------------
// CBrk 22.1.2.15 (Break)
//--------------------------------------------------------------------------------
......@@ -532,8 +651,6 @@ namespace OOX
virtual ~CBrk()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
oNode.ReadAttributeBase( _T("m:alnAt"), m_alnAt );
......@@ -571,24 +688,48 @@ namespace OOX
// Attr
nullable<SimpleTypes::CInteger255<>> m_alnAt;
};
//--------------------------------------------------------------------------------
// CCtrlPr 22.1.2.23 (Control Properties)
// CBoxPr 22.1.2.14 (Box Properties)
//--------------------------------------------------------------------------------
class CCtrlPr : public WritingElement
class CBoxPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CCtrlPr)
CCtrlPr()
WritingElement_AdditionConstructors(CBoxPr)
CBoxPr()
{
}
virtual ~CCtrlPr()
virtual ~CBoxPr()
{
}
public:
virtual void 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("m:aln") == sName )
m_oAln = new OOX::Logic::CAln( oItem );
else if ( _T("m:brk") == sName )
m_oBrk = new OOX::Logic::CBrk( oItem );
else if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("m:diff") == sName )
m_oDiff = new OOX::Logic::CDiff( oItem );
else if ( _T("m:noBreak") == sName )
m_oNoBreak = new OOX::Logic::CNoBreak( oItem );
else if ( _T("m:opEmu") == sName )
m_oOpEmu = new OOX::Logic::COpEmu( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -598,51 +739,97 @@ namespace OOX
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("w:rPr") == sName )
m_oRPr = oReader;
else if ( _T("a:rPr") == sName )
{
std::wstring sXml = oReader.GetOuterXml();
XmlUtils::CXmlNode node;
node.FromXmlString(sXml);
if ( _T("m:aln") == sName )
m_oAln = oReader;
else if ( _T("m:brk") == sName )
m_oBrk = oReader;
else if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = oReader;
else if ( _T("m:diff") == sName )
m_oDiff = oReader;
else if ( _T("m:noBreak") == sName )
m_oNoBreak = oReader;
else if ( _T("m:opEmu") == sName )
m_oOpEmu = oReader;
}
}
virtual std::wstring toXML() const;
m_oARPr = node;
virtual EElementType getType() const
{
return et_m_boxPr;
}
else if ( _T("w:ins") == sName )
m_oIns = oReader;
else if ( _T("w:del") == sName )
m_oDel = oReader;
public:
// Childs
nullable<OOX::Logic::CAln> m_oAln;
nullable<OOX::Logic::CBrk> m_oBrk;
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
nullable<OOX::Logic::CDiff> m_oDiff;
nullable<OOX::Logic::CNoBreak> m_oNoBreak;
nullable<OOX::Logic::COpEmu> m_oOpEmu;
};
//--------------------------------------------------------------------------------
// CBox 22.1.2.13 (Box Object)
//--------------------------------------------------------------------------------
class CBox : public WritingElement
{
public:
WritingElement_AdditionConstructors(CBox)
CBox()
{
}
virtual ~CBox()
{
}
virtual std::wstring toXML() const
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
std::wstring sResult = _T("<m:ctrlPr>");
if ( m_oRPr.IsInit() )
sResult += m_oRPr->toXML();
if ( m_oARPr.IsInit() )
sResult += m_oARPr->toXML();
if ( m_oIns.IsInit() )
sResult += m_oIns->toXML();
if ( m_oDel.IsInit() )
sResult += m_oDel->toXML();
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;
sResult += _T("</m:ctrlPr>");
if ( _T("m:boxPr") == sName )
m_oBoxPr = new OOX::Logic::CBoxPr( oItem );
else if ( _T("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
return sResult;
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
if ( oReader.IsEmptyNode() )
return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:boxPr") == sName )
m_oBoxPr = oReader;
else if ( _T("m:e") == sName )
m_oElement = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_ctrlPr;
return et_m_box;
}
public:
//Childs
nullable<OOX::Logic::CRunProperty> m_oRPr;
nullable<PPTX::Logic::RunProperties> m_oARPr;
nullable<OOX::Logic::CRPrChange> m_oIns;
nullable<OOX::Logic::CRPrChange> m_oDel;
// Childs
nullable<OOX::Logic::CBoxPr> m_oBoxPr;
nullable<OOX::Logic::CElement> m_oElement;
};
//--------------------------------------------------------------------------------
// CDelimiterPr 22.1.2.31 (Delimiter Properties)
//--------------------------------------------------------------------------------
......@@ -656,10 +843,35 @@ namespace OOX
virtual ~CDelimiterPr()
{
}
public:
virtual void 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("m:begChr") == sName )
m_oBegChr = new OOX::Logic::CBegChr( oItem );
else if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("m:endChr") == sName )
m_oEndChr = new OOX::Logic::CEndChr( oItem );
else if ( _T("m:grow") == sName )
m_oGrow = new OOX::Logic::CGrow( oItem );
else if ( _T("m:sepChr") == sName )
m_oSepChr = new OOX::Logic::CSepChr( oItem );
else if ( _T("m:shp") == sName )
m_oShp = new OOX::Logic::CShp( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -732,18 +944,45 @@ namespace OOX
WritingElement_AdditionConstructors(CDelimiter)
CDelimiter()
{
m_lColumn = 0;
}
virtual ~CDelimiter()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
m_lColumn = 0;
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("m:dPr") == sName )
pItem = new CDelimiterPr( oItem );
else if ( _T("m:e") == sName )
{
pItem = new CElement( oItem );
//нужно заранее знать колисество столбцов для отрисовки
m_lColumn++;
}
if ( pItem )
m_arrItems.push_back( pItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
m_lColumn = 0;
if ( oReader.IsEmptyNode() )
return;
......@@ -804,10 +1043,34 @@ namespace OOX
virtual ~CEqArrPr()
{
}
public:
virtual void 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("m:baseJc") == sName )
m_oBaseJc = new OOX::Logic::CBaseJc( oItem );
else if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("m:maxDist") == sName )
m_oMaxDist = new OOX::Logic::CMaxDist( oItem );
else if ( _T("m:objDist") == sName )
m_oObjDist = new OOX::Logic::CObjDist( oItem );
else if ( _T("m:rSp") == sName )
m_oRSp = new OOX::Logic::CRSp( oItem );
else if ( _T("m:rSpRule") == sName )
m_oRSpRule = new OOX::Logic::CRSpRule( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -880,21 +1143,42 @@ namespace OOX
WritingElement_AdditionConstructors(CEqArr)
CEqArr()
{
m_lRow = 0;
}
virtual ~CEqArr()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
m_lRow = 0;
if ( oReader.IsEmptyNode() )
return;
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("m:eqArrPr") == sName )
pItem = new CEqArrPr( oItem );
else if ( _T("m:e") == sName )
pItem = new CElement( oItem );
if ( pItem )
m_arrItems.push_back( pItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
m_lRow = 0;
if ( oReader.IsEmptyNode() )
return;
int nCurDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nCurDepth ) )
{
......@@ -908,11 +1192,8 @@ namespace OOX
pItem = new CElement( oReader );
m_lRow++;
}
if ( pItem )
m_arrItems.push_back( pItem );
}
}
virtual std::wstring toXML() const
......@@ -941,70 +1222,38 @@ namespace OOX
LONG m_lRow;
};
//--------------------------------------------------------------------------------
// CFraction 22.1.2.36 (Fraction Object)
// CFPr 22.1.2.38 (Fraction Properties)
//--------------------------------------------------------------------------------
class CFPr;
class CFraction : public WritingElement
class CFPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CFraction)
CFraction()
WritingElement_AdditionConstructors(CFPr)
CFPr()
{
}
virtual ~CFraction()
virtual ~CFPr()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
XmlUtils::CXmlNodes oChilds;
if ( oNode.GetNodes( _T("*"), oChilds ) )
{
if ( oReader.IsEmptyNode() )
return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
XmlUtils::CXmlNode oItem;
for ( int nIndex = 0; nIndex < oChilds.GetCount(); nIndex++ )
{
std::wstring sName = oReader.GetName();
if ( _T("m:den") == sName )
m_oDen = oReader;
else if ( _T("m:fPr") == sName )
m_oFPr = oReader;
else if ( _T("m:num") == sName )
m_oNum = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
if ( oChilds.GetAt( nIndex, oItem ) )
{
return et_m_f;
}
public:
//Childs
nullable<OOX::Logic::CDen> m_oDen;
nullable<OOX::Logic::CFPr> m_oFPr;
nullable<OOX::Logic::CNum> m_oNum;
};
std::wstring sName = oItem.GetName();
WritingElement *pItem = NULL;
//--------------------------------------------------------------------------------
// CFPr 22.1.2.38 (Fraction Properties)
//--------------------------------------------------------------------------------
class CFPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CFPr)
CFPr()
{
if ( _T("m:type") == sName )
m_oType = new OOX::Logic::CType( oItem );
else if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
}
}
virtual ~CFPr()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1039,29 +1288,45 @@ namespace OOX
{
return et_m_fPr;
}
public:
//Childs
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
nullable<OOX::Logic::CType> m_oType;
};
//--------------------------------------------------------------------------------
// CFunc 22.1.2.39 (Function Apply Object)
// CFraction 22.1.2.36 (Fraction Object)
//--------------------------------------------------------------------------------
class CFuncPr;
class CFunc : public WritingElement
class CFraction : public WritingElement
{
public:
WritingElement_AdditionConstructors(CFunc)
CFunc()
WritingElement_AdditionConstructors(CFraction)
CFraction()
{
}
virtual ~CFunc()
virtual ~CFraction()
{
}
public:
virtual void 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("m:den") == sName )
m_oDen = new OOX::Logic::CDen( oItem );
else if ( _T("m:fPr") == sName )
m_oFPr = new OOX::Logic::CFPr( oItem );
else if ( _T("m:num") == sName )
m_oNum = new OOX::Logic::CNum( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1071,25 +1336,25 @@ namespace OOX
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:e") == sName )
m_oElement = oReader;
else if ( _T("m:fName") == sName )
m_oFName = oReader;
else if ( _T("m:funcPr") == sName )
m_oFuncPr = oReader;
if ( _T("m:den") == sName )
m_oDen = oReader;
else if ( _T("m:fPr") == sName )
m_oFPr = oReader;
else if ( _T("m:num") == sName )
m_oNum = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_func;
return et_m_f;
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CFName> m_oFName;
nullable<OOX::Logic::CFuncPr> m_oFuncPr;
nullable<OOX::Logic::CDen> m_oDen;
nullable<OOX::Logic::CFPr> m_oFPr;
nullable<OOX::Logic::CNum> m_oNum;
};
//--------------------------------------------------------------------------------
// CFuncPr 22.1.2.40 (Function Properties)
......@@ -1104,10 +1369,24 @@ namespace OOX
virtual ~CFuncPr()
{
}
public:
virtual void 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("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1137,28 +1416,44 @@ namespace OOX
{
return et_m_funcPr;
}
public:
//Childs
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
};
//--------------------------------------------------------------------------------
// CGroupChr 22.1.2.41 (Group-Character Object)
// CFunc 22.1.2.39 (Function Apply Object)
//--------------------------------------------------------------------------------
class CGroupChrPr;
class CGroupChr : public WritingElement
class CFunc : public WritingElement
{
public:
WritingElement_AdditionConstructors(CGroupChr)
CGroupChr()
WritingElement_AdditionConstructors(CFunc)
CFunc()
{
}
virtual ~CGroupChr()
virtual ~CFunc()
{
}
public:
virtual void 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("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
else if ( _T("m:fName") == sName )
m_oFName = new OOX::Logic::CFName( oItem );
else if ( _T("m:funcPr") == sName )
m_oFuncPr = new OOX::Logic::CFuncPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1170,22 +1465,23 @@ namespace OOX
std::wstring sName = oReader.GetName();
if ( _T("m:e") == sName )
m_oElement = oReader;
else if ( _T("m:groupChrPr") == sName )
m_oGroupChrPr = oReader;
else if ( _T("m:fName") == sName )
m_oFName = oReader;
else if ( _T("m:funcPr") == sName )
m_oFuncPr = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_groupChr;
return et_m_func;
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CGroupChrPr> m_oGroupChrPr;
nullable<OOX::Logic::CFName> m_oFName;
nullable<OOX::Logic::CFuncPr> m_oFuncPr;
};
//--------------------------------------------------------------------------------
// CGroupChrPr 22.1.2.42 (Group-Character Properties )
//--------------------------------------------------------------------------------
......@@ -1203,6 +1499,28 @@ namespace OOX
public:
virtual void 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("m:chr") == sName )
m_oChr = new OOX::Logic::CChr( oItem );
else if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("m:pos") == sName )
m_oPos = new OOX::Logic::CPos( oItem );
else if ( _T("m:vertJc") == sName )
m_oVertJc = new OOX::Logic::CVertJc( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1256,23 +1574,40 @@ namespace OOX
};
//--------------------------------------------------------------------------------
// CLimLow 22.1.2.54 (Lower-Limit Object)
// CGroupChr 22.1.2.41 (Group-Character Object)
//--------------------------------------------------------------------------------
class CLimLowPr;
class CLimLow : public WritingElement
class CGroupChr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CLimLow)
CLimLow()
WritingElement_AdditionConstructors(CGroupChr)
CGroupChr()
{
}
virtual ~CLimLow()
virtual ~CGroupChr()
{
}
public:
virtual void 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("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
else if ( _T("m:groupChrPr") == sName )
m_oGroupChrPr = new OOX::Logic::CGroupChrPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1284,24 +1619,22 @@ namespace OOX
std::wstring sName = oReader.GetName();
if ( _T("m:e") == sName )
m_oElement = oReader;
else if ( _T("m:lim") == sName )
m_oLim = oReader;
else if ( _T("m:limLowPr") == sName )
m_oLimLowPr = oReader;
else if ( _T("m:groupChrPr") == sName )
m_oGroupChrPr = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_limLow;
return et_m_groupChr;
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CLim> m_oLim;
nullable<OOX::Logic::CLimLowPr> m_oLimLowPr;
nullable<OOX::Logic::CGroupChrPr> m_oGroupChrPr;
};
//--------------------------------------------------------------------------------
// CLimLowPr 22.1.2.55 (Lower-Limit Properties)
//--------------------------------------------------------------------------------
......@@ -1316,9 +1649,24 @@ namespace OOX
{
}
public:
virtual void 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("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1348,28 +1696,45 @@ namespace OOX
{
return et_m_limLowPr;
}
public:
//Childs
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
};
//--------------------------------------------------------------------------------
// CLimUpp 22.1.2.56 (Upper-Limit Object)
// CLimLow 22.1.2.54 (Lower-Limit Object)
//--------------------------------------------------------------------------------
class CLimUppPr;
class CLimUpp : public WritingElement
class CLimLow : public WritingElement
{
public:
WritingElement_AdditionConstructors(CLimUpp)
CLimUpp()
WritingElement_AdditionConstructors(CLimLow)
CLimLow()
{
}
virtual ~CLimUpp()
virtual ~CLimLow()
{
}
public:
virtual void 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("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
else if ( _T("m:lim") == sName )
m_oLim = new OOX::Logic::CLim( oItem );
else if ( _T("m:limLowPr") == sName )
m_oLimLowPr = new OOX::Logic::CLimLowPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1383,21 +1748,21 @@ namespace OOX
m_oElement = oReader;
else if ( _T("m:lim") == sName )
m_oLim = oReader;
else if ( _T("m:limUppPr") == sName )
m_oLimUppPr = oReader;
else if ( _T("m:limLowPr") == sName )
m_oLimLowPr = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_limUpp;
return et_m_limLow;
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CLim> m_oLim;
nullable<OOX::Logic::CLimUppPr> m_oLimUppPr;
nullable<OOX::Logic::CLimLowPr> m_oLimLowPr;
};
//--------------------------------------------------------------------------------
// CLimUppPr 22.1.2.57 (Upper-Limit Properties)
......@@ -1413,9 +1778,24 @@ namespace OOX
{
}
public:
virtual void 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("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1449,7 +1829,72 @@ namespace OOX
//Childs
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
};
//--------------------------------------------------------------------------------
// CLimUpp 22.1.2.56 (Upper-Limit Object)
//--------------------------------------------------------------------------------
class CLimUpp : public WritingElement
{
public:
WritingElement_AdditionConstructors(CLimUpp)
CLimUpp()
{
}
virtual ~CLimUpp()
{
}
public:
virtual void 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("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
else if ( _T("m:lim") == sName )
m_oLim = new OOX::Logic::CLim( oItem );
else if ( _T("m:limUppPr") == sName )
m_oLimUppPr = new OOX::Logic::CLimUppPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
if ( oReader.IsEmptyNode() )
return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:e") == sName )
m_oElement = oReader;
else if ( _T("m:lim") == sName )
m_oLim = oReader;
else if ( _T("m:limUppPr") == sName )
m_oLimUppPr = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_limUpp;
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CLim> m_oLim;
nullable<OOX::Logic::CLimUppPr> m_oLimUppPr;
};
//--------------------------------------------------------------------------------
// CMathFont 22.1.2.61 (Math Font)
//--------------------------------------------------------------------------------
......@@ -1463,8 +1908,6 @@ namespace OOX
virtual ~CMathFont()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
oNode.ReadAttributeBase( _T("m:val"), m_val );
......@@ -1483,7 +1926,6 @@ namespace OOX
sResult += _T("\" />");
return sResult;
}
virtual EElementType getType() const
{
return et_m_mathFont;
......@@ -1517,9 +1959,57 @@ namespace OOX
{
}
public:
virtual void 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("m:brkBin") == sName )
pItem = new Logic::CBrkBin( oItem );
else if ( _T("m:brkBinSub") == sName )
pItem = new CBrkBinSub( oItem );
else if ( _T("m:defJc") == sName )
pItem = new CDefJc( oItem );
else if ( _T("w:dispDef") == sName )
pItem = new CDispDef( oItem );
else if ( _T("w:interSp") == sName )
pItem = new CInterSp( oItem );
else if ( _T("m:intLim") == sName )
pItem = new CIntLim( oItem );
else if ( _T("m:intraSp") == sName )
pItem = new CIntraSp( oItem );
else if ( _T("m:lMargin") == sName )
pItem = new CLMargin( oItem );
else if ( _T("m:mathFont") == sName )
pItem = new CMathFont( oItem );
else if ( _T("m:naryLim") == sName )
pItem = new CNaryLim( oItem );
else if ( _T("m:postSp") == sName )
pItem = new CPostSp( oItem );
else if ( _T("m:preSp") == sName )
pItem = new CPreSp( oItem );
else if ( _T("m:rMargin") == sName )
pItem = new CRMargin( oItem );
else if ( _T("m:smallFrac") == sName )
pItem = new CSmallFrac( oItem );
else if ( _T("m:wrapIndent") == sName )
pItem = new CWrapIndent( oItem );
else if ( _T("m:wrapRight") == sName )
pItem = new CWrapRight( oItem );
if ( pItem )
m_arrItems.push_back( pItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1595,63 +2085,40 @@ namespace OOX
// Childs
};
//--------------------------------------------------------------------------------
// CMc 22.1.2.64 (Matrix Column)
// CMcPr 22.1.2.66 (Matrix Column Properties)
//--------------------------------------------------------------------------------
class CMcPr;
class CMc : public WritingElement
class CMcPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CMc)
CMc()
WritingElement_AdditionConstructors(CMcPr)
CMcPr()
{
}
virtual ~CMc()
virtual ~CMcPr()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
XmlUtils::CXmlNodes oChilds;
if ( oNode.GetNodes( _T("*"), oChilds ) )
{
if ( oReader.IsEmptyNode() )
return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
XmlUtils::CXmlNode oItem;
for ( int nIndex = 0; nIndex < oChilds.GetCount(); nIndex++ )
{
std::wstring sName = oReader.GetName();
if ( _T("m:mcPr") == sName )
m_oMcPr = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
if ( oChilds.GetAt( nIndex, oItem ) )
{
return et_m_mc;
std::wstring sName = oItem.GetName();
WritingElement *pItem = NULL;
if ( _T("m:count") == sName )
m_oCount = new OOX::Logic::CCount( oItem );
else if ( _T("m:mcJc") == sName )
m_oMcJc = new OOX::Logic::CMcJc( oItem );
}
public:
//Childs
nullable<OOX::Logic::CMcPr> m_oMcPr;
};
//--------------------------------------------------------------------------------
// CMcPr 22.1.2.66 (Matrix Column Properties)
//--------------------------------------------------------------------------------
class CMcPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CMcPr)
CMcPr()
{
}
virtual ~CMcPr()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1692,6 +2159,59 @@ namespace OOX
nullable<OOX::Logic::CMcJc> m_oMcJc;
};
//--------------------------------------------------------------------------------
// CMc 22.1.2.64 (Matrix Column)
//--------------------------------------------------------------------------------
class CMc : public WritingElement
{
public:
WritingElement_AdditionConstructors(CMc)
CMc()
{
}
virtual ~CMc()
{
}
virtual void 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("m:mcPr") == sName )
m_oMcPr = new OOX::Logic::CMcPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
if ( oReader.IsEmptyNode() )
return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:mcPr") == sName )
m_oMcPr = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_mc;
}
//Childs
nullable<OOX::Logic::CMcPr> m_oMcPr;
};
//--------------------------------------------------------------------------------
// CMcs 22.1.2.67 (Matrix Columns)
//--------------------------------------------------------------------------------
class CMcs : public WritingElementWithChilds<>
......@@ -1705,9 +2225,27 @@ namespace OOX
{
}
public:
virtual void 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("m:mc") == sName )
pItem = new Logic::CMc( oItem );
if ( pItem )
m_arrItems.push_back( pItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1775,6 +2313,38 @@ namespace OOX
public:
virtual void 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("m:baseJc") == sName )
m_oBaseJc = new OOX::Logic::CBaseJc( oItem );
else if ( _T("m:cGp") == sName )
m_oCGp = new OOX::Logic::CCGp( oItem );
else if ( _T("m:cGpRule") == sName )
m_oCGpRule = new OOX::Logic::CCGpRule( oItem );
else if ( _T("m:cSp") == sName )
m_oCSp = new OOX::Logic::CCSp( oItem );
else if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("m:mcs") == sName )
m_oMcs = new OOX::Logic::CMcs( oItem );
else if ( _T("m:plcHide") == sName )
m_oPlcHide = new OOX::Logic::CPlcHide( oItem );
else if ( _T("m:rSp") == sName )
m_oRSp = new OOX::Logic::CRSp( oItem );
else if ( _T("m:rSpRule") == sName )
m_oRSpRule = new OOX::Logic::CRSpRule( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -1859,16 +2429,39 @@ namespace OOX
WritingElement_AdditionConstructors(CMr)
CMr()
{
m_lCol = 0;
}
virtual ~CMr()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
m_lCol = 0;
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("m:e") == sName )
{
pItem = new Logic::CElement( oItem );
m_lCol++;
}
if ( pItem )
m_arrItems.push_back( pItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
if ( oReader.IsEmptyNode() )
......@@ -1930,27 +2523,48 @@ namespace OOX
WritingElement_AdditionConstructors(CMatrix)
CMatrix()
{
m_lRow = 0;
}
virtual ~CMatrix()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
m_lRow = 0;
if ( oReader.IsEmptyNode() )
return;
int nCurDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nCurDepth ) )
XmlUtils::CXmlNodes oChilds;
if ( oNode.GetNodes( _T("*"), oChilds ) )
{
std::wstring sName = oReader.GetName();
WritingElement *pItem = NULL;
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("m:mPr") == sName )
pItem = new CMPr( oItem );
else if ( _T("m:mr") == sName )
{
pItem = new CMr( oItem );
m_lRow++;
}
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
m_lRow = 0;
if ( oReader.IsEmptyNode() )
return;
int nCurDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nCurDepth ) )
{
std::wstring sName = oReader.GetName();
WritingElement *pItem = NULL;
if ( _T("m:mPr") == sName )
pItem = new CMPr( oReader );
......@@ -1986,77 +2600,50 @@ namespace OOX
{
return et_m_m;
}
public:
// Childs
LONG m_lRow;
};
//--------------------------------------------------------------------------------
// CNary 22.1.2.70 (n-ary Operator Object)
// CNaryPr 22.1.2.72 (n-ary Properties)
//--------------------------------------------------------------------------------
class CNaryPr;
class CNary : public WritingElement
class CNaryPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CNary)
CNary()
WritingElement_AdditionConstructors(CNaryPr)
CNaryPr()
{
}
virtual ~CNary()
virtual ~CNaryPr()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
XmlUtils::CXmlNodes oChilds;
if ( oNode.GetNodes( _T("*"), oChilds ) )
{
if ( oReader.IsEmptyNode() )
return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
XmlUtils::CXmlNode oItem;
for ( int nIndex = 0; nIndex < oChilds.GetCount(); nIndex++ )
{
std::wstring sName = oReader.GetName();
if ( _T("m:e") == sName )
m_oElement = oReader;
else if ( _T("m:naryPr") == sName )
m_oNaryPr = oReader;
else if ( _T("m:sub") == sName )
m_oSub = oReader;
else if ( _T("m:sup") == sName )
m_oSup = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
if ( oChilds.GetAt( nIndex, oItem ) )
{
return et_m_nary;
std::wstring sName = oItem.GetName();
WritingElement *pItem = NULL;
if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("m:chr") == sName )
m_oChr = new OOX::Logic::CChr( oItem );
else if ( _T("m:grow") == sName )
m_oGrow = new OOX::Logic::CGrow( oItem );
else if ( _T("m:limLoc") == sName )
m_oLimLoc = new OOX::Logic::CLimLoc( oItem );
else if ( _T("m:subHide") == sName )
m_oSubHide = new OOX::Logic::CSubHide( oItem );
else if ( _T("m:supHide") == sName )
m_oSupHide = new OOX::Logic::CSupHide( oItem );
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CNaryPr> m_oNaryPr;
nullable<OOX::Logic::CSub> m_oSub;
nullable<OOX::Logic::CSup> m_oSup;
};
//--------------------------------------------------------------------------------
// CNaryPr 22.1.2.72 (n-ary Properties)
//--------------------------------------------------------------------------------
class CNaryPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CNaryPr)
CNaryPr()
{
}
virtual ~CNaryPr()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2111,7 +2698,6 @@ namespace OOX
{
return et_m_naryPr;
}
public:
//Childs
nullable<OOX::Logic::CChr> m_oChr;
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
......@@ -2121,6 +2707,74 @@ namespace OOX
nullable<OOX::Logic::CSupHide> m_oSupHide;
};
//--------------------------------------------------------------------------------
// CNary 22.1.2.70 (n-ary Operator Object)
//--------------------------------------------------------------------------------
class CNary : public WritingElement
{
public:
WritingElement_AdditionConstructors(CNary)
CNary()
{
}
virtual ~CNary()
{
}
virtual void 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("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
else if ( _T("m:naryPr") == sName )
m_oNaryPr = new OOX::Logic::CNaryPr( oItem );
else if ( _T("m:sub") == sName )
m_oSub = new OOX::Logic::CSub( oItem );
else if ( _T("m:sup") == sName )
m_oSup = new OOX::Logic::CSup( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
if ( oReader.IsEmptyNode() )
return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:e") == sName )
m_oElement = oReader;
else if ( _T("m:naryPr") == sName )
m_oNaryPr = oReader;
else if ( _T("m:sub") == sName )
m_oSub = oReader;
else if ( _T("m:sup") == sName )
m_oSup = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_nary;
}
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CNaryPr> m_oNaryPr;
nullable<OOX::Logic::CSub> m_oSub;
nullable<OOX::Logic::CSup> m_oSup;
};
//--------------------------------------------------------------------------------
// COMathParaPr 22.1.2.79
//--------------------------------------------------------------------------------
class COMathParaPr : public WritingElement
......@@ -2134,9 +2788,24 @@ namespace OOX
{
}
public:
virtual void 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("m:jc") == sName )
m_oMJc = new OOX::Logic::CMJc( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2167,15 +2836,115 @@ namespace OOX
{
return et_m_oMathParaPr;
}
//Childs
nullable<OOX::Logic::CMJc> m_oMJc;
};
//--------------------------------------------------------------------------------
// CPhantPr 22.1.2.82 (Phantom Properties)
//--------------------------------------------------------------------------------
class CPhantPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CPhantPr)
CPhantPr()
{
}
virtual ~CPhantPr()
{
}
virtual void 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("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("m:show") == sName )
m_oShow = new OOX::Logic::CShow( oItem );
else if ( _T("m:transp") == sName )
m_oTransp = new OOX::Logic::CTransp( oItem );
else if ( _T("m:zeroAsc") == sName )
m_oZeroAsc = new OOX::Logic::CZeroAsc( oItem );
else if ( _T("m:zeroDesc") == sName )
m_oZeroDesc = new OOX::Logic::CZeroDesc( oItem );
else if ( _T("m:zeroWid") == sName )
m_oZeroWid = new OOX::Logic::CZeroWid( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
if ( oReader.IsEmptyNode() )
return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = oReader;
else if ( _T("m:show") == sName )
m_oShow = oReader;
else if ( _T("m:transp") == sName )
m_oTransp = oReader;
else if ( _T("m:zeroAsc") == sName )
m_oZeroAsc = oReader;
else if ( _T("m:zeroDesc") == sName )
m_oZeroDesc = oReader;
else if ( _T("m:zeroWid") == sName )
m_oZeroWid = oReader;
}
}
virtual std::wstring toXML() const
{
std::wstring sResult = _T("<m:phantPr>");
if ( m_oCtrlPr.IsInit() )
sResult += m_oCtrlPr->toXML();
if ( m_oShow.IsInit() )
sResult += m_oShow->toXML();
if ( m_oTransp.IsInit() )
sResult += m_oTransp->toXML();
if ( m_oZeroAsc.IsInit() )
sResult += m_oZeroAsc->toXML();
if ( m_oZeroDesc.IsInit() )
sResult += m_oZeroDesc->toXML();
if ( m_oZeroWid.IsInit() )
sResult += m_oZeroWid->toXML();
sResult += _T("</m:phantPr>");
return sResult;
}
virtual EElementType getType() const
{
return et_m_phantPr;
}
//Childs
nullable<OOX::Logic::CMJc> m_oMJc;
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
nullable<OOX::Logic::CShow> m_oShow;
nullable<OOX::Logic::CTransp> m_oTransp;
nullable<OOX::Logic::CZeroAsc> m_oZeroAsc;
nullable<OOX::Logic::CZeroDesc> m_oZeroDesc;
nullable<OOX::Logic::CZeroWid> m_oZeroWid;
};
//--------------------------------------------------------------------------------
// CPhant 22.1.2.81 (Phantom Object)
//--------------------------------------------------------------------------------
class CPhantPr;
class CPhant : public WritingElement
{
public:
......@@ -2186,10 +2955,26 @@ namespace OOX
virtual ~CPhant()
{
}
public:
virtual void 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("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
else if ( _T("m:phantPr") == sName )
m_oPhantPr = new OOX::Logic::CPhantPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2198,42 +2983,147 @@ namespace OOX
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:e") == sName )
m_oElement = oReader;
else if ( _T("m:phantPr") == sName )
m_oPhantPr = oReader;
std::wstring sName = oReader.GetName();
if ( _T("m:e") == sName )
m_oElement = oReader;
else if ( _T("m:phantPr") == sName )
m_oPhantPr = oReader;
}
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_phant;
}
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CPhantPr> m_oPhantPr;
};
//--------------------------------------------------------------------------------
// CMText 22.1.2.116 (Math Text)
//--------------------------------------------------------------------------------
class CMText : public WritingElement
{
public:
WritingElement_AdditionConstructors(CMText)
CMText()
{
}
virtual ~CMText()
{
}
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
oNode.ReadAttributeBase( _T("xml:space"), m_oSpace );
m_sText = oNode.GetText();
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
ReadAttributes( oReader );
if ( oReader.IsEmptyNode() )
return;
m_sText = oReader.GetText2();
}
virtual std::wstring toXML() const
{
std::wstring sResult;
if ( m_oSpace.IsInit() )
sResult = _T("<m:t xml:space=\"") + m_oSpace->ToString() + _T("\">");
else
sResult = _T("<m:t>");
sResult += XmlUtils::EncodeXmlString(m_sText);
sResult += _T("</m:t>");
return sResult;
}
virtual EElementType getType() const
{
return et_m_t;
}
private:
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
{
if ( oReader.GetAttributesCount() <= 0 )
return;
if ( !oReader.MoveToFirstAttribute() )
return;
std::wstring wsName = oReader.GetName();
while( !wsName.empty() )
{
if ( _T("xml:space") == wsName )
{
m_oSpace = oReader.GetText();
break;
}
if ( !oReader.MoveToNextAttribute() )
break;
wsName = oReader.GetName();
}
virtual std::wstring toXML() const;
virtual EElementType getType() const
{
return et_m_phant;
oReader.MoveToElement();
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CPhantPr> m_oPhantPr;
};
// Attributes
nullable<SimpleTypes::CXmlSpace<> > m_oSpace;
// Value
std::wstring m_sText;
};
//--------------------------------------------------------------------------------
// CPhantPr 22.1.2.82 (Phantom Properties)
// CMRPr 22.1.2.91 (Run Properties)
//--------------------------------------------------------------------------------
class CPhantPr : public WritingElement
class CMRPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CPhantPr)
CPhantPr()
WritingElement_AdditionConstructors(CMRPr)
CMRPr()
{
}
virtual ~CPhantPr()
virtual ~CMRPr()
{
}
public:
virtual void 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("m:aln") == sName )
m_oAln = new OOX::Logic::CAln( oItem );
else if ( _T("m:brk") == sName )
m_oBrk = new OOX::Logic::CBrk( oItem );
else if ( _T("m:lit") == sName )
m_oLit = new OOX::Logic::CLit( oItem );
else if ( _T("m:nor") == sName )
m_oNor = new OOX::Logic::CNor( oItem );
else if ( _T("m:scr") == sName )
m_oScr = new OOX::Logic::CScr( oItem );
else if ( _T("m:sty") == sName )
m_oSty = new OOX::Logic::CSty( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2243,67 +3133,63 @@ namespace OOX
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = oReader;
else if ( _T("m:show") == sName )
m_oShow = oReader;
else if ( _T("m:transp") == sName )
m_oTransp = oReader;
else if ( _T("m:zeroAsc") == sName )
m_oZeroAsc = oReader;
else if ( _T("m:zeroDesc") == sName )
m_oZeroDesc = oReader;
else if ( _T("m:zeroWid") == sName )
m_oZeroWid = oReader;
if ( _T("m:aln") == sName )
m_oAln = oReader;
else if ( _T("m:brk") == sName )
m_oBrk = oReader;
else if ( _T("m:lit") == sName )
m_oLit = oReader;
else if ( _T("m:nor") == sName )
m_oNor = oReader;
else if ( _T("m:scr") == sName )
m_oScr = oReader;
else if ( _T("m:sty") == sName )
m_oSty = oReader;
}
}
virtual std::wstring toXML() const
{
std::wstring sResult = _T("<m:phantPr>");
if ( m_oCtrlPr.IsInit() )
sResult += m_oCtrlPr->toXML();
std::wstring sResult = _T("<m:rPr>");
if ( m_oShow.IsInit() )
sResult += m_oShow->toXML();
if ( m_oAln.IsInit() )
sResult += m_oAln->toXML();
if ( m_oTransp.IsInit() )
sResult += m_oTransp->toXML();
if ( m_oBrk.IsInit() )
sResult += m_oBrk->toXML();
if ( m_oZeroAsc.IsInit() )
sResult += m_oZeroAsc->toXML();
if ( m_oLit.IsInit() )
sResult += m_oLit->toXML();
if ( m_oZeroDesc.IsInit() )
sResult += m_oZeroDesc->toXML();
if ( m_oNor.IsInit() )
sResult += m_oNor->toXML();
if ( m_oZeroWid.IsInit() )
sResult += m_oZeroWid->toXML();
if ( m_oScr.IsInit() )
sResult += m_oScr->toXML();
sResult += _T("</m:phantPr>");
if ( m_oSty.IsInit() )
sResult += m_oSty->toXML();
sResult += _T("</m:rPr>");
return sResult;
}
virtual EElementType getType() const
{
return et_m_phantPr;
return et_m_rPr;
}
public:
//Childs
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
nullable<OOX::Logic::CShow> m_oShow;
nullable<OOX::Logic::CTransp> m_oTransp;
nullable<OOX::Logic::CZeroAsc> m_oZeroAsc;
nullable<OOX::Logic::CZeroDesc> m_oZeroDesc;
nullable<OOX::Logic::CZeroWid> m_oZeroWid;
nullable<OOX::Logic::CAln> m_oAln;
nullable<OOX::Logic::CBrk> m_oBrk;
nullable<OOX::Logic::CLit> m_oLit;
nullable<OOX::Logic::CNor> m_oNor;
nullable<OOX::Logic::CScr> m_oScr;
nullable<OOX::Logic::CSty> m_oSty;
};
class CMDel;
class CMIns;
//--------------------------------------------------------------------------------
// CMRun 22.1.2.87 (Math Run)
//--------------------------------------------------------------------------------
class CMText;
class CMRPr;
class CMDel;
class CMIns;
class CMRun : public WritingElement
{
public:
......@@ -2315,9 +3201,97 @@ namespace OOX
{
}
public:
virtual void 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();
if ( _T("w:annotationRef") == sName )
m_oAnnotationRef = oItem;
else if ( _T("w:br") == sName )
m_oBr = oItem;
else if ( _T("w:commentReference") == sName )
m_oCommentReference = oItem;
else if ( _T("w:contentPart") == sName )
m_oContentPart = oItem;
else if ( _T("w:continuationSeparator") == sName )
m_oContinuationSeparator = oItem;
else if ( _T("w:cr") == sName )
m_oCr = oItem;
else if ( _T("w:dayLong") == sName )
m_oDayLong = oItem;
else if ( _T("w:dayShort") == sName )
m_oDayShort = oItem;
else if ( _T("w:del") == sName )
m_oDel = oItem;
else if ( _T("w:delInstrText") == sName )
m_oDelInstrText = oItem;
else if ( _T("w:delText") == sName )
m_oDelText = oItem;
else if ( _T("w:drawing") == sName )
m_oDrawing = oItem;
else if ( _T("w:endnoteRef") == sName )
m_oEndnoteRef = oItem;
else if ( _T("w:endnoteReference") == sName )
m_oEndnoteReference = oItem;
else if ( _T("w:fldChar") == sName )
m_oFldChar = oItem;
else if ( _T("w:footnoteRef") == sName )
m_oFootnoteRef = oItem;
else if ( _T("w:footnoteReference") == sName )
m_oFootnoteReference = oItem;
else if ( _T("w:ins") == sName )
m_oIns = oItem;
else if ( _T("w:instrText") == sName )
m_oInstrText = oItem;
else if ( _T("w:lastRenderedPageBreak") == sName )
m_oLastRenderedPageBreak = oItem;
else if ( _T("w:monthLong") == sName )
m_oMonthLong = oItem;
else if ( _T("w:monthShort") == sName )
m_oMonthShort = oItem;
else if ( _T("w:noBreakHyphen") == sName )
m_oNoBreakHyphen = oItem;
else if ( _T("w:object") == sName )
m_oObject = oItem;
else if ( _T("w:pgNum") == sName )
m_oPgNum = oItem;
else if ( _T("w:ptab") == sName )
m_oPtab = oItem;
else if ( _T("m:rPr") == sName )
m_oMRPr = oItem ;
else if ( _T("w:rPr") == sName )
m_oRPr = oItem;
else if ( _T("a:rPr") == sName )
m_oARPr = oItem;
else if ( _T("w:ruby") == sName )
m_oRuby = oItem;
else if ( _T("w:separator") == sName )
m_oSeparator = oItem;
else if ( _T("w:softHyphen") == sName )
m_oSoftHyphen = oItem;
else if ( _T("w:sym") == sName )
m_oSym = oItem;
else if ( _T("m:t") == sName )
m_oMText = oItem ;
else if ( _T("w:t") == sName )
m_oText = oItem;
else if ( _T("w:tab") == sName )
m_oTab = oItem;
else if ( _T("w:yearLong") == sName )
m_oYearLong = oItem;
else if ( _T("w:yearShort") == sName )
m_oYearShort = oItem;
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2418,7 +3392,6 @@ namespace OOX
{
return et_m_r;
}
public:
// Childs
nullable<OOX::Logic::CAnnotationRef> m_oAnnotationRef;
nullable<OOX::Logic::CBr> m_oBr;
......@@ -2469,10 +3442,14 @@ namespace OOX
virtual ~CMDel()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
oNode.ReadAttributeBase( _T("w:author"), m_sAuthor );
oNode.ReadAttributeBase( _T("w:date"), m_oDate );
oNode.ReadAttributeBase( _T("w:id"), m_oId );
oNode.ReadAttributeBase( _T("oouserid"), m_sUserId );
m_oRun = oNode;
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2540,10 +3517,10 @@ namespace OOX
WritingElement_ReadAttributes_End( oReader )
}
public:
nullable<std::wstring > m_sAuthor;
nullable<SimpleTypes::CDateTime > m_oDate;
nullable<std::wstring> m_sAuthor;
nullable<SimpleTypes::CDateTime> m_oDate;
nullable<SimpleTypes::CDecimalNumber<> > m_oId;
nullable<std::wstring > m_sUserId;
nullable<std::wstring> m_sUserId;
// Childs
nullable<CMRun> m_oRun;
};
......@@ -2557,10 +3534,14 @@ namespace OOX
virtual ~CMIns()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
oNode.ReadAttributeBase( _T("w:author"), m_sAuthor );
oNode.ReadAttributeBase( _T("w:date"), m_oDate );
oNode.ReadAttributeBase( _T("w:id"), m_oId );
oNode.ReadAttributeBase( _T("oouserid"), m_sUserId );
m_oRun = oNode;
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2648,10 +3629,26 @@ namespace OOX
virtual ~CRadPr()
{
}
public:
virtual void 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("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
else if ( _T("m:degHide") == sName )
m_oDegHide = new OOX::Logic::CDegHide( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2685,7 +3682,6 @@ namespace OOX
{
return et_m_radPr;
}
public:
//Childs
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
nullable<OOX::Logic::CDegHide> m_oDegHide;
......@@ -2703,71 +3699,29 @@ namespace OOX
virtual ~CRad()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
XmlUtils::CXmlNodes oChilds;
if ( oNode.GetNodes( _T("*"), oChilds ) )
{
if ( oReader.IsEmptyNode() )
return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) )
XmlUtils::CXmlNode oItem;
for ( int nIndex = 0; nIndex < oChilds.GetCount(); nIndex++ )
{
std::wstring sName = oReader.GetName();
if ( _T("m:deg") == sName )
m_oDeg = oReader;
else if ( _T("m:e") == sName )
m_oElement = oReader;
else if ( _T("m:radPr") == sName )
m_oRadPr = oReader;
}
}
virtual std::wstring toXML() const
if ( oChilds.GetAt( nIndex, oItem ) )
{
std::wstring sResult = _T("<m:rad>");
if ( m_oRadPr.IsInit())
sResult += m_oRadPr->toXML();
if ( m_oDeg.IsInit() )
sResult += m_oDeg->toXML();
if ( m_oElement.IsInit() )
sResult += m_oElement->toXML();
sResult += _T("</m:rad>");
return sResult;
}
std::wstring sName = oItem.GetName();
WritingElement *pItem = NULL;
virtual EElementType getType() const
{
return et_m_rad;
}
public:
//Childs
nullable<OOX::Logic::CDeg> m_oDeg;
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CRadPr> m_oRadPr;
};
//--------------------------------------------------------------------------------
// CMRPr 22.1.2.91 (Run Properties)
//--------------------------------------------------------------------------------
class CMRPr : public WritingElement
{
public:
WritingElement_AdditionConstructors(CMRPr)
CMRPr()
{
}
virtual ~CMRPr()
{
}
if ( _T("m:radPr") == sName )
m_oRadPr = new OOX::Logic::CRadPr( oItem );
else if ( _T("m:deg") == sName )
m_oDeg = new OOX::Logic::CDeg( oItem );
else if ( _T("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2777,58 +3731,39 @@ namespace OOX
while( oReader.ReadNextSiblingNode( nParentDepth ) )
{
std::wstring sName = oReader.GetName();
if ( _T("m:aln") == sName )
m_oAln = oReader;
else if ( _T("m:brk") == sName )
m_oBrk = oReader;
else if ( _T("m:lit") == sName )
m_oLit = oReader;
else if ( _T("m:nor") == sName )
m_oNor = oReader;
else if ( _T("m:scr") == sName )
m_oScr = oReader;
else if ( _T("m:sty") == sName )
m_oSty = oReader;
if ( _T("m:deg") == sName )
m_oDeg = oReader;
else if ( _T("m:e") == sName )
m_oElement = oReader;
else if ( _T("m:radPr") == sName )
m_oRadPr = oReader;
}
}
virtual std::wstring toXML() const
{
std::wstring sResult = _T("<m:rPr>");
if ( m_oAln.IsInit() )
sResult += m_oAln->toXML();
if ( m_oBrk.IsInit() )
sResult += m_oBrk->toXML();
if ( m_oLit.IsInit() )
sResult += m_oLit->toXML();
std::wstring sResult = _T("<m:rad>");
if ( m_oNor.IsInit() )
sResult += m_oNor->toXML();
if ( m_oRadPr.IsInit())
sResult += m_oRadPr->toXML();
if ( m_oScr.IsInit() )
sResult += m_oScr->toXML();
if ( m_oDeg.IsInit() )
sResult += m_oDeg->toXML();
if ( m_oSty.IsInit() )
sResult += m_oSty->toXML();
if ( m_oElement.IsInit() )
sResult += m_oElement->toXML();
sResult += _T("</m:rPr>");
sResult += _T("</m:rad>");
return sResult;
}
virtual EElementType getType() const
{
return et_m_rPr;
return et_m_rad;
}
public:
//Childs
nullable<OOX::Logic::CAln> m_oAln;
nullable<OOX::Logic::CBrk> m_oBrk;
nullable<OOX::Logic::CLit> m_oLit;
nullable<OOX::Logic::CNor> m_oNor;
nullable<OOX::Logic::CScr> m_oScr;
nullable<OOX::Logic::CSty> m_oSty;
nullable<OOX::Logic::CDeg> m_oDeg;
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CRadPr> m_oRadPr;
};
//--------------------------------------------------------------------------------
// CSPrePr 22.1.2.100 (Pre-Sub-Superscript Properties))
......@@ -2843,10 +3778,24 @@ namespace OOX
virtual ~CSPrePr()
{
}
public:
virtual void 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("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2876,7 +3825,6 @@ namespace OOX
{
return et_m_sPrePr;
}
public:
//Childs
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
};
......@@ -2893,10 +3841,31 @@ namespace OOX
virtual ~CSPre()
{
}
public:
virtual void 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("m:sPrePr") == sName )
m_oSPrePr = new OOX::Logic::CSPrePr( oItem );
else if ( _T("m:sub") == sName )
m_oSub = new OOX::Logic::CSub( oItem );
else if ( _T("m:sup") == sName )
m_oSup = new OOX::Logic::CSup( oItem );
else if ( _T("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2940,7 +3909,6 @@ namespace OOX
{
return et_m_sPre;
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CSPrePr> m_oSPrePr;
......@@ -2962,10 +3930,24 @@ namespace OOX
virtual ~CSSubPr()
{
}
public:
virtual void 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("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -2994,7 +3976,6 @@ namespace OOX
{
return et_m_sSubPr;
}
public:
//Childs
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
};
......@@ -3011,10 +3992,29 @@ namespace OOX
virtual ~CSSub()
{
}
public:
virtual void 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("m:sSubPr") == sName )
m_oSSubPr = new OOX::Logic::CSSubPr( oItem );
else if ( _T("m:sub") == sName )
m_oSub = new OOX::Logic::CSub( oItem );
else if ( _T("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -3053,14 +4053,12 @@ namespace OOX
{
return et_m_sSub;
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CSSubPr> m_oSSubPr;
nullable<OOX::Logic::CSub> m_oSub;
};
//--------------------------------------------------------------------------------
// CSSubSupPr 22.1.2.104 (Sub-Superscript Properties)
//--------------------------------------------------------------------------------
......@@ -3074,10 +4072,26 @@ namespace OOX
virtual ~CSSubSupPr()
{
}
public:
virtual void 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("m:alnScr") == sName )
m_oAlnScr = new OOX::Logic::CAlnScr( oItem );
else if ( _T("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -3106,12 +4120,10 @@ namespace OOX
sResult += _T("</m:sSubSupPr>");
return sResult;
}
virtual EElementType getType() const
{
return et_m_sSubSupPr;
}
public:
//Childs
nullable<OOX::Logic::CAlnScr> m_oAlnScr;
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
......@@ -3129,10 +4141,31 @@ namespace OOX
virtual ~CSSubSup()
{
}
public:
virtual void 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("m:sSubSupPr") == sName )
m_oSSubSupPr = new OOX::Logic::CSSubSupPr( oItem );
else if ( _T("m:sup") == sName )
m_oSup = new OOX::Logic::CSup( oItem );
else if ( _T("m:sub") == sName )
m_oSub = new OOX::Logic::CSub( oItem );
else if ( _T("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -3176,7 +4209,6 @@ namespace OOX
{
return et_m_sSubSup;
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CSSubSupPr> m_oSSubSupPr;
......@@ -3196,10 +4228,24 @@ namespace OOX
virtual ~CSSupPr()
{
}
public:
virtual void 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("m:ctrlPr") == sName )
m_oCtrlPr = new OOX::Logic::CCtrlPr( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -3228,7 +4274,6 @@ namespace OOX
{
return et_m_sSupPr;
}
public:
//Childs
nullable<OOX::Logic::CCtrlPr> m_oCtrlPr;
};
......@@ -3245,10 +4290,29 @@ namespace OOX
virtual ~CSSup()
{
}
public:
virtual void 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("m:sSupPr") == sName )
m_oSSupPr = new OOX::Logic::CSSupPr( oItem );
else if ( _T("m:sup") == sName )
m_oSup = new OOX::Logic::CSup( oItem );
else if ( _T("m:e") == sName )
m_oElement = new OOX::Logic::CElement( oItem );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -3287,101 +4351,11 @@ namespace OOX
{
return et_m_sSup;
}
public:
//Childs
nullable<OOX::Logic::CElement> m_oElement;
nullable<OOX::Logic::CSSupPr> m_oSSupPr;
nullable<OOX::Logic::CSup> m_oSup;
};
//--------------------------------------------------------------------------------
// CMText 22.1.2.116 (Math Text)
//--------------------------------------------------------------------------------
class CMText : public WritingElement
{
public:
WritingElement_AdditionConstructors(CMText)
CMText()
{
}
virtual ~CMText()
{
}
public:
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
oNode.ReadAttributeBase( _T("xml:space"), m_oSpace );
m_sText = oNode.GetText();
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
ReadAttributes( oReader );
if ( oReader.IsEmptyNode() )
return;
m_sText = oReader.GetText2();
}
virtual std::wstring toXML() const
{
std::wstring sResult;
if ( m_oSpace.IsInit() )
sResult = _T("<m:t xml:space=\"") + m_oSpace->ToString() + _T("\">");
else
sResult = _T("<m:t>");
sResult += XmlUtils::EncodeXmlString(m_sText);
sResult += _T("</m:t>");
return sResult;
}
virtual EElementType getType() const
{
return et_m_t;
}
private:
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
{
if ( oReader.GetAttributesCount() <= 0 )
return;
if ( !oReader.MoveToFirstAttribute() )
return;
std::wstring wsName = oReader.GetName();
while( !wsName.empty() )
{
if ( _T("xml:space") == wsName )
{
m_oSpace = oReader.GetText();
break;
}
if ( !oReader.MoveToNextAttribute() )
break;
wsName = oReader.GetName();
}
oReader.MoveToElement();
}
public:
// Attributes
nullable<SimpleTypes::CXmlSpace<> > m_oSpace;
// Value
std::wstring m_sText;
};
} // namespace OMath
} // namespace OOX
......@@ -52,10 +52,31 @@ namespace OOX
virtual ~COMathPara()
{
}
public:
virtual void 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 );
}
}
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment