summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-10 16:43:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 12:38:32 +0200
commitd347c2403605c5aa3ddd98fb605366914acab79f (patch)
treee39624030741234c514bccd858e69d6318dfba68 /forms
parentf0e68d4feaaa43f7450432ad1ebd92c2b572400f (diff)
convert std::map::insert to std::map::emplace
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/GroupManager.cxx2
-rw-r--r--forms/source/helper/formnavigation.cxx2
-rw-r--r--forms/source/richtext/richtextcontrol.cxx2
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx6
-rw-r--r--forms/source/xforms/propertysetbase.cxx6
5 files changed, 9 insertions, 9 deletions
diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx
index 6a6876d0e7a6..486ad435aec5 100644
--- a/forms/source/component/GroupManager.cxx
+++ b/forms/source/component/GroupManager.cxx
@@ -356,7 +356,7 @@ void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet )
if ( aFind == m_aGroupArr.end() )
{
- aFind = m_aGroupArr.insert(OGroupArr::value_type(sGroupName,OGroup(sGroupName))).first;
+ aFind = m_aGroupArr.emplace(sGroupName,OGroup(sGroupName)).first;
}
aFind->second.InsertComponent( xSet );
diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx
index 018d04c87b90..f79185b60d05 100644
--- a/forms/source/helper/formnavigation.cxx
+++ b/forms/source/helper/formnavigation.cxx
@@ -270,7 +270,7 @@ namespace frm
if ( bKnownId )
// add to our map
- m_aSupportedFeatures.insert( FeatureMap::value_type( *aLoop, aFeatureInfo ) );
+ m_aSupportedFeatures.emplace( *aLoop, aFeatureInfo );
}
}
}
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 5cf60a536254..fcf1c7ee3d79 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -615,7 +615,7 @@ namespace frm
SingleAttributeDispatcher pDispatcher = implCreateDispatcher( nSlotId, _rURL );
if ( pDispatcher.is() )
{
- aDispatcherPos = m_aDispatchers.insert( AttributeDispatchers::value_type( nSlotId, pDispatcher ) ).first;
+ aDispatcherPos = m_aDispatchers.emplace( nSlotId, pDispatcher ).first;
}
}
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index d9ba2469e1e4..dad5042b2846 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -191,12 +191,12 @@ namespace frm
return;
SAL_WARN_IF( _nAttributeId != aHandler->getAttributeId(), "forms.richtext", "RichTextControlImpl::enableAttributeNotification: suspicious handler!" );
- aHandlerPos = m_aAttributeHandlers.insert( AttributeHandlerPool::value_type( _nAttributeId , aHandler ) ).first;
+ aHandlerPos = m_aAttributeHandlers.emplace( _nAttributeId , aHandler ).first;
}
// remember the listener
if ( _pListener )
- m_aAttributeListeners.insert( AttributeListenerPool::value_type( _nAttributeId, _pListener ) );
+ m_aAttributeListeners.emplace( _nAttributeId, _pListener );
// update (and broadcast) the state of this attribute
updateAttribute( _nAttributeId );
@@ -240,7 +240,7 @@ namespace frm
StateCache::iterator aCachePos = m_aLastKnownStates.find( _nAttribute );
if ( aCachePos == m_aLastKnownStates.end() )
{ // nothing known about this attribute, yet
- m_aLastKnownStates.insert( StateCache::value_type( _nAttribute, _rState ) );
+ m_aLastKnownStates.emplace( _nAttribute, _rState );
}
else
{
diff --git a/forms/source/xforms/propertysetbase.cxx b/forms/source/xforms/propertysetbase.cxx
index cf0dfa62613e..4d426815fc98 100644
--- a/forms/source/xforms/propertysetbase.cxx
+++ b/forms/source/xforms/propertysetbase.cxx
@@ -72,7 +72,7 @@ void PropertySetBase::registerProperty( const Property& rProperty,
const ::rtl::Reference< PropertyAccessorBase >& rAccessor )
{
OSL_ENSURE( rAccessor.get(), "PropertySetBase::registerProperty: invalid property accessor, this will crash!" );
- m_aAccessors.insert( PropertyAccessors::value_type( rProperty.Handle, rAccessor ) );
+ m_aAccessors.emplace( rProperty.Handle, rAccessor );
OSL_ENSURE( rAccessor->isWriteable()
== ( ( rProperty.Attributes & css::beans::PropertyAttribute::READONLY ) == 0 ),
@@ -98,7 +98,7 @@ void PropertySetBase::notifyAndCachePropertyValue( sal_Int32 nHandle )
// default construct a value of this type
Any aEmptyValue( nullptr, aProperty.Type );
// insert into the cache
- aPos = m_aCache.insert( PropertyValueCache::value_type( nHandle, aEmptyValue ) ).first;
+ aPos = m_aCache.emplace( nHandle, aEmptyValue ).first;
}
catch( const Exception& )
{
@@ -123,7 +123,7 @@ void PropertySetBase::initializePropertyValueCache( sal_Int32 nHandle )
getFastPropertyValue( aCurrentValue, nHandle );
::std::pair< PropertyValueCache::iterator, bool > aInsertResult =
- m_aCache.insert( PropertyValueCache::value_type( nHandle, aCurrentValue ) );
+ m_aCache.emplace( nHandle, aCurrentValue );
OSL_ENSURE( aInsertResult.second, "PropertySetBase::initializePropertyValueCache: already cached a value for this property!" );
}