summaryrefslogtreecommitdiff
path: root/cui/source/customize/cfgutil.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-02-27 22:34:17 +0100
committerJulien Nabet <serval2412@yahoo.fr>2018-02-28 11:02:12 +0100
commit81260c448911069ce8cb051d3a973ec52b9b43a3 (patch)
tree2c18396c931db3f78f21e813fd9307ea5405b85b /cui/source/customize/cfgutil.cxx
parentb6aee26f3630fd531e51f781391ba0130001df60 (diff)
Use for-range loops in cui
Change-Id: I82cbea6d221ec0fd0e0d4620bdda698f2bed520e Reviewed-on: https://gerrit.libreoffice.org/50472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'cui/source/customize/cfgutil.cxx')
-rw-r--r--cui/source/customize/cfgutil.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 75ab89474532..74318258fd5b 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -959,12 +959,9 @@ void SfxConfigGroupListBox::GroupSelected()
if (pFamily)
{
const std::vector< SfxStyleInfo_Impl > lStyles = pStylesInfo->getStyles(pFamily->sFamily);
- std::vector< SfxStyleInfo_Impl >::const_iterator pIt;
- for ( pIt = lStyles.begin();
- pIt != lStyles.end() ;
- ++pIt )
+ for (auto const& lStyle : lStyles)
{
- SfxStyleInfo_Impl* pStyle = new SfxStyleInfo_Impl(*pIt);
+ SfxStyleInfo_Impl* pStyle = new SfxStyleInfo_Impl(lStyle);
SvTreeListEntry* pFuncEntry = pFunctionListBox->InsertEntry( pStyle->sLabel );
pFunctionListBox->aArr.push_back( o3tl::make_unique<SfxGroupInfo_Impl>( SfxCfgKind::GROUP_STYLES, 0, pStyle ) );
pFunctionListBox->aArr.back()->sCommand = pStyle->sCommand;
@@ -1042,12 +1039,9 @@ void SfxConfigGroupListBox::RequestingChildren( SvTreeListEntry *pEntry )
if ( !GetChildCount( pEntry ) )
{
const std::vector< SfxStyleInfo_Impl > lStyleFamilies = pStylesInfo->getStyleFamilies();
- std::vector< SfxStyleInfo_Impl >::const_iterator pIt;
- for ( pIt = lStyleFamilies.begin();
- pIt != lStyleFamilies.end() ;
- ++pIt )
+ for (auto const& lStyleFamily : lStyleFamilies)
{
- SfxStyleInfo_Impl* pFamily = new SfxStyleInfo_Impl(*pIt);
+ SfxStyleInfo_Impl* pFamily = new SfxStyleInfo_Impl(lStyleFamily);
SvTreeListEntry* pStyleEntry = InsertEntry( pFamily->sLabel, pEntry );
aArr.push_back( o3tl::make_unique<SfxGroupInfo_Impl>( SfxCfgKind::GROUP_STYLES, 0, pFamily ));
pStyleEntry->SetUserData( aArr.back().get() );