summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/tpline.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/tabpages/tpline.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/tabpages/tpline.cxx')
-rw-r--r--cui/source/tabpages/tpline.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index c45d56bc5dc0..36fae228bc34 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -282,19 +282,19 @@ void SvxLineTabPage::InitSymbols(MenuButton const * pButton)
VclPtrInstance<PopupMenu> pPopup;
sal_uInt32 i = 0;
m_nNumMenuGalleryItems = m_aGrfNames.size();
- for(std::vector<OUString>::iterator it = m_aGrfNames.begin(); it != m_aGrfNames.end(); ++it, ++i)
+ for (auto const& grfName : m_aGrfNames)
{
- const OUString *pUIName = &(*it);
+ const OUString *pUIName = &grfName;
// Convert URL encodings to UI characters (e.g. %20 for spaces)
OUString aPhysicalName;
- if (osl::FileBase::getSystemPathFromFileURL(*it, aPhysicalName)
+ if (osl::FileBase::getSystemPathFromFileURL(grfName, aPhysicalName)
== osl::FileBase::E_None)
{
pUIName = &aPhysicalName;
}
- SvxBrushItem* pBrushItem = new SvxBrushItem(*it, "", GPOS_AREA, SID_ATTR_BRUSH);
+ SvxBrushItem* pBrushItem = new SvxBrushItem(grfName, "", GPOS_AREA, SID_ATTR_BRUSH);
SvxBmpItemInfo* pInfo = new SvxBmpItemInfo;
pInfo->pBrushItem = pBrushItem;
@@ -329,6 +329,7 @@ void SvxLineTabPage::InitSymbols(MenuButton const * pButton)
Image aImage;
pPopup->InsertItem(pInfo->nItemId, *pUIName, aImage );
}
+ ++i;
}
m_pSymbolMB->GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup );