Bugzilla – Attachment 82031 Details for
Bug 66575
Incorrect removal of last line in SmXMLExport::ExportTable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
patch.diff (text/plain), 1.49 KB, created by
Frédéric Wang
on 2013-07-04 15:18:41 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Frédéric Wang
Created:
2013-07-04 15:18:41 UTC
Size:
1.49 KB
patch
obsolete
>diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx >index 1dd1634..15f8921 100644 >--- a/starmath/source/mathmlexport.cxx >+++ b/starmath/source/mathmlexport.cxx >@@ -868,8 +868,13 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel) > //no subnodes, the newline is superfulous so we just drop > //the last node, inclusion would create a bad MathML > //table >- if (nSize >= 1 && pNode->GetSubNode(nSize-1)->GetNumSubNodes() == 0) >- --nSize; >+ if (nSize >= 1) >+ { >+ const SmNode *pLine = pNode->GetSubNode(nSize-1); >+ if (pLine->GetType() == NLINE && pLine->GetNumSubNodes() == 1 && >+ pLine->GetSubNode(0)->GetToken().eType == TNEWLINE) >+ --nSize; >+ } > > // try to avoid creating a mtable element when the formula consists only > // of a single output line >diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx >index 5929447..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(SmToken())); >+ { >+ SmToken aTok = SmToken(); >+ aTok.eType = TNEWLINE; >+ ExpressionArray.push_back(new SmExpressionNode(aTok)); >+ } > > SmStructureNode *pSNode = new SmLineNode(m_aCurToken); > pSNode->SetSubNodes(ExpressionArray);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 66575
: 82031