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@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@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();