diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-14 08:35:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-14 10:25:27 +0200 |
commit | 5d5ac2fd9e8fe4781d6175eb58b949ba9c25d564 (patch) | |
tree | 1c32d0257d3ea62cb60cf802efb0e7f57f8ead8c /xmloff | |
parent | d36ccd2a7111b35276c21ed19750921fdfbfdacc (diff) |
clang-tidy modernize-use-emplace in xmloff
Change-Id: I55bf75b5505d01cb33f26fac4603afdb3b4f1780
Reviewed-on: https://gerrit.libreoffice.org/42262
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
21 files changed, 49 insertions, 52 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 916928d00353..364c687fe685 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -550,7 +550,7 @@ void lcl_swapPointAndSeriesStylesForDonutCharts( ::std::list< DataRowPointStyle ::std::map< sal_Int32, Reference< chart2::XDataSeries > >::const_iterator aIndexEnd( aIndexSeriesMap.end() ); for( ; aIndexIt != aIndexEnd; ++aIndexIt ) - aNewSeriesVector.push_back( NewDonutSeries(aIndexIt->second,nOldSeriesCount) ); + aNewSeriesVector.emplace_back(aIndexIt->second,nOldSeriesCount ); } //overwrite attached axis information according to old series styles diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 8fdb75e86f8a..41d0716f6b4d 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -494,7 +494,7 @@ tLabelAndValueRange lcl_getLabelAndValueRangeByRole( aResult.second = lcl_ConvertRange( xValueSeq->getSourceRangeRepresentation(), xDoc ); if( xLabelSeq.is() || xValueSeq.is()) - rOutSequencesToExport.push_back( SchXMLExportHelper_Impl::tLabelValuesDataPair( xLabelSeq, xValueSeq )); + rOutSequencesToExport.emplace_back( xLabelSeq, xValueSeq ); } return aResult; @@ -2755,8 +2755,8 @@ void SchXMLExportHelper_Impl::exportSeries( { Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() ); if( lcl_exportDomainForThisSequence( xValues, aFirstXDomainRange, mrExport ) ) - m_aDataSequencesToExport.push_back( tLabelValuesDataPair( - uno::Reference< chart2::data::XDataSequence >(), xValues )); + m_aDataSequencesToExport.emplace_back( + uno::Reference< chart2::data::XDataSequence >(), xValues ); } else if( nSeriesIdx==0 ) { @@ -2771,8 +2771,8 @@ void SchXMLExportHelper_Impl::exportSeries( } } if( xYValuesForBubbleChart.is() ) - m_aDataSequencesToExport.push_back( tLabelValuesDataPair( - uno::Reference< chart2::data::XDataSequence >(), xYValuesForBubbleChart )); + m_aDataSequencesToExport.emplace_back( + uno::Reference< chart2::data::XDataSequence >(), xYValuesForBubbleChart ); } } @@ -2873,8 +2873,8 @@ void SchXMLExportHelper_Impl::exportPropertyMapping( SvXMLElementExport( mrExport, XML_NAMESPACE_LO_EXT, XML_PROPERTY_MAPPING, true, true ); // register range for data table export - m_aDataSequencesToExport.push_back( tLabelValuesDataPair( - uno::Reference< chart2::data::XDataSequence >(), xValues )); + m_aDataSequencesToExport.emplace_back( + uno::Reference< chart2::data::XDataSequence >(), xValues ); } } } @@ -3057,8 +3057,8 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe for( ::std::vector< Reference< chart2::data::XDataSequence > >::const_iterator aIt( aErrorBarSequences.begin()); aIt != aErrorBarSequences.end(); ++aIt ) { - m_aDataSequencesToExport.push_back( tLabelValuesDataPair( - uno::Reference< chart2::data::XDataSequence >(), *aIt )); + m_aDataSequencesToExport.emplace_back( + uno::Reference< chart2::data::XDataSequence >(), *aIt ); } } diff --git a/xmloff/source/chart/SchXMLTextListContext.cxx b/xmloff/source/chart/SchXMLTextListContext.cxx index 020b77203907..0893f42ff930 100644 --- a/xmloff/source/chart/SchXMLTextListContext.cxx +++ b/xmloff/source/chart/SchXMLTextListContext.cxx @@ -110,7 +110,7 @@ SvXMLImportContext* SchXMLTextListContext::CreateChildContext( SvXMLImportContext* pContext = nullptr; if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_LIST_ITEM ) ) { - m_aTextVector.push_back( OUString() ); + m_aTextVector.emplace_back( ); pContext = new SchXMLListItemContext( GetImport(), rLocalName, m_aTextVector.back() ); } else diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 7f902830f5b9..070ecc1581f2 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -332,7 +332,7 @@ SvXMLImportContext *XMLDocumentSettingsContext::CreateChildContext( sal_uInt16 p m_pData->aConfigProps, nullptr); else { - m_pData->aDocSpecificSettings.push_back( SettingsGroup( aLocalConfigName, uno::Any() ) ); + m_pData->aDocSpecificSettings.emplace_back( aLocalConfigName, uno::Any() ); ::std::list< SettingsGroup >::reverse_iterator settingsPos = m_pData->aDocSpecificSettings.rbegin(); diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index abfa5ed80ced..6703241b2f28 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.cxx @@ -409,7 +409,7 @@ RDFaImportHelper::AddRDFa( SAL_WARN("xmloff.core", "AddRDFa: invalid arg: null RDFa attributes"); return; } - m_RDFaEntries.push_back(RDFaEntry(i_xObject, i_pRDFaAttributes)); + m_RDFaEntries.emplace_back(i_xObject, i_pRDFaAttributes); } void diff --git a/xmloff/source/core/SvXMLAttrCollection.cxx b/xmloff/source/core/SvXMLAttrCollection.cxx index 34abfbb2630f..e203e3c9f920 100644 --- a/xmloff/source/core/SvXMLAttrCollection.cxx +++ b/xmloff/source/core/SvXMLAttrCollection.cxx @@ -20,7 +20,7 @@ bool SvXMLAttrCollection::operator ==( const SvXMLAttrCollection& rCmp ) const bool SvXMLAttrCollection::AddAttr( const OUString& rLName, const OUString& rValue ) { - aAttrs.push_back( SvXMLAttr(rLName, rValue) ); + aAttrs.emplace_back(rLName, rValue ); return true; } @@ -30,7 +30,7 @@ bool SvXMLAttrCollection::AddAttr( const OUString& rPrefix, const OUString& rValue ) { sal_uInt16 nPos = aNamespaceMap.Add( rPrefix, rNamespace ); - aAttrs.push_back( SvXMLAttr(nPos, rLName, rValue) ); + aAttrs.emplace_back(nPos, rLName, rValue ); return true; } @@ -41,7 +41,7 @@ bool SvXMLAttrCollection::AddAttr( const OUString& rPrefix, sal_uInt16 nPos = aNamespaceMap.GetIndexByPrefix( rPrefix ); if( USHRT_MAX == nPos ) return false; - aAttrs.push_back( SvXMLAttr(nPos, rLName, rValue) ); + aAttrs.emplace_back(nPos, rLName, rValue ); return true; } diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx index dd12c784f747..849a595f50f3 100644 --- a/xmloff/source/core/attrlist.cxx +++ b/xmloff/source/core/attrlist.cxx @@ -151,7 +151,7 @@ SvXMLAttributeList::~SvXMLAttributeList() void SvXMLAttributeList::AddAttribute( const OUString &sName , const OUString &sValue ) { - m_pImpl->vecAttribute.push_back( SvXMLTagAttribute_Impl( sName , sValue ) ); + m_pImpl->vecAttribute.emplace_back( sName , sValue ); } void SvXMLAttributeList::Clear() @@ -183,9 +183,9 @@ void SvXMLAttributeList::AppendAttributeList( const uno::Reference< css::xml::sa m_pImpl->vecAttribute.reserve( nTotalSize ); for( sal_Int16 i = 0 ; i < nMax ; ++i ) { - m_pImpl->vecAttribute.push_back( SvXMLTagAttribute_Impl( + m_pImpl->vecAttribute.emplace_back( r->getNameByIndex( i ) , - r->getValueByIndex( i ))); + r->getValueByIndex( i )); } OSL_ASSERT( nTotalSize == (SvXMLAttributeList_Impl::size_type)getLength()); diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx index 7bc45c540a90..10961175beaf 100644 --- a/xmloff/source/core/xmlerror.cxx +++ b/xmloff/source/core/xmlerror.cxx @@ -95,8 +95,8 @@ void XMLErrors::AddRecord( const OUString& rPublicId, const OUString& rSystemId ) { - aErrors.push_back( ErrorRecord( nId, rParams, rExceptionMessage, - nRow, nColumn, rPublicId, rSystemId ) ); + aErrors.emplace_back( nId, rParams, rExceptionMessage, + nRow, nColumn, rPublicId, rSystemId ); #ifdef DBG_UTIL diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index cd8442d08fa1..78a798ecd3a7 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1082,13 +1082,13 @@ void SvXMLExport::ImplExportSettings() // view settings uno::Sequence< beans::PropertyValue > aViewSettings; GetViewSettingsAndViews( aViewSettings ); - aSettings.push_back( SettingsGroup( XML_VIEW_SETTINGS, aViewSettings ) ); + aSettings.emplace_back( XML_VIEW_SETTINGS, aViewSettings ); nSettingsCount += aViewSettings.getLength(); // configuration settings uno::Sequence<beans::PropertyValue> aConfigSettings; GetConfigurationSettings( aConfigSettings ); - aSettings.push_back( SettingsGroup( XML_CONFIGURATION_SETTINGS, aConfigSettings ) ); + aSettings.emplace_back( XML_CONFIGURATION_SETTINGS, aConfigSettings ); nSettingsCount += aConfigSettings.getLength(); // any document specific settings diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx index 2c8d89844e4a..0745ac941aae 100644 --- a/xmloff/source/core/xmlmultiimagehelper.cxx +++ b/xmloff/source/core/xmlmultiimagehelper.cxx @@ -134,7 +134,7 @@ SvXMLImportContextRef MultiImageImportHelper::solveMultipleImages() void MultiImageImportHelper::addContent(const SvXMLImportContext& rSvXMLImportContext) { - maImplContextVector.push_back(SvXMLImportContextRef(const_cast< SvXMLImportContext* >(&rSvXMLImportContext))); + maImplContextVector.emplace_back(const_cast< SvXMLImportContext* >(&rSvXMLImportContext)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 98941c827b41..dd5eb993b7e1 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -836,30 +836,30 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: case ANA_Node_Type: { if( SvXMLUnitConverter::convertEnum( nEnum, rValue, aAnimations_EnumMap_EffectNodeType ) ) - aUserData.push_back( NamedValue( GetXMLToken( XML_NODE_TYPE ), makeAny( nEnum ) ) ); + aUserData.emplace_back( GetXMLToken( XML_NODE_TYPE ), makeAny( nEnum ) ); } break; case ANA_Preset_ID: { - aUserData.push_back( NamedValue( GetXMLToken( XML_PRESET_ID ), makeAny( rValue ) ) ); + aUserData.emplace_back( GetXMLToken( XML_PRESET_ID ), makeAny( rValue ) ); } break; case ANA_Preset_Sub_Type: { - aUserData.push_back( NamedValue( GetXMLToken( XML_PRESET_SUB_TYPE ), makeAny( rValue ) ) ); + aUserData.emplace_back( GetXMLToken( XML_PRESET_SUB_TYPE ), makeAny( rValue ) ); } break; case ANA_Preset_Class: { if( SvXMLUnitConverter::convertEnum( nEnum, rValue, aAnimations_EnumMap_EffectPresetClass ) ) - aUserData.push_back( NamedValue( GetXMLToken( XML_PRESET_CLASS ), makeAny( nEnum ) ) ); + aUserData.emplace_back( GetXMLToken( XML_PRESET_CLASS ), makeAny( nEnum ) ); } break; case ANA_After_Effect: { bool bTemp; if (::sax::Converter::convertBool( bTemp, rValue )) - aUserData.push_back( NamedValue( GetXMLToken( XML_AFTER_EFFECT ), makeAny( bTemp ) ) ); + aUserData.emplace_back( GetXMLToken( XML_AFTER_EFFECT ), makeAny( bTemp ) ); } break; case ANA_XLink: @@ -909,7 +909,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: case ANA_MasterElement: { Reference< XAnimationNode > xMaster( GetImport().getInterfaceToIdentifierMapper().getReference( rValue ), UNO_QUERY ); - aUserData.push_back( NamedValue( GetXMLToken( XML_MASTER_ELEMENT ), makeAny( xMaster ) ) ); + aUserData.emplace_back( GetXMLToken( XML_MASTER_ELEMENT ), makeAny( xMaster ) ); } break; @@ -1166,7 +1166,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: case ANA_Group_Id: { - aUserData.push_back( NamedValue( aLocalName, makeAny( rValue.toInt32() ) ) ); + aUserData.emplace_back( aLocalName, makeAny( rValue.toInt32() ) ); } break; @@ -1186,7 +1186,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: // push all unknown attributes within the presentation namespace as user data if( nPrefix == XML_NAMESPACE_PRESENTATION ) { - aUserData.push_back( NamedValue( aLocalName, makeAny( rValue ) ) ); + aUserData.emplace_back( aLocalName, makeAny( rValue ) ); } } } diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 47877e62c45d..0cf5d26693fd 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -3753,7 +3753,7 @@ void SdXMLCustomShapeContext::EndElement() } else { - maCustomShapeGeometry.push_back(beans::PropertyValue()); + maCustomShapeGeometry.emplace_back(); pItem = &maCustomShapeGeometry.back(); } diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index f11584c0762f..a8ff54cb069c 100644 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.cxx @@ -287,7 +287,7 @@ void OFormLayerXMLImport_Impl::registerCellValueBinding( const Reference< XPrope { OSL_ENSURE( _rxControlModel.is() && !_rCellAddress.isEmpty(), "OFormLayerXMLImport_Impl::registerCellValueBinding: invalid arguments!" ); - m_aCellValueBindings.push_back( ModelStringPair( _rxControlModel, _rCellAddress ) ); + m_aCellValueBindings.emplace_back( _rxControlModel, _rCellAddress ); } void OFormLayerXMLImport_Impl::registerXFormsValueBinding( @@ -297,8 +297,7 @@ void OFormLayerXMLImport_Impl::registerXFormsValueBinding( // TODO: is an empty binding name allowed? OSL_ENSURE( _rxControlModel.is(), "need model" ); - m_aXFormsValueBindings.push_back( - ModelStringPair( _rxControlModel, _rBindingID ) ); + m_aXFormsValueBindings.emplace_back( _rxControlModel, _rBindingID ); } void OFormLayerXMLImport_Impl::registerXFormsListBinding( @@ -308,8 +307,7 @@ void OFormLayerXMLImport_Impl::registerXFormsListBinding( // TODO: is an empty binding name allowed? OSL_ENSURE( _rxControlModel.is(), "need model" ); - m_aXFormsListBindings.push_back( - ModelStringPair( _rxControlModel, _rBindingID ) ); + m_aXFormsListBindings.emplace_back( _rxControlModel, _rBindingID ); } void OFormLayerXMLImport_Impl::registerXFormsSubmission( @@ -319,15 +317,14 @@ void OFormLayerXMLImport_Impl::registerXFormsSubmission( // TODO: is an empty binding name allowed? OSL_ENSURE( _rxControlModel.is(), "need model" ); - m_aXFormsSubmissions.push_back( - ModelStringPair( _rxControlModel, _rSubmissionID ) ); + m_aXFormsSubmissions.emplace_back( _rxControlModel, _rSubmissionID ); } void OFormLayerXMLImport_Impl::registerCellRangeListSource( const Reference< XPropertySet >& _rxControlModel, const OUString& _rCellRangeAddress ) { OSL_ENSURE( _rxControlModel.is() && !_rCellRangeAddress.isEmpty(), "OFormLayerXMLImport_Impl::registerCellRangeListSource: invalid arguments!" ); - m_aCellRangeListSources.push_back( ModelStringPair( _rxControlModel, _rCellRangeAddress ) ); + m_aCellRangeListSources.emplace_back( _rxControlModel, _rCellRangeAddress ); } const SvXMLStyleContext* OFormLayerXMLImport_Impl::getStyleElement(const OUString& _rStyleName) const { @@ -367,7 +364,7 @@ void OFormLayerXMLImport_Impl::registerControlReferences(const Reference< XPrope { OSL_ENSURE(!_rReferringControls.isEmpty(), "OFormLayerXMLImport_Impl::registerControlReferences: invalid (empty) control id list!"); OSL_ENSURE(_rxControl.is(), "OFormLayerXMLImport_Impl::registerControlReferences: invalid (NULL) control!"); - m_aControlReferences.push_back( ModelStringPair( _rxControl, _rReferringControls ) ); + m_aControlReferences.emplace_back( _rxControl, _rReferringControls ); } void OFormLayerXMLImport_Impl::startPage(const Reference< XDrawPage >& _rxDrawPage) diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx index c0c10e0247a8..2528d717d424 100644 --- a/xmloff/source/meta/xmlmetae.cxx +++ b/xmloff/source/meta/xmlmetae.cxx @@ -381,8 +381,8 @@ SvXMLMetaExport::startElement(const OUString & i_rName, } } if (!found) { - m_preservedNSs.push_back(beans::StringPair(name, - i_xAttribs->getValueByIndex(i))); + m_preservedNSs.emplace_back(name, + i_xAttribs->getValueByIndex(i)); } } } diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index d5bce493255a..b49c5dedceeb 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -56,7 +56,7 @@ static void lcl_RemoveStateIfZero16( XMLPropertyState* pState ) static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int32 nIndex, const OUString& rProperty, const uno::Reference< beans::XPropertySet >& xProps) { if(::cppu::any2bool(xProps->getPropertyValue(rProperty))) - rPropState.push_back(XMLPropertyState (nIndex, css::uno::Any(true))); + rPropState.emplace_back(nIndex, css::uno::Any(true)); } // helper struct to handle equal XMLPropertyState's for page, header and footer diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index d2fd6834811f..085380c48f1d 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -207,7 +207,7 @@ FilterPropertiesInfo_Impl::FilterPropertiesInfo_Impl() : void FilterPropertiesInfo_Impl::AddProperty( const OUString& rApiName, const sal_uInt32 nIndex) { - aPropInfos.push_back(FilterPropertyInfo_Impl(rApiName, nIndex)); + aPropInfos.emplace_back(rApiName, nIndex); nCount++; OSL_ENSURE( !pApiNames, "performance warning: API names already retrieved" ); diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index ca87054c25ac..da6526da54b8 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -587,7 +587,7 @@ void SvXMLImportPropertyMapper::PrepareForMultiPropertySet_( (rPropSetInfo.is() && rPropSetInfo->hasPropertyByName( rPropName )) ) ) { // save property into property pair structure - aPropertyPairs.push_back( PropertyPair( &rPropName, &rProp.maValue ) ); + aPropertyPairs.emplace_back( &rPropName, &rProp.maValue ); } // handle no-property and special items diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 6a3d997f8fe5..4d5b7c93d7a3 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -399,7 +399,7 @@ void SvXMLNumImpData::AddKey( sal_uInt32 nKey, const OUString& rName, bool bRemo SetUsed( nKey ); } - m_NameEntries.push_back(SvXMLNumFmtEntry(rName, nKey, bRemoveAfterUse)); + m_NameEntries.emplace_back(rName, nKey, bRemoveAfterUse); } void SvXMLNumImpData::SetUsed( sal_uInt32 nKey ) diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 40014f2c6bbe..d51efb52b36f 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -276,7 +276,7 @@ SvXMLStylesContext_Impl::SvXMLStylesContext_Impl( bool bAuto ) : inline void SvXMLStylesContext_Impl::AddStyle( SvXMLStyleContext *pStyle ) { - aStyles.push_back( pStyle ); + aStyles.emplace_back(pStyle ); FlushIndex(); } diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 2e8837c88da7..d54478f0b473 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -2647,7 +2647,7 @@ void XMLTextImportHelper::addFieldParam( const OUString& name, const OUString& v assert(!m_xImpl->m_FieldStack.empty()); if (!m_xImpl->m_FieldStack.empty()) { Impl::field_stack_item_t & FieldStackItem(m_xImpl->m_FieldStack.top()); - FieldStackItem.second.push_back(Impl::field_param_t( name, value )); + FieldStackItem.second.emplace_back( name, value ); } } diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index 25ff8ec94f11..ff57fbe0f601 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -349,8 +349,8 @@ XMLTextListsHelper::EnsureNumberedParagraph( if ( rNPList.empty() ) { // create default list style for top level sal_Int16 lev(0); - rNPList.push_back(::std::make_pair(none, - MakeNumRule(i_rImport, nullptr, none, none, lev) )); + rNPList.emplace_back(none, + MakeNumRule(i_rImport, nullptr, none, none, lev) ); } // create num rule first because this might clamp the level... uno::Reference<container::XIndexReplace> xNumRules; |