starmath/source/mathmlexport.cxx | 4 ++-- starmath/source/parse.cxx | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-)
New commits: commit 5d63514c6eddcd61a319c994202c7689f60ebf0a Author: Frédéric Wang <fred.w...@free.fr> Date: Thu Jul 4 20:21:06 2013 +0100 fdo#66575 - MathML export: fix errors with newline, binom and stack. Change-Id: I6833140aaf3fcfc47b81f7d324af88843de00834 diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 2c9474e..b35753f 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -871,8 +871,8 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel) if (nSize >= 1) { const SmNode *pLine = pNode->GetSubNode(nSize-1); - if (pLine->GetType() == NLINE && pLine->GetNumSubNodes() > 0 && - pLine->GetSubNode(0)->GetToken().eType == TEND) + if (pLine->GetType() == NLINE && pLine->GetNumSubNodes() == 1 && + pLine->GetSubNode(0)->GetToken().eType == TNEWLINE) --nSize; } diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index e532591..aa3a66f 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -1072,7 +1072,11 @@ void SmParser::Line() //this is to avoid a formula tree without any caret //positions, in visual formula editor. if(ExpressionArray.empty()) - ExpressionArray.push_back(new SmExpressionNode(m_aCurToken)); + { + SmToken aTok = SmToken(); + aTok.eType = TNEWLINE; + ExpressionArray.push_back(new SmExpressionNode(aTok)); + } SmStructureNode *pSNode = new SmLineNode(m_aCurToken); pSNode->SetSubNodes(ExpressionArray);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits