convert std::map::insert to std::map::emplace II
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331
Reviewed-on: https://gerrit.libreoffice.org/41019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index f361a43..a84fc81 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -216,18 +216,15 @@ struct lcl_RolesWithRangeAppend : public
Reference< beans::XPropertySet > xProp( xSeq, uno::UNO_QUERY_THROW );
if( xProp->getPropertyValue( "Role" ) >>= aRole )
{
m_rDestCnt->insert(
tContainerType::value_type(
aRole, xSeq->getSourceRangeRepresentation()));
m_rDestCnt->emplace(aRole, xSeq->getSourceRangeRepresentation());
// label
if( aRole == m_aRoleForLabelSeq )
{
Reference< data::XDataSequence > xLabelSeq( xVal->getLabel());
if( xLabelSeq.is())
{
m_rDestCnt->insert(
tContainerType::value_type(
lcl_aLabelRole, xLabelSeq->getSourceRangeRepresentation()));
m_rDestCnt->emplace(
lcl_aLabelRole, xLabelSeq->getSourceRangeRepresentation());
}
}
}
@@ -471,7 +468,7 @@ void addMissingRoles(DialogModel::tRolesWithRanges& rResult, const uno::Sequence
for(sal_Int32 i = 0, n = rRoles.getLength(); i < n; ++i)
{
if(rResult.find(rRoles[i]) == rResult.end())
rResult.insert(DialogModel::tRolesWithRanges::value_type(rRoles[i], OUString()));
rResult.emplace(rRoles[i], OUString());
}
}
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 2888ece..e1a629f 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -415,10 +415,9 @@ void InternalDataProvider::addDataSequenceToMap(
const OUString & rRangeRepresentation,
const Reference< chart2::data::XDataSequence > & xSequence )
{
m_aSequenceMap.insert(
tSequenceMap::value_type(
m_aSequenceMap.emplace(
rRangeRepresentation,
uno::WeakReference< chart2::data::XDataSequence >( xSequence )));
uno::WeakReference< chart2::data::XDataSequence >( xSequence ));
}
void InternalDataProvider::deleteMapReferences( const OUString & rRangeRepresentation )
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 160fbd7..ba3ac18 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1785,8 +1785,7 @@ private:
TotalStoreType::iterator itr = aStore.find(fX);
if (itr == aStore.end())
// New min-max pair for give X value.
aStore.insert(
TotalStoreType::value_type(fX, std::pair<double,double>(fYMin,fYMax)));
aStore.emplace(fX, std::pair<double,double>(fYMin,fYMax));
else
{
MinMaxType& r = itr->second;
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index a8ac2ba..28efa3f 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -2025,9 +2025,8 @@ void PlainStructType::dumpComprehensiveGetCppuType(FileStream & out)
std::map< OUString, sal_uInt32 > types;
std::vector< unoidl::PlainStructTypeEntity::Member >::size_type n = 0;
for (const unoidl::PlainStructTypeEntity::Member& member : entity_->getDirectMembers()) {
if (types.insert(
std::map< OUString, sal_uInt32 >::value_type(
member.type, static_cast< sal_uInt32 >(types.size()))).
if (types.emplace(
member.type, static_cast< sal_uInt32 >(types.size())).
second) {
dumpCppuGetType(out, member.type, &name_);
// For typedefs, use the resolved type name, as there will be no
@@ -2530,9 +2529,8 @@ void PolyStructType::dumpComprehensiveGetCppuType(FileStream & out)
size_type n = 0;
for (const unoidl::PolymorphicStructTypeTemplateEntity::Member& member : entity_->getMembers()) {
if (member.parameterized) {
if (parameters.insert(
std::map< OUString, sal_uInt32 >::value_type(
member.type, static_cast< sal_uInt32 >(parameters.size()))).
if (parameters.emplace(
member.type, static_cast< sal_uInt32 >(parameters.size())).
second) {
sal_uInt32 k = static_cast< sal_uInt32 >(parameters.size() - 1);
out << indent()
@@ -2546,9 +2544,7 @@ void PolyStructType::dumpComprehensiveGetCppuType(FileStream & out)
<< "::rtl::OUString the_pname" << k << "(the_ptype" << k
<< ".getTypeName());\n";
}
} else if (types.insert(
std::map< OUString, sal_uInt32 >::value_type(
member.type, static_cast< sal_uInt32 >(types.size()))).
} else if (types.emplace(member.type, static_cast< sal_uInt32 >(types.size())).
second) {
dumpCppuGetType(out, member.type, &name_);
// For typedefs, use the resolved type name, as there will be no
diff --git a/codemaker/source/cppumaker/dependencies.cxx b/codemaker/source/cppumaker/dependencies.cxx
index 99da99f..314e021 100644
--- a/codemaker/source/cppumaker/dependencies.cxx
+++ b/codemaker/source/cppumaker/dependencies.cxx
@@ -282,8 +282,7 @@ void Dependencies::insert(OUString const & name, Kind kind) {
case UnoType::Sort::Typedef:
{
std::pair< Map::iterator, bool > i(
m_map.insert(
Map::value_type(n, kind)));
m_map.emplace(n, kind));
if (!i.second && kind == KIND_BASE) {
assert(i.first->second != KIND_EXCEPTION);
i.first->second = KIND_BASE;
diff --git a/codemaker/source/cppumaker/includes.cxx b/codemaker/source/cppumaker/includes.cxx
index 7ab3716..2a57b13 100644
--- a/codemaker/source/cppumaker/includes.cxx
+++ b/codemaker/source/cppumaker/includes.cxx
@@ -111,8 +111,7 @@ void Includes::add(OString const & entityName) {
case codemaker::UnoType::Sort::Exception:
case codemaker::UnoType::Sort::Interface:
case codemaker::UnoType::Sort::Typedef:
m_map.insert(
Dependencies::Map::value_type(n, Dependencies::KIND_NORMAL));
m_map.emplace(n, Dependencies::KIND_NORMAL);
break;
default:
throw CannotDumpException(
diff --git a/codemaker/source/javamaker/classfile.cxx b/codemaker/source/javamaker/classfile.cxx
index 19de29c..4431005 100644
--- a/codemaker/source/javamaker/classfile.cxx
+++ b/codemaker/source/javamaker/classfile.cxx
@@ -491,8 +491,7 @@ sal_uInt16 ClassFile::addIntegerInfo(sal_Int32 value) {
sal_uInt16 index = nextConstantPoolIndex(1);
appendU1(m_constantPool, 3);
appendU4(m_constantPool, static_cast< sal_uInt32 >(value));
if (!m_integerInfos.insert(
std::map< sal_Int32, sal_uInt16 >::value_type(value, index)).second)
if (!m_integerInfos.emplace(value, index).second)
{
OSL_ASSERT(false);
}
@@ -509,8 +508,7 @@ sal_uInt16 ClassFile::addFloatInfo(float value) {
union { float floatBytes; sal_uInt32 uint32Bytes; } bytes;
bytes.floatBytes = value;
appendU4(m_constantPool, bytes.uint32Bytes);
if (!m_floatInfos.insert(
std::map< float, sal_uInt16 >::value_type(value, index)).second)
if (!m_floatInfos.emplace(value, index).second)
{
OSL_ASSERT(false);
}
@@ -525,8 +523,7 @@ sal_uInt16 ClassFile::addLongInfo(sal_Int64 value) {
sal_uInt16 index = nextConstantPoolIndex(2);
appendU1(m_constantPool, 5);
appendU8(m_constantPool, static_cast< sal_uInt64 >(value));
if (!m_longInfos.insert(
std::map< sal_Int64, sal_uInt16 >::value_type(value, index)).second)
if (!m_longInfos.emplace(value, index).second)
{
OSL_ASSERT(false);
}
@@ -543,8 +540,7 @@ sal_uInt16 ClassFile::addDoubleInfo(double value) {
union { double doubleBytes; sal_uInt64 uint64Bytes; } bytes;
bytes.doubleBytes = value;
appendU8(m_constantPool, bytes.uint64Bytes);
if (!m_doubleInfos.insert(
std::map< double, sal_uInt16 >::value_type(value, index)).second)
if (!m_doubleInfos.emplace(value, index).second)
{
OSL_ASSERT(false);
}
@@ -685,9 +681,7 @@ sal_uInt16 ClassFile::addUtf8Info(OString const & value) {
for (sal_Int32 j = 0; j < value.getLength(); ++j) {
appendU1(m_constantPool, static_cast< sal_uInt8 >(value[j]));
}
if (!m_utf8Infos.insert(
std::map< OString, sal_uInt16 >::value_type(value, index)).
second)
if (!m_utf8Infos.emplace(value, index).second)
{
OSL_ASSERT(false);
}
@@ -704,9 +698,7 @@ sal_uInt16 ClassFile::addClassInfo(OString const & type) {
sal_uInt16 index = nextConstantPoolIndex(1);
appendU1(m_constantPool, 7);
appendU2(m_constantPool, nameIndex);
if (!m_classInfos.insert(
std::map< sal_uInt16, sal_uInt16 >::value_type(nameIndex, index)).
second)
if (!m_classInfos.emplace(nameIndex, index).second)
{
OSL_ASSERT(false);
}
@@ -723,9 +715,7 @@ sal_uInt16 ClassFile::addStringInfo(OString const & value) {
sal_uInt16 index = nextConstantPoolIndex(1);
appendU1(m_constantPool, 8);
appendU2(m_constantPool, stringIndex);
if (!m_stringInfos.insert(
std::map< sal_uInt16, sal_uInt16 >::value_type(stringIndex, index)).
second)
if (!m_stringInfos.emplace(stringIndex, index).second)
{
OSL_ASSERT(false);
}
@@ -748,8 +738,7 @@ sal_uInt16 ClassFile::addFieldrefInfo(
appendU1(m_constantPool, 9);
appendU2(m_constantPool, classIndex);
appendU2(m_constantPool, nameAndTypeIndex);
if (!m_fieldrefInfos.insert(
std::map< sal_uInt32, sal_uInt16 >::value_type(key, index)).second)
if (!m_fieldrefInfos.emplace(key, index).second)
{
OSL_ASSERT(false);
}
@@ -772,8 +761,7 @@ sal_uInt16 ClassFile::addMethodrefInfo(
appendU1(m_constantPool, 10);
appendU2(m_constantPool, classIndex);
appendU2(m_constantPool, nameAndTypeIndex);
if (!m_methodrefInfos.insert(
std::map< sal_uInt32, sal_uInt16 >::value_type(key, index)).second)
if (!m_methodrefInfos.emplace(key, index).second)
{
OSL_ASSERT(false);
}
@@ -797,8 +785,7 @@ sal_uInt16 ClassFile::addInterfaceMethodrefInfo(
appendU1(m_constantPool, 11);
appendU2(m_constantPool, classIndex);
appendU2(m_constantPool, nameAndTypeIndex);
if (!m_interfaceMethodrefInfos.insert(
std::map< sal_uInt32, sal_uInt16 >::value_type(key, index)).second)
if (!m_interfaceMethodrefInfos.emplace(key, index).second)
{
OSL_ASSERT(false);
}
@@ -821,8 +808,7 @@ sal_uInt16 ClassFile::addNameAndTypeInfo(
appendU1(m_constantPool, 12);
appendU2(m_constantPool, nameIndex);
appendU2(m_constantPool, descriptorIndex);
if (!m_nameAndTypeInfos.insert(
std::map< sal_uInt32, sal_uInt16 >::value_type(key, index)).second)
if (!m_nameAndTypeInfos.emplace(key, index).second)
{
OSL_ASSERT(false);
}
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index 1092557..f2ce845 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -742,9 +742,7 @@ void handleEnumType(
{
min = std::min(min, member.value);
max = std::max(max, member.value);
map.insert(
std::map< sal_Int32, OString >::value_type(
member.value, codemaker::convertString(member.name)));
map.emplace(member.value, codemaker::convertString(member.name));
}
sal_uInt64 size = static_cast< sal_uInt64 >(map.size());
if ((static_cast< sal_uInt64 >(max) - static_cast< sal_uInt64 >(min)
@@ -1458,8 +1456,7 @@ void handlePolyStructType(
for (const OUString& param : entity->getTypeParameters())
{
sig.append(codemaker::convertString(param) + ":Ljava/lang/Object;");
if (!typeParameters.insert(
std::map< OUString, sal_Int32 >::value_type(param, index++)).second)
if (!typeParameters.emplace(param, index++).second)
{
throw CannotDumpException("Bad type information"); //TODO
}
diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx
index 77f712c..b28b2a2 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -112,8 +112,7 @@ namespace comphelper
// see if we do cache children
if ( !m_bTransientChildren )
{
if (!m_aChildrenMap.insert(
AccessibleMap::value_type( _rxKey, xValue ) ).second)
if (!m_aChildrenMap.emplace( _rxKey, xValue ).second)
{
OSL_FAIL(
"OWrappedAccessibleChildrenManager::"
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 13a5288..0f062b3 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -154,10 +154,9 @@ void Access::markChildAsModified(rtl::Reference< ChildAccess > const & child) {
break;
}
assert(dynamic_cast< ChildAccess * >(p.get()) != nullptr);
parent->modifiedChildren_.insert(
ModifiedChildren::value_type(
parent->modifiedChildren_.emplace(
p->getNameInternal(),
ModifiedChild(static_cast< ChildAccess * >(p.get()), false)));
ModifiedChild(static_cast< ChildAccess * >(p.get()), false));
p = parent;
}
}
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 3978305..af4a239 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -440,8 +440,7 @@ css::beans::Optional< css::uno::Any > Components::getExternalValue(
if (service.is()) {
propset.set( service, css::uno::UNO_QUERY_THROW);
}
j = externalServices_.insert(
ExternalServices::value_type(name, propset)).first;
j = externalServices_.emplace(name, propset).first;
}
css::beans::Optional< css::uno::Any > value;
if (j->second.is()) {
diff --git a/configmgr/source/data.cxx b/configmgr/source/data.cxx
index 70ce467..a24359f 100644
--- a/configmgr/source/data.cxx
+++ b/configmgr/source/data.cxx
@@ -302,9 +302,8 @@ Additions * Data::addExtensionXcuAdditions(
{
rtl::Reference< ExtensionXcu > item(new ExtensionXcu);
ExtensionXcuAdditions::iterator i(
extensionXcuAdditions_.insert(
ExtensionXcuAdditions::value_type(
url, rtl::Reference< ExtensionXcu >())).first);
extensionXcuAdditions_.emplace(
url, rtl::Reference< ExtensionXcu >()).first);
if (i->second.is()) {
throw css::uno::RuntimeException(
"already added extension xcu " + url);
diff --git a/configmgr/source/modifications.cxx b/configmgr/source/modifications.cxx
index 630de8f..f385fc3 100644
--- a/configmgr/source/modifications.cxx
+++ b/configmgr/source/modifications.cxx
@@ -40,8 +40,7 @@ void Modifications::add(std::vector<OUString> const & path) {
if (wasPresent && p->children.empty()) {
return;
}
j = p->children.insert(Node::Children::value_type(*i, Node())).
first;
j = p->children.emplace(*i, Node()).first;
wasPresent = false;
} else {
wasPresent = true;
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 8569f22..25492b3 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -89,7 +89,7 @@ public:
{
}
void clear() { m_pComponent = nullptr; }
void add(const OUString& _sRefName) { m_aRefNames.insert(std::map< OUString,bool>::value_type(_sRefName,true)); }
void add(const OUString& _sRefName) { m_aRefNames.emplace(_sRefName,true); }
};
}
namespace connectivity
diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx
index e5513f0..716e5e6 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -304,8 +304,8 @@ namespace dbtools
// remember meta information about this new parameter
std::pair< ParameterInformation::iterator, bool > aInsertionPos =
m_aParameterInformation.insert(
ParameterInformation::value_type( sNewParamName, ParameterMetaData( nullptr ) )
m_aParameterInformation.emplace(
sNewParamName, ParameterMetaData( nullptr )
);
OSL_ENSURE( aInsertionPos.second, "ParameterManager::classifyLinks: there already was a parameter with this name!" );
aInsertionPos.first->second.eType = ParameterClassification::LinkedByColumnName;
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 7ff389c..4f53c25 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -307,7 +307,7 @@ namespace connectivity
}
pHelper.reset( new StreamHelper(storage->openStreamElement( sStrippedName, _nMode ) ) );
}
aFind->second.streams.insert(TStreamMap::value_type(sName,pHelper));
aFind->second.streams.emplace(sName,pHelper);
}
catch(const Exception& e)
{
diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index a220749..30eccc2 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -450,7 +450,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges(
{
if ( sPrivs[j] == sColumnName )
{
aColumnMatching.insert( std::map<sal_Int32,sal_Int32>::value_type(i,j+1) );
aColumnMatching.emplace(i,j+1);
break;
}
}
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx
index ec9463e..eac88ca 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -515,7 +515,7 @@ SQLHANDLE OConnection::createStatementHandle()
N3SQLAllocHandle(SQL_HANDLE_STMT,pConnectionTemp->getConnection(),&aStatementHandle);
++m_nStatementCount;
if(bNew)
m_aConnections.insert(std::map< SQLHANDLE,OConnection*>::value_type(aStatementHandle,pConnectionTemp));
m_aConnections.emplace(aStatementHandle,pConnectionTemp);
return aStatementHandle;
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index 796f34a..e52999a 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -1287,7 +1287,10 @@ SWORD ODatabaseMetaDataResultSet::impl_getColumnType_nothrow(sal_Int32 columnInd
{
std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(columnIndex);
if ( aFind == m_aODBCColumnTypes.end() )
aFind = m_aODBCColumnTypes.insert(std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pConnection.get(),m_aStatementHandle,*this,columnIndex))).first;
aFind = m_aODBCColumnTypes.emplace(
columnIndex,
OResultSetMetaData::getColumnODBCType(m_pConnection.get(),m_aStatementHandle,*this,columnIndex)
).first;
return aFind->second;
}
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index 2a27652..dec1e86 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -1814,7 +1814,10 @@ SWORD OResultSet::impl_getColumnType_nothrow(sal_Int32 columnIndex)
{
std::map<sal_Int32,SWORD>::const_iterator aFind = m_aODBCColumnTypes.find(columnIndex);
if ( aFind == m_aODBCColumnTypes.end() )
aFind = m_aODBCColumnTypes.insert(std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pStatement->getOwnConnection(),m_aStatementHandle,*this,columnIndex))).first;
aFind = m_aODBCColumnTypes.emplace(
columnIndex,
OResultSetMetaData::getColumnODBCType(m_pStatement->getOwnConnection(),m_aStatementHandle,*this,columnIndex)
).first;
return aFind->second;
}
diff --git a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
index 709bfdb..225f2b5 100644
--- a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
+++ b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
@@ -150,7 +150,7 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column )
}
else
nType = OTools::MapOdbcType2Jdbc(getNumColAttrib(column,SQL_DESC_CONCISE_TYPE ));
aFind = m_aColumnTypes.insert(std::map<sal_Int32,sal_Int32>::value_type(column,nType)).first;
aFind = m_aColumnTypes.emplace(column,nType).first;
}
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index aefadc8..94bb572 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -951,8 +951,7 @@ inline void EnvironmentsData::registerEnvironment( uno_Environment ** ppEnv )
{
(*pEnv->acquireWeak)( pEnv );
std::pair< OUString2EnvironmentMap::iterator, bool > insertion (
aName2EnvMap.insert(
OUString2EnvironmentMap::value_type( aKey, pEnv ) ) );
aName2EnvMap.emplace( aKey, pEnv ) );
SAL_WARN_IF( !insertion.second, "cppu", "key " << aKey << " already in env map" );
}
else
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index 952ee69..8555feae 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -185,8 +185,8 @@ void ComponentContext::insertByName(
name.startsWith( "/singletons/" ) &&
!element.hasValue() ) );
MutexGuard guard( m_mutex );
std::pair<t_map::iterator, bool> insertion( m_map.insert(
t_map::value_type( name, entry ) ) );
std::pair<t_map::iterator, bool> insertion( m_map.emplace(
name, entry ) );
if (! insertion.second)
throw container::ElementExistException(
"element already exists: " + name,
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index 111da64..32ede83 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -242,8 +242,7 @@ void Data::initProperties(
"interface type has too many attributes");
}
rtl::OUString name(members[i]->getMemberName());
if (!properties.insert(
PropertyMap::value_type(
if (!properties.emplace(
name,
PropertyData(
css::beans::Property(
@@ -252,7 +251,7 @@ void Data::initProperties(
t->getTypeClass(), t->getName()),
attrAttribs),
(std::find(absentBegin, absentEnd, name)
== absentEnd)))).
== absentEnd))).
second)
{
throw css::uno::RuntimeException(
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 5faee9a..c77526d 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -384,9 +384,7 @@ void Parser::handleImplementation() {
new cppuhelper::ServiceManager::Data::Implementation(
attrName, attrLoader_, attrUri_, attrEnvironment_, attrConstructor,
attrPrefix_, alienContext_, reader_.getUrl()));
if (!data_->namedImplementations.insert(
cppuhelper::ServiceManager::Data::NamedImplementations::value_type(
attrName, implementation_)).
if (!data_->namedImplementations.emplace(attrName, implementation_).
second)
{
throw css::registry::InvalidRegistryException(
@@ -1445,9 +1443,7 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(rtl::OUString const & uri) {
name, readLegacyRdbString(uri, implKey, "UNO/ACTIVATOR"),
readLegacyRdbString(uri, implKey, "UNO/LOCATION"), "", "", "",
css::uno::Reference< css::uno::XComponentContext >(), uri));
if (!data_.namedImplementations.insert(
Data::NamedImplementations::value_type(name, impl)).
second)
if (!data_.namedImplementations.emplace(name, impl).second)
{
throw css::registry::InvalidRegistryException(
uri + ": duplicate <implementation name=\"" + name + "\">");
@@ -1580,11 +1576,9 @@ void cppuhelper::ServiceManager::insertLegacyFactory(
new Data::Implementation(name, f1, f2, comp));
Data extra;
if (!name.isEmpty()) {
extra.namedImplementations.insert(
Data::NamedImplementations::value_type(name, impl));
extra.namedImplementations.emplace(name, impl);
}
extra.dynamicImplementations.insert(
Data::DynamicImplementations::value_type(factoryInfo, impl));
extra.dynamicImplementations.emplace(factoryInfo, impl);
css::uno::Sequence< rtl::OUString > services(
factoryInfo->getSupportedServiceNames());
for (sal_Int32 i = 0; i != services.getLength(); ++i) {
diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx
index ce1249d..cfd62ef 100644
--- a/cppuhelper/source/unourl.cxx
+++ b/cppuhelper/source/unourl.cxx
@@ -118,13 +118,12 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor)
case STATE_VALUE:
if (bEnd || c == 0x2C) // ','
{
if (!m_aParameters.insert(
Parameters::value_type(
if (!m_aParameters.emplace(
aKey,
rtl::Uri::decode(rDescriptor.copy(nStart,
i - nStart),
rtl_UriDecodeWithCharset,
RTL_TEXTENCODING_UTF8))).second)
RTL_TEXTENCODING_UTF8)).second)
throw rtl::MalformedUriException(
"UNO URL contains duplicated parameter");
eState = STATE_KEY0;
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index f0dd27e..f5e74a4 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -646,11 +646,10 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const OUString& _s
Sequence<Any> aArgs(1);
Reference<XConnection> xMy(this);
aArgs[0] <<= NamedValue("ActiveConnection",makeAny(xMy));
aFind = m_aSupportServices.insert(
TSupportServices::value_type(
aFind = m_aSupportServices.emplace(
_sServiceSpecifier,
m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(_sServiceSpecifier, aArgs, m_aContext)
)).first;
).first;
}
return aFind->second;
}
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index c70e8d1..131c183 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -104,8 +104,7 @@ ODefinitionContainer::ODefinitionContainer( const Reference< XComponentContext
++aDefinition
)
m_aDocuments.push_back(
m_aDocumentMap.insert(
Documents::value_type( aDefinition->first, Documents::mapped_type() ) ).first );
m_aDocumentMap.emplace(aDefinition->first, Documents::mapped_type() ).first );
}
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index d3a823b..780db27 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -740,7 +740,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategor
const sal_Int32 columnIndex = col - aColumns.begin();
const OUString sRangeName = OUString::number( columnIndex );
m_aNumberFormats.insert( std::map< OUString, uno::Any >::value_type( sRangeName, aNumberFormat ) );
m_aNumberFormats.emplace( sRangeName, aNumberFormat );
}
std::vector< OUString > aRowLabels;
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 7152811..5ca0038 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -1008,7 +1008,7 @@ void OCopyTableWizard::insertColumn(sal_Int32 _nPos,OFieldDescription* _pField)
}
m_aDestVec.insert(m_aDestVec.begin() + _nPos,
m_vDestColumns.insert(ODatabaseExport::TColumns::value_type(_pField->GetName(),_pField)).first);
m_vDestColumns.emplace(_pField->GetName(),_pField).first);
m_mNameMapping[_pField->GetName()] = _pField->GetName();
}
}
@@ -1021,8 +1021,7 @@ void OCopyTableWizard::replaceColumn(sal_Int32 _nPos,OFieldDescription* _pField,
m_vDestColumns.erase(_sOldName);
OSL_ENSURE( m_vDestColumns.find(_pField->GetName()) == m_vDestColumns.end(),"Column with that name already exist!");
m_aDestVec[_nPos] =
m_vDestColumns.insert(ODatabaseExport::TColumns::value_type(_pField->GetName(),_pField)).first;
m_aDestVec[_nPos] = m_vDestColumns.emplace(_pField->GetName(),_pField).first;
}
}
@@ -1066,7 +1065,7 @@ void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject,
pTypeInfo = m_pTypeInfo;
pActFieldDescr->FillFromTypeInfo(pTypeInfo,true,false);
_rColVector.push_back(_rColumns.insert(ODatabaseExport::TColumns::value_type(pActFieldDescr->GetName(),pActFieldDescr)).first);
_rColVector.push_back(_rColumns.emplace(pActFieldDescr->GetName(),pActFieldDescr).first);
}
// determine which columns belong to the primary key
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index e67123a..63be1bc 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1022,7 +1022,7 @@ namespace
std::map<OTableWindow*,sal_Int32>::const_iterator aCountEnd = aConnectionCount.end();
for(;aCountIter != aCountEnd;++aCountIter)
{
aMulti.insert(std::multimap<sal_Int32 , OTableWindow*>::value_type(aCountIter->second,aCountIter->first));
aMulti.emplace(aCountIter->second,aCountIter->first);
}
const bool bUseEscape = ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_OUTERJOINESCAPE );
@@ -1161,7 +1161,7 @@ namespace
}
if ( aGroupByNames.find(sGroupByPart) == aGroupByNames.end() )
{
aGroupByNames.insert(std::map< OUString,bool>::value_type(sGroupByPart,true));
aGroupByNames.emplace(sGroupByPart,true);
aGroupByStr += sGroupByPart + ",";
}
}
diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx
index a3e0b40..9bde54b 100644
--- a/desktop/source/deployment/misc/dp_update.cxx
+++ b/desktop/source/deployment/misc/dp_update.cxx
@@ -359,9 +359,8 @@ UpdateInfoMap getOnlineUpdateInfos(
Reference<deployment::XPackage> extension = getExtensionWithHighestVersion(seqExt);
OSL_ASSERT(extension.is());
std::pair<UpdateInfoMap::iterator, bool> insertRet = infoMap.insert(
UpdateInfoMap::value_type(
dp_misc::getIdentifier(extension), UpdateInfo(extension)));
std::pair<UpdateInfoMap::iterator, bool> insertRet = infoMap.emplace(
dp_misc::getIdentifier(extension), UpdateInfo(extension));
OSL_ASSERT(insertRet.second);
}
}
@@ -371,9 +370,8 @@ UpdateInfoMap getOnlineUpdateInfos(
for (CIT i = extensionList->begin(); i != extensionList->end(); ++i)
{
OSL_ASSERT(i->is());
std::pair<UpdateInfoMap::iterator, bool> insertRet = infoMap.insert(
UpdateInfoMap::value_type(
dp_misc::getIdentifier(*i), UpdateInfo(*i)));
std::pair<UpdateInfoMap::iterator, bool> insertRet = infoMap.emplace(
dp_misc::getIdentifier(*i), UpdateInfo(*i));
OSL_ASSERT(insertRet.second);
}
}
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index c0a629f..08859be 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -202,9 +202,7 @@ void PackageRegistryImpl::insertBackend(
// add parameterless media-type, too:
sal_Int32 semi = mediaType.indexOf( ';' );
if (semi >= 0) {
m_mediaType2backend.insert(
t_string2registry::value_type(
mediaType.copy( 0, semi ), xBackend ) );
m_mediaType2backend.emplace( mediaType.copy( 0, semi ), xBackend );
}
const OUString fileFilter( xPackageType->getFileFilter() );
//The package backend shall also be called to determine the mediatype
@@ -228,9 +226,8 @@ void PackageRegistryImpl::insertBackend(
token.indexOf('?') >= 0);
if (! ambig) {
std::pair<t_string2string::iterator, bool> ins(
m_filter2mediaType.insert(
t_string2string::value_type(
token, mediaType ) ) );
m_filter2mediaType.emplace(
token, mediaType ) );
ambig = !ins.second;
if (ambig) {
// filter has already been in: add previously
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index d24f66e..0ef10fb 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -203,8 +203,7 @@ void LdapConnection::initConnection()
if (values) {
const OUString aAttr( reinterpret_cast<sal_Unicode*>( attr ) );
const OUString aValues( reinterpret_cast<sal_Unicode*>( *values ) );
data->insert(
LdapData::value_type( aAttr, aValues ));
data->emplace( aAttr, aValues );
ldap_value_freeW(values);
}
attr = ldap_next_attributeW(mConnection, result.msg, ptr);
@@ -213,10 +212,9 @@ void LdapConnection::initConnection()
while (attr) {
char ** values = ldap_get_values(mConnection, result.msg, attr);
if (values) {
data->insert(
LdapData::value_type(
data->emplace(
OStringToOUString(attr, RTL_TEXTENCODING_ASCII_US),
OStringToOUString(*values, RTL_TEXTENCODING_UTF8)));
OStringToOUString(*values, RTL_TEXTENCODING_UTF8));
ldap_value_free(values);
}
attr = ldap_next_attribute(mConnection, result.msg, ptr);
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index d7e4881..af24701 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -590,7 +590,7 @@ namespace dbp
{
OSL_FAIL("OControlWizard::initContext: unexpected exception while gathering column information!");
}
m_aContext.aTypes.insert(OControlWizardContext::TNameTypeMap::value_type(*pBegin,nFieldType));
m_aContext.aTypes.emplace(*pBegin,nFieldType);
}
}
}
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 814184c..90d48a9 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -826,7 +826,7 @@ void FormulaDlg_Impl::UpdateTokenArray( const OUString& rStrExp)
{
for (sal_Int32 nPos = 0; nPos < nLen; nPos++)
{
m_aTokenMap.insert( ::std::map<FormulaToken*, sheet::FormulaToken>::value_type( pTokens[nPos], m_aTokenList[nPos]));
m_aTokenMap.emplace( pTokens[nPos], m_aTokenList[nPos] );
}
} // if ( pTokens && nLen == m_aTokenList.getLength() )
diff --git a/framework/source/services/ContextChangeEventMultiplexer.cxx b/framework/source/services/ContextChangeEventMultiplexer.cxx
index 1171aeb..ac579ee 100644
--- a/framework/source/services/ContextChangeEventMultiplexer.cxx
+++ b/framework/source/services/ContextChangeEventMultiplexer.cxx
@@ -284,10 +284,9 @@ ContextChangeEventMultiplexer::FocusDescriptor* ContextChangeEventMultiplexer::G
xComponent->addEventListener(this);
// Create a new listener container for the event focus.
iDescriptor = maListeners.insert(
ListenerMap::value_type(
iDescriptor = maListeners.emplace(
rxEventFocus,
FocusDescriptor())).first;
FocusDescriptor()).first;
}
if (iDescriptor != maListeners.end())
return &iDescriptor->second;
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 856c391..c5cf173 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -798,9 +798,8 @@ void ToolBarManager::CreateControllers()
{
SubToolBarControllerVector aSubToolBarVector;
aSubToolBarVector.push_back( xSubToolBar );
m_aSubToolBarControllerMap.insert(
SubToolBarToSubToolBarControllerMap::value_type(
aSubToolBarName, aSubToolBarVector ));
m_aSubToolBarControllerMap.emplace(
aSubToolBarName, aSubToolBarVector );
}
else
pIter->second.push_back( xSubToolBar );
diff --git a/idlc/source/astinterface.cxx b/idlc/source/astinterface.cxx
index 90e5c06..8fc4ed0 100644
--- a/idlc/source/astinterface.cxx
+++ b/idlc/source/astinterface.cxx
@@ -80,9 +80,7 @@ AstInterface::DoubleMemberDeclarations AstInterface::checkMemberClashes(
void AstInterface::addMember(AstDeclaration /*TODO: const*/ * member) {
addDeclaration(member);
m_visibleMembers.insert(
VisibleMembers::value_type(
member->getLocalName(), VisibleMember(member)));
m_visibleMembers.emplace(member->getLocalName(), VisibleMember(member));
}
void AstInterface::forwardDefined(AstInterface const & def)
@@ -347,8 +345,7 @@ void AstInterface::addVisibleInterface(
? direct ? INTERFACE_DIRECT_OPTIONAL : INTERFACE_INDIRECT_OPTIONAL
: direct ? INTERFACE_DIRECT_MANDATORY : INTERFACE_INDIRECT_MANDATORY;
std::pair< VisibleInterfaces::iterator, bool > result(
m_visibleInterfaces.insert(
VisibleInterfaces::value_type(ifc->getScopedName(), kind)));
m_visibleInterfaces.emplace(ifc->getScopedName(), kind));
bool seen = !result.second
&& result.first->second >= INTERFACE_INDIRECT_MANDATORY;
if (!result.second && kind > result.first->second) {
@@ -358,9 +355,8 @@ void AstInterface::addVisibleInterface(
for (DeclList::const_iterator i(ifc->getIteratorBegin());
i != ifc->getIteratorEnd(); ++i)
{
m_visibleMembers.insert(
VisibleMembers::value_type(
(*i)->getLocalName(), VisibleMember(*i)));
m_visibleMembers.emplace(
(*i)->getLocalName(), VisibleMember(*i));
}
for (InheritedInterfaces::const_iterator i(
ifc->m_inheritedInterfaces.begin());
@@ -378,13 +374,11 @@ void AstInterface::addOptionalVisibleMembers(AstInterface const * ifc) {
VisibleMembers::iterator visible(
m_visibleMembers.find((*i)->getLocalName()));
if (visible == m_visibleMembers.end()) {
visible = m_visibleMembers.insert(
VisibleMembers::value_type(
(*i)->getLocalName(), VisibleMember())).first;
visible = m_visibleMembers.emplace(
(*i)->getLocalName(), VisibleMember()).first;
}
if (visible->second.mandatory == nullptr) {
visible->second.optionals.insert(
VisibleMember::Optionals::value_type(ifc->getScopedName(), *i));
visible->second.optionals.emplace(ifc->getScopedName(), *i);
}
}
for (InheritedInterfaces::const_iterator i(
diff --git a/include/oox/core/relations.hxx b/include/oox/core/relations.hxx
index d3303bd..d556d9c 100644
--- a/include/oox/core/relations.hxx
+++ b/include/oox/core/relations.hxx
@@ -78,9 +78,10 @@ public:
{
return maMap.end();
}
void insert( const ::std::map< OUString, Relation >::value_type& rVal )
template<class... Args>
void emplace(Args&&... args)
{
maMap.insert( rVal );
maMap.emplace(std::forward<Args>(args)...);
}
/** Returns the path of the fragment this relations collection is related to. */
diff --git a/oox/source/core/relationshandler.cxx b/oox/source/core/relationshandler.cxx
index e522831..74a2ab9 100644
--- a/oox/source/core/relationshandler.cxx
+++ b/oox/source/core/relationshandler.cxx
@@ -78,7 +78,7 @@ Reference< XFastContextHandler > RelationsFragment::createFastChildContext(
SAL_WARN_IF( mxRelations->count( aRelation.maId ) != 0, "oox",
"RelationsFragment::createFastChildContext - relation identifier exists already" );
mxRelations->insert( ::std::map< OUString, Relation >::value_type( aRelation.maId, aRelation ) );
mxRelations->emplace( aRelation.maId, aRelation );
}
}
break;
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 5b11d67..f7345aa 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -566,11 +566,9 @@ void ORptExport::exportSectionAutoStyle(const Reference<XSection>& _xProp)
::std::sort(aRowPos.begin(),aRowPos.end(),::std::less<sal_Int32>());
aRowPos.erase(::std::unique(aRowPos.begin(),aRowPos.end()),aRowPos.end());
TSectionsGrid::iterator aInsert = m_aSectionsGrid.insert(
TSectionsGrid::value_type(
TSectionsGrid::iterator aInsert = m_aSectionsGrid.emplace(
_xProp.get(),
TGrid(aRowPos.size() - 1,TGrid::value_type(false,TRow(aColumnPos.size() - 1)))
)
).first;
lcl_calculate(aColumnPos,aRowPos,aInsert->second);
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index a3bbb27..bff8691 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -677,8 +677,7 @@ rtlBootstrapHandle SAL_CALL rtl_bootstrap_args_open(rtl_uString * pIniName)
{
++that->_nRefCount;
::std::pair< bootstrap_map::t::iterator, bool > insertion(
p_bootstrap_map->insert(
bootstrap_map::t::value_type(iniName, that)));
p_bootstrap_map->emplace(iniName, that));
OSL_ASSERT(insertion.second);
}
else
diff --git a/sc/inc/reordermap.hxx b/sc/inc/reordermap.hxx
index b7bb5d5..3f36220 100644
--- a/sc/inc/reordermap.hxx
+++ b/sc/inc/reordermap.hxx
@@ -24,12 +24,12 @@ public:
typedef DataType::const_iterator const_iterator;
typedef DataType::iterator iterator;
const_iterator end() const;
const_iterator end() const { return maData.end(); }
std::pair<iterator, bool>
insert( DataType::value_type const& val );
template<class... Args>
std::pair<iterator,bool> emplace(Args&&... args) { return maData.emplace(std::forward<Args>(args)...); }
const_iterator find( DataType::key_type key ) const;
const_iterator find( DataType::key_type key ) const { return maData.find(key); }
};
}
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 01166bf..4c04807 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -189,8 +189,7 @@ void Test::testFormulaCreateStringFromTokens()
aCxt.maExternalFileNames.push_back("file:///path/to/fake.file");
std::vector<OUString> aExtTabNames;
aExtTabNames.push_back("Sheet");
aCxt.maExternalCachedTabNames.insert(
sc::TokenStringContext::IndexNamesMapType::value_type(0, aExtTabNames));
aCxt.maExternalCachedTabNames.emplace(0, aExtTabNames);
ScAddress aPos(0,0,0);
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 4b67c4a..86a57b3 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -866,8 +866,7 @@ void ScConditionEntry::FillCache() const
if (!lcl_GetCellContent(aCell, false, nVal, aStr, mpDoc))
{
std::pair<ScConditionEntryCache::StringCacheType::iterator, bool> aResult =
mpCache->maStrings.insert(
ScConditionEntryCache::StringCacheType::value_type(aStr, 1));
mpCache->maStrings.emplace(aStr, 1);
if(!aResult.second)
aResult.first->second++;
@@ -875,8 +874,7 @@ void ScConditionEntry::FillCache() const
else
{
std::pair<ScConditionEntryCache::ValueCacheType::iterator, bool> aResult =
mpCache->maValues.insert(
ScConditionEntryCache::ValueCacheType::value_type(nVal, 1));
mpCache->maValues.emplace(nVal, 1);
if(!aResult.second)
aResult.first->second++;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index a2d0682..92370a7 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -118,7 +118,7 @@ void ScDocument::GetAllTabRangeNames(ScRangeName::TabNameCopyMap& rNames) const
// ignore empty ones.
continue;
aNames.insert(ScRangeName::TabNameCopyMap::value_type(i, p));
aNames.emplace(i, p);
}
rNames.swap(aNames);
}
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 3e36951..92443f7 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -657,8 +657,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio
ScDPGroupDimensionVec::const_iterator itr = aGroups.begin(), itrEnd = aGroups.end();
for (; itr != itrEnd; ++itr)
{
aGroupFieldIds.insert(
GroupFieldMapType::value_type(itr->GetGroupDim(), &(*itr)));
aGroupFieldIds.emplace(itr->GetGroupDim(), &(*itr));
}
}
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index e70a695..5ca9e8d 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -856,8 +856,7 @@ public:
void operator() (const ScDPSaveDimension* pDim)
{
size_t nRank = mrNames.size();
mrNames.insert(
ScDPSaveData::DimOrderType::value_type(pDim->GetName(), nRank));
mrNames.emplace(pDim->GetName(), nRank);
}
};
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 89996fa..cd7b483 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -3897,8 +3897,8 @@ void ScDPResultVisibilityData::addVisibleMember(const OUString& rDimName, const
DimMemberType::iterator itr = maDimensions.find(rDimName);
if (itr == maDimensions.end())
{
pair<DimMemberType::iterator, bool> r = maDimensions.insert(
DimMemberType::value_type(rDimName, VisibleMemberType()));
pair<DimMemberType::iterator, bool> r = maDimensions.emplace(
rDimName, VisibleMemberType());
if (!r.second)
// insertion failed.
@@ -3920,8 +3920,7 @@ void ScDPResultVisibilityData::fillFieldFilters(vector<ScDPFilteredCache::Criter
long nColumnCount = pData->GetColumnCount();
for (long i = 0; i < nColumnCount; ++i)
{
aFieldNames.insert(
FieldNameMapType::value_type(pData->getDimensionName(i), i));
aFieldNames.emplace(pData->getDimensionName(i), i);
}
const ScDPDimensions* pDims = mpSource->GetDimensionsObject();
diff --git a/sc/source/core/data/mtvelements.cxx b/sc/source/core/data/mtvelements.cxx
index c823492..25a3900 100644
--- a/sc/source/core/data/mtvelements.cxx
+++ b/sc/source/core/data/mtvelements.cxx
@@ -80,8 +80,7 @@ ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, SCCOL
return &it->second;
std::pair<ColumnsType::iterator,bool> r =
rCols.insert(
ColumnsType::value_type(nCol, ColumnBlockPosition()));
rCols.emplace(nCol, ColumnBlockPosition());
if (!r.second)
// insertion failed.
@@ -140,8 +139,7 @@ ColumnBlockPosition* TableColumnBlockPositionSet::getBlockPosition( SCCOL nCol )
return &it->second;
std::pair<ColumnsType::iterator,bool> r =
mpImpl->maColumns.insert(
ColumnsType::value_type(nCol, ColumnBlockPosition()));
mpImpl->maColumns.emplace(nCol, ColumnBlockPosition());
if (!r.second)
// insertion failed.
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index cc1857cf..04885f9 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -974,7 +974,7 @@ void ScTable::SortReorderByColumn(
{
SCCOL nNew = i + nStart;
SCCOL nOld = rOldIndices[i];
aColMap.insert(sc::ColRowReorderMapType::value_type(nOld, nNew));
aColMap.emplace(nOld, nNew);
}
// Collect all listeners within sorted range ahead of time.
@@ -1375,7 +1375,7 @@ void ScTable::SortReorderByRowRefUpdate(
{
SCROW nNew = i + nRow1;
SCROW nOld = rOldIndices[i];
aRowMap.insert(sc::ColRowReorderMapType::value_type(nOld, nNew));
aRowMap.emplace(nOld, nNew);
}
// Collect all listeners within sorted range ahead of time.
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index f565d34..ab75dd3 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -553,18 +553,15 @@ void ScUnoAddInCollection::ReadConfiguration()
ppFuncData[nFuncPos+nOld] = pData;
pExactHashMap->insert(
ScAddInHashMap::value_type(
pExactHashMap->emplace(
pData->GetOriginalName(),
pData ) );
pNameHashMap->insert(
ScAddInHashMap::value_type(
pData );
pNameHashMap->emplace(
pData->GetUpperName(),
pData ) );
pLocalHashMap->insert(
ScAddInHashMap::value_type(
pData );
pLocalHashMap->emplace(
pData->GetUpperLocal(),
pData ) );
pData );
}
}
}
@@ -942,18 +939,15 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
const ScUnoAddInFuncData* pData =
ppFuncData[nFuncPos+nOld];
pExactHashMap->insert(
ScAddInHashMap::value_type(
pExactHashMap->emplace(
pData->GetOriginalName(),
pData ) );
pNameHashMap->insert(
ScAddInHashMap::value_type(
pData );
pNameHashMap->emplace(
pData->GetUpperName(),
pData ) );
pLocalHashMap->insert(
ScAddInHashMap::value_type(
pData );
pLocalHashMap->emplace(
pData->GetUpperLocal(),
pData ) );
pData );
}
}
}
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 859dd8d..590215a 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -86,8 +86,7 @@ FormulaGroupContext::ColArray* FormulaGroupContext::setCachedColArray(
if (it == maColArrays.end())
{
std::pair<ColArraysType::iterator,bool> r =
maColArrays.insert(
ColArraysType::value_type(ColKey(nTab, nCol), ColArray(pNumArray, pStrArray)));
maColArrays.emplace(ColKey(nTab, nCol), ColArray(pNumArray, pStrArray));
if (!r.second)
// Somehow the insertion failed.
diff --git a/sc/source/core/tool/reordermap.cxx b/sc/source/core/tool/reordermap.cxx
index b9754df..b4da9aa 100644
--- a/sc/source/core/tool/reordermap.cxx
+++ b/sc/source/core/tool/reordermap.cxx
@@ -9,25 +9,4 @@
#include <reordermap.hxx>
namespace sc {
ColRowReorderMapType::const_iterator ColRowReorderMapType::end() const
{
return maData.end();
}
std::pair<ColRowReorderMapType::iterator, bool>
ColRowReorderMapType::insert( ColRowReorderMapType::value_type const& val )
{
return maData.insert(val);
}
ColRowReorderMapType::const_iterator
ColRowReorderMapType::find( DataType::key_type key ) const
{
return maData.find(key);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/tokenstringcontext.cxx b/sc/source/core/tool/tokenstringcontext.cxx
index 7837fee..f93717a 100644
--- a/sc/source/core/tool/tokenstringcontext.cxx
+++ b/sc/source/core/tool/tokenstringcontext.cxx
@@ -25,8 +25,7 @@ void insertAllNames( TokenStringContext::IndexNameMapType& rMap, const ScRangeNa
for (auto const& it : rNames)
{
const ScRangeData *const pData = it.second.get();
rMap.insert(
TokenStringContext::IndexNameMapType::value_type(pData->GetIndex(), pData->GetName()));
rMap.emplace(pData->GetIndex(), pData->GetName());
}
}
@@ -104,8 +103,7 @@ TokenStringContext::TokenStringContext( const ScDocument* pDoc, formula::Formula
std::vector<OUString> aTabNames;
pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
if (!aTabNames.empty())
maExternalCachedTabNames.insert(
IndexNamesMapType::value_type(nFileId, aTabNames));
maExternalCachedTabNames.emplace(nFileId, aTabNames);
}
}
}
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 154efd5..7aaa592 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -166,8 +166,7 @@ void ImportExcel::SetLastFormula( SCCOL nCol, SCROW nRow, double fVal, sal_uInt1
if (it == maLastFormulaCells.end())
{
std::pair<LastFormulaMapType::iterator, bool> r =
maLastFormulaCells.insert(
LastFormulaMapType::value_type(nCol, LastFormula()));
maLastFormulaCells.emplace(nCol, LastFormula());
it = r.first;
}
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 6e51af6..941550b 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -3529,8 +3529,7 @@ void XclImpChAxesSet::Finalize()
XclImpChTypeGroupRef xTypeGroup = aIt->second;
xTypeGroup->Finalize();
if( xTypeGroup->IsValidGroup() )
aValidGroups.insert(
XclImpChTypeGroupMap::value_type(aIt->first, xTypeGroup));
aValidGroups.emplace(aIt->first, xTypeGroup);
}
maTypeGroups.swap( aValidGroups );
}
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 8b8aa07..4ef6a37 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -552,7 +552,7 @@ void OP_CreatePattern123(LotusContext& rContext, SvStream& r, sal_uInt16 n)
r.ReadUChar( Ver_Align );
OP_VerAlign123(rContext, Ver_Align, rItemSet );
rContext.aLotusPatternPool.insert( std::map<sal_uInt16, ScPatternAttr>::value_type( nPatternId, aPattern ) );
rContext.aLotusPatternPool.emplace( nPatternId, aPattern );
n -= (n > 20) ? 20 : n;
}
r.SeekRel(n);
diff --git a/sc/source/filter/xml/editattributemap.cxx b/sc/source/filter/xml/editattributemap.cxx
index fa3e19e..6e6c333 100644
--- a/sc/source/filter/xml/editattributemap.cxx
+++ b/sc/source/filter/xml/editattributemap.cxx
@@ -69,12 +69,10 @@ ScXMLEditAttributeMap::ScXMLEditAttributeMap()
{
for (size_t i = 0; i < SAL_N_ELEMENTS(aEntries); ++i)
{
maAPIEntries.insert(
StrToEntriesType::value_type(
OUString::createFromAscii(aEntries[i].mpAPIName), &aEntries[i]));
maAPIEntries.emplace(
OUString::createFromAscii(aEntries[i].mpAPIName), &aEntries[i]);
maItemIDEntries.insert(
IndexToEntriesType::value_type(aEntries[i].mnItemID, &aEntries[i]));
maItemIDEntries.emplace(aEntries[i].mnItemID, &aEntries[i]);
}
}
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index e2950ba..339b433 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -823,9 +823,8 @@ ScXMLImport::ScXMLImport(
};
for (const auto & aCellTypePair : aCellTypePairs)
{
aCellTypeMap.insert(
CellTypeMap::value_type(
GetXMLToken(aCellTypePair._token), aCellTypePair._type));
aCellTypeMap.emplace(
GetXMLToken(aCellTypePair._token), aCellTypePair._type);
}
}
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index ecd99a4..ad86c0e 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -278,8 +278,7 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncDa
for( ScDPLabelDataVector::const_iterator aIt = mrLabelVec.begin(), aEnd = mrLabelVec.end(); aIt != aEnd; ++aIt )
{
mpLbBaseField->InsertEntry((*aIt)->getDisplayName());
maBaseFieldNameMap.insert(
NameMapType::value_type((*aIt)->getDisplayName(), (*aIt)->maName));
maBaseFieldNameMap.emplace((*aIt)->getDisplayName(), (*aIt)->maName);
if ((*aIt)->maName == rFuncData.maFieldRef.ReferenceField)
aSelectedEntry = (*aIt)->getDisplayName();
}
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 402975e..8277b26 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -278,8 +278,8 @@ void ScExternalRefCache::Table::setCell(SCCOL nCol, SCROW nRow, TokenRef const &
if (itrRow == maRows.end())
{
// This row does not exist yet.
pair<RowsDataType::iterator, bool> res = maRows.insert(
RowsDataType::value_type(nRow, RowDataType()));
pair<RowsDataType::iterator, bool> res = maRows.emplace(
nRow, RowDataType());
if (!res.second)
return;
@@ -1391,8 +1391,7 @@ ScExternalRefCache::TableTypeRef ScExternalRefCache::getCacheTable(sal_uInt16 nF
TableTypeRef pTab(new Table);
rDoc.maTables.push_back(pTab);
rDoc.maTableNames.push_back(TableName(aTabNameUpper, rTabName));
rDoc.maTableNameIndex.insert(
TableNameIndexMap::value_type(aTabNameUpper, nIndex));
rDoc.maTableNameIndex.emplace(aTabNameUpper, nIndex);
return pTab;
}
@@ -1435,8 +1434,8 @@ ScExternalRefCache::DocItem* ScExternalRefCache::getDocItem(sal_uInt16 nFileId)
if (itrDoc == maDocs.end())
{
// specified document is not cached.
pair<DocDataType::iterator, bool> res = maDocs.insert(
DocDataType::value_type(nFileId, DocItem()));
pair<DocDataType::iterator, bool> res = maDocs.emplace(
nFileId, DocItem());
if (!res.second)
// insertion failed.
@@ -2167,8 +2166,8 @@ void ScExternalRefManager::insertRefCell(sal_uInt16 nFileId, const ScAddress& rC
if (itr == maRefCells.end())
{
RefCellSet aRefCells;
pair<RefCellMap::iterator, bool> r = maRefCells.insert(
RefCellMap::value_type(nFileId, aRefCells));
pair<RefCellMap::iterator, bool> r = maRefCells.emplace(
nFileId, aRefCells);
if (!r.second)
// insertion failed.
return;
@@ -3065,8 +3064,8 @@ void ScExternalRefManager::addLinkListener(sal_uInt16 nFileId, LinkListener* pLi
LinkListenerMap::iterator itr = maLinkListeners.find(nFileId);
if (itr == maLinkListeners.end())
{
pair<LinkListenerMap::iterator, bool> r = maLinkListeners.insert(
LinkListenerMap::value_type(nFileId, LinkListeners()));
pair<LinkListenerMap::iterator, bool> r = maLinkListeners.emplace(
nFileId, LinkListeners());
if (!r.second)
{
OSL_FAIL("insertion of new link listener list failed");
@@ -3140,8 +3139,8 @@ sal_uInt32 ScExternalRefManager::getMappedNumberFormat(sal_uInt16 nFileId, sal_u
if (itr == maNumFormatMap.end())
{
// Number formatter map is not initialized for this external document.
pair<NumFmtMap::iterator, bool> r = maNumFormatMap.insert(
NumFmtMap::value_type(nFileId, SvNumberFormatterMergeMap()));
pair<NumFmtMap::iterator, bool> r = maNumFormatMap.emplace(
nFileId, SvNumberFormatterMergeMap());
if (!r.second)
// insertion failed.
diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx
index f4001d9..8ca7185 100644
--- a/sc/source/ui/docshell/macromgr.cxx
+++ b/sc/source/ui/docshell/macromgr.cxx
@@ -47,8 +47,8 @@ public:
ModuleCellMap::iterator itr = maCells.find(rModuleName);
if (itr == maCells.end())
{
pair<ModuleCellMap::iterator, bool> r = maCells.insert(
ModuleCellMap::value_type(rModuleName, list<ScFormulaCell*>()));
pair<ModuleCellMap::iterator, bool> r = maCells.emplace(
rModuleName, list<ScFormulaCell*>());
if (!r.second)
// insertion failed.
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index e54bf48..3bcec4d 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5429,8 +5429,7 @@ bool ScGridWindow::ContinueOnlineSpelling()
if (!aRanges.empty())
{
sc::SpellCheckContext::CellPos aPos(nCol, nRow);
mpSpellCheckCxt->maMisspellCells.insert(
sc::SpellCheckContext::CellMapType::value_type(aPos, aRanges));
mpSpellCheckCxt->maMisspellCells.emplace(aPos, aRanges);
}
// Broadcast for re-paint.
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index b22a8b0..4e17536 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -584,16 +584,12 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu()
// Translate the special empty name into an empty string.
aName.clear();
aResult.insert(
std::unordered_map<OUString, bool, OUStringHash>::value_type(
aName, itr->bValid));
aResult.emplace(aName, itr->bValid);
}
else
{
// This is a layout name. Get the original member name and use it.
aResult.insert(
std::unordered_map<OUString, bool, OUStringHash>::value_type(
itrNameMap->second, itr->bValid));
aResult.emplace(itrNameMap->second, itr->bValid);
}
}
pDim->UpdateMemberVisibility(aResult);
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index b45c2ad..2a5b300 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -273,9 +273,9 @@ void BitmapCache::SetBitmap (
}
else
{
iEntry = mpBitmapContainer->insert(CacheBitmapContainer::value_type (
iEntry = mpBitmapContainer->emplace(
rKey,
CacheEntry(rPreview, mnCurrentAccessTime++, bIsPrecious))
CacheEntry(rPreview, mnCurrentAccessTime++, bIsPrecious)
).first;
}
@@ -315,9 +315,9 @@ void BitmapCache::SetPrecious (const CacheKey& rKey, bool bIsPrecious)
}
else if (bIsPrecious)
{
iEntry = mpBitmapContainer->insert(CacheBitmapContainer::value_type (
iEntry = mpBitmapContainer->emplace(
rKey,
CacheEntry(Bitmap(), mnCurrentAccessTime++, bIsPrecious))
CacheEntry(Bitmap(), mnCurrentAccessTime++, bIsPrecious)
).first;
UpdateCacheSize(iEntry->second, ADD);
}
@@ -354,9 +354,9 @@ void BitmapCache::Recycle (const BitmapCache& rCache)
CacheBitmapContainer::iterator iEntry (mpBitmapContainer->find(iOtherEntry->first));
if (iEntry == mpBitmapContainer->end())
{
iEntry = mpBitmapContainer->insert(CacheBitmapContainer::value_type (
iEntry = mpBitmapContainer->emplace(
iOtherEntry->first,
CacheEntry(mnCurrentAccessTime++, true))
CacheEntry(mnCurrentAccessTime++, true)
).first;
UpdateCacheSize(iEntry->second, ADD);
}
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index fb733ce..a2d93d2 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -147,7 +147,8 @@ public:
iterator end() { return maMap.end(); }
void clear() { maMap.clear(); }
iterator find(const key_type& key) { return maMap.find(key); }
std::pair<iterator,bool> insert(const value_type& value) { return maMap.insert(value); }
template<class... Args>
std::pair<iterator,bool> emplace(Args&&... args) { return maMap.emplace(std::forward<Args>(args)...); }
};
class PageCacheManager::Deleter
@@ -414,8 +415,8 @@ void PageCacheManager::PutRecentlyUsedCache(
// Look up the list of recently used caches for the given document.
RecentlyUsedPageCaches::iterator iQueue (mpRecentlyUsedPageCaches->find(pDocument));
if (iQueue == mpRecentlyUsedPageCaches->end())
iQueue = mpRecentlyUsedPageCaches->insert(
RecentlyUsedPageCaches::value_type(pDocument, RecentlyUsedQueue())
iQueue = mpRecentlyUsedPageCaches->emplace(
pDocument, RecentlyUsedQueue()
).first;
if (iQueue != mpRecentlyUsedPageCaches->end())
diff --git a/sd/source/ui/tools/PropertySet.cxx b/sd/source/ui/tools/PropertySet.cxx
index 33b2d74..d4aa8bd 100644
--- a/sd/source/ui/tools/PropertySet.cxx
+++ b/sd/source/ui/tools/PropertySet.cxx
@@ -86,10 +86,7 @@ void SAL_CALL PropertySet::addPropertyChangeListener (
if (rBHelper.bDisposed || rBHelper.bInDispose)
return;
mpChangeListeners->insert(
ChangeListenerContainer::value_type(
rsPropertyName,
rxListener));
mpChangeListeners->emplace(rsPropertyName, rxListener);
}
void SAL_CALL PropertySet::removePropertyChangeListener (
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 137a51e..7fd7e6a 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -529,8 +529,7 @@ void ViewShellManager::Implementation::ActivateSubShell (
// Create the sub shell list if it does not yet exist.
SubShellList::iterator iList (maActiveSubShells.find(&rParentShell));
if (iList == maActiveSubShells.end())
iList = maActiveSubShells.insert(
SubShellList::value_type(&rParentShell,SubShellSubList())).first;
iList = maActiveSubShells.emplace(&rParentShell,SubShellSubList()).first;
// Do not activate an object bar that is already active. Requesting
// this is not exactly an error but may be an indication of one.
diff --git a/sdext/source/presenter/PresenterPaneBorderPainter.cxx b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
index 8aab1f8..764c7dc 100644
--- a/sdext/source/presenter/PresenterPaneBorderPainter.cxx
+++ b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
@@ -575,8 +575,7 @@ std::shared_ptr<RendererPaneStyle>
// Create a new pane style object and initialize it with bitmaps.
std::shared_ptr<RendererPaneStyle> pStyle (
new RendererPaneStyle(mpTheme,sPaneStyleName));
iStyle = maRendererPaneStyles.insert(
RendererPaneStyleContainer::value_type(rsResourceURL, pStyle)).first;
iStyle = maRendererPaneStyles.emplace(rsResourceURL, pStyle).first;
}
if (iStyle != maRendererPaneStyles.end())
return iStyle->second;
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index b9d1ff0..01a5f47 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -636,7 +636,7 @@ void IndexTabPage_Impl::InitializeIndex()
if ( aIndex != aTempString )
{
aIndex = aTempString;
it = aInfo.insert(sfx2::KeywordInfo::value_type(aTempString, 0)).first;
it = aInfo.emplace(aTempString, 0).first;
if ( (tmp = it->second++) != 0)
m_pIndexCB->InsertEntry(aTempString + OUString(append, tmp));
else
@@ -646,7 +646,7 @@ void IndexTabPage_Impl::InitializeIndex()
aIndex.clear();
// Assume the token is trimmed
it = aInfo.insert(sfx2::KeywordInfo::value_type(aKeywordPair, 0)).first;
it = aInfo.emplace(aKeywordPair, 0).first;
if ((tmp = it->second++) != 0)
nPos = m_pIndexCB->InsertEntry(aKeywordPair + OUString(append, tmp));
else
@@ -678,7 +678,7 @@ void IndexTabPage_Impl::InitializeIndex()
.append( aTitleList[j] );
aTempString = aData.makeStringAndClear();
it = aInfo.insert(sfx2::KeywordInfo::value_type(aTempString, 0)).first;
it = aInfo.emplace(aTempString, 0).first;
if ( (tmp = it->second++) != 0 )
nPos = m_pIndexCB->InsertEntry(aTempString + OUString(append, tmp));
else
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index a75aa42..1f8fb28 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -190,9 +190,7 @@ const ResourceManager::DeckContextDescriptorContainer& ResourceManager::GetMatch
&& rDeckDescriptor.mbIsEnabled;
aOrderedIds.insert(::std::multimap<sal_Int32,DeckContextDescriptor>::value_type(
rDeckDescriptor.mnOrderIndex,
aDeckContextDescriptor));
aOrderedIds.emplace(rDeckDescriptor.mnOrderIndex, aDeckContextDescriptor);
}
std::multimap<sal_Int32,DeckContextDescriptor>::const_iterator iId;
@@ -233,9 +231,7 @@ const ResourceManager::PanelContextDescriptorContainer& ResourceManager::GetMatc
aPanelContextDescriptor.msMenuCommand = pEntry->msMenuCommand;
aPanelContextDescriptor.mbIsInitiallyVisible = pEntry->mbIsInitiallyVisible;
aPanelContextDescriptor.mbShowForReadOnlyDocuments = rPanelDescriptor.mbShowForReadOnlyDocuments;
aOrderedIds.insert(std::multimap<sal_Int32, PanelContextDescriptor>::value_type(
rPanelDescriptor.mnOrderIndex,
aPanelContextDescriptor));
aOrderedIds.emplace(rPanelDescriptor.mnOrderIndex, aPanelContextDescriptor);
}
std::multimap<sal_Int32,PanelContextDescriptor>::const_iterator iId;
diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx
index 2a12f05..579797b 100644
--- a/slideshow/source/engine/slide/layermanager.cxx
+++ b/slideshow/source/engine/slide/layermanager.cxx
@@ -214,9 +214,8 @@ namespace slideshow
ENSURE_OR_THROW( rShape, "LayerManager::addShape(): invalid Shape" );
// add shape to XShape hash map
if( !maXShapeHash.insert(
XShapeHash::value_type( rShape->getXShape(),
rShape) ).second )
if( !maXShapeHash.emplace(rShape->getXShape(),
rShape).second )
{
// entry already present, nothing to do
return;
diff --git a/slideshow/source/engine/slide/shapemanagerimpl.cxx b/slideshow/source/engine/slide/shapemanagerimpl.cxx
index e15936e..3b8f730 100644
--- a/slideshow/source/engine/slide/shapemanagerimpl.cxx
+++ b/slideshow/source/engine/slide/shapemanagerimpl.cxx
@@ -296,10 +296,7 @@ bool ShapeManagerImpl::listenerAdded(
ShapeSharedPtr pShape( lookupShape(xShape) );
if( pShape )
{
maShapeListenerMap.insert(
ShapeToListenersMap::value_type(
pShape,
aIter->second));
maShapeListenerMap.emplace(pShape, aIter->second);
}
return true;
@@ -343,10 +340,7 @@ void ShapeManagerImpl::cursorChanged( const uno::Reference<drawing::XShape>& x
if( (aIter = maShapeCursorMap.find(pShape))
== maShapeCursorMap.end() )
{
maShapeCursorMap.insert(
ShapeToCursorMap::value_type(
pShape,
nCursor ));
maShapeCursorMap.emplace(pShape, nCursor);
}
else
{
diff --git a/slideshow/source/engine/slide/targetpropertiescreator.cxx b/slideshow/source/engine/slide/targetpropertiescreator.cxx
index 73635e0..451199e 100644
--- a/slideshow/source/engine/slide/targetpropertiescreator.cxx
+++ b/slideshow/source/engine/slide/targetpropertiescreator.cxx
@@ -304,15 +304,14 @@ namespace internal
// target is set the 'visible' value,
// so we should record the opposite value
mrShapeHash.insert(
XShapeHash::value_type(
mrShapeHash.emplace(
aTarget,
VectorOfNamedValues(
1,
beans::NamedValue(
//xAnimateNode->getAttributeName(),
"visibility",
uno::makeAny( bVisible ) ) ) ) );
uno::makeAny( bVisible ) ) ) );
break;
}
}
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 365b5ea..2aa66dc 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1828,11 +1828,10 @@ void SlideShowImpl::addShapeEventListener(
maShapeEventListeners.end() )
{
// no entry for this shape -> create one
aIter = maShapeEventListeners.insert(
ShapeEventListenerMap::value_type(
aIter = maShapeEventListeners.emplace(
xShape,
std::make_shared<comphelper::OInterfaceContainerHelper2>(
m_aMutex))).first;
m_aMutex)).first;
}
// add new listener to broadcaster
@@ -1890,9 +1889,7 @@ void SlideShowImpl::setShapeCursor(
// add new entry, unless shape shall display
// normal pointer arrow -> no need to handle that
// case
maShapeCursors.insert(
ShapeCursorMap::value_type(xShape,
nPointerShape) );
maShapeCursors.emplace(xShape, nPointerShape);
}
}
else if( nPointerShape == awt::SystemPointer::ARROW )
diff --git a/slideshow/source/engine/usereventqueue.cxx b/slideshow/source/engine/usereventqueue.cxx
index 66ddcb7..8d71510 100644
--- a/slideshow/source/engine/usereventqueue.cxx
+++ b/slideshow/source/engine/usereventqueue.cxx
@@ -158,9 +158,7 @@ public:
maAnimationEventMap.end() )
{
// no entry for this animation -> create one
aIter = maAnimationEventMap.insert(
ImpAnimationEventMap::value_type( xNode,
ImpEventVector() ) ).first;
aIter = maAnimationEventMap.emplace( xNode, ImpEventVector() ).first;
}
// add new event to queue
@@ -300,9 +298,7 @@ public:
if( (aIter=maShapeEventMap.find( rShape )) == maShapeEventMap.end() )
{
// no entry for this shape -> create one
aIter = maShapeEventMap.insert(
ImpShapeEventMap::value_type( rShape,
ImpEventQueue() ) ).first;
aIter = maShapeEventMap.emplace(rShape, ImpEventQueue()).first;
}
// add new event to queue
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 65dc5d0..063e868 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1519,8 +1519,7 @@ public:
}
map_.erase(del);
}
bool ins = map_.insert(typename Map::value_type(key, Data(access)))
.second;
bool ins = map_.emplace(key, Data(access)).second;
assert(ins); (void)ins;
}
diff --git a/stoc/source/security/lru_cache.h b/stoc/source/security/lru_cache.h
index 6677a95..28c34fe 100644
--- a/stoc/source/security/lru_cache.h
+++ b/stoc/source/security/lru_cache.h
@@ -193,7 +193,7 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::set(
m_key2element.erase( entry->m_key );
entry->m_key = key;
::std::pair< typename t_key2element::iterator, bool > insertion(
m_key2element.insert( typename t_key2element::value_type( key, entry ) ) );
m_key2element.emplace( key, entry ) );
OSL_ENSURE( insertion.second, "### inserting new cache entry failed?!" );
}
else
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx
index 9748be9..8eff53f 100644
--- a/svtools/source/brwbox/brwbox3.cxx
+++ b/svtools/source/brwbox/brwbox3.cxx
@@ -58,7 +58,7 @@ namespace svt
nullptr,
_eType
);
aFind = _raHeaderCells.insert( BrowseBoxImpl::THeaderCellMap::value_type( _nPos, xAccessible ) ).first;
aFind = _raHeaderCells.emplace( _nPos, xAccessible ).first;
}
if ( aFind != _raHeaderCells.end() )
xRet = aFind->second;
diff --git a/svx/source/dialog/searchcharmap.cxx b/svx/source/dialog/searchcharmap.cxx
index ff22615..058fb5e 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -433,7 +433,7 @@ svx::SvxShowCharSetItem* SvxSearchCharSet::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;
std::unordered_map<sal_Int32,sal_UCS4>::const_iterator got = m_aItemList.find (_nPos);
buf.appendUtf32( got->second );
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index e1408f8..8bef3f5 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -639,7 +639,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
}
// insert the new entry
aPropertyPos = rPropInfos.insert(PropertySetInfo::AllProperties::value_type(evt.PropertyName,aNewEntry)).first;
aPropertyPos = rPropInfos.emplace(evt.PropertyName,aNewEntry).first;
DBG_ASSERT(aPropertyPos != rPropInfos.end(), "FmXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
}
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index fb63de3..f54e677 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -4065,8 +4065,8 @@ FormController::interceptedQueryDispatch( const URL& aURL,
DispatcherContainer::const_iterator aDispatcherPos = m_aFeatureDispatchers.find( nFormFeature );
if ( aDispatcherPos == m_aFeatureDispatchers.end() )
{
aDispatcherPos = m_aFeatureDispatchers.insert(
DispatcherContainer::value_type( nFormFeature, new svx::OSingleFeatureDispatcher( aURL, nFormFeature, m_xFormOperations, m_aMutex ) )
aDispatcherPos = m_aFeatureDispatchers.emplace(
nFormFeature, new svx::OSingleFeatureDispatcher( aURL, nFormFeature, m_xFormOperations, m_aMutex )
).first;
}
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 11e6676..858b97d 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -155,20 +155,17 @@ GalleryThemePopup::GalleryThemePopup(
mpPopupMenu->SetPopupMenu(mpPopupMenu->GetItemId("background"), mpBackgroundPopup);
// SID_GALLERY_ENABLE_ADDCOPY
m_aCommandInfo.insert(
CommandInfoMap::value_type(
m_aCommandInfo.emplace(
SID_GALLERY_ENABLE_ADDCOPY,
CommandInfo( CMD_SID_GALLERY_ENABLE_ADDCOPY )));
CommandInfo( CMD_SID_GALLERY_ENABLE_ADDCOPY ));
// SID_GALLERY_BG_BRUSH
m_aCommandInfo.insert(
CommandInfoMap::value_type(
m_aCommandInfo.emplace(
SID_GALLERY_BG_BRUSH,
CommandInfo( CMD_SID_GALLERY_BG_BRUSH )));
CommandInfo( CMD_SID_GALLERY_BG_BRUSH ));
// SID_GALLERY_FORMATS
m_aCommandInfo.insert(
CommandInfoMap::value_type(
m_aCommandInfo.emplace(
SID_GALLERY_FORMATS,
CommandInfo( CMD_SID_GALLERY_FORMATS )));
CommandInfo( CMD_SID_GALLERY_FORMATS ));
}
diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx
index 43da30d..18bdd32 100644
--- a/sw/source/core/access/accfrmobjmap.cxx
+++ b/sw/source/core/access/accfrmobjmap.cxx
@@ -126,8 +126,7 @@ std::pair< SwAccessibleChildMap::iterator, bool > SwAccessibleChildMap::insert(
const SwAccessibleChild& rLower )
{
SwAccessibleChildMapKey aKey( eLayerId, nPos );
value_type aEntry( aKey, rLower );
return insert( aEntry );
return emplace( aKey, rLower );
}
std::pair< SwAccessibleChildMap::iterator, bool > SwAccessibleChildMap::insert(
@@ -142,8 +141,7 @@ std::pair< SwAccessibleChildMap::iterator, bool > SwAccessibleChildMap::insert(
? SwAccessibleChildMapKey::CONTROLS
: SwAccessibleChildMapKey::HEAVEN );
SwAccessibleChildMapKey aKey( eLayerId, pObj->GetOrdNum() );
value_type aEntry( aKey, rLower );
return insert( aEntry );
return emplace( aKey, rLower );
}
bool SwAccessibleChildMap::IsSortingRequired( const SwFrame& rFrame )
diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx
index 819c331..2376bde 100644
--- a/sw/source/core/access/accfrmobjmap.hxx
+++ b/sw/source/core/access/accfrmobjmap.hxx
@@ -117,7 +117,8 @@ public:
const_reverse_iterator crbegin() const { return maMap.crbegin(); }
const_reverse_iterator crend() const { return maMap.crend(); }
std::pair<iterator,bool> insert(const value_type& value) { return maMap.insert(value); }
template<class... Args>
std::pair<iterator,bool> emplace(Args&&... args) { return maMap.emplace(std::forward<Args>(args)...); }
};
#endif
diff --git a/sw/source/core/access/acchypertextdata.hxx b/sw/source/core/access/acchypertextdata.hxx
index ea1d349..7a0c5e7 100644
--- a/sw/source/core/access/acchypertextdata.hxx
+++ b/sw/source/core/access/acchypertextdata.hxx
@@ -45,7 +45,8 @@ public:
iterator begin() { return maMap.begin(); }
iterator end() { return maMap.end(); }
iterator find(const key_type& key) { return maMap.find(key); }
std::pair<iterator,bool> insert(const value_type& value ) { return maMap.insert(value); }
template<class... Args>
std::pair<iterator,bool> emplace(Args&&... args) { return maMap.emplace(std::forward<Args>(args)...); }
};
#endif
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index cf74ec6..3ca5624 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -113,7 +113,8 @@ public:
bool empty() const { return maMap.empty(); }
void clear() { maMap.clear(); }
iterator find(const key_type& key) { return maMap.find(key); }
std::pair<iterator,bool> insert(const value_type& value ) { return maMap.insert(value); }
template<class... Args>
std::pair<iterator,bool> emplace(Args&&... args) { return maMap.emplace(std::forward<Args>(args)...); }
iterator erase(const_iterator const & pos) { return maMap.erase(pos); }
};
@@ -257,7 +258,8 @@ public:
const_iterator cend() const { return maMap.cend(); }
bool empty() const { return maMap.empty(); }
iterator find(const key_type& key) { return maMap.find(key); }
std::pair<iterator,bool> insert(const value_type& value ) { return maMap.insert(value); }
template<class... Args>
std::pair<iterator,bool> emplace(Args&&... args) { return maMap.emplace(std::forward<Args>(args)...); }
iterator erase(const_iterator const & pos) { return maMap.erase(pos); }
};
@@ -588,7 +590,8 @@ private:
public:
iterator end() { return maMap.end(); }
iterator find(const key_type& key) { return maMap.find(key); }
std::pair<iterator,bool> insert(const value_type& value ) { return maMap.insert(value); }
template<class... Args>
std::pair<iterator,bool> emplace(Args&&... args) { return maMap.emplace(std::forward<Args>(args)...); }
iterator erase(const_iterator const & pos) { return maMap.erase(pos); }
};
@@ -628,7 +631,8 @@ public:
iterator begin() { return maMap.begin(); }
iterator end() { return maMap.end(); }
iterator find(const key_type& key) { return maMap.find(key); }
std::pair<iterator,bool> insert(const value_type& value ) { return maMap.insert(value); }
template<class... Args>
std::pair<iterator,bool> emplace(Args&&... args) { return maMap.emplace(std::forward<Args>(args)...); }
iterator erase(const_iterator const & pos) { return maMap.erase(pos); }
};
@@ -1042,9 +1046,8 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent )
}
else if( SwAccessibleEvent_Impl::DISPOSE != rEvent.GetType() )
{
SwAccessibleEventMap_Impl::value_type aEntry( rEvent.GetFrameOrObj(),
mpEventMap->emplace( rEvent.GetFrameOrObj(),
mpEvents->insert( mpEvents->end(), rEvent ) );
mpEventMap->insert( aEntry );
}
}
}
@@ -1349,7 +1352,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
vecAdd.push_back(static_cast< SwAccessibleContext * >(xAcc.get()));
}
mapTemp.insert( SwAccessibleContextMap_Impl::value_type( pFrame, xAcc ) );
mapTemp.emplace( pFrame, xAcc );
}
}
++nStartIndex;
@@ -1379,7 +1382,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
SwAccessibleContextMap_Impl::iterator aIter = mapTemp.begin();
while( aIter != mapTemp.end() )
{
mpSeletedFrameMap->insert( SwAccessibleContextMap_Impl::value_type( (*aIter).first, (*aIter).second ) );
mpSeletedFrameMap->emplace( (*aIter).first, (*aIter).second );
++aIter;
}
mapTemp.clear();
@@ -1760,8 +1763,7 @@ uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView_(
}
else
{
SwAccessibleContextMap_Impl::value_type aEntry( pRootFrame, xAcc );
mpFrameMap->insert( aEntry );
mpFrameMap->emplace( pRootFrame, xAcc );
}
}
@@ -1889,8 +1891,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrame *pFrame,
}
else
{
SwAccessibleContextMap_Impl::value_type aEntry( pFrame, xAcc );
mpFrameMap->insert( aEntry );
mpFrameMap->emplace( pFrame, xAcc );
}
if( pAcc->HasCursor() &&
@@ -1986,9 +1987,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext(
}
else
{
SwAccessibleShapeMap_Impl::value_type aEntry( pObj,
xAcc );
mpShapeMap->insert( aEntry );
mpShapeMap->emplace( pObj, xAcc );
}
// TODO: focus!!!
AddGroupContext(pObj, xAcc);
@@ -2016,8 +2015,7 @@ void SwAccessibleMap::AddShapeContext(const SdrObject *pObj, uno::Reference < XA
if( mpShapeMap )
{
SwAccessibleShapeMap_Impl::value_type aEntry( pObj, xAccShape );
mpShapeMap->insert( aEntry );
mpShapeMap->emplace( pObj, xAccShape );
}
}
@@ -3147,8 +3145,7 @@ bool SwAccessibleMap::ReplaceChild (
}
else
{
SwAccessibleShapeMap_Impl::value_type aEntry( pObj, xAcc );
mpShapeMap->insert( aEntry );
mpShapeMap->emplace( pObj, xAcc );
}
}
}
@@ -3349,14 +3346,12 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::BuildSelectedParas()
pTextNode == &(pEndPos->nNode.GetNode())
? pEndPos->nContent.GetIndex()
: -1 );
SwAccessibleSelectedParas_Impl::value_type
aEntry( xWeakAcc, aDataEntry );
if ( !pRetSelectedParas )
{
pRetSelectedParas =
new SwAccessibleSelectedParas_Impl;
}
pRetSelectedParas->insert( aEntry );
pRetSelectedParas->emplace( xWeakAcc, aDataEntry );
}
}
}
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 44056b7..1ec3475 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -3088,8 +3088,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
}
else
{
SwAccessibleHyperTextData::value_type aEntry( pHt, xRet );
m_pHyperTextData->insert( aEntry );
m_pHyperTextData->emplace( pHt, xRet );
}
}
}
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 689b032..b658659 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2347,8 +2347,7 @@ lcl_CollectHintSpans(const SwpHints& i_rHints, const sal_Int32 nLength,
// no hints at the end (special case: no hints at all in i_rHints)
if (nLastEnd != nLength && nLength != 0)
{
o_rSpanMap.insert(
AttrSpanMap_t::value_type(AttrSpan_t(nLastEnd, nLength), nullptr));
o_rSpanMap.emplace(AttrSpan_t(nLastEnd, nLength), nullptr);
}
}
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 5e62ef0..82625c6 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1477,7 +1477,7 @@ bool SwContentTree::Expand( SvTreeListEntry* pParent )
assert(dynamic_cast<SwContent*>(static_cast<SwTypeNumber*>(pChild->GetUserData())));
long nPos = static_cast<SwContent*>(pChild->GetUserData())->GetYPos();
void* key = static_cast<void*>(pShell->getIDocumentOutlineNodesAccess()->getOutlineNode( nPos ));
aCurrOutLineNodeMap.insert(std::map<void*, bool>::value_type( key, false ) );
aCurrOutLineNodeMap.emplace( key, false );
std::map<void*, bool>::iterator iter = mOutLineNodeMap.find( key );
if( iter != mOutLineNodeMap.end() && mOutLineNodeMap[key])
{
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index b9bbed7..2398589 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -2814,8 +2814,8 @@ TaskManager::getContentExchangedEventListeners( const OUString& aOldPrefix,
TaskManager::ContentMap::iterator itold = m_aContent.find( aOldName );
if( itold != m_aContent.end() )
{
TaskManager::ContentMap::iterator itnew = m_aContent.insert(
ContentMap::value_type( aNewName,UnqPathData() ) ).first;
TaskManager::ContentMap::iterator itnew = m_aContent.emplace(
aNewName,UnqPathData() ).first;
// copy Ownership also
delete itnew->second.properties;
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index 2ffe271..92db744 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -172,10 +172,9 @@ StorageElementFactory::createStorage( const OUString & rUri,
rtl::Reference< Storage > xElement(
new Storage( m_xContext, this, aUriKey, xParentStorage, xStorage ) );
aIt = m_aMap.insert(
StorageMap::value_type(
aIt = m_aMap.emplace(
std::pair< OUString, bool >( aUriKey, bWritable ),
xElement.get() ) ).first;
xElement.get() ).first;
aIt->second->m_aContainerIt = aIt;
return aIt->second;
diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y
index f504d51..c491d23 100644
--- a/unoidl/source/sourceprovider-parser.y
+++ b/unoidl/source/sourceprovider-parser.y
@@ -273,12 +273,11 @@ unoidl::detail::SourceProviderEntity * findEntity_(
rtl::Reference<unoidl::Entity> ent(data->manager->findEntity(n));
if (ent.is()) {
std::map<OUString, unoidl::detail::SourceProviderEntity>::iterator
k(data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
k(data->entities.emplace(
n,
unoidl::detail::SourceProviderEntity(
unoidl::detail::SourceProviderEntity::KIND_EXTERNAL,
ent))).
ent)).
first);
*name = n;
return &k->second;
@@ -295,12 +294,11 @@ unoidl::detail::SourceProviderEntity * findEntity_(
rtl::Reference<unoidl::Entity> ent(data->manager->findEntity(n));
if (ent.is()) {
std::map<OUString, unoidl::detail::SourceProviderEntity>::iterator
j(data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
j(data->entities.emplace(
n,
unoidl::detail::SourceProviderEntity(
unoidl::detail::SourceProviderEntity::KIND_EXTERNAL,
ent))).
ent)).
first);
*name = n;
return &j->second;
@@ -959,11 +957,10 @@ moduleDecl:
OUString name(convertToFullName(data, $2));
data->modules.push_back(name);
std::pair<std::map<OUString, unoidl::detail::SourceProviderEntity>::iterator, bool> p(
data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
data->entities.emplace(
name,
unoidl::detail::SourceProviderEntity(
unoidl::detail::SourceProviderEntity::KIND_MODULE))));
unoidl::detail::SourceProviderEntity::KIND_MODULE)));
if (!p.second
&& (p.first->second.kind
!= unoidl::detail::SourceProviderEntity::KIND_MODULE))
@@ -981,12 +978,11 @@ enumDefn:
unoidl::detail::SourceProviderScannerData * data = yyget_extra(yyscanner);
data->publishedContext = $2;
convertToCurrentName(data, $4);
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
if (!data->entities.emplace(
data->currentName,
unoidl::detail::SourceProviderEntity(
new unoidl::detail::SourceProviderEnumTypeEntityPad(
$2)))).
$2))).
second)
{
error(@4, yyscanner, "multiple entities named " + data->currentName);
@@ -1113,12 +1109,11 @@ plainStructDefn:
YYERROR;
}
}
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
if (!data->entities.emplace(
data->currentName,
unoidl::detail::SourceProviderEntity(
new unoidl::detail::SourceProviderPlainStructTypeEntityPad(
$2, baseName, baseEnt)))).
$2, baseName, baseEnt))).
second)
{
error(@4, yyscanner, "multiple entities named " + data->currentName);
@@ -1147,12 +1142,11 @@ polymorphicStructTemplateDefn:
unoidl::detail::SourceProviderScannerData * data = yyget_extra(yyscanner);
data->publishedContext = $2;
convertToCurrentName(data, $4);
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
if (!data->entities.emplace(
data->currentName,
unoidl::detail::SourceProviderEntity(
new unoidl::detail::SourceProviderPolymorphicStructTypeTemplateEntityPad(
$2)))).
$2))).
second)
{
error(@4, yyscanner, "multiple entities named " + data->currentName);
@@ -1244,12 +1238,11 @@ exceptionDefn:
YYERROR;
}
}
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
if (!data->entities.emplace(
data->currentName,
unoidl::detail::SourceProviderEntity(
new unoidl::detail::SourceProviderExceptionTypeEntityPad(
$2, baseName, baseEnt)))).
$2, baseName, baseEnt))).
second)
{
error(@4, yyscanner, "multiple entities named " + data->currentName);
@@ -1940,13 +1933,12 @@ typedefDefn:
default:
break;
}
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
if (!data->entities.emplace(
name,
unoidl::detail::SourceProviderEntity(
unoidl::detail::SourceProviderEntity::KIND_LOCAL,
new unoidl::TypedefEntity(
$2, t.getName(), annotations($1))))).
$2, t.getName(), annotations($1)))).
second)
{
error(@5, yyscanner, "multiple entities named " + name);
@@ -1962,12 +1954,11 @@ constantGroupDefn:
unoidl::detail::SourceProviderScannerData * data = yyget_extra(yyscanner);
data->publishedContext = $2;
convertToCurrentName(data, $4);
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
if (!data->entities.emplace(
data->currentName,
unoidl::detail::SourceProviderEntity(
new unoidl::detail::SourceProviderConstantGroupEntityPad(
$2)))).
$2))).
second)
{
error(@4, yyscanner, "multiple entities named " + data->currentName);
@@ -2326,12 +2317,11 @@ singleInterfaceBasedServiceDefn:
+ " base " + base + " is unpublished"));
YYERROR;
}
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
if (!data->entities.emplace(
data->currentName,
unoidl::detail::SourceProviderEntity(
new unoidl::detail::SourceProviderSingleInterfaceBasedServiceEntityPad(
$2, base)))).
$2, base))).
second)
{
error(@4, yyscanner, "multiple entities named " + data->currentName);
@@ -2540,12 +2530,11 @@ accumulationBasedServiceDefn:
unoidl::detail::SourceProviderScannerData * data = yyget_extra(yyscanner);
data->publishedContext = $2;
convertToCurrentName(data, $4);
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
if (!data->entities.emplace(
data->currentName,
unoidl::detail::SourceProviderEntity(
new unoidl::detail::SourceProviderAccumulationBasedServiceEntityPad(
$2)))).
$2))).
second)
{
error(@4, yyscanner, "multiple entities named " + data->currentName);
@@ -2857,13 +2846,12 @@ interfaceBasedSingletonDefn:
+ " is unpublished"));
YYERROR;
}
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
if (!data->entities.emplace(
name,
unoidl::detail::SourceProviderEntity(
unoidl::detail::SourceProviderEntity::KIND_LOCAL,
new unoidl::InterfaceBasedSingletonEntity(
$2, base, annotations($1))))).
$2, base, annotations($1)))).
second)
{
error(@4, yyscanner, "multiple entities named " + name);
@@ -2908,13 +2896,12 @@ serviceBasedSingletonDefn:
+ " is unpublished"));
YYERROR;
}
if (!data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
if (!data->entities.emplace(
name,
unoidl::detail::SourceProviderEntity(
unoidl::detail::SourceProviderEntity::KIND_LOCAL,
new unoidl::ServiceBasedSingletonEntity(
$2, base, annotations($1))))).
$2, base, annotations($1)))).
second)
{
error(@4, yyscanner, "multiple entities named " + name);
@@ -3020,13 +3007,12 @@ interfaceDecl:
data->publishedContext = $2;
OUString name(convertToFullName(data, $4));
std::pair<std::map<OUString, unoidl::detail::SourceProviderEntity>::iterator, bool> p(
data->entities.insert(
std::map<OUString, unoidl::detail::SourceProviderEntity>::value_type(
data->entities.emplace(
name,
unoidl::detail::SourceProviderEntity(
$2
? unoidl::detail::SourceProviderEntity::KIND_PUBLISHED_INTERFACE_DECL
: unoidl::detail::SourceProviderEntity::KIND_INTERFACE_DECL))));
: unoidl::detail::SourceProviderEntity::KIND_INTERFACE_DECL)));
if (!p.second) {
switch (p.first->second.kind) {
case unoidl::detail::SourceProviderEntity::KIND_INTERFACE_DECL:
@@ -4087,9 +4073,7 @@ bool SourceProviderInterfaceTypeEntityPad::addDirectMember(
if (!checkMemberClashes(location, yyscanner, data, "", name, true)) {
return false;
}
allMembers.insert(
std::map<OUString, Member>::value_type(
name, Member(data->currentName)));
allMembers.emplace(name, Member(data->currentName));
return true;
}
@@ -4270,8 +4254,7 @@ bool SourceProviderInterfaceTypeEntityPad::addBase(
? direct ? BASE_DIRECT_OPTIONAL : BASE_INDIRECT_OPTIONAL
: direct ? BASE_DIRECT_MANDATORY : BASE_INDIRECT_MANDATORY;
std::pair<std::map<OUString, BaseKind>::iterator, bool> p(
allBases.insert(
std::map<OUString, BaseKind>::value_type(name, kind)));
allBases.emplace(name, kind));
bool seen = !p.second && p.first->second >= BASE_INDIRECT_MANDATORY;
if (!p.second && kind > p.first->second) {
p.first->second = kind;
@@ -4333,12 +4316,10 @@ bool SourceProviderInterfaceTypeEntityPad::addBase(
}
}
for (auto & i: entity->getDirectAttributes()) {
allMembers.insert(
std::map<OUString, Member>::value_type(i.name, Member(name)));
allMembers.emplace(i.name, Member(name));
}
for (auto & i: entity->getDirectMethods()) {
allMembers.insert(
std::map<OUString, Member>::value_type(i.name, Member(name)));
allMembers.emplace(i.name, Member(name));
}
}
return true;
@@ -4378,8 +4359,7 @@ bool SourceProviderInterfaceTypeEntityPad::addOptionalBaseMembers(
}
for (auto & i: entity->getDirectAttributes()) {
Member & m(
allMembers.insert(
std::map<OUString, Member>::value_type(i.name, Member("")))
allMembers.emplace(i.name, Member(""))
.first->second);
if (m.mandatory.isEmpty()) {
m.optional.insert(name);
@@ -4387,8 +4367,7 @@ bool SourceProviderInterfaceTypeEntityPad::addOptionalBaseMembers(
}
for (auto & i: entity->getDirectMethods()) {
Member & m(
allMembers.insert(
std::map<OUString, Member>::value_type(i.name, Member("")))
allMembers.emplace(i.name, Member(""))
.first->second);
if (m.mandatory.isEmpty()) {
m.optional.insert(name);
diff --git a/unoidl/source/sourcetreeprovider.cxx b/unoidl/source/sourcetreeprovider.cxx
index 55dd2ac..da1770c 100644
--- a/unoidl/source/sourcetreeprovider.cxx
+++ b/unoidl/source/sourcetreeprovider.cxx
@@ -201,8 +201,7 @@ rtl::Reference<Entity> SourceTreeProvider::findEntity(OUString const & name)
"<" << uri << "> does not define entity " << name);
}
}
cache_.insert(
std::map< OUString, rtl::Reference<Entity> >::value_type(name, ent));
cache_.emplace(name, ent);
return ent;
}
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index dd3ad60..dfaafd5 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1168,9 +1168,7 @@ StarSymbolToMSMultiFontImpl::StarSymbolToMSMultiFontImpl()
for (aEntry.cIndex = 0xFF; aEntry.cIndex >= 0x20; --aEntry.cIndex)
{
if (sal_Unicode cChar = r.pTab[aEntry.cIndex-0x20])
maMagicMap.insert(
::std::multimap<sal_Unicode, SymbolEntry>::value_type(
cChar, aEntry));
maMagicMap.emplace(cChar, aEntry);
}
}
@@ -1198,9 +1196,7 @@ StarSymbolToMSMultiFontImpl::StarSymbolToMSMultiFontImpl()
for (int j = r.mnSize / sizeof(r.mpTable[0]) - 1; j >=0; --j)
{
aEntry.cIndex = r.mpTable[j].cMS;
maMagicMap.insert(
::std::multimap<sal_Unicode, SymbolEntry>::value_type(
r.mpTable[j].cStar, aEntry));
maMagicMap.emplace(r.mpTable[j].cStar, aEntry);
}
}
}
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index 8bd5a3e..bc2969c 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -97,11 +97,11 @@ namespace DOM
{
::rtl::Reference<CDocument> const xDoc(new CDocument(pDoc));
// add the doc itself to its nodemap!
xDoc->m_NodeMap.insert(
nodemap_t::value_type(reinterpret_cast<xmlNodePtr>(pDoc),
xDoc->m_NodeMap.emplace(
reinterpret_cast<xmlNodePtr>(pDoc),
::std::make_pair(
WeakReference<XNode>(static_cast<XDocument*>(xDoc.get())),
xDoc.get())));
xDoc.get()));
return xDoc;
}
@@ -260,10 +260,9 @@ namespace DOM
}
if (pCNode != nullptr) {
bool const bInserted = m_NodeMap.insert(
nodemap_t::value_type(pNode,
::std::make_pair(WeakReference<XNode>(pCNode.get()),
pCNode.get()))
bool const bInserted = m_NodeMap.emplace(
pNode,
::std::make_pair(WeakReference<XNode>(pCNode.get()), pCNode.get())
).second;
OSL_ASSERT(bInserted);
if (!bInserted) {
diff --git a/xmloff/source/chart/SchXMLPropertyMappingContext.cxx b/xmloff/source/chart/SchXMLPropertyMappingContext.cxx
index 28074ee..ff739ae 100644
--- a/xmloff/source/chart/SchXMLPropertyMappingContext.cxx
+++ b/xmloff/source/chart/SchXMLPropertyMappingContext.cxx
@@ -109,10 +109,9 @@ void SchXMLPropertyMappingContext::StartElement(const uno::Reference< xml::sax::
Reference< chart2::XChartDocument > xChartDoc( GetImport().GetModel(), uno::UNO_QUERY );
Reference< chart2::data::XLabeledDataSequence2 > xSeq =
createAndAddSequenceToSeries(aRole, aRange, xChartDoc, mxDataSeries);
mrLSequencesPerIndex.insert(
tSchXMLLSequencesPerIndex::value_type(
mrLSequencesPerIndex.emplace(
tSchXMLIndexWithPart( 0, SCH_XML_PART_VALUES),
Reference< chart2::data::XLabeledDataSequence >( xSeq, UNO_QUERY )));
Reference< chart2::data::XLabeledDataSequence >( xSeq, UNO_QUERY ));
}
}
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index d868cf6..a40d23c 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -185,9 +185,8 @@ void lcl_insertErrorBarLSequencesToMap(
for( sal_Int32 nIndex = 0; nIndex < aLSequences.getLength(); ++nIndex )
{
// use "0" as data index. This is ok, as it is not used for error bars
rInOutMap.insert(
tSchXMLLSequencesPerIndex::value_type(
tSchXMLIndexWithPart( 0, SCH_XML_PART_ERROR_BARS ), aLSequences[ nIndex ] ));
rInOutMap.emplace(
tSchXMLIndexWithPart( 0, SCH_XML_PART_ERROR_BARS ), aLSequences[ nIndex ] );
}
}
}
@@ -434,9 +433,8 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
xLabeledSeq->setValues(xSequenceValues);
// register for setting local data if external data provider is not present
maPostponedSequences.insert(
tSchXMLLSequencesPerIndex::value_type(
tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_VALUES ), xLabeledSeq ));
maPostponedSequences.emplace(
tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_VALUES ), xLabeledSeq );
// label
Reference<chart2::data::XDataSequence> xSequenceLabel;
@@ -462,9 +460,8 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
// for creation, because internal data always has labels. If
// they don't exist in the original, auto-generated labels are
// used for the internal data.
maPostponedSequences.insert(
tSchXMLLSequencesPerIndex::value_type(
tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_LABEL ), xLabeledSeq ));
maPostponedSequences.emplace(
tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_LABEL ), xLabeledSeq );
Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( &xLabeledSeq, 1 );
Reference< chart2::data::XDataSink > xSink( m_xSeries, uno::UNO_QUERY_THROW );
@@ -619,10 +616,9 @@ void SchXMLSeries2Context::EndElement()
if( xLabeledSeq.is() )
{
// register for setting local data if external data provider is not present
mrLSequencesPerIndex.insert(
tSchXMLLSequencesPerIndex::value_type(
mrLSequencesPerIndex.emplace(
tSchXMLIndexWithPart( aDomainInfo.nIndexForLocalData, SCH_XML_PART_VALUES ),
Reference< chart2::data::XLabeledDataSequence >(xLabeledSeq, uno::UNO_QUERY_THROW) ));
Reference< chart2::data::XLabeledDataSequence >(xLabeledSeq, uno::UNO_QUERY_THROW) );
}
}
@@ -632,9 +628,7 @@ void SchXMLSeries2Context::EndElement()
aIt != maPostponedSequences.end(); ++aIt )
{
sal_Int32 nNewIndex = aIt->first.first + nDomainCount;
mrLSequencesPerIndex.insert(
tSchXMLLSequencesPerIndex::value_type(
tSchXMLIndexWithPart( nNewIndex, aIt->first.second ), aIt->second ));
mrLSequencesPerIndex.emplace( tSchXMLIndexWithPart( nNewIndex, aIt->first.second ), aIt->second );
}
m_rGlobalSeriesImportInfo.nCurrentDataIndex++;
}
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 13ef728..6d3dc3e 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -513,9 +513,8 @@ void CreateCategories(
if( pLSequencesPerIndex )
{
// register for setting local data if external data provider is not present
pLSequencesPerIndex->insert(
tSchXMLLSequencesPerIndex::value_type(
tSchXMLIndexWithPart( SCH_XML_CATEGORIES_INDEX, SCH_XML_PART_VALUES ), xLabeledSeq ));
pLSequencesPerIndex->emplace(
tSchXMLIndexWithPart( SCH_XML_CATEGORIES_INDEX, SCH_XML_PART_VALUES ), xLabeledSeq );
}
xAxis->setScaleData( aData );
}
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx
index 52cfb2a..47d6e07e 100644
--- a/xmloff/source/core/nmspmap.cxx
+++ b/xmloff/source/core/nmspmap.cxx
@@ -252,9 +252,7 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey,
if (bCache)
{
OUString sString(sQName.makeStringAndClear());
aQNameCache.insert(
QNameCache::value_type(
QNamePair(nKey, rLocalName), sString));
aQNameCache.emplace(QNamePair(nKey, rLocalName), sString);
return sString;
}
else
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index d11b5ed3..d2fd683 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -623,7 +623,7 @@ vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_(
xInfo = xWeakInfo;
if( xInfo.is() )
{
mpImpl->maCache.insert(Impl::CacheType::value_type(xInfo, pFilterInfo));
mpImpl->maCache.emplace(xInfo, pFilterInfo);
}
else
bDelInfo = true;