diff options
Diffstat (limited to 'starmath/source/node.cxx')
-rw-r--r-- | starmath/source/node.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index b0cecfab4aca..1104196b099f 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -448,17 +448,13 @@ SmNode * SmStructureNode::GetSubNode(sal_uInt16 nIndex) void SmStructureNode::GetAccessibleText( OUStringBuffer &rText ) const { - sal_uInt16 nNodes = GetNumSubNodes(); - for (sal_uInt16 i = 0; i < nNodes; ++i) - { - SmNode *pNode = const_cast<SmStructureNode *>(this)->GetSubNode(i); - if (pNode) + ForEachNonNull(const_cast<SmStructureNode *>(this), + [&rText](SmNode *pNode) { if (pNode->IsVisible()) static_cast<SmStructureNode *>(pNode)->mnAccIndex = rText.getLength(); pNode->GetAccessibleText( rText ); - } - } + }); } |