summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/customize/cfg.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 0392d1f250a6..63497966709d 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2068,12 +2068,10 @@ SvTreeListEntry* SvxConfigPage::AddFunction(
// check that this function is not already in the menu
SvxConfigEntry* pParent = GetTopLevelSelection();
- SvxEntries::const_iterator iter = pParent->GetEntries()->begin();
- SvxEntries::const_iterator end = pParent->GetEntries()->end();
-
if ( !bAllowDuplicates )
{
- while ( iter != end )
+ for (SvxEntries::const_iterator iter(pParent->GetEntries()->begin()), end(pParent->GetEntries()->end());
+ iter != end ; ++iter)
{
SvxConfigEntry *pCurEntry = *iter;
@@ -2085,8 +2083,6 @@ SvTreeListEntry* SvxConfigPage::AddFunction(
delete pNewEntryData;
return NULL;
}
-
- ++iter;
}
}