diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-08-01 18:14:21 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2016-08-02 01:44:12 +0000 |
commit | 389b08190092f9a9103b3ac098994ec83b2d0bfa (patch) | |
tree | c7bc32223a7b667e044c9d17f8f831b16eb5eb36 /starmath/source/mathmlexport.cxx | |
parent | a859c37ee0126e0daca711893da1cbf6138ec25b (diff) |
starmath: SmVerticalBraceNode always has a triple of nodes
Moreover the middle ("Brace") node is a SmMathSymbolNode.
Change-Id: Ia0e4f798b69a9a205269bbd3f6c63d2059e8c766
Reviewed-on: https://gerrit.libreoffice.org/27769
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/source/mathmlexport.cxx')
-rw-r--r-- | starmath/source/mathmlexport.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index cb1ed0eec4c5..6abd5be7f198 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -1391,7 +1391,7 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel) } -void SmXMLExport::ExportVerticalBrace(const SmNode *pNode, int nLevel) +void SmXMLExport::ExportVerticalBrace(const SmVerticalBraceNode *pNode, int nLevel) { // "[body] overbrace [script]" @@ -1417,18 +1417,17 @@ void SmXMLExport::ExportVerticalBrace(const SmNode *pNode, int nLevel) break; } - OSL_ENSURE(pNode->GetNumSubNodes()==3,"Bad Vertical Brace"); SvXMLElementExport aOver1(*this, XML_NAMESPACE_MATH,which, true, true); {//Scoping // using accents will draw the over-/underbraces too close to the base // see http://www.w3.org/TR/MathML2/chapter3.html#id.3.4.5.2 // also XML_ACCENT is illegal with XML_MUNDER. Thus no XML_ACCENT attribute here! SvXMLElementExport aOver2(*this, XML_NAMESPACE_MATH,which, true, true); - ExportNodes(pNode->GetSubNode(0), nLevel); + ExportNodes(pNode->Body(), nLevel); AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_TRUE); - ExportNodes(pNode->GetSubNode(1), nLevel); + ExportNodes(pNode->Brace(), nLevel); } - ExportNodes(pNode->GetSubNode(2), nLevel); + ExportNodes(pNode->Script(), nLevel); } void SmXMLExport::ExportMatrix(const SmNode *pNode, int nLevel) @@ -1554,7 +1553,7 @@ void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel) ExportFont(pNode, nLevel); break; case NVERTICAL_BRACE: - ExportVerticalBrace(pNode, nLevel); + ExportVerticalBrace(static_cast<const SmVerticalBraceNode *>(pNode), nLevel); break; case NMATRIX: ExportMatrix(pNode, nLevel); |