summaryrefslogtreecommitdiff
path: root/framework/source/uielement/toolbarmanager.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-19 13:43:23 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-20 08:14:13 +0000
commitfe3fd05966a668c1cdf53e8221b8614e9a07de65 (patch)
tree4c6c105b78d0cb9c45431c2fecd2583d6a2aa85c /framework/source/uielement/toolbarmanager.cxx
parent1d5c39192e81f950289dbdd7991a0e8a67c0aabc (diff)
add mapKeysToSequence/mapValuesToSequence methods to comphelper
and use them Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec Reviewed-on: https://gerrit.libreoffice.org/20055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'framework/source/uielement/toolbarmanager.cxx')
-rw-r--r--framework/source/uielement/toolbarmanager.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index ce608f7bbec2..49588d78f782 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1320,19 +1320,10 @@ void ToolBarManager::RequestImages()
{
// Request images from image manager
- Sequence< OUString > aCmdURLSeq( m_aCommandMap.size() );
+ Sequence< OUString > aCmdURLSeq( comphelper::mapKeysToSequence(m_aCommandMap) );
Sequence< Reference< XGraphic > > aDocGraphicSeq;
Sequence< Reference< XGraphic > > aModGraphicSeq;
- sal_uInt32 i = 0;
- CommandToInfoMap::iterator pIter = m_aCommandMap.begin();
- CommandToInfoMap::iterator pEnd = m_aCommandMap.end();
- while ( pIter != pEnd )
- {
- aCmdURLSeq[i++] = pIter->first;
- ++pIter;
- }
-
bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() );
sal_Int16 p = getImageTypeFromBools( SvtMiscOptions().AreCurrentSymbolsLarge() );
@@ -1340,8 +1331,9 @@ void ToolBarManager::RequestImages()
aDocGraphicSeq = m_xDocImageManager->getImages( p, aCmdURLSeq );
aModGraphicSeq = m_xModuleImageManager->getImages( p, aCmdURLSeq );
- i = 0;
- pIter = m_aCommandMap.begin();
+ sal_uInt32 i = 0;
+ CommandToInfoMap::iterator pIter = m_aCommandMap.begin();
+ CommandToInfoMap::iterator pEnd = m_aCommandMap.end();
while ( pIter != pEnd )
{
Image aImage;