summaryrefslogtreecommitdiff
path: root/framework/source/uielement
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-10 16:43:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 12:38:32 +0200
commitd347c2403605c5aa3ddd98fb605366914acab79f (patch)
treee39624030741234c514bccd858e69d6318dfba68 /framework/source/uielement
parentf0e68d4feaaa43f7450432ad1ebd92c2b572400f (diff)
convert std::map::insert to std::map::emplace
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/uielement')
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx3
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx2
-rw-r--r--framework/source/uielement/uicommanddescription.cxx6
4 files changed, 6 insertions, 7 deletions
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 5831e5112ee6..24a9279944c9 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -344,7 +344,7 @@ void SAL_CALL ControlMenuController::updatePopupMenu()
{
xDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
- m_aURLToDispatchMap.insert( UrlToDispatchMap::value_type( aTargetURL.Complete, xDispatch ));
+ m_aURLToDispatchMap.emplace( aTargetURL.Complete, xDispatch );
}
}
}
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 4c2c5c79ff54..a9341aa85c4e 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1722,8 +1722,7 @@ void MenuBarManager::GetPopupController( PopupControllerCache& rPopupController
else if ( nQueryPart == -1 )
aMainURL += aMenuURL.copy( nSchemePart+1 );
- rPopupController.insert( PopupControllerCache::value_type(
- aMainURL, aPopupControllerEntry ));
+ rPopupController.emplace( aMainURL, aPopupControllerEntry );
}
}
if ( pItemHandler->xSubMenuManager.is() )
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 8a4502443468..995fa66d4c7e 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -214,7 +214,7 @@ static void fillHashMap( const Sequence< Sequence< css::beans::PropertyValue > >
if ( !aResourceURL.isEmpty() &&
rHashMap.find( aResourceURL ) == rHashMap.end() )
- rHashMap.insert( ToolbarHashMap::value_type( aResourceURL, aUIName ));
+ rHashMap.emplace( aResourceURL, aUIName );
}
}
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 5a59fce6e662..62b1fa3b7198 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -342,7 +342,7 @@ void ConfigurationAccess_UICommand::impl_fill(const Reference< XNameAccess >& _x
xNameAccess->getByName( m_aPropUIIsExperimental ) >>= aCmdToInfo.bIsExperimental;
xNameAccess->getByName( m_aPropProperties ) >>= aCmdToInfo.nProperties;
- m_aCmdInfoCache.insert( CommandToInfoCache::value_type( aNameSeq[i], aCmdToInfo ));
+ m_aCmdInfoCache.emplace( aNameSeq[i], aCmdToInfo );
if ( aCmdToInfo.nProperties & COMMAND_PROPERTY_IMAGE )
aImageCommandVector.push_back( aNameSeq[i] );
@@ -639,12 +639,12 @@ void UICommandDescription::impl_fillElements(const sal_Char* _pName)
}
// Create first mapping ModuleIdentifier ==> Command File
- m_aModuleToCommandFileMap.insert( ModuleToCommandFileMap::value_type( aModuleIdentifier, aCommandStr ));
+ m_aModuleToCommandFileMap.emplace( aModuleIdentifier, aCommandStr );
// Create second mapping Command File ==> commands instance
UICommandsHashMap::iterator pIter = m_aUICommandsHashMap.find( aCommandStr );
if ( pIter == m_aUICommandsHashMap.end() )
- m_aUICommandsHashMap.insert( UICommandsHashMap::value_type( aCommandStr, Reference< XNameAccess >() ));
+ m_aUICommandsHashMap.emplace( aCommandStr, Reference< XNameAccess >() );
}
} // for ( sal_Int32 i = 0; i < aElementNames.getLength(); i++ )
}