starmath: ClaimPaternity() is only for SmStructureNode
rather than SmNode. Change-Id: I2c4765500f077007979417b90f47cc22c6362491 Reviewed-on: https://gerrit.libreoffice.org/18917 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
committed by
Caolán McNamara
parent
64a3c4d9e2
commit
4672445c1a
@@ -222,9 +222,7 @@ public:
|
|||||||
void SetToken(SmToken& token){
|
void SetToken(SmToken& token){
|
||||||
aNodeToken = token;
|
aNodeToken = token;
|
||||||
}
|
}
|
||||||
protected:
|
|
||||||
/** Sets parent on children of this node */
|
|
||||||
inline void ClaimPaternity();
|
|
||||||
private:
|
private:
|
||||||
SmStructureNode* aParentNode;
|
SmStructureNode* aParentNode;
|
||||||
};
|
};
|
||||||
@@ -336,15 +334,12 @@ public:
|
|||||||
aSubNodes[nIndex] = pNode;
|
aSubNodes[nIndex] = pNode;
|
||||||
ClaimPaternity();
|
ClaimPaternity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
/** Sets parent on children of this node */
|
||||||
|
void ClaimPaternity();
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void SmNode::ClaimPaternity() {
|
|
||||||
SmNode* pNode;
|
|
||||||
sal_uInt16 nSize = GetNumSubNodes();
|
|
||||||
for (sal_uInt16 i = 0; i < nSize; i++)
|
|
||||||
if (NULL != (pNode = GetSubNode(i)))
|
|
||||||
pNode->SetParent(static_cast<SmStructureNode*>(this)); //Cast is valid if we have children
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Abstract base class for all visible node
|
/** Abstract base class for all visible node
|
||||||
*
|
*
|
||||||
|
@@ -624,6 +624,10 @@ void SmStructureNode::GetAccessibleText( OUStringBuffer &rText ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SmStructureNode::ClaimPaternity()
|
||||||
|
{
|
||||||
|
ForEachNonNull(this, [this](SmNode *pNode){pNode->SetParent(this);});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SmVisibleNode::IsVisible() const
|
bool SmVisibleNode::IsVisible() const
|
||||||
|
Reference in New Issue
Block a user