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

Takeshi Abe tabe at fixedpoint.jp
Fri Jun 24 03:43:25 UTC 2016


 starmath/inc/node.hxx |   24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

New commits:
commit f02c1ca61c936ad555c33c16ccccadf0ce9674c2
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Jun 23 10:46:33 2016 +0900

    starmath: IndexOfSubNode() is for SmStructureNode only
    
    ... not for the base class.
    
    Change-Id: I9f6a6de93a4db964c8b019349049fdef4afaf224
    Reviewed-on: https://gerrit.libreoffice.org/26583
    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 bde97d5..f6f684d 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -205,17 +205,6 @@ public:
         mpParentNode = parent;
     }
 
-    /** Get the index of a child node
-     *
-     * Returns -1, if pSubNode isn't a subnode of this.
-     */
-    int IndexOfSubNode(SmNode* pSubNode){
-        sal_uInt16 nSize = GetNumSubNodes();
-        for(sal_uInt16 i = 0; i < nSize; i++)
-            if(pSubNode == GetSubNode(i))
-                return i;
-        return -1;
-    }
     /** Set the token for this node */
     void SetToken(SmToken& token){
         maNodeToken = token;
@@ -313,6 +302,19 @@ public:
 
     virtual void  GetAccessibleText( OUStringBuffer &rText ) const override;
 
+    /** Get the index of a child node
+     *
+     * Returns -1, if pSubNode isn't a subnode of this.
+     */
+    int IndexOfSubNode(SmNode* pSubNode)
+    {
+        sal_uInt16 nSize = GetNumSubNodes();
+        for(sal_uInt16 i = 0; i < nSize; i++)
+            if(pSubNode == GetSubNode(i))
+                return i;
+        return -1;
+    }
+
     void SetSubNode(size_t nIndex, SmNode* pNode)
     {
         size_t size = aSubNodes.size();


More information about the Libreoffice-commits mailing list