diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-08-03 17:54:11 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2016-08-03 23:23:43 +0000 |
commit | 8da4ba9be2d2deb8990f40fa0cc5d6b16d525c72 (patch) | |
tree | a3e8f254878c5455087d2ee7a9125e4715b3cf95 /starmath | |
parent | 7fc61bc051fa2bb6a95bbc76d6239118f3eb434b (diff) |
starmath: SmDynIntegralNode always has a couple of subnodes
And the 0th subnode is SmDynIntegralSymbolNode.
Change-Id: Icb15125abf1846204d0f9130ad1ec964c5172589
Reviewed-on: https://gerrit.libreoffice.org/27820
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/node.hxx | 5 | ||||
-rw-r--r-- | starmath/source/node.cxx | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 79661339b8a0..c22e9a79deec 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -1274,7 +1274,8 @@ inline const SmNode* SmRootNode::Body() const inline SmDynIntegralSymbolNode* SmDynIntegralNode::Symbol() { - OSL_ASSERT( GetNumSubNodes() > 0 && GetSubNode( 0 )->GetType() == NDYNINTSYMBOL ); + assert( GetNumSubNodes() == 2 ); + assert( GetSubNode( 0 )->GetType() == NDYNINTSYMBOL ); return static_cast< SmDynIntegralSymbolNode* >( GetSubNode( 0 )); } inline const SmDynIntegralSymbolNode* SmDynIntegralNode::Symbol() const @@ -1283,7 +1284,7 @@ inline const SmDynIntegralSymbolNode* SmDynIntegralNode::Symbol() const } inline SmNode* SmDynIntegralNode::Body() { - OSL_ASSERT( GetNumSubNodes() > 1 ); + assert( GetNumSubNodes() == 2 ); return GetSubNode( 1 ); } inline const SmNode* SmDynIntegralNode::Body() const diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index e6a47267791d..c1d53f1975cf 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -807,7 +807,7 @@ void SmDynIntegralNode::CreateTextFromNode(OUString &rText) { rText += "intd "; - SmNode *pBody = GetSubNode(1); + SmNode *pBody = Body(); if (pBody->GetNumSubNodes() > 1) rText += "{ "; |