diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-27 23:29:01 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-28 17:33:40 +0200 |
commit | 1e084caf573255a93ce86053d584976f317074df (patch) | |
tree | 9340232dd2ae3b3f38f4c8e996f93587adbb7fb8 /unotools/source/config/optionsdlg.cxx | |
parent | 41cf4e6604bfb9b51ce54c5ea64d77249c7545d7 (diff) |
Simplify Sequence iterations in unotools
Use range-based loops or replace with STL functions
Change-Id: I220c5cd5dcc19fc35e1ad729ae69246f4a79ce2d
Reviewed-on: https://gerrit.libreoffice.org/74825
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'unotools/source/config/optionsdlg.cxx')
-rw-r--r-- | unotools/source/config/optionsdlg.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx index 8efc6e2dc56e..988ef98f3857 100644 --- a/unotools/source/config/optionsdlg.cxx +++ b/unotools/source/config/optionsdlg.cxx @@ -85,10 +85,9 @@ SvtOptionsDlgOptions_Impl::SvtOptionsDlgOptions_Impl() OUString sRootNode( ROOT_NODE ); Sequence< OUString > aNodeSeq = GetNodeNames( sRootNode ); OUString sNode( sRootNode + g_sPathDelimiter ); - sal_uInt32 nCount = aNodeSeq.getLength(); - for ( sal_uInt32 n = 0; n < nCount; n++ ) + for ( const auto& rNode : aNodeSeq ) { - OUString sSubNode( sNode + aNodeSeq[n] ); + OUString sSubNode( sNode + rNode ); ReadNode( sSubNode, NT_Group ); } } @@ -145,13 +144,10 @@ void SvtOptionsDlgOptions_Impl::ReadNode( const OUString& _rNode, NodeType _eTyp { OUString sNodes( sNode + sSet ); Sequence< OUString > aNodes = GetNodeNames( sNodes ); - if ( aNodes.hasElements() ) + for ( const auto& rNode : aNodes ) { - for ( sal_uInt32 n = 0; n < static_cast<sal_uInt32>(aNodes.getLength()); ++n ) - { - OUString sSubNodeName( sNodes + g_sPathDelimiter + aNodes[n] ); - ReadNode( sSubNodeName, _eType == NT_Group ? NT_Page : NT_Option ); - } + OUString sSubNodeName( sNodes + g_sPathDelimiter + rNode ); + ReadNode( sSubNodeName, _eType == NT_Group ? NT_Page : NT_Option ); } } } |