[Libreoffice-commits] core.git: starmath/source

Takeshi Abe tabe at fixedpoint.jp
Wed Jun 29 02:36:06 UTC 2016


 starmath/source/node.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit f6c004800a73059eea5267f58bdac118e7a37656
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Jun 28 14:33:24 2016 +0900

    starmath: SmBinDiagonalNode's 3rd child must be SmPolyLineNode
    
    Change-Id: If3b81de299eca8b398a65534d1b201bf38daf19f
    Reviewed-on: https://gerrit.libreoffice.org/26733
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 8300752..fa0c748 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -1144,12 +1144,13 @@ void SmBinDiagonalNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
     // Both arguments have to get into the SubNodes before the Operator so that clicking
     // within the GraphicWindow sets the FormulaCursor correctly (cf. SmRootNode)
     SmNode *pLeft  = GetSubNode(0),
-           *pRight = GetSubNode(1);
+           *pRight = GetSubNode(1),
+           *pLine  = GetSubNode(2);
     assert(pLeft);
     assert(pRight);
+    assert(pLine && pLine->GetType() == NPOLYLINE);
 
-    OSL_ENSURE(GetSubNode(2)->GetType() == NPOLYLINE, "Sm : wrong node type");
-    SmPolyLineNode *pOper = static_cast<SmPolyLineNode *>(GetSubNode(2));
+    SmPolyLineNode *pOper = static_cast<SmPolyLineNode *>(pLine);
     assert(pOper);
 
     //! some routines being called extract some info from the OutputDevice's


More information about the Libreoffice-commits mailing list