Commit 846e2eda authored by Sergey.Tsarkov's avatar Sergey.Tsarkov Committed by Alexander Trofimov

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@56907 954022d7-b5bf-4e40-9824-e11837661b57
parent 13d18578
...@@ -3373,7 +3373,7 @@ public: ...@@ -3373,7 +3373,7 @@ public:
case 4: sBaseJc = _T("outside");break; case 4: sBaseJc = _T("outside");break;
case 5: sBaseJc = _T("top");break; case 5: sBaseJc = _T("top");break;
} }
CString sVal; sVal.Format(_T("<m:pos m:val=\"%s\" />"), sBaseJc); CString sVal; sVal.Format(_T("<m:baseJc m:val=\"%s\" />"), sBaseJc);
GetRunStringWriter().WriteString(sVal); GetRunStringWriter().WriteString(sVal);
} }
else else
......
...@@ -3865,8 +3865,22 @@ namespace BinDocxRW ...@@ -3865,8 +3865,22 @@ namespace BinDocxRW
{ {
int nCurPos = m_oBcw.WriteItemStart(c_oSer_OMathBottomNodesType::Mcs); int nCurPos = m_oBcw.WriteItemStart(c_oSer_OMathBottomNodesType::Mcs);
if ( pMcs.m_oMc.IsInit() ) for(int i = 0; i< pMcs.m_arrItems.GetSize(); ++i)
WriteMathMc(pMcs.m_oMc.get()); {
OOX::WritingElement* item = pMcs.m_arrItems[i];
OOX::EElementType eType = item->getType();
int nCurPos1 = 0;
if (eType == OOX::et_m_mc)
{
OOX::Logic::CMc* pMc = static_cast<OOX::Logic::CMc*>(item);
nCurPos1 = m_oBcw.WriteItemStart(c_oSer_OMathContentType::Mc);
if ( pMc->m_oMcPr.IsInit() )
WriteMathMcPr(pMc->m_oMcPr.get());
m_oBcw.WriteItemEnd(nCurPos1);
}
}
m_oBcw.WriteItemEnd(nCurPos); m_oBcw.WriteItemEnd(nCurPos);
} }
......
...@@ -1678,6 +1678,7 @@ namespace OOX ...@@ -1678,6 +1678,7 @@ namespace OOX
} }
virtual ~CMcs() virtual ~CMcs()
{ {
Clear();
} }
public: public:
...@@ -1688,33 +1689,59 @@ namespace OOX ...@@ -1688,33 +1689,59 @@ namespace OOX
{ {
if ( oReader.IsEmptyNode() ) if ( oReader.IsEmptyNode() )
return; return;
int nParentDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nParentDepth ) ) int nCurDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nCurDepth ) )
{ {
CWCharWrapper sName = oReader.GetName(); CWCharWrapper sName = oReader.GetName();
WritingElement *pItem = NULL;
if ( _T("m:mc") == sName ) if ( _T("m:mc") == sName )
m_oMc = oReader; pItem = new Logic::CMc( oReader );
if ( pItem )
m_arrItems.Add( pItem );
} }
} }
virtual CString toXML() const virtual CString toXML() const
{ {
CString sResult = _T("<m:mcs>"); CString sResult = _T("<m:mcs>");
if ( m_oMc.IsInit() ) for ( int nIndex = 0; nIndex < m_arrItems.GetSize(); nIndex++ )
sResult += m_oMc->toXML(); {
if ( m_arrItems[nIndex])
{
sResult += m_arrItems[nIndex]->toXML();
}
}
sResult += _T("</m:mcs>"); sResult += _T("</m:mcs>");
return sResult; return sResult;
} }
void Clear()
{
for ( int nIndex = 0; nIndex < m_arrItems.GetSize(); nIndex++ )
{
if ( m_arrItems[nIndex] )
delete m_arrItems[nIndex];
m_arrItems[nIndex] = NULL;
}
m_arrItems.RemoveAll();
}
virtual EElementType getType() const virtual EElementType getType() const
{ {
return et_m_mcs; return et_m_mcs;
} }
public: public:
//Childs //Childs
nullable<OOX::Logic::CMc> m_oMc; CSimpleArray<WritingElement *> m_arrItems;
}; };
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// CMPr 22.1.2.68 (Matrix Properties) // CMPr 22.1.2.68 (Matrix Properties)
......
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