Commit 49ff2379 authored by Sergey.Tsarkov's avatar Sergey.Tsarkov Committed by Alexander Trofimov

при отсутствии mcs в матрицах создаем этот тег

в старых формулах поправлены баги с groupChr

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59104 954022d7-b5bf-4e40-9824-e11837661b57
parent bf061cb6
......@@ -764,6 +764,7 @@ namespace MathEquation
int nCurPos2 = WriteItemStart(BinDocxRW::c_oSer_OMathContentType::Element);
m_aLimitStack.push(nCurPos2);
int nCurPos3 = WriteItemStart(BinDocxRW::c_oSer_OMathContentType::GroupChr);
m_aLimitStack.push(nCurPos3);
int nCurPos4 = WriteItemStart(BinDocxRW::c_oSer_OMathContentType::GroupChrPr);
WriteItemValStr(BinDocxRW::c_oSer_OMathBottomNodesType::Chr, chr);
......@@ -771,12 +772,7 @@ namespace MathEquation
WriteItemVal(BinDocxRW::c_oSer_OMathBottomNodesType::VertJc, vertJc);
WriteItemEnd(nCurPos4);
int nCurPos5 = WriteItemStart(BinDocxRW::c_oSer_OMathContentType::Element);
PushCommand(commandVerticalBrace);
WriteItemEnd(nCurPos5);
WriteItemEnd(nCurPos3);
WriteItemEnd(nCurPos2);
}
virtual void EndVerticalBrace ()
......@@ -1224,6 +1220,7 @@ namespace MathEquation
}
void Write(BinaryEquationWriter* pWriter, bool bBeginNode)
{
bOpenNode = bBeginNode;
if (0 == nBlockNum)
{
if (bBeginNode)
......@@ -1252,6 +1249,7 @@ namespace MathEquation
}
void Write(BinaryEquationWriter* pWriter, bool bBeginNode)
{
bOpenNode = bBeginNode;
if (0 == nBlockNum)
{
if (bBeginNode)
......@@ -1288,6 +1286,7 @@ namespace MathEquation
}
void Write(BinaryEquationWriter* pWriter, bool bBeginNode)
{
bOpenNode = bBeginNode;
if (0 == nBlockNum)
{
if (bBeginNode)
......@@ -1331,6 +1330,7 @@ namespace MathEquation
void Write(BinaryEquationWriter* pWriter, bool bBegin)
{
bOpenNode = bBegin;
if (bInline)
{
if (0 == nBlockNum)
......@@ -1532,6 +1532,7 @@ namespace MathEquation
void Write(BinaryEquationWriter* pWriter, bool bBeginNode)
{
bOpenNode = bBeginNode;
if (0 == nBlockNum)
{
if (bBeginNode)
......@@ -1573,6 +1574,7 @@ namespace MathEquation
void Write(BinaryEquationWriter* pWriter, bool bBeginNode)
{
bOpenNode = bBeginNode;
if (0 == nBlockNum)
{
if (bBeginNode)
......@@ -1587,8 +1589,15 @@ namespace MathEquation
pCommand->WriteEndBlock(pWriter);
}*/
pWriter->PopCommand();
int nCurPos = pWriter->m_aLimitStack.top();
pWriter->WriteItemEnd(nCurPos);
pWriter->WriteItemEnd(nCurPos); //groupChr
pWriter->m_aLimitStack.pop();
nCurPos = pWriter->m_aLimitStack.top();
pWriter->WriteItemEnd(nCurPos); //lim element
pWriter->m_aLimitStack.pop();
pWriter->PushCommand(commandVerticalBraceLim);
......@@ -1620,6 +1629,7 @@ namespace MathEquation
void Write(BinaryEquationWriter* pWriter, bool bBeginNode)
{
bOpenNode = bBeginNode;
if (0 == nBlockNum)
{
if (bBeginNode)
......
......@@ -3050,8 +3050,8 @@ namespace BinDocxRW
OOX::Logic::CMatrix* pMatrix = static_cast<OOX::Logic::CMatrix*>(item);
nCurPos = m_oBcw.WriteItemStart(c_oSer_OMathContentType::Matrix);
LONG lCol = 0;
for ( int j = 0; j < pMatrix->m_arrItems.size(); j++)
LONG lCol = 0;
for ( int j = 0; j < pMatrix->m_arrItems.size(); j++) //TODO , m:mcs, -
{
OOX::WritingElement* item = pMatrix->m_arrItems[j];
if (item->getType() == OOX::et_m_mr)
......@@ -3366,11 +3366,11 @@ namespace BinDocxRW
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
m_oBcw.m_oStream.WriteLONG(pBrk.m_alnAt->GetValue());
}
// </m:brk>
// <m:brk>
else
{
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
m_oBcw.m_oStream.WriteBOOL(false);
}
m_oBcw.WriteItemEnd(nCurPos);
......@@ -3804,8 +3804,6 @@ namespace BinDocxRW
if (lRow)
WriteMathRow(lRow);
if (lCol)
WriteMathColumn(lCol);
if ( pMPr->m_oBaseJc.IsInit() )
WriteMathBaseJc(pMPr->m_oBaseJc.get());
if ( pMPr->m_oCGp.IsInit() )
......@@ -3818,6 +3816,8 @@ namespace BinDocxRW
WriteMathCtrlPr(pMPr->m_oCtrlPr.get());
if ( pMPr->m_oMcs.IsInit() )
WriteMathMcs(pMPr->m_oMcs.get());
else
WriteMathMcs(lCol);
if ( pMPr->m_oPlcHide.IsInit() )
WriteMathPlcHide(pMPr->m_oPlcHide.get());
if ( pMPr->m_oRSp.IsInit() )
......@@ -3906,6 +3906,22 @@ namespace BinDocxRW
m_oBcw.WriteItemEnd(nCurPos);
}
void WriteMathMcs ( LONG lColumn )
{
int nCurPos = m_oBcw.WriteItemStart(c_oSer_OMathBottomNodesType::Mcs);
int nCurPos1 = m_oBcw.WriteItemStart(c_oSer_OMathContentType::Mc);
int nCurPos2 = m_oBcw.WriteItemStart(c_oSer_OMathContentType::McPr);
int nCurPos3 = m_oBcw.WriteItemStart(c_oSer_OMathBottomNodesType::Count);
m_oBcw.m_oStream.WriteBYTE(c_oSer_OMathBottomNodesValType::Val);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
m_oBcw.m_oStream.WriteLONG(lColumn);
m_oBcw.WriteItemEnd(nCurPos3);
m_oBcw.WriteItemEnd(nCurPos2);
m_oBcw.WriteItemEnd(nCurPos1);
m_oBcw.WriteItemEnd(nCurPos);
}
void WriteMathMPr(const OOX::Logic::CMPr &pMPr)
{
int nCurPos = m_oBcw.WriteItemStart(c_oSer_OMathContentType::MPr);
......
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