diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-10 14:39:07 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-11 06:54:34 +0000 |
commit | 265068d65b39688b8a4756dfbcd46453dd1f9b70 (patch) | |
tree | 6936185b2f2f46b99646d00e542cdde845ef073d /scripting/source/provider | |
parent | 9e0335d1db22bd3ad3f4bb249b30a00fd55558f4 (diff) |
clang-tidy modernize-loop-convert in scripting to svtools
Change-Id: I98229d14109cf243839d632feabde1391ea9bad5
Reviewed-on: https://gerrit.libreoffice.org/24847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'scripting/source/provider')
-rw-r--r-- | scripting/source/provider/BrowseNodeFactoryImpl.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index cc63505399fd..863860e2911e 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -91,12 +91,12 @@ public: sal_Int32 numChildren = 0; - for ( size_t i = 0; i < m_Nodes.size(); i++ ) + for (Reference<XBrowseNode> & xNode : m_Nodes) { Sequence< Reference < browse::XBrowseNode > > children; try { - children = m_Nodes[ i ]->getChildNodes(); + children = xNode->getChildNodes(); seqs.push_back( children ); numChildren += children.getLength(); } @@ -128,11 +128,11 @@ public: { if ( !m_Nodes.empty() ) { - for ( size_t i = 0 ; i < m_Nodes.size(); i++ ) + for (Reference<XBrowseNode> & xNode : m_Nodes) { try { - if ( m_Nodes[ i ]->hasChildNodes() ) + if ( xNode->hasChildNodes() ) { return true; } @@ -538,9 +538,9 @@ public: std::vector< Reference< browse::XBrowseNode > > nodes = getAllBrowseNodes( xCtx ); - for ( size_t i=0; i<nodes.size(); i++ ) + for (Reference< browse::XBrowseNode > & xNode : nodes) { - m_vNodes.push_back( new DefaultBrowseNode( xCtx, nodes[ i ] ) ); + m_vNodes.push_back( new DefaultBrowseNode( xCtx, xNode ) ); } m_Name = "Root"; } |