summaryrefslogtreecommitdiff
path: root/framework
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
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')
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx6
-rw-r--r--framework/source/fwe/xml/statusbardocumenthandler.cxx4
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx4
-rw-r--r--framework/source/fwe/xml/xmlnamespaces.cxx4
-rw-r--r--framework/source/services/substitutepathvars.cxx3
-rw-r--r--framework/source/uiconfiguration/graphicnameaccess.cxx2
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx8
-rw-r--r--framework/source/uiconfiguration/moduleuicfgsupplier.cxx2
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx14
-rw-r--r--framework/source/uiconfiguration/uicategorydescription.cxx5
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx6
-rw-r--r--framework/source/uiconfiguration/windowstateconfiguration.cxx10
-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
-rw-r--r--framework/source/uifactory/factoryconfiguration.cxx4
-rw-r--r--framework/source/uifactory/uielementfactorymanager.cxx8
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx2
19 files changed, 46 insertions, 49 deletions
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 3e9bf8a23a07..89a037799942 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -644,7 +644,7 @@ void AddonsOptions_Impl::ReadOfficeMenuBarSet( Sequence< Sequence< PropertyValue
sal_uInt32 nMenuItemCount = rAddonOfficeMenuBarSeq.getLength() + 1;
rAddonOfficeMenuBarSeq.realloc( nMenuItemCount );
rAddonOfficeMenuBarSeq[nIndex] = aPopupMenu;
- aTitleToIndexMap.insert( StringToIndexMap::value_type( aPopupTitle, nIndex ));
+ aTitleToIndexMap.emplace( aPopupTitle, nIndex );
++nIndex;
}
}
@@ -746,7 +746,7 @@ void AddonsOptions_Impl::ReadImages( ImageManager& aImageManager )
if ( pImageEntry )
{
// Successfully read a user-defined images item, put it into our image manager
- aImageManager.insert( ImageManager::value_type( aURL, *pImageEntry ));
+ aImageManager.emplace( aURL, *pImageEntry );
delete pImageEntry; // We have the ownership of the pointer
}
}
@@ -1321,7 +1321,7 @@ void AddonsOptions_Impl::ReadAndAssociateImages( const OUString& aURL, const OUS
Image(), aFileURL.makeStringAndClear() );
}
- m_aImageManager.insert( ImageManager::value_type( aURL, aImageEntry ));
+ m_aImageManager.emplace( aURL, aImageEntry );
}
AddonsOptions_Impl::ImageEntry* AddonsOptions_Impl::ReadImageData( const OUString& aImagesNodeName )
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index d1edc94bb6d8..b50ae541474f 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -155,14 +155,14 @@ OReadStatusBarDocumentHandler::OReadStatusBarDocumentHandler(
OUString temp( XMLNS_STATUSBAR );
temp += XMLNS_FILTER_SEPARATOR;
temp += OUString::createFromAscii( StatusBarEntries[i].aEntryName );
- m_aStatusBarMap.insert( StatusBarHashMap::value_type( temp, (StatusBar_XML_Entry)i ) );
+ m_aStatusBarMap.emplace( temp, (StatusBar_XML_Entry)i );
}
else
{
OUString temp( XMLNS_XLINK );
temp += XMLNS_FILTER_SEPARATOR;
temp += OUString::createFromAscii( StatusBarEntries[i].aEntryName );
- m_aStatusBarMap.insert( StatusBarHashMap::value_type( temp, (StatusBar_XML_Entry)i ) );
+ m_aStatusBarMap.emplace( temp, (StatusBar_XML_Entry)i );
}
}
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 50fc7dfe4ad2..eb59a9faacbc 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -135,14 +135,14 @@ OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XInde
OUString temp( XMLNS_TOOLBAR );
temp += XMLNS_FILTER_SEPARATOR;
temp += OUString::createFromAscii( ToolBoxEntries[i].aEntryName );
- m_aToolBoxMap.insert( ToolBoxHashMap::value_type( temp, (ToolBox_XML_Entry)i ) );
+ m_aToolBoxMap.emplace( temp, (ToolBox_XML_Entry)i );
}
else
{
OUString temp( XMLNS_XLINK );
temp += XMLNS_FILTER_SEPARATOR;
temp += OUString::createFromAscii( ToolBoxEntries[i].aEntryName );
- m_aToolBoxMap.insert( ToolBoxHashMap::value_type( temp, (ToolBox_XML_Entry)i ) );
+ m_aToolBoxMap.emplace( temp, (ToolBox_XML_Entry)i );
}
}
diff --git a/framework/source/fwe/xml/xmlnamespaces.cxx b/framework/source/fwe/xml/xmlnamespaces.cxx
index 6909508f78a5..c13c0bbbf163 100644
--- a/framework/source/fwe/xml/xmlnamespaces.cxx
+++ b/framework/source/fwe/xml/xmlnamespaces.cxx
@@ -81,11 +81,11 @@ void XMLNamespaces::addNamespace( const OUString& aName, const OUString& aValue
{
// replace current namespace definition
m_aNamespaceMap.erase( p );
- m_aNamespaceMap.insert( NamespaceMap::value_type( aNamespaceName, aValue ));
+ m_aNamespaceMap.emplace( aNamespaceName, aValue );
}
else
{
- m_aNamespaceMap.insert( NamespaceMap::value_type( aNamespaceName, aValue ));
+ m_aNamespaceMap.emplace( aNamespaceName, aValue );
}
}
}
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index ee5fcaffdb64..bd24b5667de7 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -201,8 +201,7 @@ SubstitutePathVariables::SubstitutePathVariables( const Reference< XComponentCon
m_aPreDefVars.m_FixedVarNames[i] = OUString::createFromAscii( aFixedVarTable[i].pVarName );
// Create hash map entry
- m_aPreDefVarMap.insert( VarNameToIndexMap::value_type(
- m_aPreDefVars.m_FixedVarNames[i], PreDefVariable(i) ) );
+ m_aPreDefVarMap.emplace( m_aPreDefVars.m_FixedVarNames[i], PreDefVariable(i) );
}
// Sort predefined/fixed variable to path length
diff --git a/framework/source/uiconfiguration/graphicnameaccess.cxx b/framework/source/uiconfiguration/graphicnameaccess.cxx
index 029d34d05cd3..bdd4c1f2445c 100644
--- a/framework/source/uiconfiguration/graphicnameaccess.cxx
+++ b/framework/source/uiconfiguration/graphicnameaccess.cxx
@@ -36,7 +36,7 @@ GraphicNameAccess::~GraphicNameAccess()
void GraphicNameAccess::addElement( const OUString& rName, const uno::Reference< graphic::XGraphic >& rElement )
{
- m_aNameToElementMap.insert( NameGraphicHashMap::value_type( rName, rElement ));
+ m_aNameToElementMap.emplace( rName, rElement );
}
// XNameAccess
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index fccf5977c8d0..030377316e31 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -670,12 +670,12 @@ Sequence< OUString > ImageManagerImpl::getAllImageNames( ::sal_Int16 nImageType
const std::vector< OUString >& rGlobalImageNameVector = rGlobalImageList->getImageCommandNames();
const sal_uInt32 nGlobalCount = rGlobalImageNameVector.size();
for ( i = 0; i < nGlobalCount; i++ )
- aImageCmdNameMap.insert( ImageNameMap::value_type( rGlobalImageNameVector[i], true ));
+ aImageCmdNameMap.emplace( rGlobalImageNameVector[i], true );
const std::vector< OUString >& rModuleImageNameVector = implts_getDefaultImageList()->getImageCommandNames();
const sal_uInt32 nModuleCount = rModuleImageNameVector.size();
for ( i = 0; i < nModuleCount; i++ )
- aImageCmdNameMap.insert( ImageNameMap::value_type( rModuleImageNameVector[i], true ));
+ aImageCmdNameMap.emplace( rModuleImageNameVector[i], true );
}
ImageList* pImageList = implts_getUserImageList(nIndex);
@@ -683,7 +683,7 @@ Sequence< OUString > ImageManagerImpl::getAllImageNames( ::sal_Int16 nImageType
pImageList->GetImageNames( rUserImageNames );
const sal_uInt32 nUserCount = rUserImageNames.size();
for ( i = 0; i < nUserCount; i++ )
- aImageCmdNameMap.insert( ImageNameMap::value_type( rUserImageNames[i], true ));
+ aImageCmdNameMap.emplace( rUserImageNames[i], true );
return comphelper::mapKeysToSequence( aImageCmdNameMap );
}
@@ -986,7 +986,7 @@ void ImageManagerImpl::reload()
sal_uInt32 j( 0 );
const sal_uInt32 nOldCount = aOldUserCmdImageVector.size();
for ( j = 0; j < nOldCount; j++ )
- aOldUserCmdImageSet.insert( CommandMap::value_type( aOldUserCmdImageVector[j], false ));
+ aOldUserCmdImageSet.emplace( aOldUserCmdImageVector[j], false );
// Attention: This can make the old image list pointer invalid!
implts_loadUserImages( i, m_xUserImageStorage, m_xUserBitmapsStorage );
diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
index b4d1a0e6fffd..14c3d0905d1e 100644
--- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
+++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
@@ -107,7 +107,7 @@ ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier( cons
const Sequence< OUString > aNameSeq = xNameAccess->getElementNames();
const OUString* pNameSeq = aNameSeq.getConstArray();
for ( sal_Int32 n = 0; n < aNameSeq.getLength(); n++ )
- m_aModuleToModuleUICfgMgrMap.insert( ModuleToModuleCfgMgr::value_type( pNameSeq[n], Reference< XModuleUIConfigurationManager2 >() ));
+ m_aModuleToModuleUICfgMgrMap.emplace( pNameSeq[n], Reference< XModuleUIConfigurationManager2 >() );
}
catch(...)
{
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 8b1e0bdc9a94..19f6ce0af138 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -302,14 +302,14 @@ void ModuleUIConfigurationManager::impl_fillSequenceWithElementTypeInfo( UIEleme
}
UIElementInfo aInfo( pUserIter->second.aResourceURL, aUIName );
- aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pUserIter->second.aResourceURL, aInfo ));
+ aUIElementInfoCollection.emplace( pUserIter->second.aResourceURL, aInfo );
}
}
else
{
// The user interface name for standard user interface elements is stored in the WindowState.xcu file
UIElementInfo aInfo( pUserIter->second.aResourceURL, OUString() );
- aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pUserIter->second.aResourceURL, aInfo ));
+ aUIElementInfoCollection.emplace( pUserIter->second.aResourceURL, aInfo );
}
++pUserIter;
}
@@ -340,14 +340,14 @@ void ModuleUIConfigurationManager::impl_fillSequenceWithElementTypeInfo( UIEleme
}
UIElementInfo aInfo( pDefIter->second.aResourceURL, aUIName );
- aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pDefIter->second.aResourceURL, aInfo ));
+ aUIElementInfoCollection.emplace( pDefIter->second.aResourceURL, aInfo );
}
}
else
{
// The user interface name for standard user interface elements is stored in the WindowState.xcu file
UIElementInfo aInfo( pDefIter->second.aResourceURL, OUString() );
- aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pDefIter->second.aResourceURL, aInfo ));
+ aUIElementInfoCollection.emplace( pDefIter->second.aResourceURL, aInfo );
}
}
@@ -398,7 +398,7 @@ void ModuleUIConfigurationManager::impl_preloadUIElementTypeList( Layer eLayer,
// Create std::unordered_map entries for all user interface elements inside the storage. We don't load the
// settings to speed up the process.
- rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData ));
+ rHashMap.emplace( aUIElementData.aResourceURL, aUIElementData );
}
}
rElementTypeData.bLoaded = true;
@@ -1265,7 +1265,7 @@ void SAL_CALL ModuleUIConfigurationManager::replaceSettings( const OUString& Res
if ( pIter != rElements.end() )
pIter->second = aUIElementData;
else
- rElements.insert( UIElementDataHashMap::value_type( ResourceURL, aUIElementData ));
+ rElements.emplace( ResourceURL, aUIElementData );
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
Reference< XInterface > xIfac( xThis, UNO_QUERY );
@@ -1406,7 +1406,7 @@ void SAL_CALL ModuleUIConfigurationManager::insertSettings( const OUString& NewR
rElementType.bModified = true;
UIElementDataHashMap& rElements = rElementType.aElementsHashMap;
- rElements.insert( UIElementDataHashMap::value_type( NewResourceURL, aUIElementData ));
+ rElements.emplace( NewResourceURL, aUIElementData );
Reference< XIndexAccess > xInsertSettings( aUIElementData.xSettings );
Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY );
diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx
index 119d5282a373..50ea375c93bd 100644
--- a/framework/source/uiconfiguration/uicategorydescription.cxx
+++ b/framework/source/uiconfiguration/uicategorydescription.cxx
@@ -188,7 +188,7 @@ void ConfigurationAccess_UICategory::fillCache()
{
xNameAccess->getByName( m_aPropUIName ) >>= aUIName;
- m_aIdCache.insert( IdToInfoCache::value_type( aNameSeq[i], aUIName ));
+ m_aIdCache.emplace( aNameSeq[i], aUIName );
}
}
catch ( const css::lang::WrappedTargetException& )
@@ -379,8 +379,7 @@ UICategoryDescription::UICategoryDescription( const Reference< XComponentContext
m_xGenericUICommands = new ConfigurationAccess_UICategory( aGenericCategories, xEmpty, rxContext );
// insert generic categories mappings
- m_aModuleToCommandFileMap.insert( ModuleToCommandFileMap::value_type(
- OUString("generic"), aGenericCategories ));
+ m_aModuleToCommandFileMap.emplace( OUString("generic"), aGenericCategories );
UICommandsHashMap::iterator pCatIter = m_aUICommandsHashMap.find( aGenericCategories );
if ( pCatIter != m_aUICommandsHashMap.end() )
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 945d0cee0f26..c8b5f574055c 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -271,7 +271,7 @@ void UIConfigurationManager::impl_fillSequenceWithElementTypeInfo( UIElementInfo
}
UIElementInfo aInfo( pUserIter->second.aResourceURL, aUIName );
- aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pUserIter->second.aResourceURL, aInfo ));
+ aUIElementInfoCollection.emplace( pUserIter->second.aResourceURL, aInfo );
}
++pUserIter;
}
@@ -315,7 +315,7 @@ void UIConfigurationManager::impl_preloadUIElementTypeList( sal_Int16 nElementTy
// Create unordered_map entries for all user interface elements inside the storage. We don't load the
// settings to speed up the process.
- rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData ));
+ rHashMap.emplace( aUIElementData.aResourceURL, aUIElementData );
}
}
}
@@ -1107,7 +1107,7 @@ void SAL_CALL UIConfigurationManager::insertSettings( const OUString& NewResourc
pDataSettings->aResourceURL = NewResourceURL;
UIElementDataHashMap& rElements = rElementType.aElementsHashMap;
- rElements.insert( UIElementDataHashMap::value_type( NewResourceURL, *pDataSettings ));
+ rElements.emplace( NewResourceURL, *pDataSettings );
}
Reference< XIndexAccess > xInsertSettings( aUIElementData.xSettings );
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index 3870b0c0cb28..036a12f40ce2 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -381,7 +381,7 @@ void SAL_CALL ConfigurationAccess_WindowState::insertByName( const OUString& rRe
{
WindowStateInfo aWinStateInfo;
impl_fillStructFromSequence( aWinStateInfo, aPropSet );
- m_aResourceURLToInfoCache.insert( ResourceURLToInfoCache::value_type( rResourceURL, aWinStateInfo ));
+ m_aResourceURLToInfoCache.emplace( rResourceURL, aWinStateInfo );
// insert must be write-through => insert element into configuration
Reference< XNameContainer > xNameContainer( m_xConfigAccess, UNO_QUERY );
@@ -765,7 +765,7 @@ Any ConfigurationAccess_WindowState::impl_insertCacheAndReturnSequence( const OU
}
aWindowStateInfo.nMask = nMask;
- m_aResourceURLToInfoCache.insert( ResourceURLToInfoCache::value_type( rResourceURL, aWindowStateInfo ));
+ m_aResourceURLToInfoCache.emplace( rResourceURL, aWindowStateInfo );
return makeAny( comphelper::containerToSequence(aPropVec) );
}
@@ -940,7 +940,7 @@ ConfigurationAccess_WindowState::WindowStateInfo& ConfigurationAccess_WindowStat
}
aWindowStateInfo.nMask = nMask;
- ResourceURLToInfoCache::iterator pIter = (m_aResourceURLToInfoCache.insert( ResourceURLToInfoCache::value_type( rResourceURL, aWindowStateInfo ))).first;
+ ResourceURLToInfoCache::iterator pIter = (m_aResourceURLToInfoCache.emplace( rResourceURL, aWindowStateInfo )).first;
return pIter->second;
}
@@ -1324,12 +1324,12 @@ WindowStateConfiguration::WindowStateConfiguration( const Reference< XComponentC
if ( !aWindowStateFileStr.isEmpty() )
{
// Create first mapping ModuleIdentifier ==> Window state configuration file
- m_aModuleToFileHashMap.insert( ModuleToWindowStateFileMap::value_type( aModuleIdentifier, aWindowStateFileStr ));
+ m_aModuleToFileHashMap.emplace( aModuleIdentifier, aWindowStateFileStr );
// Create second mapping Command File ==> Window state configuration instance
ModuleToWindowStateConfigHashMap::iterator pIter = m_aModuleToWindowStateHashMap.find( aWindowStateFileStr );
if ( pIter == m_aModuleToWindowStateHashMap.end() )
- m_aModuleToWindowStateHashMap.insert( ModuleToWindowStateConfigHashMap::value_type( aWindowStateFileStr, xEmptyNameAccess ));
+ m_aModuleToWindowStateHashMap.emplace( aWindowStateFileStr, xEmptyNameAccess );
}
}
}
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++ )
}
diff --git a/framework/source/uifactory/factoryconfiguration.cxx b/framework/source/uifactory/factoryconfiguration.cxx
index 1895daa7f376..49da26648fd1 100644
--- a/framework/source/uifactory/factoryconfiguration.cxx
+++ b/framework/source/uifactory/factoryconfiguration.cxx
@@ -121,7 +121,7 @@ void ConfigurationAccess_ControllerFactory::addServiceToCommandModule(
osl::MutexGuard g(m_mutex);
OUString aHashKey = getHashKeyFromStrings( rCommandURL, rModule );
- m_aMenuControllerMap.insert( MenuControllerMap::value_type( aHashKey,ControllerInfo(rServiceSpecifier,OUString()) ));
+ m_aMenuControllerMap.emplace( aHashKey,ControllerInfo(rServiceSpecifier,OUString()) );
}
void ConfigurationAccess_ControllerFactory::removeServiceFromCommandModule(
@@ -248,7 +248,7 @@ void ConfigurationAccess_ControllerFactory::updateConfigurationData()
// Create hash key from command and module as they are together a primary key to
// the UNO service that implements the popup menu controller.
aHashKey = getHashKeyFromStrings( aCommand, aModule );
- m_aMenuControllerMap.insert( MenuControllerMap::value_type( aHashKey, ControllerInfo(aService,aValue) ));
+ m_aMenuControllerMap.emplace( aHashKey, ControllerInfo(aService,aValue) );
}
}
catch ( const NoSuchElementException& )
diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx
index 5524e3118528..557a38c7d665 100644
--- a/framework/source/uifactory/uielementfactorymanager.cxx
+++ b/framework/source/uifactory/uielementfactorymanager.cxx
@@ -129,7 +129,7 @@ void ConfigurationAccess_FactoryManager::addFactorySpecifierToTypeNameModule( co
if ( pIter != m_aFactoryManagerMap.end() )
throw ElementExistException();
else
- m_aFactoryManagerMap.insert( FactoryManagerMap::value_type( aHashKey, rServiceSpecifier ));
+ m_aFactoryManagerMap.emplace( aHashKey, rServiceSpecifier );
}
void ConfigurationAccess_FactoryManager::removeFactorySpecifierFromTypeNameModule( const OUString& rType, const OUString& rName, const OUString& rModule )
@@ -205,7 +205,7 @@ void SAL_CALL ConfigurationAccess_FactoryManager::elementInserted( const Contain
// Create hash key from type, name and module as they are together a primary key to
// the UNO service that implements a user interface factory.
OUString aHashKey( getHashKeyFromStrings( aType, aName, aModule ));
- m_aFactoryManagerMap.insert( FactoryManagerMap::value_type( aHashKey, aService ));
+ m_aFactoryManagerMap.emplace( aHashKey, aService );
}
}
@@ -244,7 +244,7 @@ void SAL_CALL ConfigurationAccess_FactoryManager::elementReplaced( const Contain
// the UNO service that implements the popup menu controller.
OUString aHashKey( getHashKeyFromStrings( aType, aName, aModule ));
m_aFactoryManagerMap.erase( aHashKey );
- m_aFactoryManagerMap.insert( FactoryManagerMap::value_type( aHashKey, aService ));
+ m_aFactoryManagerMap.emplace( aHashKey, aService );
}
}
@@ -297,7 +297,7 @@ void ConfigurationAccess_FactoryManager::readConfigurationData()
// Create hash key from type, name and module as they are together a primary key to
// the UNO service that implements the user interface element factory.
aHashKey = getHashKeyFromStrings( aType, aName, aModule );
- m_aFactoryManagerMap.insert( FactoryManagerMap::value_type( aHashKey, aService ));
+ m_aFactoryManagerMap.emplace( aHashKey, aService );
}
}
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index 2aac402fc2f4..fd0d51f9b6e8 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -123,7 +123,7 @@ OReadImagesDocumentHandler::OReadImagesDocumentHandler( ImageListsDescriptor& aI
temp.append( XMLNS_FILTER_SEPARATOR );
temp.appendAscii( ImagesEntries[i].aEntryName );
- m_aImageMap.insert( ImageHashMap::value_type( temp.makeStringAndClear(), (Image_XML_Entry)i ) );
+ m_aImageMap.emplace( temp.makeStringAndClear(), (Image_XML_Entry)i );
}
// reset states