[Libreoffice-commits] core.git: starmath/inc starmath/source
Takeshi Abe
tabe at fixedpoint.jp
Wed Aug 3 23:24:16 UTC 2016
starmath/inc/node.hxx | 5 +++--
starmath/source/node.cxx | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 8da4ba9be2d2deb8990f40fa0cc5d6b16d525c72
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Wed Aug 3 17:54:11 2016 +0900
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 at libreoffice.org>
Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 7966133..c22e9a7 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 e6a4726..c1d53f1 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 += "{ ";
More information about the Libreoffice-commits
mailing list