convert std::map::insert to std::map::emplace

which is considerably less verbose

Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b
Reviewed-on: https://gerrit.libreoffice.org/40978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2017-08-10 16:43:55 +02:00
parent f0e68d4fea
commit d347c24036
212 changed files with 495 additions and 520 deletions

View File

@ -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;
}

View File

@ -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() ) );
}

View File

@ -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
{

View File

@ -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)

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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;
}
}

View File

@ -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() ) );
}
}
}

View File

@ -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);

View File

@ -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);

View File

@ -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());

View File

@ -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();
}

View File

@ -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 );
}
}
}

View File

@ -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 );

View File

@ -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 );

View File

@ -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 )

View File

@ -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;
}

View File

@ -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;

View File

@ -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.

View File

@ -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

View File

@ -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 )

View File

@ -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 )

View File

@ -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;

View File

@ -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 );
}

View File

@ -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));
}
}
}

View File

@ -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() )
}

View File

@ -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);
}

View File

@ -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

View File

@ -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& )

View File

@ -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;

View File

@ -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();

View File

@ -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();
}

View File

@ -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()) );
}

View File

@ -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();

View File

@ -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;
}

View File

@ -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();
}

View File

@ -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 ),

View File

@ -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;
}

View File

@ -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 );

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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 ) ) );

View File

@ -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 );
}
};

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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);
}

View File

@ -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() )

View File

@ -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:

View File

@ -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 ) );
}
}
}

View File

@ -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 );
}
}

View File

@ -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 );
}

View File

@ -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

View File

@ -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& ) {}

View File

@ -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
{

View File

@ -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()

View File

@ -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());

View File

@ -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();

View File

@ -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

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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;

View File

@ -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 );

View File

@ -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;
}

View File

@ -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(

View File

@ -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:

View File

@ -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())

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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 );
}
}
}

View File

@ -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 );
}
}

View File

@ -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& )

View File

@ -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

View File

@ -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 );
}

View File

@ -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 );

View File

@ -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 );
}
}
}

View File

@ -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;
}
}

View File

@ -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
{

View File

@ -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!" );
}

View File

@ -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);
}
}

View File

@ -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 )

View File

@ -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 );
}
}

View File

@ -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 );
}
}

View File

@ -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 );
}
}
}

View File

@ -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

View File

@ -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

View File

@ -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 );

View File

@ -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(...)
{

View File

@ -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 );

View File

@ -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() )

View File

@ -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 );

View File

@ -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 );
}
}
}

View File

@ -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 );
}
}
}

View File

@ -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() )

View File

@ -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 );
}
}

View File

@ -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++ )
}

Some files were not shown because too many files have changed in this diff Show More