[Libreoffice-commits] core.git: starmath/source
Takeshi Abe
tabe at fixedpoint.jp
Tue May 10 01:00:49 UTC 2016
starmath/source/node.cxx | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
New commits:
commit 65b327b873e67ae24133b6e4afef5e8a12ed822e
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Mon May 9 12:36:41 2016 +0900
Simplify code with ForEachNonNull
Change-Id: Id149ecee4fa7737b529f3a3a19bb4bb9ed778dcd
Reviewed-on: https://gerrit.libreoffice.org/24778
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 b0cecfa..1104196 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 );
- }
- }
+ });
}
More information about the Libreoffice-commits
mailing list