summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx4
-rw-r--r--accessibility/source/helper/characterattributeshelper.cxx26
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx2
-rw-r--r--basctl/source/basicide/bastypes.cxx2
-rw-r--r--basctl/source/basicide/macrodlg.cxx2
-rw-r--r--basctl/source/dlged/dlged.cxx2
-rw-r--r--basctl/source/dlged/dlgedobj.cxx4
-rw-r--r--basic/source/classes/codecompletecache.cxx8
-rw-r--r--basic/source/classes/sbxmod.cxx2
-rw-r--r--basic/source/runtime/dllmgr-x64.cxx4
-rw-r--r--basic/source/runtime/dllmgr-x86.cxx4
-rw-r--r--binaryurp/source/bridge.cxx4
-rw-r--r--bridges/source/cpp_uno/shared/vtablefactory.cxx2
-rw-r--r--chart2/source/model/main/DataSeries.cxx2
-rw-r--r--chart2/source/model/main/Diagram.cxx2
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx2
-rw-r--r--chart2/source/tools/NameContainer.cxx2
-rw-r--r--chart2/source/tools/PropertyHelper.cxx2
-rw-r--r--chart2/source/view/main/ChartView.cxx2
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx36
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx2
-rw-r--r--comphelper/source/container/NamedPropertyValuesContainer.cxx2
-rw-r--r--comphelper/source/container/namecontainer.cxx2
-rw-r--r--comphelper/source/misc/accessibleeventnotifier.cxx2
-rw-r--r--comphelper/source/property/propertybag.cxx4
-rw-r--r--configmgr/source/dconf.cxx4
-rw-r--r--connectivity/source/commontools/DriversConfig.cxx2
-rw-r--r--connectivity/source/commontools/TSkipDeletedSet.cxx16
-rw-r--r--connectivity/source/commontools/TTableHelper.cxx8
-rw-r--r--connectivity/source/commontools/dbtools2.cxx4
-rw-r--r--connectivity/source/commontools/parameters.cxx4
-rw-r--r--connectivity/source/cpool/ZConnectionPool.cxx4
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx2
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx2
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx4
-rw-r--r--connectivity/source/drivers/mysql/YDriver.cxx2
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx2
-rw-r--r--connectivity/source/parse/PColumn.cxx2
-rw-r--r--cppu/source/threadpool/threadpool.cxx2
-rw-r--r--cppu/source/uno/lbenv.cxx7
-rw-r--r--cui/source/customize/cfg.cxx12
-rw-r--r--dbaccess/source/core/api/KeySet.cxx10
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx2
-rw-r--r--dbaccess/source/core/api/querycontainer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.hxx2
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/bookmarkcontainer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/definitioncontainer.cxx2
-rw-r--r--dbaccess/source/core/inc/definitioncontainer.hxx2
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx8
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx2
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx2
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx2
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx92
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx2
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx4
-rw-r--r--desktop/source/app/appinit.cxx2
-rw-r--r--desktop/source/deployment/dp_persmap.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_managerfac.cxx2
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx3
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx2
-rw-r--r--desktop/source/deployment/registry/dp_registry.cxx3
-rw-r--r--desktop/source/migration/migration.cxx2
-rw-r--r--editeng/source/misc/hangulhanja.cxx2
-rw-r--r--extensions/source/bibliography/framectr.cxx2
-rw-r--r--extensions/source/ole/oleobjw.cxx5
-rw-r--r--extensions/source/ole/unoobjw.cxx8
-rw-r--r--extensions/source/propctrlr/eformshelper.cxx2
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx10
-rw-r--r--extensions/source/propctrlr/genericpropertyhandler.cxx2
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx5
-rw-r--r--extensions/source/propctrlr/propertyeditor.cxx2
-rw-r--r--forms/source/component/GroupManager.cxx2
-rw-r--r--forms/source/helper/formnavigation.cxx2
-rw-r--r--forms/source/richtext/richtextcontrol.cxx2
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx6
-rw-r--r--forms/source/xforms/propertysetbase.cxx6
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx14
-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
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx5
-rw-r--r--l10ntools/source/merge.cxx2
-rw-r--r--l10ntools/source/xmlparse.cxx16
-rw-r--r--linguistic/source/convdic.cxx6
-rw-r--r--lotuswordpro/source/filter/lwpfont.cxx2
-rw-r--r--lotuswordpro/source/filter/lwpfoundry.cxx2
-rw-r--r--lotuswordpro/source/filter/lwpobjfactory.cxx2
-rw-r--r--oox/source/vml/vmldrawing.cxx4
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx2
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx50
-rw-r--r--reportdesign/source/core/sdr/UndoEnv.cxx8
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx12
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx2
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx4
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx4
-rw-r--r--reportdesign/source/ui/misc/FunctionHelper.cxx6
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx6
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx8
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx2
-rw-r--r--sc/source/core/data/bcaslot.cxx6
-rw-r--r--sc/source/core/data/columnset.cxx2
-rw-r--r--sc/source/core/data/dociter.cxx6
-rw-r--r--sc/source/core/data/dpdimsave.cxx2
-rw-r--r--sc/source/core/data/dpresfilter.cxx8
-rw-r--r--sc/source/core/data/dpsave.cxx10
-rw-r--r--sc/source/core/data/mtvelements.cxx2
-rw-r--r--sc/source/core/data/refupdatecontext.cxx2
-rw-r--r--sc/source/core/tool/cellkeytranslator.cxx2
-rw-r--r--sc/source/core/tool/chartpos.cxx6
-rw-r--r--sc/source/core/tool/formulagroup.cxx2
-rw-r--r--sc/source/core/tool/interpr1.cxx9
-rw-r--r--sc/source/core/tool/interpr4.cxx5
-rw-r--r--sc/source/core/tool/interpr5.cxx2
-rw-r--r--sc/source/core/tool/listenerquery.cxx4
-rw-r--r--sc/source/core/tool/simplerangelist.cxx2
-rw-r--r--sc/source/core/tool/tokenstringcontext.cxx4
-rw-r--r--sc/source/filter/excel/namebuff.cxx2
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx4
-rw-r--r--sc/source/filter/excel/xetable.cxx2
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/html/htmlpars.cxx2
-rw-r--r--sc/source/filter/oox/formulabuffer.cxx2
-rw-r--r--sc/source/filter/oox/revisionfragment.cxx2
-rw-r--r--sc/source/filter/orcus/interface.cxx2
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx2
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx8
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx6
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx22
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx4
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx4
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/spellcheckcontext.cxx2
-rw-r--r--scripting/source/basprov/basscript.cxx2
-rw-r--r--sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx6
-rw-r--r--sd/source/ui/view/ToolBarManager.cxx2
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx2
-rw-r--r--sfx2/source/appl/workwin.cxx2
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx4
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx4
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx4
-rw-r--r--svl/source/items/macitem.cxx4
-rw-r--r--svl/source/misc/sharedstringpool.cxx2
-rw-r--r--svtools/source/config/extcolorcfg.cxx8
-rw-r--r--svtools/source/dialogs/roadmapwizard.cxx2
-rw-r--r--svtools/source/uno/framestatuslistener.cxx2
-rw-r--r--svtools/source/uno/generictoolboxcontroller.cxx2
-rw-r--r--svtools/source/uno/statusbarcontroller.cxx6
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx6
-rw-r--r--svx/source/dialog/charmap.cxx2
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx2
-rw-r--r--svx/source/form/fmundo.cxx2
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx2
-rw-r--r--sw/source/core/txtnode/thints.cxx5
-rw-r--r--sw/source/filter/writer/writer.cxx4
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx2
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx3
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx2
-rw-r--r--toolkit/source/controls/unocontrol.cxx2
-rw-r--r--ucb/source/ucp/file/filtask.cxx8
-rw-r--r--ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx2
-rw-r--r--ucb/source/ucp/webdav/DAVSessionFactory.cxx2
-rw-r--r--unodevtools/source/skeletonmaker/skeletonmaker.cxx2
-rw-r--r--unotools/source/config/cmdoptions.cxx2
-rw-r--r--unotools/source/config/extendedsecurityoptions.cxx2
-rw-r--r--unotools/source/config/optionsdlg.cxx2
-rw-r--r--unotools/source/config/pathoptions.cxx4
-rw-r--r--unoxml/source/dom/saxbuilder.cxx6
-rw-r--r--unoxml/source/events/eventdispatcher.cxx4
-rw-r--r--unoxml/source/xpath/xpathapi.cxx2
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.cxx2
-rw-r--r--winaccessibility/source/service/AccObject.cxx2
-rw-r--r--winaccessibility/source/service/AccObjectWinManager.cxx8
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx4
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx10
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx3
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx18
-rw-r--r--xmloff/source/core/i18nmap.cxx2
-rw-r--r--xmloff/source/core/nmspmap.cxx2
-rw-r--r--xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx2
-rw-r--r--xmloff/source/forms/layerexport.cxx2
-rw-r--r--xmloff/source/forms/layerimport.cxx3
-rw-r--r--xmloff/source/forms/property_meta_data.cxx2
-rw-r--r--xmloff/source/style/SinglePropertySetInfoCache.cxx2
-rw-r--r--xmlsecurity/source/component/certificatecontainer.cxx4
212 files changed, 495 insertions, 520 deletions
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index 8c5765835bb7..47c8f9ecd3a5 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -147,7 +147,7 @@ namespace accessibility
{
AccessibleListBoxEntry *pEntNew = new AccessibleListBoxEntry( *getListBox(), pEntry, nullptr );
m_xFocusedChild = pEntNew;
- m_mapEntry.insert(MAP_ENTRY::value_type(pEntry,pEntNew));
+ m_mapEntry.emplace(pEntry,pEntNew);
}
aNewValue <<= m_xFocusedChild;
@@ -232,7 +232,7 @@ namespace accessibility
else
{
pAccCurOptionEntry =new AccessibleListBoxEntry( *getListBox(), pEntry, nullptr );
- std::pair<MAP_ENTRY::iterator, bool> pairMi = m_mapEntry.insert(MAP_ENTRY::value_type(pAccCurOptionEntry->GetSvLBoxEntry(),pAccCurOptionEntry));
+ std::pair<MAP_ENTRY::iterator, bool> pairMi = m_mapEntry.emplace(pAccCurOptionEntry->GetSvLBoxEntry(), pAccCurOptionEntry);
mi = pairMi.first;
}
diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx
index 7a88351c91a2..302ee29145b4 100644
--- a/accessibility/source/helper/characterattributeshelper.cxx
+++ b/accessibility/source/helper/characterattributeshelper.cxx
@@ -27,19 +27,19 @@ using namespace ::com::sun::star::beans;
CharacterAttributesHelper::CharacterAttributesHelper( const vcl::Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor )
{
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharBackColor" ), Any( nBackColor ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharColor" ), Any( nColor ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontCharSet" ), Any( (sal_Int16) rFont.GetCharSet() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontFamily" ), Any( (sal_Int16) rFont.GetFamilyType() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontName" ), Any( rFont.GetFamilyName() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontPitch" ), Any( (sal_Int16) rFont.GetPitch() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontStyleName" ), Any( rFont.GetStyleName() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharHeight" ), Any( (sal_Int16) rFont.GetFontSize().Height() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharScaleWidth" ), Any( (sal_Int16) rFont.GetFontSize().Width() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharStrikeout" ), Any( (sal_Int16) rFont.GetStrikeout() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharUnderline" ), Any( (sal_Int16) rFont.GetUnderline() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharWeight" ), Any( (float) rFont.GetWeight() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharPosture" ), Any( (sal_Int16)rFont.GetItalic() ) ) );
+ m_aAttributeMap.emplace( OUString( "CharBackColor" ), Any( nBackColor ) );
+ m_aAttributeMap.emplace( OUString( "CharColor" ), Any( nColor ) );
+ m_aAttributeMap.emplace( OUString( "CharFontCharSet" ), Any( (sal_Int16) rFont.GetCharSet() ) );
+ m_aAttributeMap.emplace( OUString( "CharFontFamily" ), Any( (sal_Int16) rFont.GetFamilyType() ) );
+ m_aAttributeMap.emplace( OUString( "CharFontName" ), Any( rFont.GetFamilyName() ) );
+ m_aAttributeMap.emplace( OUString( "CharFontPitch" ), Any( (sal_Int16) rFont.GetPitch() ) );
+ m_aAttributeMap.emplace( OUString( "CharFontStyleName" ), Any( rFont.GetStyleName() ) );
+ m_aAttributeMap.emplace( OUString( "CharHeight" ), Any( (sal_Int16) rFont.GetFontSize().Height() ) );
+ m_aAttributeMap.emplace( OUString( "CharScaleWidth" ), Any( (sal_Int16) rFont.GetFontSize().Width() ) );
+ m_aAttributeMap.emplace( OUString( "CharStrikeout" ), Any( (sal_Int16) rFont.GetStrikeout() ) );
+ m_aAttributeMap.emplace( OUString( "CharUnderline" ), Any( (sal_Int16) rFont.GetUnderline() ) );
+ m_aAttributeMap.emplace( OUString( "CharWeight" ), Any( (float) rFont.GetWeight() ) );
+ m_aAttributeMap.emplace( OUString( "CharPosture" ), Any( (sal_Int16)rFont.GetItalic() ) );
}
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index 3bbd139ed9fb..0dd0134a54d5 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -738,7 +738,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal
pChild->SetChecked( true );
if ( pToolBox->GetItemState( nItemId ) == TRISTATE_INDET )
pChild->SetIndeterminate( true );
- m_aAccessibleChildren.insert( ToolBoxItemsMap::value_type( i, xChild ) );
+ m_aAccessibleChildren.emplace( i, xChild );
}
else
{
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 91515535a257..8e29d0223ff6 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -657,7 +657,7 @@ void LibInfo::InsertInfo (
{
Key aKey(rDocument, rLibName);
m_aMap.erase(aKey);
- m_aMap.insert(Map::value_type(aKey, Item(rCurrentName, eCurrentType)));
+ m_aMap.emplace(aKey, Item(rCurrentName, eCurrentType));
}
void LibInfo::RemoveInfoFor (ScriptDocument const& rDocument)
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 0b02ee3b903c..6b9aad86f5cc 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -515,7 +515,7 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox, void )
DBG_ASSERT( pMethod, "Method not found! (NULL)" );
sal_uInt16 nStart, nEnd;
pMethod->GetLineRange( nStart, nEnd );
- aMacros.insert( map< sal_uInt16, SbMethod*>::value_type( nStart, pMethod ) );
+ aMacros.emplace( nStart, pMethod );
}
m_pMacroBox->SetUpdateMode(false);
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index ff888c6dab5e..3f904c96a991 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -382,7 +382,7 @@ void DlgEditor::SetDialog( const uno::Reference< container::XNameContainer >& xU
xPSet->getPropertyValue( DLGED_PROP_TABINDEX ) >>= nTabIndex;
// insert into map
- aIndexToNameMap.insert( IndexToNameMap::value_type( nTabIndex, aName ) );
+ aIndexToNameMap.emplace( nTabIndex, aName );
}
// create controls and insert them into drawing page
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index bead2801ebe8..21f88e3bc335 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -562,7 +562,7 @@ void DlgEdObj::TabIndexChange( const beans::PropertyChangeEvent& evt )
xPSet->getPropertyValue( DLGED_PROP_TABINDEX ) >>= nTabIndex;
// insert into map
- aIndexToNameMap.insert( IndexToNameMap::value_type( nTabIndex, aName ) );
+ aIndexToNameMap.emplace( nTabIndex, aName );
}
// create a helper list of control names, sorted by tab index
@@ -1424,7 +1424,7 @@ void DlgEdForm::UpdateTabIndices()
xPSet->getPropertyValue( DLGED_PROP_TABINDEX ) >>= nTabIndex;
// insert into map
- aIndexToNameMap.insert( IndexToNameMap::value_type( nTabIndex, aName ) );
+ aIndexToNameMap.emplace( nTabIndex, aName );
}
// set new tab indices
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx
index b3d003e23881..445132401574 100644
--- a/basic/source/classes/codecompletecache.cxx
+++ b/basic/source/classes/codecompletecache.cxx
@@ -126,7 +126,7 @@ void CodeCompleteDataCache::Clear()
void CodeCompleteDataCache::InsertGlobalVar( const OUString& sVarName, const OUString& sVarType )
{
- aGlobalVars.insert( CodeCompleteVarTypes::value_type(sVarName, sVarType) );
+ aGlobalVars.emplace( sVarName, sVarType );
}
void CodeCompleteDataCache::InsertLocalVar( const OUString& sProcName, const OUString& sVarName, const OUString& sVarType )
@@ -135,13 +135,13 @@ void CodeCompleteDataCache::InsertLocalVar( const OUString& sProcName, const OUS
if( aIt == aVarScopes.end() ) //new procedure
{
CodeCompleteVarTypes aTypes;
- aTypes.insert( CodeCompleteVarTypes::value_type(sVarName, sVarType) );
- aVarScopes.insert( CodeCompleteVarScopes::value_type(sProcName, aTypes) );
+ aTypes.emplace( sVarName, sVarType );
+ aVarScopes.emplace( sProcName, aTypes );
}
else
{
CodeCompleteVarTypes aTypes = aVarScopes[ sProcName ];
- aTypes.insert( CodeCompleteVarTypes::value_type(sVarName, sVarType) );
+ aTypes.emplace( sVarName, sVarType );
aVarScopes[ sProcName ] = aTypes;
}
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 61e1cfd7da6e..6cfb13b110ac 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -267,7 +267,7 @@ DocObjectWrapper::invoke( const OUString& aFunctionName, const Sequence< Any >&
if ( pVar )
{
SbxVariableRef xVar = pVar;
- aOutParamMap.insert( OutParamMap::value_type( n - 1, sbxToUnoValue( xVar.get() ) ) );
+ aOutParamMap.emplace( n - 1, sbxToUnoValue( xVar.get() ) );
}
}
}
diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx
index d9242264ae0f..ffc05ddfeb5a 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -702,7 +702,7 @@ ErrCode Dll::getProc(OUString const & name, ProcData * proc) {
}
ErrCode e = getProcData(handle, name, proc);
if (e == ERRCODE_NONE) {
- procs.insert(Procs::value_type(name, *proc));
+ procs.emplace(name, *proc);
}
return e;
}
@@ -734,7 +734,7 @@ public:
Dll * SbiDllMgr::Impl::getDll(OUString const & name) {
Dlls::iterator i(dlls.find(name));
if (i == dlls.end()) {
- i = dlls.insert(Dlls::value_type(name, new Dll)).first;
+ i = dlls.emplace(name, new Dll).first;
HMODULE h = LoadLibraryW(reinterpret_cast<LPCWSTR>(name.getStr()));
if (h == nullptr) {
dlls.erase(i);
diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx
index 3d5e9fbcf63d..2f3203e72751 100644
--- a/basic/source/runtime/dllmgr-x86.cxx
+++ b/basic/source/runtime/dllmgr-x86.cxx
@@ -656,7 +656,7 @@ ErrCode Dll::getProc(OUString const & name, ProcData * proc) {
}
ErrCode e = getProcData(handle, name, proc);
if (e == ERRCODE_NONE) {
- procs.insert(Procs::value_type(name, *proc));
+ procs.emplace(name, *proc);
}
return e;
}
@@ -688,7 +688,7 @@ public:
Dll * SbiDllMgr::Impl::getDll(OUString const & name) {
Dlls::iterator i(dlls.find(name));
if (i == dlls.end()) {
- i = dlls.insert(Dlls::value_type(name, new Dll)).first;
+ i = dlls.emplace(name, new Dll).first;
HMODULE h = LoadLibraryW(reinterpret_cast<LPCWSTR>(name.getStr()));
if (h == 0) {
dlls.erase(i);
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 1a05bc26430f..191ca4dc087f 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -428,9 +428,9 @@ OUString Bridge::registerOutgoingInterface(
//TODO: Release sub-stub if it is not successfully sent to remote side
// (otherwise, stub will leak until terminate()):
if (j == stub->end()) {
- j = stub->insert(Stub::value_type(type, SubStub())).first;
+ j = stub->emplace(type, SubStub()).first;
if (stub == &newStub) {
- i = stubs_.insert(Stubs::value_type(oid, Stub())).first;
+ i = stubs_.emplace(oid, Stub()).first;
std::swap(i->second, newStub);
j = i->second.find(type);
assert(j != i->second.end());
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 65dbb03c1cd1..6df5acbff883 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -216,7 +216,7 @@ VtableFactory::Vtables VtableFactory::getVtables(
for (sal_Int32 j = 0; j < vtables.count; ++j) {
vtables.blocks[j] = blocks[j];
}
- i = m_map.insert(Map::value_type(name, vtables)).first;
+ i = m_map.emplace(name, vtables).first;
guardedBlocks.release();
blocks.unguard();
}
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index 0df608770e26..6440d4d30225 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -113,7 +113,7 @@ void lcl_CloneAttributedDataPoints(
if( xPoint.is())
{
lcl_SetParent( xPoint, xSeries );
- rDestination.insert( lcl_tDataPointMap::value_type( (*aIt).first, xPoint ));
+ rDestination.emplace( (*aIt).first, xPoint );
}
}
}
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 40a40cc75341..d38130d6e0cd 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -293,7 +293,7 @@ lcl_tCooSysMapping lcl_CloneCoordinateSystems(
if( xClone.is())
{
rDestination.push_back( xClone );
- aResult.insert( lcl_tCooSysMapping::value_type( *aIt, xClone ));
+ aResult.emplace( *aIt, xClone );
}
else
rDestination.push_back( *aIt );
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index cc6a7c31e49c..2888ece39dba 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -454,7 +454,7 @@ void InternalDataProvider::adaptMapReferences(
if( xNamed.is())
xNamed->setName( rNewRangeRepresentation );
}
- aNewElements.insert( tSequenceMap::value_type( rNewRangeRepresentation, aIt->second ));
+ aNewElements.emplace( rNewRangeRepresentation, aIt->second );
}
// erase map values for old index
m_aSequenceMap.erase( aRange.first, aRange.second );
diff --git a/chart2/source/tools/NameContainer.cxx b/chart2/source/tools/NameContainer.cxx
index 58e9296a678b..77cac3860f9e 100644
--- a/chart2/source/tools/NameContainer.cxx
+++ b/chart2/source/tools/NameContainer.cxx
@@ -78,7 +78,7 @@ void SAL_CALL NameContainer::insertByName( const OUString& rName, const Any& rEl
{
if( m_aMap.find( rName ) != m_aMap.end() )
throw container::ElementExistException();
- m_aMap.insert( tContentMap::value_type( rName, rElement ));
+ m_aMap.emplace( rName, rElement );
}
void SAL_CALL NameContainer::removeByName( const OUString& Name )
diff --git a/chart2/source/tools/PropertyHelper.cxx b/chart2/source/tools/PropertyHelper.cxx
index 3b0f71839830..780afb3c981a 100644
--- a/chart2/source/tools/PropertyHelper.cxx
+++ b/chart2/source/tools/PropertyHelper.cxx
@@ -266,7 +266,7 @@ void setPropertyValueAny( tPropertyValueMap & rOutMap, tPropertyValueMapKey key,
{
tPropertyValueMap::iterator aIt( rOutMap.find( key ));
if( aIt == rOutMap.end())
- rOutMap.insert( tPropertyValueMap::value_type( key, rAny ));
+ rOutMap.emplace( key, rAny );
else
(*aIt).second = rAny;
}
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 111fe2ba9281..dc69bc4aa0b5 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2574,7 +2574,7 @@ void formatPage(
PropertyMapper::getValueMap( aNameValueMap, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xModelPage );
OUString aCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) );
- aNameValueMap.insert( tPropertyNameValueMap::value_type( "Name", uno::Any( aCID ) ) ); //CID OUString
+ aNameValueMap.emplace( "Name", uno::Any( aCID ) ); //CID OUString
tNameSequence aNames;
tAnySequence aValues;
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 15bc0dbea5a6..07bf987ec336 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -97,7 +97,7 @@ void PropertyMapper::getValueMap(
for(sal_Int32 i = 0, n = rNameMap.size(); i < n; ++i)
{
if( xValues[i].hasValue() )
- rValueMap.insert( tPropertyNameValueMap::value_type( aPropTargetNames[i], xValues[i] ) );
+ rValueMap.emplace( aPropTargetNames[i], xValues[i] );
}
}
else
@@ -110,7 +110,7 @@ void PropertyMapper::getValueMap(
{
uno::Any aAny( xSourceProp->getPropertyValue(aSource) );
if( aAny.hasValue() )
- rValueMap.insert( tPropertyNameValueMap::value_type( aTarget, aAny ) );
+ rValueMap.emplace( aTarget, aAny );
}
catch( const uno::Exception& e )
{
@@ -452,20 +452,20 @@ void PropertyMapper::getTextLabelMultiPropertyLists(
PropertyMapper::getValueMap(aValueMap, aNameMap, xSourceProp);
//some more shape properties apart from character properties, position-matrix and label string
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextHorizontalAdjust", uno::Any(drawing::TextHorizontalAdjust_CENTER) ) ); // drawing::TextHorizontalAdjust - needs to be overwritten
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextVerticalAdjust", uno::Any(drawing::TextVerticalAdjust_CENTER) ) ); //drawing::TextVerticalAdjust - needs to be overwritten
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextAutoGrowHeight", uno::Any(true) ) ); // sal_Bool
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextAutoGrowWidth", uno::Any(true) ) ); // sal_Bool
+ aValueMap.emplace( "TextHorizontalAdjust", uno::Any(drawing::TextHorizontalAdjust_CENTER) ); // drawing::TextHorizontalAdjust - needs to be overwritten
+ aValueMap.emplace( "TextVerticalAdjust", uno::Any(drawing::TextVerticalAdjust_CENTER) ); //drawing::TextVerticalAdjust - needs to be overwritten
+ aValueMap.emplace( "TextAutoGrowHeight", uno::Any(true) ); // sal_Bool
+ aValueMap.emplace( "TextAutoGrowWidth", uno::Any(true) ); // sal_Bool
if( bName )
- aValueMap.insert( tPropertyNameValueMap::value_type( "Name", uno::Any( OUString() ) ) ); //CID OUString - needs to be overwritten for each point
+ aValueMap.emplace( "Name", uno::Any( OUString() ) ); //CID OUString - needs to be overwritten for each point
if( nLimitedSpace > 0 )
{
if(bLimitedHeight)
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextMaximumFrameHeight", uno::Any(nLimitedSpace) ) ); //sal_Int32
+ aValueMap.emplace( "TextMaximumFrameHeight", uno::Any(nLimitedSpace) ); //sal_Int32
else
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextMaximumFrameWidth", uno::Any(nLimitedSpace) ) ); //sal_Int32
- aValueMap.insert( tPropertyNameValueMap::value_type( "ParaIsHyphenation", uno::Any(true) ) );
+ aValueMap.emplace( "TextMaximumFrameWidth", uno::Any(nLimitedSpace) ); //sal_Int32
+ aValueMap.emplace( "ParaIsHyphenation", uno::Any(true) );
}
PropertyMapper::getMultiPropertyListsFromValueMap( rPropNames, rPropValues, aValueMap );
@@ -482,18 +482,18 @@ void PropertyMapper::getPreparedTextShapePropertyLists(
, xSourceProp );
// auto-grow makes sure the shape has the correct size after setting text
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextHorizontalAdjust", uno::Any( drawing::TextHorizontalAdjust_CENTER )));
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextVerticalAdjust", uno::Any( drawing::TextVerticalAdjust_CENTER )));
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextAutoGrowHeight", uno::Any( true )));
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextAutoGrowWidth", uno::Any( true )));
+ aValueMap.emplace( "TextHorizontalAdjust", uno::Any( drawing::TextHorizontalAdjust_CENTER ));
+ aValueMap.emplace( "TextVerticalAdjust", uno::Any( drawing::TextVerticalAdjust_CENTER ));
+ aValueMap.emplace( "TextAutoGrowHeight", uno::Any( true ));
+ aValueMap.emplace( "TextAutoGrowWidth", uno::Any( true ));
// set some distance to the border, in case it is shown
const sal_Int32 nWidthDist = 250;
const sal_Int32 nHeightDist = 125;
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextLeftDistance", uno::Any( nWidthDist )));
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextRightDistance", uno::Any( nWidthDist )));
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextUpperDistance", uno::Any( nHeightDist )));
- aValueMap.insert( tPropertyNameValueMap::value_type( "TextLowerDistance", uno::Any( nHeightDist )));
+ aValueMap.emplace( "TextLeftDistance", uno::Any( nWidthDist ));
+ aValueMap.emplace( "TextRightDistance", uno::Any( nWidthDist ));
+ aValueMap.emplace( "TextUpperDistance", uno::Any( nHeightDist ));
+ aValueMap.emplace( "TextLowerDistance", uno::Any( nHeightDist ));
// use a line-joint showing the border of thick lines like two rectangles
// filled in between.
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index ff26c60e366b..35c450eafe71 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2281,7 +2281,7 @@ uno::Reference< drawing::XShape >
//set name/classified ObjectID (CID)
if( !aName.isEmpty() )
- aValueMap.insert( tPropertyNameValueMap::value_type( "Name", uno::Any( aName ) ) ); //CID OUString
+ aValueMap.emplace( "Name", uno::Any( aName ) ); //CID OUString
}
//set global title properties
diff --git a/comphelper/source/container/NamedPropertyValuesContainer.cxx b/comphelper/source/container/NamedPropertyValuesContainer.cxx
index 7e72ccce808e..771c9ac5a262 100644
--- a/comphelper/source/container/NamedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/NamedPropertyValuesContainer.cxx
@@ -76,7 +76,7 @@ void SAL_CALL NamedPropertyValuesContainer::insertByName( const OUString& aName,
if( !(aElement >>= aProps ) )
throw lang::IllegalArgumentException();
- maProperties.insert( NamedPropertyValues::value_type(aName ,aProps) );
+ maProperties.emplace( aName, aProps );
}
void SAL_CALL NamedPropertyValuesContainer::removeByName( const OUString& Name )
diff --git a/comphelper/source/container/namecontainer.cxx b/comphelper/source/container/namecontainer.cxx
index 23b87df8b94c..3e7e8c61ea5f 100644
--- a/comphelper/source/container/namecontainer.cxx
+++ b/comphelper/source/container/namecontainer.cxx
@@ -82,7 +82,7 @@ void SAL_CALL NameContainer::insertByName( const OUString& aName, const Any& aEl
if( aElement.getValueType() != maType )
throw IllegalArgumentException();
- maProperties.insert( SvGenericNameContainerMapImpl::value_type(aName,aElement));
+ maProperties.emplace(aName,aElement);
}
void SAL_CALL NameContainer::removeByName( const OUString& Name )
diff --git a/comphelper/source/misc/accessibleeventnotifier.cxx b/comphelper/source/misc/accessibleeventnotifier.cxx
index 702d03bab8fd..884109279251 100644
--- a/comphelper/source/misc/accessibleeventnotifier.cxx
+++ b/comphelper/source/misc/accessibleeventnotifier.cxx
@@ -157,7 +157,7 @@ AccessibleEventNotifier::TClientId AccessibleEventNotifier::registerClient()
// completely nonsense, and potentially slowing down the Office me thinks...
// add the client
- Clients::get().insert( ClientMap::value_type( nNewClientId, pNewListeners ) );
+ Clients::get().emplace( nNewClientId, pNewListeners );
// outta here
return nNewClientId;
diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx
index b3be3ddbf5ac..027301a4d318 100644
--- a/comphelper/source/property/propertybag.cxx
+++ b/comphelper/source/property/propertybag.cxx
@@ -123,7 +123,7 @@ namespace comphelper
registerPropertyNoMember( _rName, _nHandle, _nAttributes | PropertyAttribute::MAYBEVOID, _rType, css::uno::Any() );
// remember the default
- m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, Any() ) );
+ m_pImpl->aDefaults.emplace( _nHandle, Any() );
}
@@ -146,7 +146,7 @@ namespace comphelper
_rInitialValue );
// remember the default
- m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, _rInitialValue ) );
+ m_pImpl->aDefaults.emplace( _nHandle, _rInitialValue );
}
diff --git a/configmgr/source/dconf.cxx b/configmgr/source/dconf.cxx
index 2ba4d0c9b43c..35e626163fa3 100644
--- a/configmgr/source/dconf.cxx
+++ b/configmgr/source/dconf.cxx
@@ -1036,9 +1036,9 @@ void readDir(
}
} else if (replace) {
members.erase(name);
- members.insert(NodeMap::value_type(name, member));
+ members.emplace( name, member));
} else if (insert) {
- members.insert(NodeMap::value_type(name, member));
+ members.emplace( name, member));
}
}
}
diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx
index 2da9b4dc4953..a6b78b0d0330 100644
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -115,7 +115,7 @@ const TInstalledDrivers& DriversConfigImpl::getInstalledDrivers(const uno::Refer
if ( !aInstalledDriver.sDriverFactory.isEmpty() &&
( aMiscOptions.IsExperimentalMode() ||
aInstalledDriver.sDriverFactory != "com.sun.star.comp.sdbc.firebird.Driver" ))
- m_aDrivers.insert(TInstalledDrivers::value_type(*pPatternIter,aInstalledDriver));
+ m_aDrivers.emplace(*pPatternIter,aInstalledDriver);
}
} // if ( m_aInstalled.isValid() )
}
diff --git a/connectivity/source/commontools/TSkipDeletedSet.cxx b/connectivity/source/commontools/TSkipDeletedSet.cxx
index 5778e219d121..d2317c838bff 100644
--- a/connectivity/source/commontools/TSkipDeletedSet.cxx
+++ b/connectivity/source/commontools/TSkipDeletedSet.cxx
@@ -75,7 +75,7 @@ bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPosition, s
{
bDataFound = m_pHelper->move(IResultSetHelper::FIRST, 0, _bRetrieveData);
if(bDataFound && (m_bDeletedVisible || !m_pHelper->isRowDeleted()))
- //m_aBookmarksPositions.push_back(m_aBookmarks.insert(TInt2IntMap::value_type(m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
+ //m_aBookmarksPositions.push_back(m_aBookmarks.emplace( m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
m_aBookmarksPositions.push_back(m_pHelper->getDriverPos());
}
else
@@ -95,7 +95,7 @@ bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPosition, s
if( bDataFound && ( m_bDeletedVisible || !m_pHelper->isRowDeleted()) )
{ // we weren't on the last row we remember it and move on
m_aBookmarksPositions.push_back(m_pHelper->getDriverPos());
- //m_aBookmarksPositions.push_back(m_aBookmarks.insert(TInt2IntMap::value_type(m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
+ //m_aBookmarksPositions.push_back(m_aBookmarks.emplace( m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
}
else if(!bDataFound && !m_aBookmarksPositions.empty() )
{
@@ -121,7 +121,7 @@ bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPosition, s
bDone = (--nDelOffset) == 0;
if ( !bDone )
m_aBookmarksPositions.push_back(m_pHelper->getDriverPos());
- //m_aBookmarksPositions.push_back(m_aBookmarks.insert(TInt2IntMap::value_type(m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
+ //m_aBookmarksPositions.push_back(m_aBookmarks.emplace( m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
}
else
bDone = false;
@@ -137,7 +137,7 @@ bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPosition, s
bDone = (--nDelOffset) == 0;
if ( !bDone )
m_aBookmarksPositions.push_back(m_pHelper->getDriverPos());
- //m_aBookmarksPositions.push_back(m_aBookmarks.insert(TInt2IntMap::value_type(m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
+ //m_aBookmarksPositions.push_back(m_aBookmarks.emplace( m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
}
else
bDone = false;
@@ -155,7 +155,7 @@ bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPosition, s
m_aBookmarksPositions.push_back(nDriverPos);
/*sal_Int32 nDriverPos = m_pHelper->getDriverPos();
if(m_aBookmarks.find(nDriverPos) == m_aBookmarks.end())
- m_aBookmarksPositions.push_back(m_aBookmarks.insert(TInt2IntMap::value_type(nDriverPos,m_aBookmarksPositions.size()+1)).first);*/
+ m_aBookmarksPositions.push_back(m_aBookmarks.emplace( nDriverPos,m_aBookmarksPositions.size()+1)).first);*/
}
return bDataFound;
@@ -179,7 +179,7 @@ bool OSkipDeletedSet::moveAbsolute(sal_Int32 _nPos,bool _bRetrieveData)
{
++nCurPos;
m_aBookmarksPositions.push_back(m_pHelper->getDriverPos());
- //m_aBookmarksPositions.push_back(m_aBookmarks.insert(TInt2IntMap::value_type(m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
+ //m_aBookmarksPositions.push_back(m_aBookmarks.emplace( m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
--nNewPos;
}
} // if ( m_aBookmarksPositions.empty() )
@@ -199,7 +199,7 @@ bool OSkipDeletedSet::moveAbsolute(sal_Int32 _nPos,bool _bRetrieveData)
{
++nCurPos;
m_aBookmarksPositions.push_back(m_pHelper->getDriverPos());
- //m_aBookmarksPositions.push_back(m_aBookmarks.insert(TInt2IntMap::value_type(m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
+ //m_aBookmarksPositions.push_back(m_aBookmarks.emplace( m_pHelper->getDriverPos(),m_aBookmarksPositions.size()+1)).first);
--nNewPos;
}
}
@@ -244,7 +244,7 @@ sal_Int32 OSkipDeletedSet::getMappedPosition(sal_Int32 _nPos) const
void OSkipDeletedSet::insertNewPosition(sal_Int32 _nPos)
{
//OSL_ENSURE(m_aBookmarks.find(_nPos) == m_aBookmarks.end(),"OSkipDeletedSet::insertNewPosition: Invalid position");
- //m_aBookmarksPositions.push_back(m_aBookmarks.insert(TInt2IntMap::value_type(_nPos,m_aBookmarksPositions.size()+1)).first);
+ //m_aBookmarksPositions.push_back(m_aBookmarks.emplace( _nPos,m_aBookmarksPositions.size()+1)).first);
//OSL_ENSURE(std::find(m_aBookmarksPositions.begin(),m_aBookmarksPositions.end(),_nPos) == m_aBookmarksPositions.end(),"Invalid driver pos");
m_aBookmarksPositions.push_back(_nPos);
}
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 928164308839..8569f225b132 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -349,7 +349,7 @@ void OTableHelper::refreshPrimaryKeys(TStringVector& _rNames)
{
SAL_WARN_IF(aPkName.isEmpty(),"connectivity.commontools", "empty Primary Key name");
SAL_WARN_IF(pKeyProps->m_aKeyColumnNames.size() == 0,"connectivity.commontools", "Primary Key has no columns");
- m_pImpl->m_aKeys.insert(TKeyMap::value_type(aPkName,pKeyProps));
+ m_pImpl->m_aKeys.emplace(aPkName,pKeyProps);
_rNames.push_back(aPkName);
}
} // if ( xResult.is() && xResult->next() )
@@ -392,7 +392,7 @@ void OTableHelper::refreshForeignKeys(TStringVector& _rNames)
if ( sOldFKName != sFkName )
{
if ( pKeyProps.get() )
- m_pImpl->m_aKeys.insert(TKeyMap::value_type(sOldFKName,pKeyProps));
+ m_pImpl->m_aKeys.emplace(sOldFKName,pKeyProps);
const OUString sReferencedName = ::dbtools::composeTableName(getMetaData(),sCatalog,aSchema,aName,false,::dbtools::EComposeRule::InDataManipulation);
pKeyProps.reset(new sdbcx::KeyProperties(sReferencedName,KeyType::FOREIGN,nUpdateRule,nDeleteRule));
@@ -414,7 +414,7 @@ void OTableHelper::refreshForeignKeys(TStringVector& _rNames)
}
} // while( xResult->next() )
if ( pKeyProps.get() )
- m_pImpl->m_aKeys.insert(TKeyMap::value_type(sOldFKName,pKeyProps));
+ m_pImpl->m_aKeys.emplace(sOldFKName,pKeyProps);
::comphelper::disposeComponent(xResult);
}
}
@@ -586,7 +586,7 @@ std::shared_ptr<sdbcx::KeyProperties> OTableHelper::getKeyProperties(const OUStr
void OTableHelper::addKey(const OUString& _sName,const std::shared_ptr<sdbcx::KeyProperties>& _aKeyProperties)
{
- m_pImpl->m_aKeys.insert(TKeyMap::value_type(_sName,_aKeyProperties));
+ m_pImpl->m_aKeys.emplace(_sName,_aKeyProperties);
}
OUString OTableHelper::getTypeCreatePattern() const
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 7ee10d3f3323..be98ee4ea918 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -819,8 +819,8 @@ void collectColumnInformation(const Reference< XConnection>& _xConnection,
OSL_ENSURE( nCount != 0, "::dbtools::collectColumnInformation: result set has empty (column-less) meta data!" );
for (sal_Int32 i=1; i <= nCount ; ++i)
{
- _rInfo.insert(ColumnInformationMap::value_type(xMeta->getColumnName(i),
- ColumnInformation(TBoolPair(xMeta->isAutoIncrement(i),xMeta->isCurrency(i)),xMeta->getColumnType(i))));
+ _rInfo.emplace( xMeta->getColumnName(i),
+ ColumnInformation(TBoolPair(xMeta->isAutoIncrement(i),xMeta->isCurrency(i)),xMeta->getColumnType(i)));
}
}
catch( const Exception& )
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index 30311ba22aa4..e5513f078055 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -193,8 +193,8 @@ namespace dbtools
if ( aExistentPos == m_aParameterInformation.end() )
{
- aExistentPos = m_aParameterInformation.insert( ParameterInformation::value_type(
- sName, xParam ) ).first;
+ aExistentPos = m_aParameterInformation.emplace(
+ sName, xParam ).first;
}
else
aExistentPos->second.xComposerColumn = xParam;
diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx
index 346f102e8401..cfa16ca44e2a 100644
--- a/connectivity/source/cpool/ZConnectionPool.cxx
+++ b/connectivity/source/cpool/ZConnectionPool.cxx
@@ -215,9 +215,9 @@ Reference< XConnection> OConnectionPool::createNewConnection(const OUString& _rU
// insert the new connection and struct into the active connection map
aPack.nALiveCount = m_nALiveCount;
TActiveConnectionInfo aActiveInfo;
- aActiveInfo.aPos = m_aPool.insert(TConnectionMap::value_type(nId,aPack)).first;
+ aActiveInfo.aPos = m_aPool.emplace(nId,aPack).first;
aActiveInfo.xPooledConnection = xPooledConnection;
- m_aActiveConnections.insert(TActiveConnectionMap::value_type(xConnection,aActiveInfo));
+ m_aActiveConnections.emplace(xConnection,aActiveInfo);
if(m_xInvalidator->isExpired())
m_xInvalidator->start();
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 22ac35d02d9f..811be298bb07 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -305,7 +305,7 @@ OConnectionPool* OPoolCollection::getConnectionPool(const OUString& _sImplName,
if(xProp.is())
xProp->addPropertyChangeListener(getEnableNodeName(),this);
OConnectionPool* pConnectionPool = new OConnectionPool(_xDriver,_xDriverNode,m_xProxyFactory);
- aFind = m_aPools.insert(OConnectionPools::value_type(_sImplName,pConnectionPool)).first;
+ aFind = m_aPools.emplace(_sImplName,pConnectionPool).first;
pRet = aFind->second.get();
}
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index b7c39c7e5550..aafb81d39368 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -461,7 +461,7 @@ void OConnection::buildTypeInfo()
// in the Hashtable if we don't already have an
// entry for this SQL type.
- m_aTypeInfo.insert(OTypeInfoMap::value_type(aInfo->eType,aInfo));
+ m_aTypeInfo.emplace(aInfo->eType,aInfo);
}
while ( SUCCEEDED(pRecordset->MoveNext()) );
}
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 96ea61692aa8..32425cf69d51 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1465,7 +1465,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
if ( aCase(sTableColumnName, sSelectColumnRealName) && !(*aRowIter)->isBound() && aSelectIters.end() == aSelectIters.find(aIter) )
{
- aSelectIters.insert(IterMap::value_type(aIter,true));
+ aSelectIters.emplace(aIter,true);
if(_bSetColumnMapping)
{
sal_Int32 nSelectColumnPos = aIter - _rxColumns->get().begin() + 1;
@@ -1511,7 +1511,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
if ( xNameAccess->hasByName( sSelectColumnRealName ) )
{
- aSelectIters.insert(IterMap::value_type(aIter,true));
+ aSelectIters.emplace(aIter,true);
sal_Int32 nSelectColumnPos = aIter - _rxColumns->get().begin() + 1;
const OUString* pBegin = aSelectColumns.getConstArray();
const OUString* pEnd = pBegin + aSelectColumns.getLength();
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx
index 68a29c2e7c9b..f5d5b2cd83ba 100644
--- a/connectivity/source/drivers/mysql/YDriver.cxx
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
@@ -238,7 +238,7 @@ namespace connectivity
OUString sDriverClass(getJavaDriverClass(info));
TJDBCDrivers::iterator aFind = m_aJdbcDrivers.find(sDriverClass);
if ( aFind == m_aJdbcDrivers.end() )
- aFind = m_aJdbcDrivers.insert(TJDBCDrivers::value_type(sDriverClass,lcl_loadDriver(m_xContext,sCuttedUrl))).first;
+ aFind = m_aJdbcDrivers.emplace(sDriverClass,lcl_loadDriver(m_xContext,sCuttedUrl)).first;
xDriver = aFind->second;
}
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index 53216e2bd0cd..e32934774d8a 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -570,7 +570,7 @@ void SAL_CALL OSDBCDriverManager::registerObject( const OUString& _rName, const
{
Reference< XDriver > xNewDriver(_rxObject, UNO_QUERY);
if (xNewDriver.is())
- m_aDriversRT.insert(DriverCollection::value_type(_rName, xNewDriver));
+ m_aDriversRT.emplace(_rName, xNewDriver);
else
throw IllegalArgumentException();
}
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx
index 2a0ee738e5de..1a58935f5401 100644
--- a/connectivity/source/parse/PColumn.cxx
+++ b/connectivity/source/parse/PColumn.cxx
@@ -140,7 +140,7 @@ OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSe
}
sLabel = sAlias;
}
- _rColumns.insert(StringMap::value_type(sLabel,0));
+ _rColumns.emplace(sLabel,0);
OParseColumn* pColumn = new OParseColumn(
sLabel,
_rxResMetaData->getColumnTypeName( _nColumnPos ),
diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx
index a508f56e6aec..39774c9eec69 100644
--- a/cppu/source/threadpool/threadpool.cxx
+++ b/cppu/source/threadpool/threadpool.cxx
@@ -408,7 +408,7 @@ uno_threadpool_create() SAL_THROW_EXTERN_C()
// Just ensure that the handle is unique in the process (via heap)
uno_ThreadPool h = new struct _uno_ThreadPool;
- g_pThreadpoolHashSet->insert( ThreadpoolHashSet::value_type(h, p) );
+ g_pThreadpoolHashSet->emplace( h, p );
return h;
}
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 116c02e8ab77..aefadc80fdeb 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -170,8 +170,7 @@ inline void ObjectEntry::append(
aNewEntry.pTypeDescr = pTypeDescr;
std::pair< Ptr2ObjectMap::iterator, bool > i(
- pEnv->aPtr2ObjectMap.insert( Ptr2ObjectMap::value_type(
- pInterface, this ) ) );
+ pEnv->aPtr2ObjectMap.emplace( pInterface, this ) );
SAL_WARN_IF(
!i.second && (find(pInterface, 0) == -1 || i.first->second != this),
"cppu",
@@ -241,7 +240,7 @@ static void SAL_CALL defenv_registerInterface(
// try to insert dummy 0:
std::pair<OId2ObjectMap::iterator, bool> const insertion(
- that->aOId2ObjectMap.insert( OId2ObjectMap::value_type( rOId, nullptr ) ) );
+ that->aOId2ObjectMap.emplace( rOId, nullptr ) );
if (insertion.second)
{
ObjectEntry * pOEntry = new ObjectEntry( rOId );
@@ -289,7 +288,7 @@ static void SAL_CALL defenv_registerProxyInterface(
// try to insert dummy 0:
std::pair<OId2ObjectMap::iterator, bool> const insertion(
- that->aOId2ObjectMap.insert( OId2ObjectMap::value_type( rOId, nullptr ) ) );
+ that->aOId2ObjectMap.emplace( rOId, nullptr ) );
if (insertion.second)
{
ObjectEntry * pOEntry = new ObjectEntry( rOId );
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 9da485738c59..5618aef7e764 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -801,7 +801,7 @@ SvxEntries* ContextMenuSaveInData::GetEntries()
if ( xPopupMenu.is() )
{
// insert into std::unordered_map to filter duplicates from the parent
- aMenuInfo.insert( MenuInfo::value_type( aUrl, true ) );
+ aMenuInfo.emplace( aUrl, true );
OUString aUIMenuName = GetUIName( aUrl );
if ( aUIMenuName.isEmpty() )
@@ -2364,7 +2364,7 @@ SvxEntries* ToolbarSaveInData::GetEntries()
// insert into std::unordered_map to filter duplicates from the parent
- aToolbarInfo.insert( ToolbarInfo::value_type( systemname, true ));
+ aToolbarInfo.emplace( systemname, true );
OUString custom(CUSTOM_TOOLBAR_STR);
if ( systemname.startsWith( custom ) )
@@ -2426,7 +2426,7 @@ SvxEntries* ToolbarSaveInData::GetEntries()
ToolbarInfo::const_iterator pIter = aToolbarInfo.find( systemname );
if ( pIter == aToolbarInfo.end() )
{
- aToolbarInfo.insert( ToolbarInfo::value_type( systemname, true ));
+ aToolbarInfo.emplace( systemname, true );
try
{
@@ -2983,7 +2983,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
{
names = m_xImportedImageManager->getAllImageNames( SvxConfigPageHelper::GetImageType() );
for ( sal_Int32 n = 0; n < names.getLength(); ++n )
- aImageInfo1.insert( ImageInfo::value_type( names[n], false ));
+ aImageInfo1.emplace( names[n], false );
}
sal_uInt16 nId = 1;
ImageInfo::const_iterator pConstIter = aImageInfo1.begin();
@@ -3013,7 +3013,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
{
names = m_xParentImageManager->getAllImageNames( SvxConfigPageHelper::GetImageType() );
for ( sal_Int32 n = 0; n < names.getLength(); ++n )
- aImageInfo.insert( ImageInfo::value_type( names[n], false ));
+ aImageInfo.emplace( names[n], false );
}
names = m_xImageManager->getAllImageNames( SvxConfigPageHelper::GetImageType() );
@@ -3023,7 +3023,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
if ( pIter != aImageInfo.end() )
pIter->second = true;
else
- aImageInfo.insert( ImageInfo::value_type( names[n], true ));
+ aImageInfo.emplace( names[n], true );
}
// large growth factor, expecting many entries
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 849b83620fa8..4b78caf51d1d 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -323,7 +323,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet, const OUStrin
// the first row is empty because it's now easier for us to distinguish when we are beforefirst or first
// without extra variable to be set
OKeySetValue keySetValue(nullptr,std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>()));
- m_aKeyMap.insert(OKeySetMatrix::value_type(0, keySetValue));
+ m_aKeyMap.emplace(0, keySetValue);
m_aKeyIter = m_aKeyMap.begin();
}
@@ -333,7 +333,7 @@ void OKeySet::reset(const Reference< XResultSet>& _xDriverSet)
m_bRowCountFinal = false;
m_aKeyMap.clear();
OKeySetValue keySetValue(nullptr,std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>()));
- m_aKeyMap.insert(OKeySetMatrix::value_type(0,keySetValue));
+ m_aKeyMap.emplace(0,keySetValue);
m_aKeyIter = m_aKeyMap.begin();
}
@@ -353,7 +353,7 @@ void OKeySet::ensureStatement( )
// no: make a new one
makeNewStatement();
std::pair< vStatements_t::const_iterator, bool > insert_result
- (m_vStatements.insert(vStatements_t::value_type(FilterColumnsNULL, m_xStatement)));
+ (m_vStatements.emplace( FilterColumnsNULL, m_xStatement));
(void) insert_result; // WaE: unused variable
assert(insert_result.second);
}
@@ -796,7 +796,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ
ORowSetRow aKeyRow = new connectivity::ORowVector< ORowSetValue >(m_pKeyColumnNames->size());
copyRowValue(_rInsertRow,aKeyRow,aKeyIter->first + 1);
- m_aKeyIter = m_aKeyMap.insert(OKeySetMatrix::value_type(aKeyIter->first + 1,OKeySetValue(aKeyRow,std::pair<sal_Int32,Reference<XRow> >(1,Reference<XRow>())))).first;
+ m_aKeyIter = m_aKeyMap.emplace( aKeyIter->first + 1, OKeySetValue(aKeyRow,std::pair<sal_Int32,Reference<XRow> >(1,Reference<XRow>())) ).first;
// now we set the bookmark for this row
(_rInsertRow->get())[0] = makeAny((sal_Int32)m_aKeyIter->first);
tryRefetch(_rInsertRow,bRefetch);
@@ -1311,7 +1311,7 @@ bool OKeySet::fetchRow()
const SelectColumnDescription& rColDesc = aPosIter->second;
aIter->fill(rColDesc.nPosition, rColDesc.nType, m_xRow);
}
- m_aKeyIter = m_aKeyMap.insert(OKeySetMatrix::value_type(m_aKeyMap.rbegin()->first+1,OKeySetValue(aKeyRow,std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>())))).first;
+ m_aKeyIter = m_aKeyMap.emplace( m_aKeyMap.rbegin()->first+1,OKeySetValue(aKeyRow,std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>())) ).first;
}
else
m_bRowCountFinal = true;
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 7d4558390688..e3f8c8bb8491 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -126,7 +126,7 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const OU
// the first row is empty because it's now easier for us to distinguish when we are beforefirst or first
// without extra variable to be set
OKeySetValue keySetValue(nullptr,std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>()));
- m_aKeyMap.insert(OKeySetMatrix::value_type(0,keySetValue));
+ m_aKeyMap.emplace(0,keySetValue);
m_aKeyIter = m_aKeyMap.begin();
Reference< XSingleSelectQueryComposer> xSourceComposer(m_xComposer,UNO_QUERY);
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index 1641f6445d47..94d5a349fbf2 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -89,7 +89,7 @@ void OQueryContainer::init()
for ( ; pDefinitionName != pEnd; ++pDefinitionName )
{
rDefinitions.insert( *pDefinitionName, TContentPtr() );
- m_aDocuments.push_back(m_aDocumentMap.insert(Documents::value_type(*pDefinitionName,Documents::mapped_type())).first);
+ m_aDocuments.push_back(m_aDocumentMap.emplace( *pDefinitionName,Documents::mapped_type()).first);
}
setElementApproval( PContainerApprove( new ObjectNameApproval( m_xConnection, ObjectNameApproval::TypeQuery ) ) );
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
index 3f9d5df425b3..aec0fc4bcf02 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
@@ -73,7 +73,7 @@ namespace dbaccess
void insert( const OUString& _rName, const css::uno::Reference< css::beans::XPropertySet >& _rxColumn )
{
OSL_PRECOND( m_aColumns.find( _rName ) == m_aColumns.end(), "OComponentDefinition_Impl::insert: there's already an element with this name!" );
- m_aColumns.insert( Columns::value_type( _rName, _rxColumn ) );
+ m_aColumns.emplace( _rName, _rxColumn );
}
};
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index f05eda723b83..bbbe69d5f52f 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -308,7 +308,7 @@ Reference< XStorage > SAL_CALL DocumentStorageAccess::getDocumentSubStorage( con
if ( pos == m_aExposedStorages.end() )
{
Reference< XStorage > xResult = impl_openSubStorage_nothrow( aStorageName, _nDesiredMode );
- pos = m_aExposedStorages.insert( NamedStorages::value_type( aStorageName, xResult ) ).first;
+ pos = m_aExposedStorages.emplace( aStorageName, xResult ).first;
}
return pos->second;
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
index fb550264a0f0..c7696cda6ebb 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
@@ -298,7 +298,7 @@ void OBookmarkContainer::implAppend(const OUString& _rName, const OUString& _rDo
MutexGuard aGuard(m_rMutex);
OSL_ENSURE(m_aBookmarks.find(_rName) == m_aBookmarks.end(),"Bookmark already known!");
- m_aBookmarksIndexed.push_back(m_aBookmarks.insert( MapString2String::value_type(_rName,_rDocumentLocation)).first);
+ m_aBookmarksIndexed.push_back(m_aBookmarks.emplace( _rName,_rDocumentLocation).first);
}
void OBookmarkContainer::implReplace(const OUString& _rName, const OUString& _rNewLink)
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index e06b56310d7a..9d758ad6566d 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -2103,7 +2103,7 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel
pHelper->setOwner (xThis);
- m_aNumberedControllers.insert(TNumberedController::value_type(sModuleId,xNumberedControllers));
+ m_aNumberedControllers.emplace( sModuleId,xNumberedControllers );
}
else
xNumberedControllers = aFind->second;
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 1bf3af5fcd6c..0fb4ff6ce000 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -369,7 +369,7 @@ Reference<XConnection> OSharedConnectionManager::getConnection( const OUString&
TConnectionHolder aHolder;
aHolder.nALiveCount = 0; // will be incremented by addListener
aHolder.xMasterConnection = _pDataSource->buildIsolatedConnection(user,password);
- aIter = m_aConnections.insert(TConnectionMap::value_type(nId,aHolder)).first;
+ aIter = m_aConnections.emplace(nId,aHolder).first;
}
Reference<XConnection> xRet;
@@ -377,7 +377,7 @@ Reference<XConnection> OSharedConnectionManager::getConnection( const OUString&
{
Reference< XAggregation > xConProxy = m_xProxyFactory->createProxy(aIter->second.xMasterConnection.get());
xRet = new OSharedConnection(xConProxy);
- m_aSharedConnection.insert(TSharedConnectionMap::value_type(xRet,aIter));
+ m_aSharedConnection.emplace(xRet,aIter);
addEventListener(xRet,aIter);
}
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 6270c92385d6..c70e8d193714 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -554,7 +554,7 @@ void ODefinitionContainer::implAppend(const OUString& _rName, const Reference< X
}
}
- m_aDocuments.push_back(m_aDocumentMap.insert(Documents::value_type(_rName,_rxNewObject)).first);
+ m_aDocuments.push_back(m_aDocumentMap.emplace(_rName,_rxNewObject).first);
notifyDataSourceModified();
// now update our structures
if ( _rxNewObject.is() )
diff --git a/dbaccess/source/core/inc/definitioncontainer.hxx b/dbaccess/source/core/inc/definitioncontainer.hxx
index c50df7b18db0..aca848ae07c7 100644
--- a/dbaccess/source/core/inc/definitioncontainer.hxx
+++ b/dbaccess/source/core/inc/definitioncontainer.hxx
@@ -71,7 +71,7 @@ public:
void insert( const OUString& _rName, TContentPtr _pDefinition )
{
- m_aDefinitions.insert( NamedDefinitions::value_type( _rName, _pDefinition ) );
+ m_aDefinitions.emplace( _rName, _pDefinition );
}
private:
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 0644db8ac6e8..7090008dda71 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -465,7 +465,7 @@ void ODBExport::exportDataSource()
}
}
- aSettingsMap.insert(TSettingsMap::value_type(eToken,sValue));
+ aSettingsMap.emplace(eToken,sValue);
}
if ( bAutoIncrementEnabled && !(aAutoIncrement.first.isEmpty() && aAutoIncrement.second.isEmpty()) )
m_aAutoIncrement.reset( new TStringPair(aAutoIncrement));
@@ -1130,7 +1130,7 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp)
{
aPropertyStates = i.first->Filter(_xProp);
if ( !aPropertyStates.empty() )
- i.second.first->insert( TPropertyStyleMap::value_type(_xProp,GetAutoStylePool()->Add( i.second.second, aPropertyStates )));
+ i.second.first->emplace( _xProp,GetAutoStylePool()->Add( i.second.second, aPropertyStates ) );
}
Reference< XNameAccess > xCollection;
@@ -1149,7 +1149,7 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp)
if ( xFac.is() )
{
Reference< XPropertySet> xColumn = xFac->createDataDescriptor();
- m_aTableDummyColumns.insert(TTableColumnMap::value_type(Reference< XPropertySet>(_xProp),xColumn));
+ m_aTableDummyColumns.emplace( Reference< XPropertySet>(_xProp),xColumn );
exportAutoStyle(xColumn.get());
}
}
@@ -1205,7 +1205,7 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp)
if ( XML_STYLE_FAMILY_TABLE_CELL == i.second.second )
std::copy( m_aCurrentPropertyStates.begin(), m_aCurrentPropertyStates.end(), std::back_inserter( aPropStates ));
if ( !aPropStates.empty() )
- i.second.first->insert( TPropertyStyleMap::value_type(_xProp,GetAutoStylePool()->Add( i.second.second, aPropStates )));
+ i.second.first->emplace( _xProp,GetAutoStylePool()->Add( i.second.second, aPropStates ) );
}
}
}
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 0f9007c379a6..e0c94c6d7b43 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -458,7 +458,7 @@ void ODBFilter::fillPropertyMap(const Any& _rValue,TPropertyNameMap& _rMap)
{
Sequence<PropertyValue> aValue;
pIter->Value >>= aValue;
- _rMap.insert(TPropertyNameMap::value_type(pIter->Name,aValue));
+ _rMap.emplace( pIter->Name,aValue );
}
}
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 227fe0c5491c..e7fed3d2f993 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -1244,7 +1244,7 @@ Sequence< ::sal_Int16 > SAL_CALL OGenericUnoController::getSupportedCommandGroup
++aIter
)
if ( aIter->second.GroupId != CommandGroup::INTERNAL )
- aCmdHashMap.insert( CommandHashMap::value_type( aIter->second.GroupId, 0 ));
+ aCmdHashMap.emplace( aIter->second.GroupId, 0 );
return comphelper::mapKeysToSequence( aCmdHashMap );
}
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index eba7019d0b72..eb00026614fe 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -452,7 +452,7 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa
if ( dtUnknown != eURLType )
{
// notify any status listeners that the dialog is now active (well, about to be active)
- MapDispatchToBool::const_iterator aThisURLState = m_aDispatchStates.insert( MapDispatchToBool::value_type( eURLType, true ) ).first;
+ MapDispatchToBool::const_iterator aThisURLState = m_aDispatchStates.emplace( eURLType, true ).first;
NotifyStatusChanged( aURL, nullptr );
// execute the dialog
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index 1b475b7920e5..d7d91ece60ad 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -179,7 +179,7 @@ namespace dbaui
OUString sDecodedURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
sal_Int32 nPos = InsertEntry( sTitle );
- m_aURLs.insert( MapIndexToStringPair::value_type( nPos, StringPair( sDecodedURL, sFilter ) ) );
+ m_aURLs.emplace( nPos, StringPair( sDecodedURL, sFilter ) );
}
}
catch( Exception& ) {}
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 04a6214198a8..cfbf50eafebb 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -144,59 +144,59 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer
{
/// initialize the property translation map
// direct properties of a data source
- m_aDirectPropTranslator.insert(MapInt2String::value_type(DSID_CONNECTURL, PROPERTY_URL));
- m_aDirectPropTranslator.insert(MapInt2String::value_type(DSID_NAME, PROPERTY_NAME));
- m_aDirectPropTranslator.insert(MapInt2String::value_type(DSID_USER, PROPERTY_USER));
- m_aDirectPropTranslator.insert(MapInt2String::value_type(DSID_PASSWORD, PROPERTY_PASSWORD));
- m_aDirectPropTranslator.insert(MapInt2String::value_type(DSID_PASSWORDREQUIRED, PROPERTY_ISPASSWORDREQUIRED));
- m_aDirectPropTranslator.insert(MapInt2String::value_type(DSID_TABLEFILTER, PROPERTY_TABLEFILTER));
- m_aDirectPropTranslator.insert(MapInt2String::value_type(DSID_READONLY, PROPERTY_ISREADONLY));
- m_aDirectPropTranslator.insert(MapInt2String::value_type(DSID_SUPPRESSVERSIONCL, PROPERTY_SUPPRESSVERSIONCL));
+ m_aDirectPropTranslator.emplace( DSID_CONNECTURL, PROPERTY_URL );
+ m_aDirectPropTranslator.emplace( DSID_NAME, PROPERTY_NAME );
+ m_aDirectPropTranslator.emplace( DSID_USER, PROPERTY_USER );
+ m_aDirectPropTranslator.emplace( DSID_PASSWORD, PROPERTY_PASSWORD );
+ m_aDirectPropTranslator.emplace( DSID_PASSWORDREQUIRED, PROPERTY_ISPASSWORDREQUIRED );
+ m_aDirectPropTranslator.emplace( DSID_TABLEFILTER, PROPERTY_TABLEFILTER );
+ m_aDirectPropTranslator.emplace( DSID_READONLY, PROPERTY_ISREADONLY );
+ m_aDirectPropTranslator.emplace( DSID_SUPPRESSVERSIONCL, PROPERTY_SUPPRESSVERSIONCL );
// implicit properties, to be found in the direct property "Info"
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_JDBCDRIVERCLASS, INFO_JDBCDRIVERCLASS));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_TEXTFILEEXTENSION, INFO_TEXTFILEEXTENSION));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CHARSET, INFO_CHARSET));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_TEXTFILEHEADER, INFO_TEXTFILEHEADER));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_FIELDDELIMITER, INFO_FIELDDELIMITER));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_TEXTDELIMITER, INFO_TEXTDELIMITER));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_DECIMALDELIMITER, INFO_DECIMALDELIMITER));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_THOUSANDSDELIMITER, INFO_THOUSANDSDELIMITER));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_SHOWDELETEDROWS, INFO_SHOWDELETEDROWS));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_ALLOWLONGTABLENAMES, INFO_ALLOWLONGTABLENAMES));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_ADDITIONALOPTIONS, INFO_ADDITIONALOPTIONS));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_SQL92CHECK, PROPERTY_ENABLESQL92CHECK));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_AUTOINCREMENTVALUE, PROPERTY_AUTOINCREMENTCREATION));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_AUTORETRIEVEVALUE, INFO_AUTORETRIEVEVALUE));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_AUTORETRIEVEENABLED, INFO_AUTORETRIEVEENABLED));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_APPEND_TABLE_ALIAS, INFO_APPEND_TABLE_ALIAS));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_AS_BEFORE_CORRNAME, INFO_AS_BEFORE_CORRELATION_NAME ) );
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CHECK_REQUIRED_FIELDS, INFO_FORMS_CHECK_REQUIRED_FIELDS ) );
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_ESCAPE_DATETIME, INFO_ESCAPE_DATETIME ) );
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_PRIMARY_KEY_SUPPORT, OUString("PrimaryKeySupport")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_PARAMETERNAMESUBST, INFO_PARAMETERNAMESUBST));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_IGNOREDRIVER_PRIV, INFO_IGNOREDRIVER_PRIV));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_BOOLEANCOMPARISON, PROPERTY_BOOLEANCOMPARISONMODE));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_ENABLEOUTERJOIN, PROPERTY_ENABLEOUTERJOIN));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CATALOG, PROPERTY_USECATALOGINSELECT));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_SCHEMA, PROPERTY_USESCHEMAINSELECT));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_INDEXAPPENDIX, OUString("AddIndexAppendix")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_DOSLINEENDS, OUString("PreferDosLikeLineEnds")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SOCKET, OUString("LocalSocket")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_NAMED_PIPE, OUString("NamedPipe")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_RESPECTRESULTSETTYPE, OUString("RespectDriverResultSetType")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_MAX_ROW_SCAN, OUString("MaxRowScan")));
+ m_aIndirectPropTranslator.emplace( DSID_JDBCDRIVERCLASS, INFO_JDBCDRIVERCLASS );
+ m_aIndirectPropTranslator.emplace( DSID_TEXTFILEEXTENSION, INFO_TEXTFILEEXTENSION );
+ m_aIndirectPropTranslator.emplace( DSID_CHARSET, INFO_CHARSET );
+ m_aIndirectPropTranslator.emplace( DSID_TEXTFILEHEADER, INFO_TEXTFILEHEADER );
+ m_aIndirectPropTranslator.emplace( DSID_FIELDDELIMITER, INFO_FIELDDELIMITER );
+ m_aIndirectPropTranslator.emplace( DSID_TEXTDELIMITER, INFO_TEXTDELIMITER );
+ m_aIndirectPropTranslator.emplace( DSID_DECIMALDELIMITER, INFO_DECIMALDELIMITER );
+ m_aIndirectPropTranslator.emplace( DSID_THOUSANDSDELIMITER, INFO_THOUSANDSDELIMITER );
+ m_aIndirectPropTranslator.emplace( DSID_SHOWDELETEDROWS, INFO_SHOWDELETEDROWS );
+ m_aIndirectPropTranslator.emplace( DSID_ALLOWLONGTABLENAMES, INFO_ALLOWLONGTABLENAMES );
+ m_aIndirectPropTranslator.emplace( DSID_ADDITIONALOPTIONS, INFO_ADDITIONALOPTIONS );
+ m_aIndirectPropTranslator.emplace( DSID_SQL92CHECK, PROPERTY_ENABLESQL92CHECK );
+ m_aIndirectPropTranslator.emplace( DSID_AUTOINCREMENTVALUE, PROPERTY_AUTOINCREMENTCREATION );
+ m_aIndirectPropTranslator.emplace( DSID_AUTORETRIEVEVALUE, INFO_AUTORETRIEVEVALUE );
+ m_aIndirectPropTranslator.emplace( DSID_AUTORETRIEVEENABLED, INFO_AUTORETRIEVEENABLED );
+ m_aIndirectPropTranslator.emplace( DSID_APPEND_TABLE_ALIAS, INFO_APPEND_TABLE_ALIAS );
+ m_aIndirectPropTranslator.emplace( DSID_AS_BEFORE_CORRNAME, INFO_AS_BEFORE_CORRELATION_NAME );
+ m_aIndirectPropTranslator.emplace( DSID_CHECK_REQUIRED_FIELDS, INFO_FORMS_CHECK_REQUIRED_FIELDS );
+ m_aIndirectPropTranslator.emplace( DSID_ESCAPE_DATETIME, INFO_ESCAPE_DATETIME );
+ m_aIndirectPropTranslator.emplace( DSID_PRIMARY_KEY_SUPPORT, OUString("PrimaryKeySupport") );
+ m_aIndirectPropTranslator.emplace( DSID_PARAMETERNAMESUBST, INFO_PARAMETERNAMESUBST );
+ m_aIndirectPropTranslator.emplace( DSID_IGNOREDRIVER_PRIV, INFO_IGNOREDRIVER_PRIV );
+ m_aIndirectPropTranslator.emplace( DSID_BOOLEANCOMPARISON, PROPERTY_BOOLEANCOMPARISONMODE );
+ m_aIndirectPropTranslator.emplace( DSID_ENABLEOUTERJOIN, PROPERTY_ENABLEOUTERJOIN );
+ m_aIndirectPropTranslator.emplace( DSID_CATALOG, PROPERTY_USECATALOGINSELECT );
+ m_aIndirectPropTranslator.emplace( DSID_SCHEMA, PROPERTY_USESCHEMAINSELECT );
+ m_aIndirectPropTranslator.emplace( DSID_INDEXAPPENDIX, OUString("AddIndexAppendix") );
+ m_aIndirectPropTranslator.emplace( DSID_DOSLINEENDS, OUString("PreferDosLikeLineEnds") );
+ m_aIndirectPropTranslator.emplace( DSID_CONN_SOCKET, OUString("LocalSocket") );
+ m_aIndirectPropTranslator.emplace( DSID_NAMED_PIPE, OUString("NamedPipe") );
+ m_aIndirectPropTranslator.emplace( DSID_RESPECTRESULTSETTYPE, OUString("RespectDriverResultSetType") );
+ m_aIndirectPropTranslator.emplace( DSID_MAX_ROW_SCAN, OUString("MaxRowScan") );
// extra settings for odbc
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_USECATALOG, INFO_USECATALOG));
+ m_aIndirectPropTranslator.emplace( DSID_USECATALOG, INFO_USECATALOG );
// extra settings for a ldap address book
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_BASEDN, INFO_CONN_LDAP_BASEDN));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_ROWCOUNT, INFO_CONN_LDAP_ROWCOUNT));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_USESSL, OUString("UseSSL")));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_DOCUMENT_URL, PROPERTY_URL));
+ m_aIndirectPropTranslator.emplace( DSID_CONN_LDAP_BASEDN, INFO_CONN_LDAP_BASEDN );
+ m_aIndirectPropTranslator.emplace( DSID_CONN_LDAP_ROWCOUNT, INFO_CONN_LDAP_ROWCOUNT );
+ m_aIndirectPropTranslator.emplace( DSID_CONN_LDAP_USESSL, OUString("UseSSL") );
+ m_aIndirectPropTranslator.emplace( DSID_DOCUMENT_URL, PROPERTY_URL );
// oracle
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_IGNORECURRENCY, OUString("IgnoreCurrency")));
+ m_aIndirectPropTranslator.emplace( DSID_IGNORECURRENCY, OUString("IgnoreCurrency") );
try
{
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 5b7282424b8f..e9b9ad17ffc4 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -667,7 +667,7 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName)
m_aDestColumns.erase(aFind);
}
- m_vDestVector.push_back(m_aDestColumns.insert(TColumns::value_type(aAlias,pField)).first);
+ m_vDestVector.push_back(m_aDestColumns.emplace(aAlias,pField).first);
}
bool ODatabaseExport::createRowSet()
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 5e3ffe421962..f914f3a54263 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -623,7 +623,7 @@ void fillTypeInfo( const Reference< css::sdbc::XConnection>& _rxConnection,
if ( !aName.isEmpty() )
pInfo->aUIName += " ]";
// Now that we have the type info, save it in the multimap
- _rTypeInfoMap.insert(OTypeInfoMap::value_type(pInfo->nType,pInfo));
+ _rTypeInfoMap.emplace(pInfo->nType,pInfo);
}
// for a faster index access
_rTypeInfoIters.reserve(_rTypeInfoMap.size());
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 1422179a18bf..986d5b277c34 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -836,7 +836,7 @@ bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
// Show the window and add to the list
OUString sName = static_cast< OQueryTableWindowData*>(pData.get())->GetAliasName();
OSL_ENSURE(GetTabWinMap().find(sName) == GetTabWinMap().end(),"Alias name already in list!");
- GetTabWinMap().insert(OTableWindowMap::value_type(sName,pTabWin));
+ GetTabWinMap().emplace(sName,pTabWin);
pTabWin->Show();
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 5c9d57ff2cb9..8d3c5b712d2d 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -357,7 +357,7 @@ namespace
TTableDataHelper::const_iterator aFind = m_aTableData.find(sSourceName);
if ( aFind == m_aTableData.end() )
{
- aFind = m_aTableData.insert(TTableDataHelper::value_type(sSourceName,std::make_shared<OTableWindowData>(xTableProp,sSourceName, sSourceName))).first;
+ aFind = m_aTableData.emplace(sSourceName,std::make_shared<OTableWindowData>(xTableProp,sSourceName, sSourceName)).first;
aFind->second->ShowAll(false);
}
TTableWindowData::value_type pReferencingTable = aFind->second;
@@ -390,7 +390,7 @@ namespace
if ( m_xTables->hasByName(sReferencedTable) )
{
Reference<XPropertySet> xReferencedTable(m_xTables->getByName(sReferencedTable),UNO_QUERY);
- aRefFind = m_aTableData.insert(TTableDataHelper::value_type(sReferencedTable,std::make_shared<OTableWindowData>(xReferencedTable,sReferencedTable, sReferencedTable))).first;
+ aRefFind = m_aTableData.emplace(sReferencedTable,std::make_shared<OTableWindowData>(xReferencedTable,sReferencedTable, sReferencedTable)).first;
aRefFind->second->ShowAll(false);
}
else
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 5571b9460646..7512b31d0dbb 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -151,7 +151,7 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
try
{
rAcceptor->initialize( aSeq );
- rMap.insert(AcceptorMap::value_type(aAcceptString, rAcceptor));
+ rMap.emplace(aAcceptString, rAcceptor);
}
catch (const css::uno::Exception& e)
{
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx
index d193193b93b3..b482ce79aaf9 100644
--- a/desktop/source/deployment/dp_persmap.cxx
+++ b/desktop/source/deployment/dp_persmap.cxx
@@ -277,7 +277,7 @@ bool PersistentMap::get( OString * value, OString const & key ) const
void PersistentMap::add( OString const & key, OString const & value )
{
typedef std::pair<t_string2string_map::iterator,bool> InsertRC;
- InsertRC r = m_entries.insert( t_string2string_map::value_type(key,value));
+ InsertRC r = m_entries.emplace(key,value);
m_bIsDirty = r.second;
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index e85b7bbe3d95..80a46523557b 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -699,7 +699,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
{
const OUString title( xPackageType->getShortDescription() );
const std::pair< t_string2string::iterator, bool > insertion(
- title2filter.insert( t_string2string::value_type( title, filter ) ) );
+ title2filter.emplace( title, filter ) );
if ( ! insertion.second )
{ // already existing, append extensions:
OUStringBuffer buf;
diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx
index b2e9fc418d8e..1a58b9122f80 100644
--- a/desktop/source/deployment/manager/dp_managerfac.cxx
+++ b/desktop/source/deployment/manager/dp_managerfac.cxx
@@ -129,7 +129,7 @@ PackageManagerFactoryImpl::getPackageManager( OUString const & context )
xRet.set( PackageManagerImpl::create( m_xComponentContext, context ) );
guard.reset();
std::pair< t_string2weakref::iterator, bool > insertion(
- m_managers.insert( t_string2weakref::value_type( context, xRet ) ) );
+ m_managers.emplace( context, xRet ) );
if (insertion.second)
{
OSL_ASSERT( insertion.first->second.get() == xRet );
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 24949b8e9586..847fbf30fba9 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1042,8 +1042,7 @@ Reference<XInterface> BackendImpl::insertObject(
{
const ::osl::MutexGuard guard( getMutex() );
const std::pair<t_string2object::iterator, bool> insertion(
- m_backendObjects.insert( t_string2object::value_type(
- id, xObject ) ) );
+ m_backendObjects.emplace( id, xObject ) );
return insertion.first->second;
}
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index bbd752f3d07c..f55910f13699 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -188,7 +188,7 @@ Reference<deployment::XPackage> PackageRegistryBackend::bindPackage(
guard.reset();
std::pair< t_string2ref::iterator, bool > insertion(
- m_bound.insert( t_string2ref::value_type( url, xNewPackage ) ) );
+ m_bound.emplace( url, xNewPackage ) );
if (insertion.second)
{ // first insertion
SAL_WARN_IF(
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index 745dc66a8717..c0a629f585cc 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -196,8 +196,7 @@ void PackageRegistryImpl::insertBackend(
const OUString mediaType( normalizeMediaType(
xPackageType->getMediaType() ) );
std::pair<t_string2registry::iterator, bool> a_insertion(
- m_mediaType2backend.insert( t_string2registry::value_type(
- mediaType, xBackend ) ) );
+ m_mediaType2backend.emplace( mediaType, xBackend ) );
if (a_insertion.second)
{
// add parameterless media-type, too:
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 338302bc22cf..bd0143608adb 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -1022,7 +1022,7 @@ void MigrationImpl::compareOldAndNewConfig(const OUString& sParent,
MigrationItem aMigrationItem(sParent, sSibling, it->m_sCommandURL, it->m_xPopupMenu);
if (m_aOldVersionItemsHashMap.find(sResourceURL)==m_aOldVersionItemsHashMap.end()) {
std::vector< MigrationItem > vMigrationItems;
- m_aOldVersionItemsHashMap.insert(MigrationHashMap::value_type(sResourceURL, vMigrationItems));
+ m_aOldVersionItemsHashMap.emplace(sResourceURL, vMigrationItems);
m_aOldVersionItemsHashMap[sResourceURL].push_back(aMigrationItem);
} else {
if (std::find(m_aOldVersionItemsHashMap[sResourceURL].begin(), m_aOldVersionItemsHashMap[sResourceURL].end(), aMigrationItem)==m_aOldVersionItemsHashMap[sResourceURL].end())
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index 826f8ac9fa0c..f98ad911209b 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -863,7 +863,7 @@ namespace editeng
implChange( sChangeInto );
// put into the "change all" list
- m_aChangeList.insert( StringMap::value_type( sCurrentUnit, sChangeInto ) );
+ m_aChangeList.emplace( sCurrentUnit, sChangeInto );
}
// and proceed
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 35e825f567ee..885630c168b2 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -120,7 +120,7 @@ const CmdToInfoCache& GetCommandToInfoCache()
CacheDispatchInfo aDispatchInfo;
aDispatchInfo.nGroupId = SupportedCommandsArray[i].nGroupId;
aDispatchInfo.bActiveConnection = SupportedCommandsArray[i].bActiveConnection;
- aCmdToInfoCache.insert( CmdToInfoCache::value_type( aCommand, aDispatchInfo ));
+ aCmdToInfoCache.emplace(aCommand, aDispatchInfo);
++i;
}
bCacheInitialized = true;
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 414e707c9b15..14d63e450784 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -2394,7 +2394,7 @@ void IUnknownWrapper_Impl::buildComTlbIndex()
if( SUCCEEDED(pType->GetNames( funcDesc->memid, & memberName, 1, &pcNames)))
{
OUString usName(reinterpret_cast<const sal_Unicode*>(LPCOLESTR(memberName)));
- m_mapComFunc.insert( TLBFuncIndexMap::value_type( usName, i));
+ m_mapComFunc.emplace(usName, i);
}
else
{
@@ -2421,8 +2421,7 @@ void IUnknownWrapper_Impl::buildComTlbIndex()
if (varDesc->varkind == VAR_DISPATCH)
{
OUString usName(reinterpret_cast<const sal_Unicode*>(LPCOLESTR(memberName)));
- m_mapComFunc.insert(TLBFuncIndexMap::value_type(
- usName, i));
+ m_mapComFunc.emplace(usName, i);
}
}
else
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index 816360853cca..d89d86192d75 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -252,11 +252,11 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/,
if (d.flags != 0)
{
m_MemberInfos.push_back(d);
- iter = m_nameToDispIdMap.insert(NameToIdMap::value_type(exactName, (DISPID)m_MemberInfos.size())).first;
+ iter = m_nameToDispIdMap.emplace(exactName, (DISPID)m_MemberInfos.size()).first;
if (exactName != name)
{
- iter = m_nameToDispIdMap.insert(NameToIdMap::value_type(name, (DISPID)m_MemberInfos.size())).first;
+ iter = m_nameToDispIdMap.emplace(name, (DISPID)m_MemberInfos.size()).first;
}
}
}
@@ -1263,12 +1263,12 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::GetIDsOfNames ( REFIID /*riid*/, OLECHA
{
// name has not been bad before( member exists
typedef NameToIdMap::iterator ITnames;
- pair< ITnames, bool > pair_id= m_nameToDispIdMap.insert( NameToIdMap::value_type(name, m_currentId++));
+ pair< ITnames, bool > pair_id= m_nameToDispIdMap.emplace(name, m_currentId++);
// new ID inserted ?
if( pair_id.second )
{// yes, now create MemberInfo and ad to IdToMemberInfoMap
MemberInfo d(0, name);
- m_idToMemberInfoMap.insert( IdToMemberInfoMap::value_type( m_currentId - 1, d));
+ m_idToMemberInfoMap.emplace(m_currentId - 1, d);
}
*rgdispid = pair_id.first->second;
diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx
index 54720f479054..b907eec8b249 100644
--- a/extensions/source/propctrlr/eformshelper.cxx
+++ b/extensions/source/propctrlr/eformshelper.cxx
@@ -690,7 +690,7 @@ namespace pcr
OUString sUIName = composeModelElementUIName( *pModelName, sElementName );
OSL_ENSURE( rMapUINameToElement.find( sUIName ) == rMapUINameToElement.end(), "EFormsHelper::getAllElementUINames: duplicate name!" );
- rMapUINameToElement.insert( MapStringToPropertySet::value_type( sUIName, xElement ) );
+ rMapUINameToElement.emplace( sUIName, xElement );
}
}
}
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index 9b690dbd135c..fe01b84ba6aa 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -156,9 +156,9 @@ namespace pcr
namespace
{
#define DESCRIBE_EVENT( asciinamespace, asciilistener, asciimethod, id_postfix ) \
- s_aKnownEvents.insert( EventMap::value_type( \
+ s_aKnownEvents.emplace( \
asciimethod, \
- EventDescription( ++nEventId, asciinamespace, asciilistener, asciimethod, RID_STR_EVT_##id_postfix, HID_EVT_##id_postfix, UID_BRWEVT_##id_postfix ) ) )
+ EventDescription( ++nEventId, asciinamespace, asciilistener, asciimethod, RID_STR_EVT_##id_postfix, HID_EVT_##id_postfix, UID_BRWEVT_##id_postfix ) )
bool lcl_getEventDescriptionForMethod( const OUString& _rMethodName, EventDescription& _out_rDescription )
{
@@ -358,7 +358,7 @@ namespace pcr
void EventHolder::addEvent( EventId _nId, const OUString& _rEventName, const ScriptEventDescriptor& _rScriptEvent )
{
std::pair< EventMap::iterator, bool > insertionResult =
- m_aEventNameAccess.insert( EventMap::value_type( _rEventName, _rScriptEvent ) );
+ m_aEventNameAccess.emplace( _rEventName, _rScriptEvent );
OSL_ENSURE( insertionResult.second, "EventHolder::addEvent: there already was a MacroURL for this event!" );
m_aEventIndexAccess[ _nId ] = insertionResult.first;
}
@@ -730,8 +730,8 @@ namespace pcr
if ( !impl_filterMethod_nothrow( aEvent ) )
continue;
- m_aEvents.insert( EventMap::value_type(
- lcl_getEventPropertyName( sListenerClassName, *pMethods ), aEvent ) );
+ m_aEvents.emplace(
+ lcl_getEventPropertyName( sListenerClassName, *pMethods ), aEvent );
}
}
diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx
index 0eb9a657b63f..859b7ae76eff 100644
--- a/extensions/source/propctrlr/genericpropertyhandler.cxx
+++ b/extensions/source/propctrlr/genericpropertyhandler.cxx
@@ -508,7 +508,7 @@ namespace pcr
continue;
}
- m_aProperties.insert( PropertyMap::value_type( property.Name, property ) );
+ m_aProperties.emplace( property.Name, property );
}
}
catch( const Exception& )
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 4e7519a8701d..531c749941e4 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -1046,8 +1046,7 @@ namespace pcr
StlSyntaxSequence< OUString > aInterestingActuations( (*aHandler)->getActuatingProperties() );
for (const auto & aInterestingActuation : aInterestingActuations)
{
- m_aDependencyHandlers.insert( PropertyHandlerMultiRepository::value_type(
- aInterestingActuation, *aHandler ) );
+ m_aDependencyHandlers.emplace( aInterestingActuation, *aHandler );
}
++aHandler;
@@ -1065,7 +1064,7 @@ namespace pcr
sal_Int32 nRelativePropertyOrder = sourceProps - aProperties.begin();
if ( m_xModel.is() )
nRelativePropertyOrder = m_xModel->getPropertyOrderIndex( sourceProps->Name );
- m_aProperties.insert(OrderedPropertyMap::value_type(nRelativePropertyOrder, *sourceProps));
+ m_aProperties.emplace(nRelativePropertyOrder, *sourceProps);
}
// be notified when one of our inspectees dies
diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index 714e640cc0ec..02e69a623bf4 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -401,7 +401,7 @@ namespace pcr
OSL_ENSURE( m_aPropertyPageIds.find( rData.sName ) == m_aPropertyPageIds.end(),
"OPropertyEditor::InsertEntry: property already present in the map!" );
- m_aPropertyPageIds.insert( MapStringToPageId::value_type( rData.sName, _nPageId ) );
+ m_aPropertyPageIds.emplace( rData.sName, _nPageId );
}
diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx
index 6a6876d0e7a6..486ad435aec5 100644
--- a/forms/source/component/GroupManager.cxx
+++ b/forms/source/component/GroupManager.cxx
@@ -356,7 +356,7 @@ void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet )
if ( aFind == m_aGroupArr.end() )
{
- aFind = m_aGroupArr.insert(OGroupArr::value_type(sGroupName,OGroup(sGroupName))).first;
+ aFind = m_aGroupArr.emplace(sGroupName,OGroup(sGroupName)).first;
}
aFind->second.InsertComponent( xSet );
diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx
index 018d04c87b90..f79185b60d05 100644
--- a/forms/source/helper/formnavigation.cxx
+++ b/forms/source/helper/formnavigation.cxx
@@ -270,7 +270,7 @@ namespace frm
if ( bKnownId )
// add to our map
- m_aSupportedFeatures.insert( FeatureMap::value_type( *aLoop, aFeatureInfo ) );
+ m_aSupportedFeatures.emplace( *aLoop, aFeatureInfo );
}
}
}
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 5cf60a536254..fcf1c7ee3d79 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -615,7 +615,7 @@ namespace frm
SingleAttributeDispatcher pDispatcher = implCreateDispatcher( nSlotId, _rURL );
if ( pDispatcher.is() )
{
- aDispatcherPos = m_aDispatchers.insert( AttributeDispatchers::value_type( nSlotId, pDispatcher ) ).first;
+ aDispatcherPos = m_aDispatchers.emplace( nSlotId, pDispatcher ).first;
}
}
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index d9ba2469e1e4..dad5042b2846 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -191,12 +191,12 @@ namespace frm
return;
SAL_WARN_IF( _nAttributeId != aHandler->getAttributeId(), "forms.richtext", "RichTextControlImpl::enableAttributeNotification: suspicious handler!" );
- aHandlerPos = m_aAttributeHandlers.insert( AttributeHandlerPool::value_type( _nAttributeId , aHandler ) ).first;
+ aHandlerPos = m_aAttributeHandlers.emplace( _nAttributeId , aHandler ).first;
}
// remember the listener
if ( _pListener )
- m_aAttributeListeners.insert( AttributeListenerPool::value_type( _nAttributeId, _pListener ) );
+ m_aAttributeListeners.emplace( _nAttributeId, _pListener );
// update (and broadcast) the state of this attribute
updateAttribute( _nAttributeId );
@@ -240,7 +240,7 @@ namespace frm
StateCache::iterator aCachePos = m_aLastKnownStates.find( _nAttribute );
if ( aCachePos == m_aLastKnownStates.end() )
{ // nothing known about this attribute, yet
- m_aLastKnownStates.insert( StateCache::value_type( _nAttribute, _rState ) );
+ m_aLastKnownStates.emplace( _nAttribute, _rState );
}
else
{
diff --git a/forms/source/xforms/propertysetbase.cxx b/forms/source/xforms/propertysetbase.cxx
index cf0dfa62613e..4d426815fc98 100644
--- a/forms/source/xforms/propertysetbase.cxx
+++ b/forms/source/xforms/propertysetbase.cxx
@@ -72,7 +72,7 @@ void PropertySetBase::registerProperty( const Property& rProperty,
const ::rtl::Reference< PropertyAccessorBase >& rAccessor )
{
OSL_ENSURE( rAccessor.get(), "PropertySetBase::registerProperty: invalid property accessor, this will crash!" );
- m_aAccessors.insert( PropertyAccessors::value_type( rProperty.Handle, rAccessor ) );
+ m_aAccessors.emplace( rProperty.Handle, rAccessor );
OSL_ENSURE( rAccessor->isWriteable()
== ( ( rProperty.Attributes & css::beans::PropertyAttribute::READONLY ) == 0 ),
@@ -98,7 +98,7 @@ void PropertySetBase::notifyAndCachePropertyValue( sal_Int32 nHandle )
// default construct a value of this type
Any aEmptyValue( nullptr, aProperty.Type );
// insert into the cache
- aPos = m_aCache.insert( PropertyValueCache::value_type( nHandle, aEmptyValue ) ).first;
+ aPos = m_aCache.emplace( nHandle, aEmptyValue ).first;
}
catch( const Exception& )
{
@@ -123,7 +123,7 @@ void PropertySetBase::initializePropertyValueCache( sal_Int32 nHandle )
getFastPropertyValue( aCurrentValue, nHandle );
::std::pair< PropertyValueCache::iterator, bool > aInsertResult =
- m_aCache.insert( PropertyValueCache::value_type( nHandle, aCurrentValue ) );
+ m_aCache.emplace( nHandle, aCurrentValue );
OSL_ENSURE( aInsertResult.second, "PropertySetBase::initializePropertyValueCache: already cached a value for this property!" );
}
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 0377fd761df3..716666513441 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -372,11 +372,11 @@ void FormulaCompiler::OpCodeMap::putExternal( const OUString & rSymbol, const OU
// map to different symbols, the first pair wins. Same symbol of course may
// not map to different AddIns, again the first pair wins and also the
// AddIn->symbol mapping is not inserted in other cases.
- bool bOk = maExternalHashMap.insert( ExternalHashMap::value_type( rSymbol, rAddIn)).second;
+ bool bOk = maExternalHashMap.emplace(rSymbol, rAddIn).second;
SAL_WARN_IF( !bOk, "formula.core", "OpCodeMap::putExternal: symbol not inserted, " << rSymbol << " -> " << rAddIn);
if (bOk)
{
- bOk = maReverseExternalHashMap.insert( ExternalHashMap::value_type( rAddIn, rSymbol)).second;
+ bOk = maReverseExternalHashMap.emplace(rAddIn, rSymbol).second;
// Failed insertion of the AddIn is ok for different symbols mapping to
// the same AddIn. Make this INFO only.
SAL_INFO_IF( !bOk, "formula.core", "OpCodeMap::putExternal: AddIn not inserted, " << rAddIn << " -> " << rSymbol);
@@ -385,9 +385,9 @@ void FormulaCompiler::OpCodeMap::putExternal( const OUString & rSymbol, const OU
void FormulaCompiler::OpCodeMap::putExternalSoftly( const OUString & rSymbol, const OUString & rAddIn )
{
- bool bOk = maReverseExternalHashMap.insert( ExternalHashMap::value_type( rAddIn, rSymbol)).second;
+ bool bOk = maReverseExternalHashMap.emplace(rAddIn, rSymbol).second;
if (bOk)
- maExternalHashMap.insert( ExternalHashMap::value_type( rSymbol, rAddIn));
+ maExternalHashMap.emplace(rSymbol, rAddIn);
}
uno::Sequence< sheet::FormulaToken > FormulaCompiler::OpCodeMap::createSequenceOfFormulaTokens(
@@ -697,7 +697,7 @@ void FormulaCompiler::OpCodeMap::putOpCode( const OUString & rStr, const OpCode
if (bPutOp)
mpTable[eOp] = rStr;
OUString aUpper( pCharClass ? pCharClass->uppercase( rStr) : rStr.toAsciiUpperCase());
- maHashMap.insert( OpCodeHashMap::value_type( aUpper, eOp));
+ maHashMap.emplace(aUpper, eOp);
}
else
{
@@ -1076,11 +1076,11 @@ void FormulaCompiler::OpCodeMap::putCopyOpCode( const OUString& rSymbol, OpCode
"OpCodeMap::putCopyOpCode: NOT replacing OpCode " << static_cast<sal_uInt16>(eOp)
<< " '" << mpTable[eOp] << "' with empty name!");
if (!mpTable[eOp].isEmpty() && rSymbol.isEmpty())
- maHashMap.insert( OpCodeHashMap::value_type( mpTable[eOp], eOp));
+ maHashMap.emplace(mpTable[eOp], eOp);
else
{
mpTable[eOp] = rSymbol;
- maHashMap.insert( OpCodeHashMap::value_type( rSymbol, eOp));
+ maHashMap.emplace(rSymbol, eOp);
}
}
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
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index d53c6eecfc3b..146ee5d75a97 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -884,7 +884,6 @@ rtl::Reference<VendorBase> getJREInfoByPath(
static map<OUString, rtl::Reference<VendorBase> > mapJREs;
typedef map<OUString, rtl::Reference<VendorBase> >::const_iterator MapIt;
- typedef map<OUString, rtl::Reference<VendorBase> > MAPJRE;
OUString sFilePath;
typedef vector<OUString>::const_iterator cit_path;
vector<pair<OUString, OUString> > props;
@@ -1055,8 +1054,8 @@ rtl::Reference<VendorBase> getJREInfoByPath(
{
JFW_TRACE2("Found JRE: " << sResolvedDir << " at: " << path);
- mapJREs.insert(MAPJRE::value_type(sResolvedDir, ret));
- mapJREs.insert(MAPJRE::value_type(sFilePath, ret));
+ mapJREs.emplace(sResolvedDir, ret);
+ mapJREs.emplace(sFilePath, ret);
}
return ret;
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index eba518a8165d..35df82f37f30 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -113,7 +113,7 @@ OString MergeEntrys::GetQTZText(const ResData& rResData, const OString& rOrigTex
std::pair<MergeDataHashMap::iterator,bool> MergeDataHashMap::insert(const OString& rKey, MergeData* pMergeData)
{
- std::pair<iterator,bool> aTemp = m_aHashMap.insert(HashMap_t::value_type( rKey, pMergeData ));
+ std::pair<iterator,bool> aTemp = m_aHashMap.emplace( rKey, pMergeData );
if( m_aHashMap.size() == 1 )
{
// When first insert, set an iterator to the first element
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index c8f670508f20..809aa62fd8a8 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -313,13 +313,13 @@ XMLFile::XMLFile( const OString &rFileName ) // the file name, empty if created
: XMLParentNode( nullptr )
, m_sFileName( rFileName )
{
- m_aNodes_localize.insert( TagMap::value_type(OString("bookmark") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("variable") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("paragraph") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("alt") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("caption") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("title") , true) );
- m_aNodes_localize.insert( TagMap::value_type(OString("link") , true) );
+ m_aNodes_localize.emplace( OString("bookmark") , true );
+ m_aNodes_localize.emplace( OString("variable") , true );
+ m_aNodes_localize.emplace( OString("paragraph") , true );
+ m_aNodes_localize.emplace( OString("alt") , true );
+ m_aNodes_localize.emplace( OString("caption") , true );
+ m_aNodes_localize.emplace( OString("title") , true );
+ m_aNodes_localize.emplace( OString("link") , true );
}
void XMLFile::Extract()
@@ -364,7 +364,7 @@ void XMLFile::InsertL10NElement( XMLElement* pElement )
{
pElem = new LangHashMap;
(*pElem)[ sLanguage ]=pElement;
- m_pXMLStrings->insert( XMLHashMap::value_type( sId , pElem ) );
+ m_pXMLStrings->emplace( sId , pElem );
m_vOrder.push_back( sId );
}
else // Already there
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index ca0304fa4480..b2f7ff655ae4 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -294,9 +294,9 @@ void ConvDic::AddEntry( const OUString &rLeftText, const OUString &rRightText )
Load();
DBG_ASSERT(!HasEntry( rLeftText, rRightText), "entry already exists" );
- aFromLeft .insert( ConvMap::value_type( rLeftText, rRightText ) );
+ aFromLeft .emplace( rLeftText, rRightText );
if (pFromRight.get())
- pFromRight->insert( ConvMap::value_type( rRightText, rLeftText ) );
+ pFromRight->emplace( rRightText, rLeftText );
if (bMaxCharCountIsValid)
{
@@ -553,7 +553,7 @@ void SAL_CALL ConvDic::setPropertyType(
// currently we assume that entries with the same left text have the
// same PropertyType even if the right text is different...
if (pConvPropType.get())
- pConvPropType->insert( PropTypeMap::value_type( rLeftText, nPropertyType ) );
+ pConvPropType->emplace( rLeftText, nPropertyType );
bIsModified = true;
}
diff --git a/lotuswordpro/source/filter/lwpfont.cxx b/lotuswordpro/source/filter/lwpfont.cxx
index 8b430866a3b8..bc97ed8b276e 100644
--- a/lotuswordpro/source/filter/lwpfont.cxx
+++ b/lotuswordpro/source/filter/lwpfont.cxx
@@ -474,7 +474,7 @@ Prerequisite: pStyle has been created and the paragraph properties has been set
pStyle->SetFont(pFont);
pStyle->SetStyleName(styleName);
XFStyleManager::AddStyle(pStyle);
- m_StyleList.insert(LwpParaStyleMap::value_type(styleObjID, styleName));
+ m_StyleList.emplace( styleObjID, styleName));
}*/
/*
diff --git a/lotuswordpro/source/filter/lwpfoundry.cxx b/lotuswordpro/source/filter/lwpfoundry.cxx
index f9a7bc85647c..f41acfcf9b5a 100644
--- a/lotuswordpro/source/filter/lwpfoundry.cxx
+++ b/lotuswordpro/source/filter/lwpfoundry.cxx
@@ -512,7 +512,7 @@ void LwpStyleManager::AddStyle(LwpObjectID styleObjID, IXFStyle* pStyle)
//pStyle may change if same style is found in XFStyleManager
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
pStyle = pXFStyleManager->AddStyle(pStyle).m_pStyle;
- m_StyleList.insert(LwpStyleMap::value_type(styleObjID, pStyle));
+ m_StyleList.emplace(styleObjID, pStyle);
}
/*
diff --git a/lotuswordpro/source/filter/lwpobjfactory.cxx b/lotuswordpro/source/filter/lwpobjfactory.cxx
index fa4faf1f3e68..48b370350c21 100644
--- a/lotuswordpro/source/filter/lwpobjfactory.cxx
+++ b/lotuswordpro/source/filter/lwpobjfactory.cxx
@@ -658,7 +658,7 @@ rtl::Reference<LwpObject> LwpObjectFactory::CreateObject(sal_uInt32 type, LwpObj
if (newObj.is())
{
newObj->QuickRead();
- auto result = m_IdToObjList.insert(LwpIdToObjMap::value_type(objHdr.GetID(), newObj));
+ auto result = m_IdToObjList.emplace(objHdr.GetID(), newObj);
if (!result.second)
{
SAL_WARN("lwp", "clearing duplicate object");
diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx
index a222af59443c..c95031d8f880 100644
--- a/oox/source/vml/vmldrawing.cxx
+++ b/oox/source/vml/vmldrawing.cxx
@@ -125,7 +125,7 @@ void Drawing::registerOleObject( const OleObjectInfo& rOleObject )
{
OSL_ENSURE( !rOleObject.maShapeId.isEmpty(), "Drawing::registerOleObject - missing OLE object shape id" );
OSL_ENSURE( maOleObjects.count( rOleObject.maShapeId ) == 0, "Drawing::registerOleObject - OLE object already registered" );
- maOleObjects.insert( OleObjectInfoMap::value_type( rOleObject.maShapeId, rOleObject ) );
+ maOleObjects.emplace( rOleObject.maShapeId, rOleObject );
}
void Drawing::registerControl( const ControlInfo& rControl )
@@ -133,7 +133,7 @@ void Drawing::registerControl( const ControlInfo& rControl )
OSL_ENSURE( !rControl.maShapeId.isEmpty(), "Drawing::registerControl - missing form control shape id" );
OSL_ENSURE( !rControl.maName.isEmpty(), "Drawing::registerControl - missing form control name" );
OSL_ENSURE( maControls.count( rControl.maShapeId ) == 0, "Drawing::registerControl - form control already registered" );
- maControls.insert( ControlInfoMap::value_type( rControl.maShapeId, rControl ) );
+ maControls.emplace( rControl.maShapeId, rControl );
}
void Drawing::finalizeFragmentImport()
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 6602a665724d..d0c194ab95db 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2364,7 +2364,7 @@ void SAL_CALL OStylesHelper::insertByName( const OUString& aName, const uno::Any
if ( !aElement.isExtractableTo(m_aType) )
throw lang::IllegalArgumentException();
- m_aElementsPos.push_back(m_aElements.insert(TStyleElements::value_type(aName,aElement)).first);
+ m_aElementsPos.push_back(m_aElements.emplace(aName,aElement).first);
}
void SAL_CALL OStylesHelper::removeByName( const OUString& aName )
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index e0a16b75b082..eb8a591e6638 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -241,9 +241,9 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
if ( s_aNameMap.empty() )
{
std::shared_ptr<AnyConverter> aNoConverter(new AnyConverter);
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBACKGROUND,TPropertyConverter(PROPERTY_BACKGROUNDCOLOR,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter)));
+ s_aNameMap.emplace(PROPERTY_CONTROLBACKGROUND,TPropertyConverter(PROPERTY_BACKGROUNDCOLOR,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter));
}
return s_aNameMap;
}
@@ -254,18 +254,18 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
if ( s_aNameMap.empty() )
{
std::shared_ptr<AnyConverter> aNoConverter(new AnyConverter);
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CHARCOLOR,TPropertyConverter(PROPERTY_TEXTCOLOR,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBACKGROUND,TPropertyConverter(PROPERTY_BACKGROUNDCOLOR,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CHARUNDERLINECOLOR,TPropertyConverter(PROPERTY_TEXTLINECOLOR,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CHARRELIEF,TPropertyConverter(PROPERTY_FONTRELIEF,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CHARFONTHEIGHT,TPropertyConverter(PROPERTY_FONTHEIGHT,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CHARSTRIKEOUT,TPropertyConverter(PROPERTY_FONTSTRIKEOUT,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLTEXTEMPHASISMARK,TPropertyConverter(PROPERTY_FONTEMPHASISMARK,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter)));
+ s_aNameMap.emplace(PROPERTY_CHARCOLOR,TPropertyConverter(PROPERTY_TEXTCOLOR,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CONTROLBACKGROUND,TPropertyConverter(PROPERTY_BACKGROUNDCOLOR,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CHARUNDERLINECOLOR,TPropertyConverter(PROPERTY_TEXTLINECOLOR,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CHARRELIEF,TPropertyConverter(PROPERTY_FONTRELIEF,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CHARFONTHEIGHT,TPropertyConverter(PROPERTY_FONTHEIGHT,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CHARSTRIKEOUT,TPropertyConverter(PROPERTY_FONTSTRIKEOUT,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CONTROLTEXTEMPHASISMARK,TPropertyConverter(PROPERTY_FONTEMPHASISMARK,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter));
std::shared_ptr<AnyConverter> aParaAdjust(new ParaAdjust);
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aParaAdjust)));
+ s_aNameMap.emplace(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aParaAdjust));
}
return s_aNameMap;
}
@@ -275,17 +275,17 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
if ( s_aNameMap.empty() )
{
std::shared_ptr<AnyConverter> aNoConverter(new AnyConverter);
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CHARCOLOR,TPropertyConverter(PROPERTY_TEXTCOLOR,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBACKGROUND,TPropertyConverter(PROPERTY_BACKGROUNDCOLOR,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CHARUNDERLINECOLOR,TPropertyConverter(PROPERTY_TEXTLINECOLOR,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CHARRELIEF,TPropertyConverter(PROPERTY_FONTRELIEF,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CHARFONTHEIGHT,TPropertyConverter(PROPERTY_FONTHEIGHT,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CHARSTRIKEOUT,TPropertyConverter(PROPERTY_FONTSTRIKEOUT,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLTEXTEMPHASISMARK,TPropertyConverter(PROPERTY_FONTEMPHASISMARK,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter)));
+ s_aNameMap.emplace(PROPERTY_CHARCOLOR,TPropertyConverter(PROPERTY_TEXTCOLOR,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CONTROLBACKGROUND,TPropertyConverter(PROPERTY_BACKGROUNDCOLOR,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CHARUNDERLINECOLOR,TPropertyConverter(PROPERTY_TEXTLINECOLOR,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CHARRELIEF,TPropertyConverter(PROPERTY_FONTRELIEF,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CHARFONTHEIGHT,TPropertyConverter(PROPERTY_FONTHEIGHT,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CHARSTRIKEOUT,TPropertyConverter(PROPERTY_FONTSTRIKEOUT,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CONTROLTEXTEMPHASISMARK,TPropertyConverter(PROPERTY_FONTEMPHASISMARK,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter));
std::shared_ptr<AnyConverter> aParaAdjust(new ParaAdjust);
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aParaAdjust)));
+ s_aNameMap.emplace(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aParaAdjust));
}
return s_aNameMap;
}
@@ -296,8 +296,8 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
if ( s_aNameMap.empty() )
{
std::shared_ptr<AnyConverter> aNoConverter(new AnyConverter);
- s_aNameMap.insert(TPropertyNamePair::value_type(OUString("FillColor"),TPropertyConverter(PROPERTY_CONTROLBACKGROUND,aNoConverter)));
- s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aNoConverter)));
+ s_aNameMap.emplace(OUString("FillColor"),TPropertyConverter(PROPERTY_CONTROLBACKGROUND,aNoConverter));
+ s_aNameMap.emplace(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aNoConverter));
}
return s_aNameMap;
}
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index 0f4a3c374973..a4dc600bffcf 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -232,9 +232,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
PropertySetInfoCache::iterator objectPos = m_pImpl->m_aPropertySetCache.find(xSet);
if (objectPos == m_pImpl->m_aPropertySetCache.end())
{
- objectPos = m_pImpl->m_aPropertySetCache.insert( PropertySetInfoCache::value_type(
- xSet, ObjectInfo()
- ) ).first;
+ objectPos = m_pImpl->m_aPropertySetCache.emplace( xSet, ObjectInfo() ).first;
DBG_ASSERT(objectPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
}
if ( objectPos == m_pImpl->m_aPropertySetCache.end() )
@@ -287,10 +285,10 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
|| ( ( nPropertyAttributes & PropertyAttribute::TRANSIENT ) != 0 );
// insert the new entry
- aPropertyPos = rObjectInfo.aProperties.insert( PropertiesInfo::value_type(
+ aPropertyPos = rObjectInfo.aProperties.emplace(
_rEvent.PropertyName,
PropertyInfo( bTransReadOnly )
- ) ).first;
+ ).first;
DBG_ASSERT(aPropertyPos != rObjectInfo.aProperties.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
}
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 7a66a583f019..5b11d671cbac 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -574,9 +574,9 @@ void ORptExport::exportSectionAutoStyle(const Reference<XSection>& _xProp)
).first;
lcl_calculate(aColumnPos,aRowPos,aInsert->second);
- TGridStyleMap::iterator aPos = m_aColumnStyleNames.insert(TGridStyleMap::value_type(_xProp.get(),TStringVec())).first;
+ TGridStyleMap::iterator aPos = m_aColumnStyleNames.emplace(_xProp.get(),TStringVec()).first;
collectStyleNames(XML_STYLE_FAMILY_TABLE_COLUMN,aColumnPos,aPos->second);
- aPos = m_aRowStyleNames.insert(TGridStyleMap::value_type(_xProp.get(),TStringVec())).first;
+ aPos = m_aRowStyleNames.emplace(_xProp.get(),TStringVec()).first;
collectStyleNames(XML_STYLE_FAMILY_TABLE_ROW,aRowPos,aPos->second);
sal_Int32 x1 = 0;
@@ -1131,7 +1131,7 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted
{
::std::vector< XMLPropertyState > aPropertyStates( m_xParaPropMapper->Filter(_xProp) );
if ( !aPropertyStates.empty() )
- m_aAutoStyleNames.insert( TPropertyStyleMap::value_type(_xProp,GetAutoStylePool()->Add( XML_STYLE_FAMILY_TEXT_PARAGRAPH, aPropertyStates )));
+ m_aAutoStyleNames.emplace( _xProp,GetAutoStylePool()->Add( XML_STYLE_FAMILY_TEXT_PARAGRAPH, aPropertyStates ));
}
::std::vector< XMLPropertyState > aPropertyStates( m_xCellStylesExportPropertySetMapper->Filter(_xProp) );
Reference<XFixedLine> xFixedLine(_xProp,uno::UNO_QUERY);
@@ -1231,14 +1231,14 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted
}
if ( !aPropertyStates.empty() )
- m_aAutoStyleNames.insert( TPropertyStyleMap::value_type(_xProp,GetAutoStylePool()->Add( XML_STYLE_FAMILY_TABLE_CELL, aPropertyStates )));
+ m_aAutoStyleNames.emplace( _xProp,GetAutoStylePool()->Add( XML_STYLE_FAMILY_TABLE_CELL, aPropertyStates ));
}
void ORptExport::exportAutoStyle(const Reference<XSection>& _xProp)
{
::std::vector< XMLPropertyState > aPropertyStates( m_xTableStylesExportPropertySetMapper->Filter(_xProp.get()) );
if ( !aPropertyStates.empty() )
- m_aAutoStyleNames.insert( TPropertyStyleMap::value_type(_xProp.get(),GetAutoStylePool()->Add( XML_STYLE_FAMILY_TABLE_TABLE, aPropertyStates )));
+ m_aAutoStyleNames.emplace( _xProp.get(),GetAutoStylePool()->Add( XML_STYLE_FAMILY_TABLE_TABLE, aPropertyStates ));
}
void ORptExport::SetBodyAttributes()
@@ -1546,7 +1546,7 @@ void ORptExport::exportGroupsExpressionAsFunction(const Reference< XGroups>& _xG
sFunction += sPostfix;
xFunction->setFormula(sFunction);
exportFunction(xFunction);
- m_aGroupFunctionMap.insert(TGroupFunctionMap::value_type(xGroup,xFunction));
+ m_aGroupFunctionMap.emplace(xGroup,xFunction);
}
}
}
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 4106cdfc72b2..0398bb51fe91 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -972,7 +972,7 @@ void ORptFilter::removeFunction(const OUString& _sFunctionName)
void ORptFilter::insertFunction(const css::uno::Reference< css::report::XFunction > & _xFunction)
{
- m_aFunctions.insert(TGroupFunctionMap::value_type(_xFunction->getName(),_xFunction));
+ m_aFunctions.emplace(_xFunction->getName(),_xFunction);
}
SvXMLImportContext* ORptFilter::CreateMetaContext(const OUString& rLocalName)
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index c9713e4b2235..b539672eec7e 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -148,8 +148,8 @@ void SAL_CALL DataProviderHandler::inspect(const uno::Reference< uno::XInterface
{
std::shared_ptr<AnyConverter> aNoConverter(new AnyConverter);
TPropertyNamePair aPropertyMediation;
- aPropertyMediation.insert( TPropertyNamePair::value_type( PROPERTY_MASTERFIELDS, TPropertyConverter(PROPERTY_MASTERFIELDS,aNoConverter) ) );
- aPropertyMediation.insert( TPropertyNamePair::value_type( PROPERTY_DETAILFIELDS, TPropertyConverter(PROPERTY_DETAILFIELDS,aNoConverter) ) );
+ aPropertyMediation.emplace( PROPERTY_MASTERFIELDS, TPropertyConverter(PROPERTY_MASTERFIELDS,aNoConverter) );
+ aPropertyMediation.emplace( PROPERTY_DETAILFIELDS, TPropertyConverter(PROPERTY_DETAILFIELDS,aNoConverter) );
m_xMasterDetails = new OPropertyMediator( m_xDataProvider.get(), m_xReportComponent.get(), aPropertyMediation,true );
}
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index bddbca41e963..9d6ddce537ae 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -137,7 +137,7 @@ void lcl_collectFunctionNames(const uno::Reference< report::XFunctions>& _xFunct
for (sal_Int32 i = 0; i < nCount ; ++i)
{
uno::Reference< report::XFunction > xFunction(_xFunctions->getByIndex(i),uno::UNO_QUERY_THROW);
- _rFunctionNames.insert(TFunctions::value_type(lcl_getQuotedFunctionName(xFunction),TFunctionPair(xFunction,xParent)));
+ _rFunctionNames.emplace( lcl_getQuotedFunctionName(xFunction),TFunctionPair(xFunction,xParent) );
}
}
@@ -2154,7 +2154,7 @@ void GeometryHandler::impl_createFunction(const OUString& _sFunctionName,const O
const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier = fillScope_throw(sNamePostfix);
const uno::Reference< container::XIndexContainer> xFunctions(xFunctionsSupplier->getFunctions(),uno::UNO_QUERY_THROW);
xFunctions->insertByIndex(xFunctions->getCount(),uno::makeAny(m_xFunction));
- m_aFunctionNames.insert(TFunctions::value_type(sQuotedFunctionName,TFunctionPair(m_xFunction,xFunctionsSupplier)));
+ m_aFunctionNames.emplace(sQuotedFunctionName,TFunctionPair(m_xFunction,xFunctionsSupplier));
m_bNewFunction = true;
}
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index b001bf39440d..f7ee6201dc9b 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -64,7 +64,7 @@ const formula::IFunctionCategory* FunctionManager::getCategory(sal_uInt32 _nPos)
{
uno::Reference< report::meta::XFunctionCategory> xCategory = m_xMgr->getCategory(_nPos);
std::shared_ptr< FunctionCategory > pCategory(new FunctionCategory(this,_nPos + 1,xCategory));
- m_aCategoryIndex.push_back( m_aCategories.insert(TCategoriesMap::value_type(xCategory->getName(),pCategory)).first );
+ m_aCategoryIndex.push_back( m_aCategories.emplace(xCategory->getName(),pCategory).first );
}
return m_aCategoryIndex[_nPos]->second.get();
}
@@ -87,10 +87,10 @@ std::shared_ptr< FunctionDescription > FunctionManager::get(const uno::Reference
TCategoriesMap::iterator aCategoryFind = m_aCategories.find(sCategoryName);
if ( aCategoryFind == m_aCategories.end() )
{
- aCategoryFind = m_aCategories.insert(TCategoriesMap::value_type(sCategoryName,std::make_shared< FunctionCategory > (this,xCategory->getNumber() + 1,xCategory))).first;
+ aCategoryFind = m_aCategories.emplace(sCategoryName,std::make_shared< FunctionCategory > (this,xCategory->getNumber() + 1,xCategory)).first;
m_aCategoryIndex.push_back( aCategoryFind );
}
- aFunctionFind = m_aFunctions.insert(TFunctionsMap::value_type(sFunctionName,std::make_shared<FunctionDescription>(aCategoryFind->second.get(),_xFunctionDescription))).first;
+ aFunctionFind = m_aFunctions.emplace(sFunctionName,std::make_shared<FunctionDescription>(aCategoryFind->second.get(),_xFunctionDescription)).first;
}
pDesc = aFunctionFind->second;
}
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index cc25964c9cb0..1622f53b895b 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -134,13 +134,13 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments
}
if ( m_aCommandURL == ".uno:FontColor" || m_aCommandURL == ".uno:Color" )
{
- m_aStates.insert(TCommandState::value_type(OUString(".uno:FontColor"),true));
- m_aStates.insert(TCommandState::value_type(OUString(".uno:Color"),true));
+ m_aStates.emplace(OUString(".uno:FontColor"),true);
+ m_aStates.emplace(OUString(".uno:Color"),true);
m_pToolbarController = new SvxColorToolBoxControl(SID_ATTR_CHAR_COLOR2,nToolBoxId,*pToolBox);
}
else
{
- m_aStates.insert(TCommandState::value_type(OUString(".uno:BackgroundColor"),true));
+ m_aStates.emplace(OUString(".uno:BackgroundColor"),true);
m_pToolbarController = new SvxColorToolBoxControl(SID_BACKGROUND_COLOR,nToolBoxId,*pToolBox);
}
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index a4e1f719a915..ccf428881469 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2968,10 +2968,10 @@ uno::Reference< sdbc::XRowSet > const & OReportController::getRowSet()
std::shared_ptr<AnyConverter> aNoConverter(new AnyConverter);
TPropertyNamePair aPropertyMediation;
- aPropertyMediation.insert( TPropertyNamePair::value_type( PROPERTY_COMMAND, TPropertyConverter(PROPERTY_COMMAND,aNoConverter) ) );
- aPropertyMediation.insert( TPropertyNamePair::value_type( PROPERTY_COMMANDTYPE, TPropertyConverter(PROPERTY_COMMANDTYPE,aNoConverter) ) );
- aPropertyMediation.insert( TPropertyNamePair::value_type( PROPERTY_ESCAPEPROCESSING, TPropertyConverter(PROPERTY_ESCAPEPROCESSING,aNoConverter) ) );
- aPropertyMediation.insert( TPropertyNamePair::value_type( PROPERTY_FILTER, TPropertyConverter(PROPERTY_FILTER,aNoConverter) ) );
+ aPropertyMediation.emplace( PROPERTY_COMMAND, TPropertyConverter(PROPERTY_COMMAND,aNoConverter) );
+ aPropertyMediation.emplace( PROPERTY_COMMANDTYPE, TPropertyConverter(PROPERTY_COMMANDTYPE,aNoConverter) );
+ aPropertyMediation.emplace( PROPERTY_ESCAPEPROCESSING, TPropertyConverter(PROPERTY_ESCAPEPROCESSING,aNoConverter) );
+ aPropertyMediation.emplace( PROPERTY_FILTER, TPropertyConverter(PROPERTY_FILTER,aNoConverter) );
m_xRowSetMediator = new OPropertyMediator( m_xReportDefinition.get(), xRowSetProp, aPropertyMediation );
m_xRowSet = xRowSet;
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index a7102fef49e3..af7c34346a4a 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -666,7 +666,7 @@ void OViewsWindow::collectRectangles(TRectangleMap& _rSortRectangles)
const SdrMark* pM = rView.GetSdrMarkByIndex(i);
SdrObject* pObj = pM->GetMarkedSdrObj();
tools::Rectangle aObjRect(pObj->GetSnapRect());
- _rSortRectangles.insert(TRectangleMap::value_type(aObjRect,TRectangleMap::mapped_type(pObj,&rView)));
+ _rSortRectangles.emplace(aObjRect,TRectangleMap::mapped_type(pObj,&rView));
}
}
}
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index a55fbcb5b533..294e5a3eb5dd 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -743,8 +743,7 @@ void ScBroadcastAreaSlotMachine::StartListeningArea(
{
TableSlotsMap::iterator iTab( aTableSlotsMap.find( nTab));
if (iTab == aTableSlotsMap.end())
- iTab = aTableSlotsMap.insert( TableSlotsMap::value_type(
- nTab, new TableSlots)).first;
+ iTab = aTableSlotsMap.emplace(nTab, new TableSlots).first;
ScBroadcastAreaSlot** ppSlots = (*iTab).second->getSlots();
SCSIZE nStart, nEnd, nRowBreak;
ComputeAreaPoints( rRange, nStart, nEnd, nRowBreak );
@@ -1057,8 +1056,7 @@ void ScBroadcastAreaSlotMachine::UpdateBroadcastAreas(
{
TableSlotsMap::iterator iTab( aTableSlotsMap.find( nTab));
if (iTab == aTableSlotsMap.end())
- iTab = aTableSlotsMap.insert( TableSlotsMap::value_type(
- nTab, new TableSlots)).first;
+ iTab = aTableSlotsMap.emplace(nTab, new TableSlots).first;
ScBroadcastAreaSlot** ppSlots = (*iTab).second->getSlots();
SCSIZE nStart, nEnd, nRowBreak;
ComputeAreaPoints( aRange, nStart, nEnd, nRowBreak );
diff --git a/sc/source/core/data/columnset.cxx b/sc/source/core/data/columnset.cxx
index 1af137117f5d..fbaf4c5d30ff 100644
--- a/sc/source/core/data/columnset.cxx
+++ b/sc/source/core/data/columnset.cxx
@@ -18,7 +18,7 @@ void ColumnSet::set(SCTAB nTab, SCCOL nCol)
if (itTab == maTabs.end())
{
std::pair<TabsType::iterator,bool> r =
- maTabs.insert(TabsType::value_type(nTab, ColsType()));
+ maTabs.emplace(nTab, ColsType());
if (!r.second)
// insertion failed.
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 6ad833f37370..74ebcd147b01 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1547,7 +1547,7 @@ public:
assert(nEndRow >= nFirstRow);
mnHighIndex = nEndRow - nFirstRow;
- maBlockMap.insert(BlockMapType::value_type(aLoPos.first->size, aLoPos.first));
+ maBlockMap.emplace(aLoPos.first->size, aLoPos.first);
return;
}
@@ -1582,7 +1582,7 @@ public:
}
nPos += itBlk->size;
- maBlockMap.insert(BlockMapType::value_type(nPos, itBlk));
+ maBlockMap.emplace(nPos, itBlk);
++itBlk;
if (itBlk->type == sc::element_type_empty)
@@ -1593,7 +1593,7 @@ public:
assert(itBlk == aHiPos.first);
nPos += itBlk->size;
- maBlockMap.insert(BlockMapType::value_type(nPos, itBlk));
+ maBlockMap.emplace(nPos, itBlk);
// Calculate the high index.
BlockMapType::const_reverse_iterator ri = maBlockMap.rbegin();
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index 539ee2c7b16c..d8dc218b4cd8 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -635,7 +635,7 @@ void ScDPDimensionSaveData::ReplaceNumGroupDimension( const ScDPSaveNumGroupDime
{
ScDPSaveNumGroupDimMap::iterator aIt = maNumGroupDims.find( rGroupDim.GetDimensionName() );
if( aIt == maNumGroupDims.end() )
- maNumGroupDims.insert( ScDPSaveNumGroupDimMap::value_type( rGroupDim.GetDimensionName(), rGroupDim ) );
+ maNumGroupDims.emplace( rGroupDim.GetDimensionName(), rGroupDim );
else
aIt->second = rGroupDim;
}
diff --git a/sc/source/core/data/dpresfilter.cxx b/sc/source/core/data/dpresfilter.cxx
index 5ba161d7dc82..44e7f4a275c6 100644
--- a/sc/source/core/data/dpresfilter.cxx
+++ b/sc/source/core/data/dpresfilter.cxx
@@ -114,7 +114,7 @@ void ScDPResultTree::add(
{
// New dimension. Insert it.
std::pair<DimensionsType::iterator, bool> r =
- rDims.insert(DimensionsType::value_type(aUpperName, new DimensionNode));
+ rDims.emplace(aUpperName, new DimensionNode);
if (!r.second)
// Insertion failed!
@@ -135,7 +135,7 @@ void ScDPResultTree::add(
// New member. Insert it.
std::shared_ptr<MemberNode> pNode( new MemberNode);
std::pair<MembersType::iterator, bool> r =
- rMembersValueNames.insert( MembersType::value_type(aUpperName, pNode));
+ rMembersValueNames.emplace(aUpperName, pNode);
if (!r.second)
// Insertion failed!
@@ -154,7 +154,7 @@ void ScDPResultTree::add(
{
// New member. Insert it.
std::pair<MembersType::iterator, bool> it =
- rMembersValues.insert( MembersType::value_type(aUpperName, pNode));
+ rMembersValues.emplace(aUpperName, pNode);
// If insertion failed do not bail out anymore.
SAL_WARN_IF( !it.second, "sc.core", "ScDPResultTree::add - rMembersValues.insert failed");
}
@@ -175,7 +175,7 @@ void ScDPResultTree::add(
if (it == maLeafValues.end())
{
// This name pair doesn't exist. Associate a new value for it.
- maLeafValues.insert(LeafValuesType::value_type(aNames, fVal));
+ maLeafValues.emplace(aNames, fVal);
}
else
{
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 26476d059911..e70a695e7bd2 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -696,7 +696,7 @@ void ScDPSaveDimension::RemoveObsoleteMembers(const MemberSetType& rMembers)
if (rMembers.count(pMem->GetName()))
{
// This member still exists.
- maMemberHash.insert(MemberHash::value_type(pMem->GetName(), pMem));
+ maMemberHash.emplace(pMem->GetName(), pMem);
aNew.push_back(pMem);
}
else
@@ -1297,7 +1297,7 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData)
NameIndexMap aMap;
long nColCount = pData->GetColumnCount();
for (long i = 0; i < nColCount; ++i)
- aMap.insert( NameIndexMap::value_type(pData->getDimensionName(i), i));
+ aMap.emplace(pData->getDimensionName(i), i);
NameIndexMap::const_iterator itrEnd = aMap.end();
@@ -1341,7 +1341,7 @@ void ScDPSaveData::SyncAllDimensionMembers(ScDPTableData* pData)
NameIndexMap aMap;
long nColCount = pData->GetColumnCount();
for (long i = 0; i < nColCount; ++i)
- aMap.insert(NameIndexMap::value_type(pData->getDimensionName(i), i));
+ aMap.emplace(pData->getDimensionName(i), i);
NameIndexMap::const_iterator itMapEnd = aMap.end();
@@ -1405,7 +1405,7 @@ void ScDPSaveData::CheckDuplicateName(ScDPSaveDimension& rDim)
}
else
// New name.
- maDupNameCounts.insert(DupNameCountType::value_type(aName, 0));
+ maDupNameCounts.emplace(aName, 0);
}
void ScDPSaveData::RemoveDuplicateNameCount(const OUString& rName)
@@ -1436,7 +1436,7 @@ ScDPSaveDimension* ScDPSaveData::AppendNewDimension(const OUString& rName, bool
ScDPSaveDimension* pNew = new ScDPSaveDimension(rName, bDataLayout);
m_DimList.push_back(std::unique_ptr<ScDPSaveDimension>(pNew));
if (!maDupNameCounts.count(rName))
- maDupNameCounts.insert(DupNameCountType::value_type(rName, 0));
+ maDupNameCounts.emplace(rName, 0);
DimensionsChanged();
return pNew;
diff --git a/sc/source/core/data/mtvelements.cxx b/sc/source/core/data/mtvelements.cxx
index 0bb50aa09f6a..c8234922ed9e 100644
--- a/sc/source/core/data/mtvelements.cxx
+++ b/sc/source/core/data/mtvelements.cxx
@@ -64,7 +64,7 @@ ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, SCCOL
if (itTab == maTables.end())
{
std::pair<TablesType::iterator,bool> r =
- maTables.insert(TablesType::value_type(nTab, ColumnsType()));
+ maTables.emplace(nTab, ColumnsType());
if (!r.second)
// insertion failed.
return nullptr;
diff --git a/sc/source/core/data/refupdatecontext.cxx b/sc/source/core/data/refupdatecontext.cxx
index c065b35e9210..e704ae57925c 100644
--- a/sc/source/core/data/refupdatecontext.cxx
+++ b/sc/source/core/data/refupdatecontext.cxx
@@ -25,7 +25,7 @@ void UpdatedRangeNames::setUpdatedName(SCTAB nTab, sal_uInt16 nIndex)
// Insert a new container for this sheet index.
NameIndicesType aIndices;
std::pair<UpdatedNamesType::iterator,bool> r =
- maUpdatedNames.insert(UpdatedNamesType::value_type(nTab, aIndices));
+ maUpdatedNames.emplace( nTab, aIndices);
if (!r.second)
// Insertion failed for whatever reason.
diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx
index 91e38c0e64b1..ed90ed626d51 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -216,7 +216,7 @@ void ScCellKeywordTranslator::addToMap(const OUString& rKey, const sal_Char* pNa
// New keyword.
list<ScCellKeyword> aList;
aList.push_back(aKeyItem);
- maStringNameMap.insert( ScCellKeywordHashMap::value_type(rKey, aList) );
+ maStringNameMap.emplace(rKey, aList);
}
else
itr->second.push_back(aKeyItem);
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index b441563237d5..6ca9cc9af5d1 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -376,7 +376,7 @@ void ScChartPositioner::CreatePositionMap()
if ( it == pCols->end() )
{
pCol = new RowMap;
- pCols->insert( ColumnMap::value_type( nInsCol, pCol ) );
+ pCols->emplace(nInsCol, pCol);
}
else
pCol = it->second;
@@ -388,7 +388,7 @@ void ScChartPositioner::CreatePositionMap()
{
if ( pCol->find( nInsRow ) == pCol->end() )
{
- pCol->insert( RowMap::value_type( nInsRow, new ScAddress( nCol, nRow, nTab ) ) );
+ pCol->emplace( nInsRow, new ScAddress( nCol, nRow, nTab ) );
}
}
}
@@ -451,7 +451,7 @@ void ScChartPositioner::CreatePositionMap()
{
sal_uLong nKey = it1->first;
for (ColumnMap::const_iterator it2 = ++pCols->begin(); it2 != pCols->end(); ++it2 )
- it2->second->insert( RowMap::value_type( nKey, nullptr )); // no data
+ it2->second->emplace( nKey, nullptr ); // no data
}
}
}
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index cea77f9c90ac..859dd8dffae3 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -231,7 +231,7 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& rDoc, const ScAddres
aRefRange.aEnd.SetRow(rTopPos.Row() + nRowEnd);
aRef.InitRange(aRefRange);
formula::FormulaTokenRef xTok(new ScMatrixRangeToken(pMat, aRef));
- aCachedTokens.insert(CachedTokensType::value_type(p, xTok));
+ aCachedTokens.emplace(p, xTok);
aCode2.AddToken(*xTok);
}
else
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 60df984f637f..7471dd9161d2 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -170,7 +170,7 @@ void ScInterpreter::ScIfJump()
}
}
xNew = new ScJumpMatrixToken( pJumpMat );
- GetTokenMatrixMap().insert( ScTokenMatrixMap::value_type(pCur, xNew));
+ GetTokenMatrixMap().emplace(pCur, xNew);
}
if (!xNew.get())
{
@@ -376,7 +376,7 @@ void ScInterpreter::ScIfError( bool bNAonly )
nR = 0;
}
xNew = new ScJumpMatrixToken( pJumpMat );
- GetTokenMatrixMap().insert( ScTokenMatrixMap::value_type( pCur, xNew ));
+ GetTokenMatrixMap().emplace( pCur, xNew );
}
nGlobalError = nOldGlobalError;
PushTokenRef( xNew );
@@ -473,8 +473,7 @@ void ScInterpreter::ScChooseJump()
}
}
xNew = new ScJumpMatrixToken( pJumpMat );
- GetTokenMatrixMap().insert( ScTokenMatrixMap::value_type(
- pCur, xNew));
+ GetTokenMatrixMap().emplace(pCur, xNew);
}
if (xNew.get())
{
@@ -827,7 +826,7 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
if (pTokenMatrixMap)
{
pTokenMatrixMap->erase( pCur);
- pTokenMatrixMap->insert( ScTokenMatrixMap::value_type( pCur, pStack[sp-1]));
+ pTokenMatrixMap->emplace(pCur, pStack[sp-1]);
}
}
return true;
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 64a72ac34f47..acd8f21d184a 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1592,7 +1592,7 @@ bool ScInterpreter::ConvertMatrixParameters()
}
pJumpMat->SetJumpParameters( pParams);
xNew = new ScJumpMatrixToken( pJumpMat );
- GetTokenMatrixMap().insert( ScTokenMatrixMap::value_type( pCur, xNew));
+ GetTokenMatrixMap().emplace(pCur, xNew);
}
PushTempTokenWithoutError( xNew.get());
// set continuation point of path for main code line
@@ -4446,8 +4446,7 @@ StackVar ScInterpreter::Interpret()
// Remember result matrix in case it could be reused.
if (pTokenMatrixMap && sp && GetStackType() == svMatrix)
- pTokenMatrixMap->insert( ScTokenMatrixMap::value_type( pCur,
- pStack[sp-1]));
+ pTokenMatrixMap->emplace(pCur, pStack[sp-1]);
// outer function determines format of an expression
if ( nFuncFmtType != css::util::NumberFormat::UNDEFINED )
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 7aba82b116db..1293ed7a597d 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -341,7 +341,7 @@ ScMatrixRef ScInterpreter::CreateMatrixFromDoubleRef( const FormulaToken* pToken
pDok->FillMatrix(*pMat, nTab1, nCol1, nRow1, nCol2, nRow2);
if (pToken && pTokenMatrixMap)
- pTokenMatrixMap->insert( ScTokenMatrixMap::value_type( pToken, new ScMatrixToken( pMat)));
+ pTokenMatrixMap->emplace(pToken, new ScMatrixToken( pMat));
return pMat;
}
diff --git a/sc/source/core/tool/listenerquery.cxx b/sc/source/core/tool/listenerquery.cxx
index e31b759b9521..a36957e1c943 100644
--- a/sc/source/core/tool/listenerquery.cxx
+++ b/sc/source/core/tool/listenerquery.cxx
@@ -38,7 +38,7 @@ void RefQueryFormulaGroup::add( const ScAddress& rPos )
if (itTab == maTabs.end())
{
std::pair<TabsType::iterator,bool> r =
- maTabs.insert(TabsType::value_type(rPos.Tab(), ColsType()));
+ maTabs.emplace(rPos.Tab(), ColsType());
if (!r.second)
// Insertion failed.
return;
@@ -51,7 +51,7 @@ void RefQueryFormulaGroup::add( const ScAddress& rPos )
if (itCol == rCols.end())
{
std::pair<ColsType::iterator,bool> r =
- rCols.insert(ColsType::value_type(rPos.Col(), ColType()));
+ rCols.emplace(rPos.Col(), ColType());
if (!r.second)
// Insertion failed.
return;
diff --git a/sc/source/core/tool/simplerangelist.cxx b/sc/source/core/tool/simplerangelist.cxx
index 326f87dff2f1..6cc3fdfc6cce 100644
--- a/sc/source/core/tool/simplerangelist.cxx
+++ b/sc/source/core/tool/simplerangelist.cxx
@@ -182,7 +182,7 @@ ScSimpleRangeList::RangeListRef ScSimpleRangeList::findTab(SCTAB nTab)
if (itr == maTabs.end())
{
RangeListRef p(new list<Range>);
- pair<TabType::iterator, bool> r = maTabs.insert(TabType::value_type(nTab, p));
+ pair<TabType::iterator, bool> r = maTabs.emplace(nTab, p);
if (!r.second)
return RangeListRef();
itr = r.first;
diff --git a/sc/source/core/tool/tokenstringcontext.cxx b/sc/source/core/tool/tokenstringcontext.cxx
index 1e40afed7003..7837fee5a670 100644
--- a/sc/source/core/tool/tokenstringcontext.cxx
+++ b/sc/source/core/tool/tokenstringcontext.cxx
@@ -76,7 +76,7 @@ TokenStringContext::TokenStringContext( const ScDocument* pDoc, formula::Formula
SCTAB nTab = it->first;
IndexNameMapType aNames;
insertAllNames(aNames, *pSheetNames);
- maSheetRangeNames.insert(TabIndexMapType::value_type(nTab, aNames));
+ maSheetRangeNames.emplace(nTab, aNames);
}
}
@@ -89,7 +89,7 @@ TokenStringContext::TokenStringContext( const ScDocument* pDoc, formula::Formula
for (; it != itEnd; ++it)
{
const ScDBData& rData = **it;
- maNamedDBs.insert(IndexNameMapType::value_type(rData.GetIndex(), rData.GetName()));
+ maNamedDBs.emplace(rData.GetIndex(), rData.GetName());
}
}
diff --git a/sc/source/filter/excel/namebuff.cxx b/sc/source/filter/excel/namebuff.cxx
index d2dce76c2c22..0a80cf8e6c9b 100644
--- a/sc/source/filter/excel/namebuff.cxx
+++ b/sc/source/filter/excel/namebuff.cxx
@@ -67,7 +67,7 @@ void SharedFormulaBuffer::Store( const ScAddress& rPos, const ScTokenArray& rArr
{
ScTokenArray* pCode = rArray.Clone();
pCode->GenHash();
- maTokenArrays.insert(TokenArraysType::value_type(rPos, pCode));
+ maTokenArrays.emplace(rPos, pCode);
}
const ScTokenArray* SharedFormulaBuffer::Find( const ScAddress& rRefPos ) const
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 92e24cf74a3a..9f1da86dcb9b 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -349,7 +349,7 @@ void XclExpXmlPivotTableManager::Initialize()
const ScDPCache::ScDPObjectSet& rRefs = pCache->GetAllReferences();
ScDPCache::ScDPObjectSet::const_iterator it = rRefs.begin(), itEnd = rRefs.end();
for (; it != itEnd; ++it)
- maCacheIdMap.insert(CacheIdMapType::value_type(*it, aCaches.size()+1));
+ maCacheIdMap.emplace(*it, aCaches.size()+1);
XclExpXmlPivotCaches::Entry aEntry;
aEntry.meType = XclExpXmlPivotCaches::Worksheet;
@@ -505,7 +505,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
for (size_t i = 0; i < nFieldCount; ++i)
{
OUString aName = rCache.GetDimensionName(i);
- aNameToIdMap.insert(NameToIdMapType::value_type(aName, aCachedDims.size()));
+ aNameToIdMap.emplace(aName, aCachedDims.size());
const ScDPSaveDimension* pDim = rSaveData.GetExistingDimensionByName(aName);
aCachedDims.push_back(pDim);
}
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index da8698aeebda..10cc23f57a09 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2413,7 +2413,7 @@ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 nXclRow, bool bRowAlwaysE
mnHighestOutlineLevel = maOutlineBfr.GetLevel();
}
RowRef p(new XclExpRow(GetRoot(), nFrom, maOutlineBfr, bRowAlwaysEmpty, bHidden, nHeight));
- maRowMap.insert(RowMap::value_type(nFrom, p));
+ maRowMap.emplace(nFrom, p);
pPrevEntry = p;
}
++nFrom;
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index cc433f9ceb8a..509eb68acdc3 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -1428,7 +1428,7 @@ XclImpSheetProtectBuffer::Sheet* XclImpSheetProtectBuffer::GetSheetItem( SCTAB n
if (itr == maProtectedSheets.end())
{
// new sheet
- if ( !maProtectedSheets.insert( ProtectedSheetMap::value_type(nTab, Sheet()) ).second )
+ if ( !maProtectedSheets.emplace( nTab, Sheet() ).second )
return nullptr;
itr = maProtectedSheets.find(nTab);
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 11795a5ff086..d5b406c1e0e6 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -177,7 +177,7 @@ void ScHTMLStyles::insertProp(
}
PropsType *const pProps = itr->second.get();
- pProps->insert(PropsType::value_type(aProp, aValue));
+ pProps->emplace(aProp, aValue);
}
// BASE class for HTML parser classes
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index e7dbc948c5aa..a677ce01abf5 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -86,7 +86,7 @@ public:
{
// Create an entry for this column.
std::pair<ColCacheType::iterator,bool> r =
- maCache.insert(ColCacheType::value_type(rPos.Col(), new Item));
+ maCache.emplace(rPos.Col(), new Item);
if (!r.second)
// Insertion failed.
return;
diff --git a/sc/source/filter/oox/revisionfragment.cxx b/sc/source/filter/oox/revisionfragment.cxx
index ec95dcffab13..d7eb692c361d 100644
--- a/sc/source/filter/oox/revisionfragment.cxx
+++ b/sc/source/filter/oox/revisionfragment.cxx
@@ -298,7 +298,7 @@ void RevisionHeadersFragment::importHeader( const AttributeList& rAttribs )
aMetadata.maUserName = rAttribs.getString(XML_userName, OUString());
- mpImpl->maRevData.insert(RevDataType::value_type(aRId, aMetadata));
+ mpImpl->maRevData.emplace(aRId, aMetadata);
}
struct RevisionLogFragment::Impl
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 1f59aa1f6675..b6ed7040a934 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -187,7 +187,7 @@ size_t ScOrcusFactory::appendString(const OUString& rStr)
{
size_t nPos = maStrings.size();
maStrings.push_back(rStr);
- maStringHash.insert(StringHashType::value_type(rStr, nPos));
+ maStringHash.emplace(rStr, nPos);
return nPos;
}
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index 9321cdb3b231..f9128fbd59e9 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -694,7 +694,7 @@ void ScXMLExportDatabaseRanges::WriteDatabaseRanges()
{
const ScDBData* p = pDoc->GetAnonymousDBData(i);
if (p)
- aSheetDBs.insert(SheetLocalDBs::value_type(i, p));
+ aSheetDBs.emplace(i, p);
}
bool bHasRanges = !aSheetDBs.empty();
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 9f431889385c..7a00a7809b1a 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -397,7 +397,7 @@ void ScXMLDataPilotTableContext::SetButtons()
void ScXMLDataPilotTableContext::SetSelectedPage( const OUString& rDimName, const OUString& rSelected )
{
- maSelectedPages.insert(SelectedPagesType::value_type(rDimName, rSelected));
+ maSelectedPages.emplace(rDimName, rSelected);
}
void ScXMLDataPilotTableContext::AddDimension(ScDPSaveDimension* pDim)
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 60113982f85a..fd209338b7f2 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -929,7 +929,7 @@ void ScXMLExport::ExportExternalRefCacheStyles()
}
// store the number format to index mapping for later use.
- aNumFmtIndexMap.insert(NumberFormatIndexMap::value_type(nNumFmt, nIndex));
+ aNumFmtIndexMap.emplace(nNumFmt, nIndex);
}
}
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 79ba53882d7f..a7a8e1f750a6 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -600,7 +600,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
aEvent.NewValue <<= xChild;
CommitChange(aEvent);
OSL_ASSERT(m_mapSelectionSend.count(aNewCell) == 0 );
- m_mapSelectionSend.insert(MAP_ADDR_XACC::value_type(aNewCell,xChild));
+ m_mapSelectionSend.emplace(aNewCell,xChild);
}
else
@@ -639,7 +639,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_ADD;
aEvent.NewValue <<= xChild;
CommitChange(aEvent);
- m_mapSelectionSend.insert(MAP_ADDR_XACC::value_type(*viAddr,xChild));
+ m_mapSelectionSend.emplace(*viAddr,xChild);
}
}
}
@@ -1542,7 +1542,7 @@ void ScAccessibleSpreadsheet::NotifyRefMode()
aEvent.EventId = AccessibleEventId::SELECTION_CHANGED;
aEvent.NewValue <<= xNew;
CommitChange(aEvent);
- m_mapFormulaSelectionSend.insert(MAP_ADDR_XACC::value_type(aFormulaAddr,xNew));
+ m_mapFormulaSelectionSend.emplace(aFormulaAddr,xNew);
m_vecFormulaLastMyAddr.clear();
m_vecFormulaLastMyAddr.push_back(aFormulaAddr);
}
@@ -1591,7 +1591,7 @@ void ScAccessibleSpreadsheet::NotifyRefMode()
aEvent.EventId = AccessibleEventId::SELECTION_CHANGED_ADD;
aEvent.NewValue <<= xChild;
CommitChange(aEvent);
- m_mapFormulaSelectionSend.insert(MAP_ADDR_XACC::value_type(*viAddr,xChild));
+ m_mapFormulaSelectionSend.emplace(*viAddr,xChild);
}
}
m_vecFormulaLastMyAddr.swap(vecCurSel);
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index d0e68d7eb950..ecd99a44dd6a 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -403,7 +403,7 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox&, rLBox, void )
NameMapType aMap;
vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end();
for (; itr != itrEnd; ++itr)
- aMap.insert(NameMapType::value_type(itr->getDisplayName(), itr->maName));
+ aMap.emplace(itr->getDisplayName(), itr->maName);
maBaseItemNameMap.swap(aMap);
}
@@ -661,7 +661,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou
for( ScDPNameVec::const_iterator aIt = rDataFields.begin(), aEnd = rDataFields.end(); aIt != aEnd; ++aIt )
{
// Cache names for later lookup.
- maDataFieldNameMap.insert(NameMapType::value_type(aIt->maLayoutName, *aIt));
+ maDataFieldNameMap.emplace(aIt->maLayoutName, *aIt);
m_pLbSortBy->InsertEntry( aIt->maLayoutName );
m_pLbShowUsing->InsertEntry( aIt->maLayoutName ); // for AutoShow
@@ -840,7 +840,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( vcl::Window* pParent, ScDPObject& rDPObj,
aName = *pLayoutName;
}
mpLbDims->InsertEntry( aName );
- maNameIndexMap.insert(DimNameIndexMap::value_type(aName, nDim));
+ maNameIndexMap.emplace(aName, nDim);
}
}
}
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 3baad956e02d..402975e39693 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -293,7 +293,7 @@ void ScExternalRefCache::Table::setCell(SCCOL nCol, SCROW nRow, TokenRef const &
ScExternalRefCache::Cell aCell;
aCell.mxToken = pToken;
aCell.mnFmtIndex = nFmtIndex;
- rRow.insert(RowDataType::value_type(nCol, aCell));
+ rRow.emplace(nCol, aCell);
if (bSetCacheRange)
setCachedCell(nCol, nRow);
}
@@ -717,9 +717,9 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData(
}
}
- rDoc.maRangeArrays.insert( RangeArrayMap::value_type(aCacheRange, pArray));
+ rDoc.maRangeArrays.emplace(aCacheRange, pArray);
if (pNewRange && *pNewRange != aCacheRange)
- rDoc.maRangeArrays.insert( RangeArrayMap::value_type(*pNewRange, pArray));
+ rDoc.maRangeArrays.emplace(*pNewRange, pArray);
return pArray;
}
@@ -751,8 +751,8 @@ void ScExternalRefCache::setRangeNameTokens(sal_uInt16 nFileId, const OUString&
OUString aUpperName = ScGlobal::pCharClass->uppercase(rName);
RangeNameMap& rMap = pDoc->maRangeNames;
- rMap.insert(RangeNameMap::value_type(aUpperName, pArray));
- pDoc->maRealRangeNameMap.insert(NamePairMap::value_type(aUpperName, rName));
+ rMap.emplace(aUpperName, pArray);
+ pDoc->maRealRangeNameMap.emplace(aUpperName, rName);
}
bool ScExternalRefCache::isValidRangeName(sal_uInt16 nFileId, const OUString& rName) const
@@ -776,7 +776,7 @@ void ScExternalRefCache::setRangeName(sal_uInt16 nFileId, const OUString& rName)
return;
OUString aUpperName = ScGlobal::pCharClass->uppercase(rName);
- pDoc->maRealRangeNameMap.insert(NamePairMap::value_type(aUpperName, rName));
+ pDoc->maRealRangeNameMap.emplace(aUpperName, rName);
}
void ScExternalRefCache::setCellData(sal_uInt16 nFileId, const OUString& rTabName, SCCOL nCol, SCROW nRow,
@@ -887,7 +887,7 @@ void ScExternalRefCache::setCellRangeData(sal_uInt16 nFileId, const ScRange& rRa
size_t nTabLastId = nTabFirstId + rRange.aEnd.Tab() - rRange.aStart.Tab();
ScRange aCacheRange( nCol1, nRow1, static_cast<SCTAB>(nTabFirstId), nCol2, nRow2, static_cast<SCTAB>(nTabLastId));
- rDoc.maRangeArrays.insert( RangeArrayMap::value_type( aCacheRange, pArray));
+ rDoc.maRangeArrays.emplace(aCacheRange, pArray);
}
bool ScExternalRefCache::isDocInitialized(sal_uInt16 nFileId)
@@ -968,7 +968,7 @@ void ScExternalRefCache::initializeDoc(sal_uInt16 nFileId, const vector<OUString
// name index map
TableNameIndexMap aNewNameIndex;
for (size_t i = 0; i < n; ++i)
- aNewNameIndex.insert(TableNameIndexMap::value_type(pDoc->maTableNames[i].maUpperName, i));
+ aNewNameIndex.emplace(pDoc->maTableNames[i].maUpperName, i);
pDoc->maTableNameIndex.swap(aNewNameIndex);
// Setup name for Sheet1 vs base name to be able to load documents
@@ -2393,7 +2393,7 @@ ScDocument* ScExternalRefManager::getInMemorySrcDocument(sal_uInt16 nFileId)
// Found !
SrcShell aSrcDoc;
aSrcDoc.maShell = pShell;
- maUnsavedDocShells.insert(DocShellMap::value_type(nFileId, aSrcDoc));
+ maUnsavedDocShells.emplace(nFileId, aSrcDoc);
StartListening(*pShell);
pSrcDoc = &pShell->GetDocument();
break;
@@ -2565,7 +2565,7 @@ ScDocument& ScExternalRefManager::cacheNewDocShell( sal_uInt16 nFileId, SrcShell
// If this is the first source document insertion, start up the timer.
maSrcDocTimer.Start();
- maDocShells.insert(DocShellMap::value_type(nFileId, rSrcShell));
+ maDocShells.emplace(nFileId, rSrcShell);
SfxObjectShell& rShell = *rSrcShell.maShell;
ScDocument& rSrcDoc = static_cast<ScDocShell&>(rShell).GetDocument();
initDocInCache(maRefCache, &rSrcDoc, nFileId);
@@ -2633,7 +2633,7 @@ void ScExternalRefManager::maybeLinkExternalFile( sal_uInt16 nFileId, bool bDefe
pLink->Update();
pLink->SetDoReferesh(true);
- maLinkedDocs.insert(LinkedDocMap::value_type(nFileId, true));
+ maLinkedDocs.emplace(nFileId, true);
}
void ScExternalRefManager::addFilesToLinkManager()
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index aa01ad485303..f68c9a06ccad 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -405,7 +405,7 @@ void ScColRowNameRangesDlg::UpdateNames()
OUString aInsStr = aString;
aInsStr += strShow;
nPos = pLbRange->InsertEntry( aInsStr );
- aRangeMap.insert( NameRangeMap::value_type(aInsStr, aRange) );
+ aRangeMap.emplace( aInsStr, aRange );
pLbRange->SetEntryData( nPos, reinterpret_cast<void*>(nEntryDataCol) );
}
}
@@ -446,7 +446,7 @@ void ScColRowNameRangesDlg::UpdateNames()
OUString aInsStr = aString;
aInsStr += strShow;
nPos = pLbRange->InsertEntry( aInsStr );
- aRangeMap.insert( NameRangeMap::value_type(aInsStr, aRange) );
+ aRangeMap.emplace( aInsStr, aRange );
pLbRange->SetEntryData( nPos, reinterpret_cast<void*>(nEntryDataRow) );
}
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 84d97df0f383..a764af6f594a 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -9321,7 +9321,7 @@ void ScUniqueFormatsEntry::Join( const ScRange& rNewRange )
}
SCROW nSingleRow = aSingleRange.aStart.Row();
- aJoinedRanges.insert( ScRowRangeHashMap::value_type( nSingleRow, aSingleRange ) );
+ aJoinedRanges.emplace( nSingleRow, aSingleRange );
eState = STATE_COMPLEX;
// continue normally
}
@@ -9353,7 +9353,7 @@ void ScUniqueFormatsEntry::Join( const ScRange& rNewRange )
else
{
// keep rNewRange for joining
- aJoinedRanges.insert( ScRowRangeHashMap::value_type( nStartRow, rNewRange ) );
+ aJoinedRanges.emplace( nStartRow, rNewRange );
}
}
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index c0b91e6d1056..8443f0bc54ef 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -1677,7 +1677,7 @@ void ScDBFunc::DataPilotSort(ScDPObject* pDPObj, long nDimIndex, bool bAscending
// This string doesn't exist in the member name set. Don't add this.
continue;
- aSubStrs.insert(UserSortMap::value_type(aSub, nSubCount++));
+ aSubStrs.emplace(aSub, nSubCount++);
}
}
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index e5d007bc8d71..b22a8b09f389 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -565,7 +565,7 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu()
MemNameMapType aMemNameMap;
for (vector<ScDPLabelData::Member>::const_iterator itr = rLabelData.maMembers.begin(), itrEnd = rLabelData.maMembers.end();
itr != itrEnd; ++itr)
- aMemNameMap.insert(MemNameMapType::value_type(itr->maLayoutName, itr->maName));
+ aMemNameMap.emplace(itr->maLayoutName, itr->maName);
// The raw result may contain a mixture of layout names and original names.
ScCheckListMenuWindow::ResultType aRawResult;
diff --git a/sc/source/ui/view/spellcheckcontext.cxx b/sc/source/ui/view/spellcheckcontext.cxx
index ac615fdbe52e..025cfb41e1e5 100644
--- a/sc/source/ui/view/spellcheckcontext.cxx
+++ b/sc/source/ui/view/spellcheckcontext.cxx
@@ -72,7 +72,7 @@ void SpellCheckContext::setMisspellRanges(
if (pRanges)
{
if (it == maMisspellCells.end())
- maMisspellCells.insert(CellMapType::value_type(aPos, *pRanges));
+ maMisspellCells.emplace(aPos, *pRanges);
else
it->second = *pRanges;
}
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index 41471369e4f4..e5ab8083511b 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -257,7 +257,7 @@ namespace basprov
if ( pVar )
{
SbxVariableRef xVar = pVar;
- aOutParamMap.insert( OutParamMap::value_type( n - 1, sbxToUnoValue( xVar.get() ) ) );
+ aOutParamMap.emplace( n - 1, sbxToUnoValue( xVar.get() ) );
}
}
}
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index fb8ed0af7395..fb733ce785b8 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -215,7 +215,7 @@ std::shared_ptr<PageCacheManager::Cache> PageCacheManager::GetCache (
// Put the new (or old) cache into the container.
if (pResult.get() != nullptr)
- mpPageCaches->insert(PageCacheContainer::value_type(aKey, pResult));
+ mpPageCaches->emplace(aKey, pResult);
return pResult;
}
@@ -296,9 +296,9 @@ std::shared_ptr<PageCacheManager::Cache> PageCacheManager::ChangeSize (
const ::sd::slidesorter::cache::PageCacheManager::DocumentKey aKey (
iCacheToChange->first.mpDocument);
mpPageCaches->erase(iCacheToChange);
- mpPageCaches->insert(PageCacheContainer::value_type(
+ mpPageCaches->emplace(
CacheDescriptor(aKey,rNewPreviewSize),
- rpCache));
+ rpCache);
pResult = rpCache;
}
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index 7fa2e7530942..b2ede96f664f 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -1220,7 +1220,7 @@ void ToolBarList::AddToolBar (
{
Groups::iterator iGroup (maGroups.find(eGroup));
if (iGroup == maGroups.end())
- iGroup = maGroups.insert(Groups::value_type(eGroup,NameList())).first;
+ iGroup = maGroups.emplace(eGroup,NameList()).first;
if (iGroup != maGroups.end())
{
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 451c1fc071a3..137a51edc0b2 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -386,7 +386,7 @@ void ViewShellManager::Implementation::AddShellFactory (
// Add the factory if it is not already present.
if ( ! bAlreadyAdded)
- maShellFactories.insert(FactoryList::value_type(pViewShell, rpFactory));
+ maShellFactories.emplace(pViewShell, rpFactory);
}
void ViewShellManager::Implementation::RemoveShellFactory (
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 7b8ebc4ee978..578a202f1540 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -312,7 +312,7 @@ namespace
while (pToolBarResToName[nIndex].eId != ToolbarId::None)
{
OUString aResourceURL( OUString::createFromAscii( pToolBarResToName[nIndex].pName ));
- m_aResIdToResourceURLMap.insert(ToolBarResIdToResourceURLMap::value_type(pToolBarResToName[nIndex].eId, aResourceURL));
+ m_aResIdToResourceURLMap.emplace(pToolBarResToName[nIndex].eId, aResourceURL);
++nIndex;
}
}
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index d55171a913bf..e26ace875906 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -181,7 +181,7 @@ namespace sfx2
FilterClassList::iterator aInsertPos = m_rClassList.end();
--aInsertPos;
// remember this position
- m_rClassesReferrer.insert( FilterClassReferrer::value_type( _rLogicalFilterName, aInsertPos ) );
+ m_rClassesReferrer.emplace( _rLogicalFilterName, aInsertPos );
}
};
@@ -349,7 +349,7 @@ namespace sfx2
void operator() ( const FilterName& _rName )
{
::std::pair< FilterGroupEntryReferrer::iterator, bool > aInsertRes =
- m_rEntryReferrer.insert( FilterGroupEntryReferrer::value_type( _rName, m_aClassPos ) );
+ m_rEntryReferrer.emplace( _rName, m_aClassPos );
SAL_WARN_IF(
!aInsertRes.second, "sfx.dialog",
"already have an element for " << _rName);
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 173f14524628..f11e73b27dd7 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -156,9 +156,9 @@ sal_Int16 MapGroupIDToCommandGroup( SfxGroupId nGroupID )
sal_Int32 i = 0;
while ( GroupIDCommandGroupMap[i].nGroupID != SfxGroupId::NONE )
{
- s_aHashMap.insert( GroupHashMap::value_type(
+ s_aHashMap.emplace(
GroupIDCommandGroupMap[i].nGroupID,
- GroupIDCommandGroupMap[i].nCommandGroup ));
+ GroupIDCommandGroupMap[i].nCommandGroup );
++i;
}
bGroupIDMapInitialized = true;
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 85bbce7407a8..a6d31551b7a1 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -1090,8 +1090,8 @@ void OServiceManager::insert( const Any & Element )
const OUString * pArray = aServiceNames.getConstArray();
for( sal_Int32 i = 0; i < aServiceNames.getLength(); i++ )
{
- m_ServiceMap.insert( HashMultimap_OWString_Interface::value_type(
- pArray[i], *o3tl::doAccess<Reference<XInterface>>(Element) ) );
+ m_ServiceMap.emplace(
+ pArray[i], *o3tl::doAccess<Reference<XInterface>>(Element) );
}
}
}
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index 505039c86d71..01a4ebd82993 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -131,7 +131,7 @@ void SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
if( SVX_MACROTBL_VERSION40 <= nVersion )
rStrm.ReadUInt16( eType );
- aSvxMacroTable.insert( SvxMacroTable::value_type(SvMacroItemId(nCurKey), SvxMacro( aMacName, aLibName, (ScriptType)eType ) ));
+ aSvxMacroTable.emplace( SvMacroItemId(nCurKey), SvxMacro( aMacName, aLibName, (ScriptType)eType ) );
}
}
@@ -186,7 +186,7 @@ bool SvxMacroTableDtor::IsKeyValid(SvMacroItemId nEvent) const
// This stores a copy of the rMacro parameter
SvxMacro& SvxMacroTableDtor::Insert(SvMacroItemId nEvent, const SvxMacro& rMacro)
{
- return aSvxMacroTable.insert( SvxMacroTable::value_type( nEvent, rMacro ) ).first->second;
+ return aSvxMacroTable.emplace( nEvent, rMacro ).first->second;
}
// If the entry exists, remove it from the map and release it's storage
diff --git a/svl/source/misc/sharedstringpool.cxx b/svl/source/misc/sharedstringpool.cxx
index d1b5aa695a1d..3383a7869566 100644
--- a/svl/source/misc/sharedstringpool.cxx
+++ b/svl/source/misc/sharedstringpool.cxx
@@ -101,7 +101,7 @@ SharedString SharedStringPool::intern( const OUString& rStr )
// Failed to insert or fetch upper-case variant. Should never happen.
return SharedString();
- mpImpl->maStrStore.insert(StrStoreType::value_type(pOrig, *aRes.first));
+ mpImpl->maStrStore.emplace(pOrig, *aRes.first);
return SharedString(pOrig, aRes.first->pData);
}
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index a8bb0b0d3243..6f360bf82aae 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -242,7 +242,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
if ( aComponentDisplayNamesValue.getLength() && (aComponentDisplayNamesValue[0] >>= sComponentDisplayName) )
{
sal_Int32 nIndex = 0;
- m_aComponentDisplayNames.insert(TDisplayNames::value_type(componentName.getToken(1,'/',nIndex),sComponentDisplayName));
+ m_aComponentDisplayNames.emplace(componentName.getToken(1,'/',nIndex),sComponentDisplayName);
}
componentName += "/Entries";
@@ -261,7 +261,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme)
sName = sName.copy(0,sName.lastIndexOf(sDisplayName));
OUString sCurrentDisplayName;
aDisplayNamesValue[j] >>= sCurrentDisplayName;
- aDisplayNameMap.insert(TDisplayNames::value_type(sName,sCurrentDisplayName));
+ aDisplayNameMap.emplace(sName,sCurrentDisplayName);
}
}
@@ -332,7 +332,7 @@ void ExtendedColorConfig_Impl::FillComponentColors(uno::Sequence < OUString >& _
OUString* pColorIter = aColorNames.getArray();
OUString* pColorEnd = pColorIter + aColorNames.getLength();
- m_aConfigValuesPos.push_back(m_aConfigValues.insert(TComponents::value_type(sComponentName,TComponentMapping(TConfigValues(),TMapPos()))).first);
+ m_aConfigValuesPos.push_back(m_aConfigValues.emplace(sComponentName,TComponentMapping(TConfigValues(),TMapPos())).first);
TConfigValues& aConfigValues = (*m_aConfigValuesPos.rbegin())->second.first;
TMapPos& aConfigValuesPos = (*m_aConfigValuesPos.rbegin())->second.second;
for(int i = 0; pColorIter != pColorEnd; ++pColorIter ,++i)
@@ -360,7 +360,7 @@ void ExtendedColorConfig_Impl::FillComponentColors(uno::Sequence < OUString >& _
else
nDefaultColor = nColor;
ExtendedColorConfigValue aValue(sName,sDisplayName,nColor,nDefaultColor);
- aConfigValuesPos.push_back(aConfigValues.insert(TConfigValues::value_type(sName,aValue)).first);
+ aConfigValuesPos.push_back(aConfigValues.emplace(sName,aValue).first);
}
} // for(int i = 0; pColorIter != pColorEnd; ++pColorIter ,++i)
}
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index 661169dcad47..a0bcb0409a99 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -169,7 +169,7 @@ namespace svt
void RoadmapWizard::declarePath( PathId _nPathId, const WizardPath& _lWizardStates)
{
- m_pImpl->aPaths.insert( Paths::value_type( _nPathId, _lWizardStates ) );
+ m_pImpl->aPaths.emplace( _nPathId, _lWizardStates );
if ( m_pImpl->aPaths.size() == 1 )
// the very first path -> activate it
diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx
index 4f135b946f87..0985d618bb3d 100644
--- a/svtools/source/uno/framestatuslistener.cxx
+++ b/svtools/source/uno/framestatuslistener.cxx
@@ -187,7 +187,7 @@ void FrameStatusListener::addStatusListener( const OUString& aCommandURL )
}
}
else
- m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, xDispatch ));
+ m_aListenerMap.emplace( aCommandURL, xDispatch );
}
}
diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx
index d74953b163b2..b755ac147caa 100644
--- a/svtools/source/uno/generictoolboxcontroller.cxx
+++ b/svtools/source/uno/generictoolboxcontroller.cxx
@@ -60,7 +60,7 @@ GenericToolboxController::GenericToolboxController( const Reference< XComponentC
// insert main command to our listener map
if ( !m_aCommandURL.isEmpty() )
- m_aListenerMap.insert( URLToDispatchMap::value_type( aCommand, Reference< XDispatch >() ));
+ m_aListenerMap.emplace( aCommand, Reference< XDispatch >() );
}
GenericToolboxController::~GenericToolboxController()
diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx
index fecabd21ad2a..94433e733fbd 100644
--- a/svtools/source/uno/statusbarcontroller.cxx
+++ b/svtools/source/uno/statusbarcontroller.cxx
@@ -162,7 +162,7 @@ void SAL_CALL StatusbarController::initialize( const Sequence< Any >& aArguments
}
if ( !m_aCommandURL.isEmpty() )
- m_aListenerMap.insert( URLToDispatchMap::value_type( m_aCommandURL, Reference< XDispatch >() ));
+ m_aListenerMap.emplace( m_aCommandURL, Reference< XDispatch >() );
}
}
@@ -357,7 +357,7 @@ void StatusbarController::addStatusListener( const OUString& aCommandURL )
if ( !m_bInitialized )
{
// Put into the unordered_map of status listener. Will be activated when initialized is called
- m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, Reference< XDispatch >() ));
+ m_aListenerMap.emplace( aCommandURL, Reference< XDispatch >() );
return;
}
else
@@ -388,7 +388,7 @@ void StatusbarController::addStatusListener( const OUString& aCommandURL )
}
}
else
- m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, xDispatch ));
+ m_aListenerMap.emplace( aCommandURL, xDispatch );
}
}
}
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index 857bc90cddc3..848a1b065d69 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -211,7 +211,7 @@ void SAL_CALL ToolboxController::initialize( const Sequence< Any >& aArguments )
}
if ( !m_aCommandURL.isEmpty() )
- m_aListenerMap.insert( URLToDispatchMap::value_type( m_aCommandURL, Reference< XDispatch >() ));
+ m_aListenerMap.emplace( m_aCommandURL, Reference< XDispatch >() );
}
}
@@ -391,7 +391,7 @@ void ToolboxController::addStatusListener( const OUString& aCommandURL )
if ( !m_bInitialized )
{
// Put into the unordered_map of status listener. Will be activated when initialized is called
- m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, Reference< XDispatch >() ));
+ m_aListenerMap.emplace( aCommandURL, Reference< XDispatch >() );
return;
}
else
@@ -422,7 +422,7 @@ void ToolboxController::addStatusListener( const OUString& aCommandURL )
}
}
else
- m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, xDispatch ));
+ m_aListenerMap.emplace( aCommandURL, xDispatch );
}
}
}
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 4904de3ab689..d997ab7e90ae 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -730,7 +730,7 @@ svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int _nPos )
OSL_ENSURE(m_xAccessible.is(), "Who wants to create a child of my table without a parent?");
std::shared_ptr<svx::SvxShowCharSetItem> xItem(new svx::SvxShowCharSetItem(*this,
m_xAccessible->getTable(), sal::static_int_cast< sal_uInt16 >(_nPos)));
- aFind = m_aItems.insert(ItemsMap::value_type(_nPos, xItem)).first;
+ aFind = m_aItems.emplace(_nPos, xItem).first;
OUStringBuffer buf;
buf.appendUtf32( mxFontCharMap->GetCharFromIndex( _nPos ) );
aFind->second->maText = buf.makeStringAndClear();
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 73f73af16fa6..23490582a59a 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -1247,7 +1247,7 @@ namespace svx
{
FmTextControlFeature* pDispatcher = implGetFeatureDispatcher( xProvider, pApplication, *pSlots );
if ( pDispatcher )
- _rDispatchers.insert( ControlFeatures::value_type( *pSlots, ControlFeature( pDispatcher ) ) );
+ _rDispatchers.emplace( *pSlots, ControlFeature( pDispatcher ) );
++pSlots;
}
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 652faa322f9a..e1408f8a604d 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -597,7 +597,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
DBG_UNHANDLED_EXCEPTION();
}
}
- aSetPos = pCache->insert(PropertySetInfoCache::value_type(xSet,aNewEntry)).first;
+ aSetPos = pCache->emplace(xSet,aNewEntry).first;
DBG_ASSERT(aSetPos != pCache->end(), "FmXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
}
else
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 30b3ef99621b..98f27571585e 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -360,7 +360,7 @@ void SearchToolbarControllersManager::registryController( const css::uno::Refere
SearchToolbarControllersVec lControllers(1);
lControllers[0].Name = sCommandURL;
lControllers[0].Value <<= xStatusListener;
- aSearchToolbarControllersMap.insert(SearchToolbarControllersMap::value_type(xFrame, lControllers));
+ aSearchToolbarControllersMap.emplace(xFrame, lControllers);
}
else
{
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 361a7513d4bd..689b032bb3c5 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2331,14 +2331,13 @@ lcl_CollectHintSpans(const SwpHints& i_rHints, const sal_Int32 nLength,
if (nWhich == RES_TXTATR_CHARFMT || nWhich == RES_TXTATR_AUTOFMT)
{
const AttrSpan_t aSpan(pHint->GetStart(), *pHint->End());
- o_rSpanMap.insert(AttrSpanMap_t::value_type(aSpan, pHint));
+ o_rSpanMap.emplace(aSpan, pHint);
// < not != because there may be multiple CHARFMT at same range
if (nLastEnd < aSpan.first)
{
// insert dummy span covering the gap
- o_rSpanMap.insert(AttrSpanMap_t::value_type(
- AttrSpan_t(nLastEnd, aSpan.first), nullptr));
+ o_rSpanMap.emplace( AttrSpan_t(nLastEnd, aSpan.first), nullptr );
}
nLastEnd = aSpan.second;
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index dab18534b15b..863a016a10bc 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -92,12 +92,12 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk)
{
sal_uLong nNd = rBkmk.GetMarkPos().nNode.GetIndex();
- aBkmkNodePos.insert( SwBookmarkNodeTable::value_type( nNd, &rBkmk ) );
+ aBkmkNodePos.emplace( nNd, &rBkmk );
if(rBkmk.IsExpanded() && rBkmk.GetOtherMarkPos().nNode != nNd)
{
nNd = rBkmk.GetOtherMarkPos().nNode.GetIndex();
- aBkmkNodePos.insert( SwBookmarkNodeTable::value_type( nNd, &rBkmk ));
+ aBkmkNodePos.emplace( nNd, &rBkmk );
}
}
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index d4d12e86aeef..082ac7f5c730 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -857,7 +857,7 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo
{
pNodeInfo =
std::make_shared<ww8::WW8TableNodeInfo>(this, pNode);
- mMap.insert(Map_t::value_type(pNode, pNodeInfo));
+ mMap.emplace(pNode, pNodeInfo);
}
pNodeInfo->setDepth(nDepth + pNodeInfo->getDepth());
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index cd4a10e121c8..fe787c421ee8 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -914,7 +914,7 @@ namespace sw
InsertedTableClient * pClient = new InsertedTableClient(rTableNode);
- maTables.insert(TableMap::value_type(pClient, &(rPaM.GetPoint()->nNode)));
+ maTables.emplace(pClient, &(rPaM.GetPoint()->nNode));
}
}
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 07a82ad0e5e7..44aaddf9ad9b 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -74,8 +74,7 @@ public:
//see Read_AmbiguousSPRM for the bPatchCJK oddity
wwSprmSearcher(SprmInfoRow const * rows, std::size_t size, bool bPatchCJK = false) {
for (std::size_t i = 0; i != size; ++i) {
- bool ins = map_.insert(Map::value_type(rows[i].nId, rows[i].info))
- .second;
+ bool ins = map_.emplace(rows[i].nId, rows[i].info).second;
assert(ins); (void) ins;
}
if (bPatchCJK)
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index edee732e8452..523410a1ef13 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -727,7 +727,7 @@ Sequence< Reference< XControlModel > > SAL_CALL ControlModelContainerBase::getCo
sal_Int32 nTabIndex = -1;
xControlProps->getPropertyValue( getTabIndexPropertyName() ) >>= nTabIndex;
- aSortedModels.insert( MapIndexToModel::value_type( nTabIndex, xModel ) );
+ aSortedModels.emplace( nTabIndex, xModel );
}
else if ( xModel.is() )
// no, it hasn't, but we have to include it, anyway
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 673551cf8c28..c16c363de3c1 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -437,7 +437,7 @@ void UnoControl::ImplLockPropertyChangeNotification( const OUString& rPropertyNa
if ( bLock )
{
if ( pos == mpData->aSuspendedPropertyNotifications.end() )
- pos = mpData->aSuspendedPropertyNotifications.insert( MapString2Int::value_type( rPropertyName, 0 ) ).first;
+ pos = mpData->aSuspendedPropertyNotifications.emplace( rPropertyName, 0 ).first;
++pos->second;
}
else
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index c082cba44703..b9bbed77bb7a 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -533,7 +533,7 @@ TaskManager::registerNotifier( const OUString& aUnqPath, Notifier* pNotifier )
osl::MutexGuard aGuard( m_aMutex );
ContentMap::iterator it =
- m_aContent.insert( ContentMap::value_type( aUnqPath,UnqPathData() ) ).first;
+ m_aContent.emplace( aUnqPath,UnqPathData() ).first;
if( ! it->second.notifier )
it->second.notifier = new NotifierList;
@@ -598,7 +598,7 @@ TaskManager::associate( const OUString& aUnqPath,
{
osl::MutexGuard aGuard( m_aMutex );
- ContentMap::iterator it = m_aContent.insert( ContentMap::value_type( aUnqPath,UnqPathData() ) ).first;
+ ContentMap::iterator it = m_aContent.emplace( aUnqPath,UnqPathData() ).first;
// Load the XPersistentPropertySetInfo and create it, if it does not exist
load( it,true );
@@ -628,7 +628,7 @@ TaskManager::deassociate( const OUString& aUnqPath,
osl::MutexGuard aGuard( m_aMutex );
- ContentMap::iterator it = m_aContent.insert( ContentMap::value_type( aUnqPath,UnqPathData() ) ).first;
+ ContentMap::iterator it = m_aContent.emplace( aUnqPath,UnqPathData() ).first;
load( it,false );
@@ -1982,7 +1982,7 @@ void SAL_CALL TaskManager::insertDefaultProperties( const OUString& aUnqPath )
osl::MutexGuard aGuard( m_aMutex );
ContentMap::iterator it =
- m_aContent.insert( ContentMap::value_type( aUnqPath,UnqPathData() ) ).first;
+ m_aContent.emplace( aUnqPath,UnqPathData() ).first;
load( it,false );
diff --git a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
index 1966eee522d2..434c924d5932 100644
--- a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
@@ -70,7 +70,7 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession(
std::unique_ptr< DAVSession > xElement(
new NeonSession( this, inUri, rFlags, *m_xProxyDecider.get() ) );
- aIt = m_aMap.insert( Map::value_type( inUri, xElement.get() ) ).first;
+ aIt = m_aMap.emplace( inUri, xElement.get() ).first;
aIt->second->m_aContainerIt = aIt;
xElement.release();
return aIt->second;
diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.cxx b/ucb/source/ucp/webdav/DAVSessionFactory.cxx
index dcf293541acd..0809252bb5f2 100644
--- a/ucb/source/ucp/webdav/DAVSessionFactory.cxx
+++ b/ucb/source/ucp/webdav/DAVSessionFactory.cxx
@@ -57,7 +57,7 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession(
std::unique_ptr< DAVSession > xElement(
new SerfSession( this, inUri, *m_xProxyDecider.get() ) );
- aIt = m_aMap.insert( Map::value_type( inUri, xElement.get() ) ).first;
+ aIt = m_aMap.emplace( inUri, xElement.get() ) ).first;
aIt->second->m_aContainerIt = aIt;
xElement.release();
return aIt->second;
diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
index e5b8d5837a6e..ad13b108ef41 100644
--- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx
+++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
@@ -243,7 +243,7 @@ SAL_IMPLEMENT_MAIN()
vCmds.push_back(sCmd);
} while ( nIndex >= 0 );
- options.protocolCmdMap.insert(ProtocolCmdMap::value_type(sPrt, vCmds));
+ options.protocolCmdMap.emplace(sPrt, vCmds);
continue;
}
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx
index f9be432a9a7a..5f1eac638403 100644
--- a/unotools/source/config/cmdoptions.cxx
+++ b/unotools/source/config/cmdoptions.cxx
@@ -74,7 +74,7 @@ class SvtCmdOptions
void AddCommand( const OUString& aCmd )
{
- m_aCommandHashMap.insert( CommandHashMap::value_type( aCmd, 0 ) );
+ m_aCommandHashMap.emplace( aCmd, 0 );
}
private:
diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx
index 0d680c304d27..7a9630595189 100644
--- a/unotools/source/config/extendedsecurityoptions.cxx
+++ b/unotools/source/config/extendedsecurityoptions.cxx
@@ -211,7 +211,7 @@ void SvtExtendedSecurityOptions_Impl::FillExtensionHashMap( ExtensionHashMap& aH
// Don't use value if sequence has not the correct length
if ( aValues[0] >>= aValue )
// Add extension into secure extensions hash map
- aHashMap.insert( ExtensionHashMap::value_type( aValue.toAsciiLowerCase(), 1 ) );
+ aHashMap.emplace( aValue.toAsciiLowerCase(), 1 );
else
{
SAL_WARN( "unotools.config", "SvtExtendedSecurityOptions_Impl::FillExtensionHashMap(): not string value?" );
diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx
index 471dad5a365e..7da3f2305455 100644
--- a/unotools/source/config/optionsdlg.cxx
+++ b/unotools/source/config/optionsdlg.cxx
@@ -144,7 +144,7 @@ void SvtOptionsDlgOptions_Impl::ReadNode( const OUString& _rNode, NodeType _eTyp
aValues = GetProperties( lResult );
bool bHide = false;
if ( aValues[0] >>= bHide )
- m_aOptionNodeList.insert( OptionNodeList::value_type( sNode, bHide ) );
+ m_aOptionNodeList.emplace( sNode, bHide );
if ( _eType != NT_Option )
{
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index d6675cd31333..c8925967c875 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -412,7 +412,7 @@ SvtPathOptions_Impl::SvtPathOptions_Impl() :
for ( sal_Int32 n = 0; n < aPathPropSeq.getLength(); n++ )
{
const css::beans::Property& aProperty = aPathPropSeq[n];
- aTempHashMap.insert( NameToHandleMap::value_type( aProperty.Name, aProperty.Handle ));
+ aTempHashMap.emplace(aProperty.Name, aProperty.Handle);
}
// Create mapping between internal enum (SvtPathOptions::Paths) and property handle
@@ -425,7 +425,7 @@ SvtPathOptions_Impl::SvtPathOptions_Impl() :
{
sal_Int32 nHandle = pIter->second;
sal_Int32 nEnum = p.ePath;
- m_aMapEnumToPropHandle.insert( EnumToHandleMap::value_type( nEnum, nHandle ));
+ m_aMapEnumToPropHandle.emplace( nEnum, nHandle );
}
}
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index cfed6c80e20e..33c7b2b9b2e3 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -210,16 +210,16 @@ namespace DOM
if (attr_qname.startsWith("xmlns:"))
{
newprefix = attr_qname.copy(attr_qname.indexOf(':')+1);
- aNSMap.insert(NSMap::value_type(newprefix, attr_value));
+ aNSMap.emplace(newprefix, attr_value);
}
else if ( attr_qname == "xmlns" )
{
// new default prefix
- aNSMap.insert(NSMap::value_type(OUString(), attr_value));
+ aNSMap.emplace(OUString(), attr_value);
}
else
{
- aAttrMap.insert(AttrMap::value_type(attr_qname, attr_value));
+ aAttrMap.emplace(attr_qname, attr_value);
}
}
diff --git a/unoxml/source/events/eventdispatcher.cxx b/unoxml/source/events/eventdispatcher.cxx
index 0dab5b9d0624..54cbf4c3267e 100644
--- a/unoxml/source/events/eventdispatcher.cxx
+++ b/unoxml/source/events/eventdispatcher.cxx
@@ -44,13 +44,13 @@ namespace DOM { namespace events {
auto tIter = pTMap->find(aType);
if (tIter == pTMap->end()) {
// the map has to be created
- auto const pair = pTMap->insert(TypeListenerMap::value_type(aType, ListenerMap()));
+ auto const pair = pTMap->emplace(aType, ListenerMap());
pMap = & pair.first->second;
} else {
pMap = & tIter->second;
}
assert(pMap != nullptr);
- pMap->insert(ListenerMap::value_type(pNode, aListener));
+ pMap->emplace(pNode, aListener);
}
void CEventDispatcher::removeListener(xmlNodePtr pNode, const OUString& aType, const Reference<XEventListener>& aListener, bool bCapture)
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index bae64f8fda45..63e21a1fe26e 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -99,7 +99,7 @@ namespace XPath
{
::osl::MutexGuard const g(m_Mutex);
- m_nsmap.insert(nsmap_t::value_type(aPrefix, aURI));
+ m_nsmap.emplace(aPrefix, aURI);
}
void SAL_CALL CXPathAPI::unregisterNS(
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index f800508eff88..1cf370976cdb 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -2616,7 +2616,7 @@ HRESULT WINAPI CMAccessible::SmartQI(void* /*pv*/, REFIID iid, void** ppvObject)
assert(hr == S_OK);
if(hr == S_OK)
{
- m_containedObjects.insert(XGUIDToComObjHash::value_type(*pMap->piid,static_cast<IUnknown*>(*ppvObject)));
+ m_containedObjects.emplace(*pMap->piid, static_cast<IUnknown*>(*ppvObject));
IUNOXWrapper* wrapper = nullptr;
static_cast<IUnknown*>(*ppvObject)->QueryInterface(IID_IUNOXWrapper, reinterpret_cast<void**>(&wrapper));
if(wrapper)
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
index 1ac198ea89f4..0eda5f73e0c7 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -1051,7 +1051,7 @@ bool AccObject:: UpdateAccessibleInfoFromUnoToMSAA ( )
*/
void AccObject::AddSelect( long index, AccObject* accObj)
{
- m_selectionList.insert(IAccSelectionList::value_type(index,accObj));
+ m_selectionList.emplace(index,accObj);
}
IAccSelectionList& AccObject::GetSelection()
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
index 2e97c62f2835..cc6a76de5cdc 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -718,7 +718,7 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX
{
XHWNDDocList.erase( aIter );
}
- XHWNDDocList.insert( XHWNDToDocumentHash::value_type(pWnd, pXAcc) );
+ XHWNDDocList.emplace( pWnd, pXAcc );
}
//end of file name
@@ -736,9 +736,9 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX
else
return false;
- XIdAccList.insert( XIdToAccObjHash::value_type( pXAcc, pObj ));
+ XIdAccList.emplace(pXAcc, pObj);
XIdToAccObjHash::iterator pIndTemp = XIdAccList.find( pXAcc );
- XResIdAccList.insert(XResIdToAccObjHash::value_type(pObj.GetResID(),&(pIndTemp->second)));
+ XResIdAccList.emplace(pObj.GetResID(),&(pIndTemp->second));
AccObject* pCurObj = GetAccObjByXAcc(pXAcc);
if( pCurObj )
@@ -762,7 +762,7 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX
*/
void AccObjectWinManager::SaveTopWindowHandle(HWND hWnd, css::accessibility::XAccessible* pXAcc)
{
- HwndXAcc.insert( XHWNDToXAccHash::value_type( hWnd,pXAcc ) );
+ HwndXAcc.emplace(hWnd,pXAcc);
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index d3c3d7fd6eb6..f94d3687e149 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3518,7 +3518,7 @@ void DomainMapper_Impl::handleToc
if( !nLevel )
nLevel = 1;
if( !sStyleName.isEmpty() )
- aMap.insert( TOCStyleMap::value_type(nLevel, sStyleName) );
+ aMap.emplace(nLevel, sStyleName);
}
uno::Reference< container::XIndexReplace> xParaStyles;
xTOC->getPropertyValue(getPropertyName(PROP_LEVEL_PARAGRAPH_STYLES)) >>= xParaStyles;
@@ -4851,7 +4851,7 @@ void DomainMapper_Impl::StartOrEndBookmark( const OUString& rId )
xCurrent = xCursor->getStart();
}
m_sCurrentBkmkId = rId;
- m_aBookmarkMap.insert(BookmarkMap_t::value_type( rId, BookmarkInsertPosition( bIsStart, m_sCurrentBkmkName, xCurrent ) ));
+ m_aBookmarkMap.emplace( rId, BookmarkInsertPosition( bIsStart, m_sCurrentBkmkName, xCurrent ) );
m_sCurrentBkmkName.clear();
}
}
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index d821191a1302..cc63585dc9dc 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1460,7 +1460,7 @@ OUString StyleSheetTable::ConvertStyleName( const OUString& rWWName, bool bExten
OUString aTo = OUString::createFromAscii(aStyleNamePairs[2 * nPair + 1]);
if (!aTo.isEmpty())
{
- m_pImpl->m_aStyleNameMap.insert( StringPairMap_t::value_type(aFrom, aTo));
+ m_pImpl->m_aStyleNameMap.emplace(aFrom, aTo);
m_pImpl->m_aReservedStyleNames.insert(aTo);
}
}
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 5f5300d839b9..6cfa804e4f02 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -342,7 +342,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const OUStrin
OUString key = processLang(Language) + "/" + Module;
std::pair< ModInfoTable::iterator,bool > aPair =
- m_aModInfo.insert( ModInfoTable::value_type( key,nullptr ) );
+ m_aModInfo.emplace(key,nullptr);
ModInfoTable::iterator it = aPair.first;
@@ -471,7 +471,7 @@ helpdatafileproxy::Hdf* Databases::getHelpDataFile( const OUString& Database,
key = *pExtensionPath + Language + dbFileName; // make unique, don't change language
std::pair< DatabasesTable::iterator,bool > aPair =
- m_aDatabases.insert( DatabasesTable::value_type( key, reinterpret_cast<helpdatafileproxy::Hdf *>(0) ) );
+ m_aDatabases.emplace( key, reinterpret_cast<helpdatafileproxy::Hdf *>(0) );
DatabasesTable::iterator it = aPair.first;
@@ -510,7 +510,7 @@ Databases::getCollator( const OUString& Language )
osl::MutexGuard aGuard( m_aMutex );
CollatorTable::iterator it =
- m_aCollatorTable.insert( CollatorTable::value_type( key, Reference< XCollator >() ) ).first;
+ m_aCollatorTable.emplace( key, Reference< XCollator >() ).first;
if( ! it->second.is() )
{
@@ -725,7 +725,7 @@ KeywordInfo* Databases::getKeyword( const OUString& Database,
OUString key = processLang(Language) + "/" + Database;
std::pair< KeywordInfoTable::iterator,bool > aPair =
- m_aKeywordInfo.insert( KeywordInfoTable::value_type( key,nullptr ) );
+ m_aKeywordInfo.emplace( key,nullptr );
KeywordInfoTable::iterator it = aPair.first;
@@ -805,7 +805,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const OUString& jar,
osl::MutexGuard aGuard( m_aMutex );
ZipFileTable::iterator it =
- m_aZipFileTable.insert( ZipFileTable::value_type( key,Reference< XHierarchicalNameAccess >(nullptr) ) ).first;
+ m_aZipFileTable.emplace( key,Reference< XHierarchicalNameAccess >(nullptr) ).first;
if( ! it->second.is() )
{
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 03ee2ecf1d84..bed146edf7b6 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -901,8 +901,7 @@ static void lcl_setErrorBarSequence ( const uno::Reference< chart2::XChartDocume
Reference< chart2::data::XLabeledDataSequence > xLabelSeq( chart2::data::LabeledDataSequence::create(xContext),
uno::UNO_QUERY_THROW );
- rSequences.insert( tSchXMLLSequencesPerIndex::value_type(
- tSchXMLIndexWithPart( -2, SCH_XML_PART_ERROR_BARS ), xLabelSeq ) );
+ rSequences.emplace( tSchXMLIndexWithPart( -2, SCH_XML_PART_ERROR_BARS ), xLabelSeq );
xLabelSeq->setValues( xNewSequence );
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 32c7ee0ecad4..f68f4b27c873 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -125,18 +125,15 @@ void lcl_fillRangeMapping(
if( nCol == 0 && rTable.bHasHeaderColumn )
{
SAL_WARN_IF( static_cast< sal_Int32 >( nRow ) != nRowOffset, "xmloff.chart", "nRow != nRowOffset" );
- rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
- aRangeId, lcl_aCategoriesRange ));
+ rOutRangeMap.emplace(aRangeId, lcl_aCategoriesRange);
}
else
{
OUString aColNumStr = OUString::number( nCol - nColOffset);
if( nRow == 0 && rTable.bHasHeaderRow )
- rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
- aRangeId, lcl_aLabelPrefix + aColNumStr ));
+ rOutRangeMap.emplace( aRangeId, lcl_aLabelPrefix + aColNumStr );
else
- rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
- aRangeId, aColNumStr ));
+ rOutRangeMap.emplace( aRangeId, aColNumStr );
}
}
else // eDataRowSource == chart::ChartDataRowSource_ROWS
@@ -144,18 +141,15 @@ void lcl_fillRangeMapping(
if( nRow == 0 && rTable.bHasHeaderRow )
{
SAL_WARN_IF( static_cast< sal_Int32 >( nCol ) != nColOffset, "xmloff.chart", "nCol != nColOffset" );
- rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
- aRangeId, lcl_aCategoriesRange ));
+ rOutRangeMap.emplace( aRangeId, lcl_aCategoriesRange );
}
else
{
OUString aRowNumStr = OUString::number( nRow - nRowOffset);
if( nCol == 0 && rTable.bHasHeaderColumn )
- rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
- aRangeId, lcl_aLabelPrefix + aRowNumStr ));
+ rOutRangeMap.emplace( aRangeId, lcl_aLabelPrefix + aRowNumStr );
else
- rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
- aRangeId, aRowNumStr ));
+ rOutRangeMap.emplace( aRangeId, aRowNumStr );
}
}
}
diff --git a/xmloff/source/core/i18nmap.cxx b/xmloff/source/core/i18nmap.cxx
index 87a7801da048..cc8ad3682bbf 100644
--- a/xmloff/source/core/i18nmap.cxx
+++ b/xmloff/source/core/i18nmap.cxx
@@ -24,7 +24,7 @@ bool SvI18NMap::Add( sal_uInt16 nKind, const OUString& rName,
const OUString& rNewName )
{
SvI18NMapEntry_Key aKey(nKind, rName);
- bool bIsNewInsertion = m_aMap.insert(SvI18NMap_Impl::value_type(aKey, rNewName)).second;
+ bool bIsNewInsertion = m_aMap.emplace(aKey, rNewName).second;
SAL_INFO_IF(!bIsNewInsertion, "xmloff.core", "SvI18NMap::Add: item with key \"" << rName << "\" registered already, likely invalid input file");
return bIsNewInsertion;
}
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx
index 7d45c524d5f5..52cfb2add085 100644
--- a/xmloff/source/core/nmspmap.cxx
+++ b/xmloff/source/core/nmspmap.cxx
@@ -347,7 +347,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName_( const OUString& rAttrName,
if (bCache)
{
- aNameCache.insert(NameSpaceHash::value_type(rAttrName, xEntry));
+ aNameCache.emplace(rAttrName, xEntry);
}
}
diff --git a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx
index 40ca17543de1..795aa5838218 100644
--- a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx
+++ b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx
@@ -46,7 +46,7 @@ const OUString& UnoInterfaceToUniqueIdentifierMapper::registerReference( const R
{
OUString aId( "id" );
aId += OUString::number( mnNextId++ );
- return (*maEntries.insert( IdMap_t::value_type( aId, xRef ) ).first).first;
+ return (*maEntries.emplace( aId, xRef ).first).first;
}
}
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index aea4f1206521..455940c553aa 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -605,7 +605,7 @@ namespace xmloff
OSL_ENSURE( m_aGridColumnStyles.end() == m_aGridColumnStyles.find( xColumnProperties ),
"OFormLayerXMLExport_Impl::collectGridColumnStylesAndIds: already have a style for this column!" );
- m_aGridColumnStyles.insert( MapPropertySet2String::value_type( xColumnProperties, sColumnStyleName ) );
+ m_aGridColumnStyles.emplace( xColumnProperties, sColumnStyleName );
}
}
}
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index dd1deeb76dfb..f11584c0762f 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -382,8 +382,7 @@ void OFormLayerXMLImport_Impl::startPage(const Reference< XDrawPage >& _rxDrawPa
// add a new entry to our page map
::std::pair< MapDrawPage2Map::iterator, bool > aPagePosition;
- aPagePosition =
- m_aControlIds.insert(MapDrawPage2Map::value_type(_rxDrawPage, MapString2PropertySet()));
+ aPagePosition = m_aControlIds.emplace(_rxDrawPage, MapString2PropertySet());
OSL_ENSURE(aPagePosition.second, "OFormLayerXMLImport_Impl::startPage: already imported this page!");
m_aCurrentPageIds = aPagePosition.first;
}
diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx
index 3a8c8dabea28..7da6f4974bec 100644
--- a/xmloff/source/forms/property_meta_data.cxx
+++ b/xmloff/source/forms/property_meta_data.cxx
@@ -143,7 +143,7 @@ namespace xmloff { namespace metadata
while ( !desc->propertyName.isEmpty() )
{
if ( desc->propertyGroup != NO_GROUP )
- s_attributeGroups.insert( AttributeGroups::value_type( desc->attribute, desc->propertyGroup ) );
+ s_attributeGroups.emplace( desc->attribute, desc->propertyGroup );
++desc;
}
}
diff --git a/xmloff/source/style/SinglePropertySetInfoCache.cxx b/xmloff/source/style/SinglePropertySetInfoCache.cxx
index e1ca7281ee29..ee0e890f112c 100644
--- a/xmloff/source/style/SinglePropertySetInfoCache.cxx
+++ b/xmloff/source/style/SinglePropertySetInfoCache.cxx
@@ -45,7 +45,7 @@ bool SinglePropertySetInfoCache::hasProperty(
rPropSetInfo = xWeakInfo;
if( rPropSetInfo.is() )
{
- map_.insert(Map::value_type(rPropSetInfo, bRet));
+ map_.emplace(rPropSetInfo, bRet);
}
return bRet;
}
diff --git a/xmlsecurity/source/component/certificatecontainer.cxx b/xmlsecurity/source/component/certificatecontainer.cxx
index 4d35c9b9404b..ac52bbf6fde1 100644
--- a/xmlsecurity/source/component/certificatecontainer.cxx
+++ b/xmlsecurity/source/component/certificatecontainer.cxx
@@ -59,11 +59,11 @@ CertificateContainer::isCertificateTrust ( const OUString & url, const OUString
sal_Bool
CertificateContainer::addCertificate( const OUString & url, const OUString & certificate_name, sal_Bool trust )
{
- certMap.insert( Map::value_type( url, certificate_name ) );
+ certMap.emplace( url, certificate_name );
//remember that the cert is trusted
if (trust)
- certTrustMap.insert( Map::value_type( url, certificate_name ) );
+ certTrustMap.emplace( url, certificate_name );
return true;
}