oox/source/core/filterdetect.cxx | 2 oox/source/core/recordparser.cxx | 2 oox/source/drawingml/chart/titleconverter.cxx | 2 oox/source/drawingml/clrscheme.cxx | 2 oox/source/drawingml/color.cxx | 8 +-- oox/source/drawingml/diagram/datamodelcontext.cxx | 4 - oox/source/drawingml/diagram/diagram.cxx | 5 -- oox/source/drawingml/linepropertiescontext.cxx | 2 oox/source/drawingml/textfield.cxx | 12 ++--- oox/source/dump/dffdumper.cxx | 2 oox/source/dump/dumperbase.cxx | 4 - oox/source/dump/oledumper.cxx | 14 +++--- oox/source/export/chartexport.cxx | 8 +-- oox/source/export/shapes.cxx | 4 - oox/source/mathml/importutils.cxx | 6 +- oox/source/ole/axcontrol.cxx | 2 oox/source/ppt/conditioncontext.cxx | 2 oox/source/ppt/slidefragmenthandler.cxx | 2 oox/source/vml/vmlformatting.cxx | 46 +++++++++++----------- oox/source/vml/vmlshape.cxx | 28 ++++++------- oox/source/vml/vmlshapecontext.cxx | 2 oox/source/vml/vmltextbox.cxx | 2 package/source/manifest/ManifestImport.cxx | 4 - package/source/xstor/ohierarchyholder.cxx | 2 package/source/xstor/xstorage.cxx | 4 - postprocess/qa/services.cxx | 14 ++---- reportdesign/source/filter/xml/xmlExport.cxx | 18 ++++---- reportdesign/source/ui/dlg/GroupsSorting.cxx | 2 reportdesign/source/ui/misc/RptUndo.cxx | 2 reportdesign/source/ui/report/ReportSection.cxx | 2 sax/qa/cppunit/xmlimport.cxx | 4 - sax/source/tools/fastattribs.cxx | 4 - sax/source/tools/fshelper.cxx | 4 - 33 files changed, 109 insertions(+), 112 deletions(-)
New commits: commit 65e293f524437a548b6c099bbe6099b56957063c Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Sep 11 16:43:19 2017 +0200 clang-tidy modernize-use-emplace in package..sax Change-Id: Ibc0258fd79df987a0e295552bcc5bf89ee12007a Reviewed-on: https://gerrit.libreoffice.org/42173 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx index bfde6aa3cb2c..3868be460c41 100644 --- a/package/source/manifest/ManifestImport.cxx +++ b/package/source/manifest/ManifestImport.cxx @@ -351,7 +351,7 @@ OUString ManifestImport::PushNameAndNamespaces( const OUString& aName, const uno aNamespaces[aNsName] = aAttrValue; } else { // this is no namespace declaration - aAttribsStrs.push_back( pair< OUString, OUString >( aAttrName, aAttrValue ) ); + aAttribsStrs.emplace_back( aAttrName, aAttrValue ); } } } @@ -360,7 +360,7 @@ OUString ManifestImport::PushNameAndNamespaces( const OUString& aName, const uno if ( !aConvertedName.getLength() ) aConvertedName = ConvertName( aName ); - aStack.push_back( ManifestScopeEntry( aConvertedName, aNamespaces ) ); + aStack.emplace_back( aConvertedName, aNamespaces ); for (const std::pair<OUString,OUString> & rAttribsStr : aAttribsStrs) { // convert the attribute names on filling diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx index 96a079e5ccd5..c07c7740c502 100644 --- a/package/source/xstor/ohierarchyholder.cxx +++ b/package/source/xstor/ohierarchyholder.cxx @@ -123,7 +123,7 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea xStreamComp->addEventListener( static_cast< lang::XEventListener* >( this ) ); } - m_aOpenStreams.push_back( uno::WeakReference< embed::XExtendedStorageStream >( xResult ) ); + m_aOpenStreams.emplace_back( xResult ); } else { diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 79b239588c77..06c5ec31ae4e 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -375,7 +375,7 @@ void OStorage_Impl::SetReadOnlyWrap( OStorage& aStorage ) { // Weak reference is used inside the holder so the refcount must not be zero at this point OSL_ENSURE( aStorage.GetRefCount_Impl(), "There must be a reference alive to use this method!" ); - m_aReadOnlyWrapVector.push_back( StorageHolder_Impl( &aStorage ) ); + m_aReadOnlyWrapVector.emplace_back( &aStorage ); } void OStorage_Impl::RemoveReadOnlyWrap( OStorage& aStorage ) @@ -2042,7 +2042,7 @@ void OStorage::MakeLinkToSubComponent_Impl( const uno::Reference< lang::XCompone xComponent->addEventListener( uno::Reference< lang::XEventListener >( static_cast< ::cppu::OWeakObject* >(m_pData->m_pSubElDispListener.get()), uno::UNO_QUERY)); - m_pData->m_aOpenSubComponentsVector.push_back( xComponent ); + m_pData->m_aOpenSubComponentsVector.emplace_back(xComponent ); } // XInterface diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx index 9616a4a1dc44..0ab677339d9d 100644 --- a/postprocess/qa/services.cxx +++ b/postprocess/qa/services.cxx @@ -126,11 +126,11 @@ void Test::test() { // ImplBorderWindow::ImplInit -> Window::ImplInit -> // WinSalInstance::CreateFrame -> ImplSendMessage -> SendMessageW): std::vector<OUString> blacklist; - blacklist.push_back("com.sun.star.comp.report.OReportDefinition"); + blacklist.emplace_back("com.sun.star.comp.report.OReportDefinition"); // <https://bugs.documentfoundation.org/show_bug.cgi?id=89343> // "~SwXMailMerge() goes into endless SwCache::Check()": - blacklist.push_back("SwXMailMerge"); + blacklist.emplace_back("SwXMailMerge"); css::uno::Reference<css::container::XContentEnumerationAccess> enumAcc( m_xContext->getServiceManager(), css::uno::UNO_QUERY_THROW); @@ -168,9 +168,8 @@ void Test::test() { css::uno::UNO_SET_THROW); std::vector<css::uno::Reference<css::lang::XServiceInfo>> serviceImpls2; while (serviceImpls1->hasMoreElements()) { - serviceImpls2.push_back( - css::uno::Reference<css::lang::XServiceInfo>( - serviceImpls1->nextElement(), css::uno::UNO_QUERY_THROW)); + serviceImpls2.emplace_back( + serviceImpls1->nextElement(), css::uno::UNO_QUERY_THROW); } css::uno::Reference<css::reflection::XServiceTypeDescription2> desc; if (typeMgr->hasByHierarchicalName(serviceNames[i])) { @@ -234,10 +233,9 @@ void Test::test() { ctors(desc->getConstructors()); for (sal_Int32 l = 0; l != ctors.getLength(); ++l) { if (!ctors[l]->getParameters().hasElements()) { - k->second.constructors.push_back( - Constructor( + k->second.constructors.emplace_back( serviceNames[i], - ctors[l]->isDefaultConstructor())); + ctors[l]->isDefaultConstructor()); break; } } diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index f7345aa0118f..a08b4cce1779 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -498,7 +498,7 @@ void lcl_calculate(const ::std::vector<sal_Int32>& _aPosX,const ::std::vector<sa void ORptExport::collectStyleNames(sal_Int32 _nFamily,const ::std::vector< sal_Int32>& _aSize, ORptExport::TStringVec& _rStyleNames) { ::std::vector< XMLPropertyState > aPropertyStates; - aPropertyStates.push_back(XMLPropertyState(0)); + aPropertyStates.emplace_back(0); ::std::vector<sal_Int32>::const_iterator aIter = _aSize.begin(); ::std::vector<sal_Int32>::const_iterator aIter2 = aIter + 1; ::std::vector<sal_Int32>::const_iterator aEnd = _aSize.end(); @@ -1155,15 +1155,15 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted if ( !aPos.X ) { sBorderProp = PROPERTY_BORDERLEFT; - aProps.push_back(PROPERTY_BORDERRIGHT); + aProps.emplace_back(PROPERTY_BORDERRIGHT); } else { sBorderProp = PROPERTY_BORDERRIGHT; - aProps.push_back(PROPERTY_BORDERLEFT); + aProps.emplace_back(PROPERTY_BORDERLEFT); } - aProps.push_back(PROPERTY_BORDERTOP); - aProps.push_back(PROPERTY_BORDERBOTTOM); + aProps.emplace_back(PROPERTY_BORDERTOP); + aProps.emplace_back(PROPERTY_BORDERBOTTOM); } else // horizontal { @@ -1171,15 +1171,15 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted if ( (aPos.Y + aSize.Height) == nSectionHeight ) { sBorderProp = PROPERTY_BORDERBOTTOM; - aProps.push_back(PROPERTY_BORDERTOP); + aProps.emplace_back(PROPERTY_BORDERTOP); } else { sBorderProp = PROPERTY_BORDERTOP; - aProps.push_back(PROPERTY_BORDERBOTTOM); + aProps.emplace_back(PROPERTY_BORDERBOTTOM); } - aProps.push_back(PROPERTY_BORDERRIGHT); - aProps.push_back(PROPERTY_BORDERLEFT); + aProps.emplace_back(PROPERTY_BORDERRIGHT); + aProps.emplace_back(PROPERTY_BORDERLEFT); } xBorderProp->setPropertyValue(sBorderProp,uno::makeAny(aValue)); diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index 77f2eaa8ba12..3ffff9305280 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -68,7 +68,7 @@ using namespace ::comphelper; OUString sLabel; if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) ) xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel; - o_aColumnList.push_back( ColumnInfo(*pEntries,sLabel) ); + o_aColumnList.emplace_back(*pEntries,sLabel ); if ( !sLabel.isEmpty() ) _rListBox.InsertEntry( sLabel ); else diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx index dec9f097b337..2c5b9697997e 100644 --- a/reportdesign/source/ui/misc/RptUndo.cxx +++ b/reportdesign/source/ui/misc/RptUndo.cxx @@ -163,7 +163,7 @@ void OSectionUndo::collectControls(const uno::Reference< report::XSection >& _xS for(;pIter != pEnd;++pIter) { if ( 0 == (pIter->Attributes & beans::PropertyAttribute::READONLY) ) - m_aValues.push_back(::std::pair< OUString ,uno::Any>(pIter->Name,_xSection->getPropertyValue(pIter->Name))); + m_aValues.emplace_back(pIter->Name,_xSection->getPropertyValue(pIter->Name)); } lcl_collectElements(_xSection,m_aControls); } diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index feeb8eb09903..81eab1451313 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -359,7 +359,7 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb try { SdrObject* pNewObj = pSdrObject->Clone(); - aCopies.push_back(uno::Reference<report::XReportComponent>(pNewObj->getUnoShape(),uno::UNO_QUERY)); + aCopies.emplace_back(pNewObj->getUnoShape(),uno::UNO_QUERY); if ( _bEraseAnddNoClone ) { m_pView->AddUndo( rUndo.CreateUndoDeleteObject( *pSdrObject ) ); diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx index 543de556b8e8..efaab5fabbc6 100644 --- a/sax/qa/cppunit/xmlimport.cxx +++ b/sax/qa/cppunit/xmlimport.cxx @@ -105,9 +105,9 @@ OUString TestDocumentHandler::canonicalform(const OUString &sName, const OUStrin { m_aCountStack.top() += 1; if ( nIndex < 0 ) - m_aNamespaceStack.push_back( make_pair( OUString( "default" ), sValue ) ); + m_aNamespaceStack.emplace_back( OUString( "default" ), sValue ); else - m_aNamespaceStack.push_back( make_pair( sName.copy( nIndex + 1 ), sValue ) ); + m_aNamespaceStack.emplace_back( sName.copy( nIndex + 1 ), sValue ); } else { diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx index 314f156e8dfe..2416a3bb42c7 100644 --- a/sax/source/tools/fastattribs.cxx +++ b/sax/source/tools/fastattribs.cxx @@ -110,12 +110,12 @@ void FastAttributeList::addNS( sal_Int32 nNamespaceToken, sal_Int32 nToken, cons void FastAttributeList::addUnknown( const OUString& rNamespaceURL, const OString& rName, const OString& value ) { - maUnknownAttributes.push_back( UnknownAttribute( rNamespaceURL, rName, value ) ); + maUnknownAttributes.emplace_back( rNamespaceURL, rName, value ); } void FastAttributeList::addUnknown( const OString& rName, const OString& value ) { - maUnknownAttributes.push_back( UnknownAttribute( rName, value ) ); + maUnknownAttributes.emplace_back( rName, value ); } // XFastAttributeList diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 1229a8689c29..3875f54df6ca 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -46,11 +46,11 @@ void FastSerializerHelper::startElement(sal_Int32 elementTokenId, FSEND_t) } void FastSerializerHelper::pushAttributeValue(sal_Int32 attribute, const char* value) { - mpSerializer->getTokenValueList().push_back(TokenValue(attribute, value)); + mpSerializer->getTokenValueList().emplace_back(attribute, value); } void FastSerializerHelper::pushAttributeValue(sal_Int32 attribute, const OString& value) { - mpSerializer->getTokenValueList().push_back(TokenValue(attribute, value.getStr())); + mpSerializer->getTokenValueList().emplace_back(attribute, value.getStr()); } void FastSerializerHelper::singleElement(sal_Int32 elementTokenId, FSEND_t) { commit baa5f32c21185025b64c01fc589c69961528b0c5 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Sep 11 16:41:56 2017 +0200 clang-tidy modernize-use-emplace in oox Change-Id: I9ea063b7f6c63ae1ad039859efeebb292d44c6e2 Reviewed-on: https://gerrit.libreoffice.org/42172 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 24e47c1ca7c2..1770a6aca440 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -327,7 +327,7 @@ Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescript feature with password. Try this first before prompting the user for a password. */ std::vector<OUString> aDefaultPasswords; - aDefaultPasswords.push_back("VelvetSweatshop"); + aDefaultPasswords.emplace_back("VelvetSweatshop"); /* Use the comphelper password helper to request a password. This helper returns either with the correct password diff --git a/oox/source/core/recordparser.cxx b/oox/source/core/recordparser.cxx index ebcd3a8cef29..0f6e463d693d 100644 --- a/oox/source/core/recordparser.cxx +++ b/oox/source/core/recordparser.cxx @@ -137,7 +137,7 @@ void ContextStack::pushContext( const RecordInfo& rRecInfo, const ContextHandler { OSL_ENSURE( (rRecInfo.mnEndRecId >= 0) || maStack.empty() || hasCurrentEndRecId(), "ContextStack::pushContext - nested incomplete context record identifiers" ); - maStack.push_back( ContextInfo( rRecInfo, rxContext ) ); + maStack.emplace_back( rRecInfo, rxContext ); } void ContextStack::popContext() diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index 8586ccbbc339..6237e39ba0b3 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -124,7 +124,7 @@ Reference< XFormattedString > TextConverter::appendFormattedString( { xFmtStr = FormattedString::create( ConverterRoot::getComponentContext() ); xFmtStr->setString( bAddNewLine ? (rString + "\n") : rString ); - orStringVec.push_back( xFmtStr ); + orStringVec.emplace_back(xFmtStr ); } catch( Exception& ) { diff --git a/oox/source/drawingml/clrscheme.cxx b/oox/source/drawingml/clrscheme.cxx index 2f8e93701e97..8447f6e7a5a1 100644 --- a/oox/source/drawingml/clrscheme.cxx +++ b/oox/source/drawingml/clrscheme.cxx @@ -82,7 +82,7 @@ bool ClrScheme::getColor( sal_Int32 nSchemeClrToken, sal_Int32& rColor ) const void ClrScheme::setColor( sal_Int32 nSchemeClrToken, sal_Int32 nColor ) { - maClrScheme.push_back(std::pair<sal_Int32, sal_Int32>(nSchemeClrToken, nColor)); + maClrScheme.emplace_back(nSchemeClrToken, nColor); } bool ClrScheme::getColorByIndex(size_t nIndex, sal_Int32& rColor) const diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx index 8470c4a0f182..4629c6ab63b7 100644 --- a/oox/source/drawingml/color.cxx +++ b/oox/source/drawingml/color.cxx @@ -295,7 +295,7 @@ void Color::addTransformation( sal_Int32 nElement, sal_Int32 nValue ) case XML_alpha: lclSetValue( mnAlpha, nValue ); break; case XML_alphaMod: lclModValue( mnAlpha, nValue ); break; case XML_alphaOff: lclOffValue( mnAlpha, nValue ); break; - default: maTransforms.push_back( Transformation( nToken, nValue ) ); + default: maTransforms.emplace_back( nToken, nValue ); } sal_Int32 nSize = maInteropTransformations.getLength(); maInteropTransformations.realloc(nSize + 1); @@ -307,15 +307,15 @@ void Color::addChartTintTransformation( double fTint ) { sal_Int32 nValue = getLimitedValue< sal_Int32, double >( fTint * MAX_PERCENT + 0.5, -MAX_PERCENT, MAX_PERCENT ); if( nValue < 0 ) - maTransforms.push_back( Transformation( XML_shade, nValue + MAX_PERCENT ) ); + maTransforms.emplace_back( XML_shade, nValue + MAX_PERCENT ); else if( nValue > 0 ) - maTransforms.push_back( Transformation( XML_tint, MAX_PERCENT - nValue ) ); + maTransforms.emplace_back( XML_tint, MAX_PERCENT - nValue ); } void Color::addExcelTintTransformation( double fTint ) { sal_Int32 nValue = getLimitedValue< sal_Int32, double >( fTint * MAX_PERCENT + 0.5, -MAX_PERCENT, MAX_PERCENT ); - maTransforms.push_back( Transformation( XLS_TOKEN( tint ), nValue ) ); + maTransforms.emplace_back( XLS_TOKEN( tint ), nValue ); } void Color::clearTransformations() diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx b/oox/source/drawingml/diagram/datamodelcontext.cxx index 2c5f8f97784f..7846a94216a5 100644 --- a/oox/source/drawingml/diagram/datamodelcontext.cxx +++ b/oox/source/drawingml/diagram/datamodelcontext.cxx @@ -51,7 +51,7 @@ public: { case DGM_TOKEN( cxn ): { - mrConnection.push_back( dgm::Connection() ); + mrConnection.emplace_back( ); dgm::Connection& rConnection=mrConnection.back(); rConnection.mnType = rAttribs.getToken( XML_type, XML_parOf ); @@ -266,7 +266,7 @@ public: case DGM_TOKEN( pt ): { // CT_Pt - mrPoints.push_back( dgm::Point() ); + mrPoints.emplace_back( ); return new PtContext( *this, rAttribs, mrPoints.back() ); } default: diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 5d060799caab..4ddbc20630bc 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -277,9 +277,8 @@ void Diagram::build( ) if( aCurrCxn->mnType == XML_presOf ) { DiagramData::StringMap::value_type::second_type& rVec=getData()->getPresOfNameMap()[aCurrCxn->msDestId]; - rVec.push_back( - std::make_pair( - aCurrCxn->msSourceId,sal_Int32(0))); + rVec.emplace_back( + aCurrCxn->msSourceId,sal_Int32(0)); } ++aCurrCxn; diff --git a/oox/source/drawingml/linepropertiescontext.cxx b/oox/source/drawingml/linepropertiescontext.cxx index 17180a7dc216..dc4a941a8096 100644 --- a/oox/source/drawingml/linepropertiescontext.cxx +++ b/oox/source/drawingml/linepropertiescontext.cxx @@ -109,7 +109,7 @@ ContextHandlerRef LinePropertiesContext::onCreateContext( sal_Int32 nElement, co nSp = rAttribs.getInteger( XML_sp, 0 ); } - mrLineProperties.maCustomDash.push_back( LineProperties::DashStop( nDash, nSp ) ); + mrLineProperties.maCustomDash.emplace_back( nDash, nSp ); } break; diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx index df3be9cf4a9d..2a3527779e41 100644 --- a/oox/source/drawingml/textfield.cxx +++ b/oox/source/drawingml/textfield.cxx @@ -69,7 +69,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields, int idx = p.toInt32(); sal_uInt16 nNumFmt; xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" ); - aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) ); + aFields.emplace_back( xIface, UNO_QUERY ); Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW ); // here we should format the field properly. waiting after #i81091. @@ -136,17 +136,17 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields, else if ( sType == "slidenum" ) { xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageNumber" ); - aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) ); + aFields.emplace_back( xIface, UNO_QUERY ); } else if ( sType == "slidecount" ) { xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageCount" ); - aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) ); + aFields.emplace_back( xIface, UNO_QUERY ); } else if ( sType == "slidename" ) { xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageName" ); - aFields.push_back( Reference< XTextField > ( xIface, uno::UNO_QUERY ) ); + aFields.emplace_back( xIface, uno::UNO_QUERY ); } else if ( sType.startsWith("file") ) { @@ -154,7 +154,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields, OString p( s.pData->buffer + 4 ); int idx = p.toInt32(); xIface = xFactory->createInstance( "com.sun.star.text.TextField.FileName" ); - aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) ); + aFields.emplace_back( xIface, UNO_QUERY ); Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW ); switch( idx ) @@ -175,7 +175,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields, else if( sType == "author" ) { xIface = xFactory->createInstance( "com.sun.star.text.TextField.Author" ); - aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) ); + aFields.emplace_back( xIface, UNO_QUERY ); } } diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx index abbd96d3b7b1..6c8cb05b3e9c 100644 --- a/oox/source/dump/dffdumper.cxx +++ b/oox/source/dump/dffdumper.cxx @@ -185,7 +185,7 @@ void DffStreamObject::dumpDffOpt() if( getFlag( nPropId, DFF_OPT_COMPLEX ) ) { writeHexItem( "complex-size", nValue, "CONV-DEC" ); - aPropInfos.push_back( PropInfo( String( "property-data" ), PROPTYPE_BINARY, nBaseId, nValue ) ); + aPropInfos.emplace_back( String( "property-data" ), PROPTYPE_BINARY, nBaseId, nValue ); } else { diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 36e9bf1a7c3d..f307f44e4b42 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -1829,13 +1829,13 @@ void StorageObjectBase::implDumpBaseStream( const BinaryInputStreamRef&, const O void StorageObjectBase::addPreferredStream( const String& rStrmName ) { if( rStrmName.has() ) - maPreferred.push_back( PreferredItem( rStrmName, false ) ); + maPreferred.emplace_back( rStrmName, false ); } void StorageObjectBase::addPreferredStorage( const String& rStrgPath ) { if( rStrgPath.has() ) - maPreferred.push_back( PreferredItem( rStrgPath, true ) ); + maPreferred.emplace_back( rStrgPath, true ); } OUString StorageObjectBase::getSysFileName( const OUString& rStrmName, const OUString& rSysOutPath ) diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx index 376b500ce15d..865a318ac0fb 100644 --- a/oox/source/dump/oledumper.cxx +++ b/oox/source/dump/oledumper.cxx @@ -957,19 +957,19 @@ void AxPropertyObjectBase::dumpUnknownProperty() void AxPropertyObjectBase::dumpPosProperty() { if( startNextProperty() ) - maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_POS, getPropertyName(), 8 ) ); + maLargeProps.emplace_back( LargeProperty::PROPTYPE_POS, getPropertyName(), 8 ); } void AxPropertyObjectBase::dumpSizeProperty() { if( startNextProperty() ) - maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_SIZE, getPropertyName(), 8 ) ); + maLargeProps.emplace_back( LargeProperty::PROPTYPE_SIZE, getPropertyName(), 8 ); } void AxPropertyObjectBase::dumpGuidProperty( OUString* pValue ) { if( startNextProperty() ) - maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_GUID, getPropertyName(), 16, pValue ) ); + maLargeProps.emplace_back( LargeProperty::PROPTYPE_GUID, getPropertyName(), 16, pValue ); } void AxPropertyObjectBase::dumpStringProperty( OUString* pValue ) @@ -978,7 +978,7 @@ void AxPropertyObjectBase::dumpStringProperty( OUString* pValue ) { alignInput< sal_uInt32 >(); sal_uInt32 nLen = dumpHex< sal_uInt32 >( getPropertyName(), "AX-STRINGLEN" ); - maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_STRING, getPropertyName(), nLen, pValue ) ); + maLargeProps.emplace_back( LargeProperty::PROPTYPE_STRING, getPropertyName(), nLen, pValue ); } } @@ -988,7 +988,7 @@ void AxPropertyObjectBase::dumpStringArrayProperty() { alignInput< sal_uInt32 >(); sal_uInt32 nLen = dumpHex< sal_uInt32 >( getPropertyName(), "CONV-DEC" ); - maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_STRINGARRAY, getPropertyName(), nLen ) ); + maLargeProps.emplace_back( LargeProperty::PROPTYPE_STRINGARRAY, getPropertyName(), nLen ); } } @@ -998,7 +998,7 @@ void AxPropertyObjectBase::dumpStreamProperty() { alignInput< sal_uInt16 >(); sal_uInt16 nData = dumpHex< sal_uInt16 >( getPropertyName() ); - maStreamProps.push_back( StreamProperty( getPropertyName(), nData ) ); + maStreamProps.emplace_back( getPropertyName(), nData ); } } @@ -1495,7 +1495,7 @@ VbaFormClassInfoObject::VbaFormClassInfoObject( const InputObjectBase& rParent, void VbaFormClassInfoObject::implDumpShortProperties() { - mrFormData.maClassInfoProgIds.push_back( OUString() ); + mrFormData.maClassInfoProgIds.emplace_back( ); dumpGuidProperty( &mrFormData.maClassInfoProgIds.back() ); dumpGuidProperty(); dumpUnknownProperty(); diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index f0536a1cbfaf..60bdc4d8c6c7 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1540,7 +1540,7 @@ std::vector<Sequence<Reference<chart2::XDataSeries> > > splitDataSeriesByAxis(co auto it = aMapAxisToIndex.find(nAxisIndex); if (it == aMapAxisToIndex.end()) { - aSplitSeries.push_back(Sequence<Reference<chart2::XDataSeries> >()); + aSplitSeries.emplace_back(); nVectorPos = aSplitSeries.size() - 1; aMapAxisToIndex.insert(std::pair<sal_Int32, size_t>(nAxisIndex, nVectorPos)); } @@ -3075,8 +3075,8 @@ void ChartExport::exportAxesId(bool bPrimaryAxes) sal_Int32 nAxisIdy = lcl_generateRandomValue(); AxesType eXAxis = bPrimaryAxes ? AXIS_PRIMARY_X : AXIS_SECONDARY_X; AxesType eYAxis = bPrimaryAxes ? AXIS_PRIMARY_Y : AXIS_SECONDARY_Y; - maAxes.push_back( AxisIdPair( eXAxis, nAxisIdx, nAxisIdy ) ); - maAxes.push_back( AxisIdPair( eYAxis, nAxisIdy, nAxisIdx ) ); + maAxes.emplace_back( eXAxis, nAxisIdx, nAxisIdy ); + maAxes.emplace_back( eYAxis, nAxisIdy, nAxisIdx ); FSHelperPtr pFS = GetFS(); pFS->singleElement( FSNS( XML_c, XML_axId ), XML_val, I32S( nAxisIdx ), @@ -3090,7 +3090,7 @@ void ChartExport::exportAxesId(bool bPrimaryAxes) if( isDeep3dChart() ) { nAxisIdz = lcl_generateRandomValue(); - maAxes.push_back( AxisIdPair( AXIS_PRIMARY_Z, nAxisIdz, nAxisIdy ) ); + maAxes.emplace_back( AXIS_PRIMARY_Z, nAxisIdz, nAxisIdy ); } pFS->singleElement( FSNS( XML_c, XML_axId ), XML_val, I32S( nAxisIdz ), diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 990525681c49..955f15894dfa 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -702,14 +702,14 @@ void lcl_AnalyzeHandles( const uno::Sequence<beans::PropertyValues> & rHandles, // For polar handles, nXPosition is radius and nYPosition is angle lcl_GetHandlePosition( nXPosition, aPosition.First , rSeq ); lcl_GetHandlePosition( nYPosition, aPosition.Second, rSeq ); - rHandlePositionList.push_back( std::pair<sal_Int32, sal_Int32> ( nXPosition, nYPosition ) ); + rHandlePositionList.emplace_back( nXPosition, nYPosition ); } } } void lcl_AppendAdjustmentValue( std::vector< std::pair< sal_Int32, sal_Int32> > &rAvList, sal_Int32 nAdjIdx, sal_Int32 nValue ) { - rAvList.push_back( std::pair<sal_Int32, sal_Int32> ( nAdjIdx , nValue ) ); + rAvList.emplace_back( nAdjIdx , nValue ); } sal_Int32 lcl_NormalizeAngle( sal_Int32 nAngle ) diff --git a/oox/source/mathml/importutils.cxx b/oox/source/mathml/importutils.cxx index 77f5ec94b84f..af3efdc8caef 100644 --- a/oox/source/mathml/importutils.cxx +++ b/oox/source/mathml/importutils.cxx @@ -320,17 +320,17 @@ void XmlStream::handleUnexpectedTag() void XmlStreamBuilder::appendOpeningTag( int token, const uno::Reference< xml::sax::XFastAttributeList >& attrs ) { - tags.push_back( Tag( OPENING( token ), attrs )); + tags.emplace_back( OPENING( token ), attrs ); } void XmlStreamBuilder::appendOpeningTag( int token, const AttributeList& attrs ) { - tags.push_back( Tag( OPENING( token ), attrs )); + tags.emplace_back( OPENING( token ), attrs ); } void XmlStreamBuilder::appendClosingTag( int token ) { - tags.push_back( Tag( CLOSING( token ))); + tags.emplace_back( CLOSING( token )); } void XmlStreamBuilder::appendCharacters( const OUString& chars ) diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index 8e2b87634ce4..efe55b582eeb 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -2405,7 +2405,7 @@ bool AxContainerModelBase::importClassTable( BinaryInputStream& rInStrm, AxClass sal_uInt16 nCount = rInStrm.readuInt16(); for( sal_uInt16 nIndex = 0; bValid && (nIndex < nCount); ++nIndex ) { - orClassTable.push_back( OUString() ); + orClassTable.emplace_back( ); AxBinaryPropertyReader aReader( rInStrm ); aReader.readGuidProperty( orClassTable.back() ); aReader.skipGuidProperty(); // source interface GUID diff --git a/oox/source/ppt/conditioncontext.cxx b/oox/source/ppt/conditioncontext.cxx index 2b6aca2c42a3..160dcd047440 100644 --- a/oox/source/ppt/conditioncontext.cxx +++ b/oox/source/ppt/conditioncontext.cxx @@ -172,7 +172,7 @@ namespace oox { namespace ppt { { case PPT_TOKEN( cond ): // add a condition to the list - maConditions.push_back( AnimationCondition() ); + maConditions.emplace_back( ); return new CondContext( *this, rAttribs.getFastAttributeList(), mpNode, maConditions.back() ); default: break; diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx index 9d6fcf16aa99..91772a22ba1b 100644 --- a/oox/source/ppt/slidefragmenthandler.cxx +++ b/oox/source/ppt/slidefragmenthandler.cxx @@ -204,7 +204,7 @@ SlideFragmentHandler::~SlideFragmentHandler() mpSlidePersistPtr->getCommentsList().cmLst.back().setText( getCharVector().back() ); } // insert a new comment in vector commentsList - mpSlidePersistPtr->getCommentsList().cmLst.push_back(Comment()); + mpSlidePersistPtr->getCommentsList().cmLst.emplace_back(); mpSlidePersistPtr->getCommentsList().cmLst.back().setAuthorId(rAttribs.getString(XML_authorId, OUString())); mpSlidePersistPtr->getCommentsList().cmLst.back().setdt(rAttribs.getString(XML_dt, OUString())); mpSlidePersistPtr->getCommentsList().cmLst.back().setidx(rAttribs.getString(XML_idx, OUString())); diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index e2b4583ff7a2..86443dd5c298 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -305,8 +305,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r LINE_REL, LINE_ABS, CLOSE, END, UNSUPPORTED }; VML_State state = START; - rPointLists.push_back( ::std::vector< Point>() ); - rFlagLists.push_back( ::std::vector< PolygonFlags >() ); + rPointLists.emplace_back( ); + rFlagLists.emplace_back( ); for ( sal_Int32 i = 0; i < rPath.getLength(); i++ ) { @@ -340,10 +340,10 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r case MOVE_REL: // 2* params -> param count reset if ( rPointLists.size() > 0 && rPointLists.back().size() > 0 ) { - rPointLists.push_back( ::std::vector< Point >() ); - rFlagLists.push_back( ::std::vector< PolygonFlags >() ); + rPointLists.emplace_back( ); + rFlagLists.emplace_back( ); } - rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) ); + rPointLists.back().emplace_back( aCoordList[ 0 ], aCoordList[ 1 ] ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); nParamCount = 2; @@ -352,21 +352,21 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r case MOVE_ABS: // 2 params -> no param count reset if ( rPointLists.size() > 0 && rPointLists.back().size() > 0 ) { - rPointLists.push_back( ::std::vector< Point >() ); - rFlagLists.push_back( ::std::vector< PolygonFlags >() ); + rPointLists.emplace_back( ); + rFlagLists.emplace_back( ); } - rPointLists.back().push_back( Point( (aCoordList[ 0 ]), (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) ) ); + rPointLists.back().emplace_back( (aCoordList[ 0 ]), (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); break; case BEZIER_REL: // 6* params -> param count reset - rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 0 ], - aCurrentPoint.Y + aCoordList[ 1 ] ) ); - rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 2 ], - aCurrentPoint.Y + aCoordList[ 3 ] ) ); - rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 4 ], - aCurrentPoint.Y + aCoordList[ 5 ] ) ); + rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 0 ], + aCurrentPoint.Y + aCoordList[ 1 ] ); + rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 2 ], + aCurrentPoint.Y + aCoordList[ 3 ] ); + rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 4 ], + aCurrentPoint.Y + aCoordList[ 5 ] ); rFlagLists.back().push_back( PolygonFlags_CONTROL ); rFlagLists.back().push_back( PolygonFlags_CONTROL ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); @@ -375,9 +375,9 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r break; case BEZIER_ABS: // 6* params -> param count reset - rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) ); - rPointLists.back().push_back( Point( aCoordList[ 2 ], aCoordList[ 3 ] ) ); - rPointLists.back().push_back( Point( aCoordList[ 4 ], aCoordList[ 5 ] ) ); + rPointLists.back().emplace_back( aCoordList[ 0 ], aCoordList[ 1 ] ); + rPointLists.back().emplace_back( aCoordList[ 2 ], aCoordList[ 3 ] ); + rPointLists.back().emplace_back( aCoordList[ 4 ], aCoordList[ 5 ] ); rFlagLists.back().push_back( PolygonFlags_CONTROL ); rFlagLists.back().push_back( PolygonFlags_CONTROL ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); @@ -386,15 +386,15 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r break; case LINE_REL: // 2* params -> param count reset - rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 0 ], - aCurrentPoint.Y + aCoordList[ 1 ] ) ); + rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 0 ], + aCurrentPoint.Y + aCoordList[ 1 ] ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); nParamCount = 2; break; case LINE_ABS: // 2* params -> param count reset - rPointLists.back().push_back( Point( aCoordList[ 0 ], (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) ) ); + rPointLists.back().emplace_back( aCoordList[ 0 ], (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) ); rFlagLists.back().push_back( PolygonFlags_NORMAL ); aCurrentPoint = rPointLists.back().back(); nParamCount = 2; @@ -411,8 +411,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r break; case END: // 0 param - rPointLists.push_back( ::std::vector< Point >() ); - rFlagLists.push_back( ::std::vector< PolygonFlags >() ); + rPointLists.emplace_back( ); + rFlagLists.emplace_back( ); break; case START: @@ -559,7 +559,7 @@ void lclGetDmlLineDash( OptValue< sal_Int32 >& oroPresetDash, LineProperties::Da aValues.push_back( rDashStyle.getToken( 0, ' ', nIndex ).toInt32() ); size_t nPairs = aValues.size() / 2; // ignore last value if size is odd for( size_t nPairIdx = 0; nPairIdx < nPairs; ++nPairIdx ) - orCustomDash.push_back( LineProperties::DashStop( aValues[ 2 * nPairIdx ], aValues[ 2 * nPairIdx + 1 ] ) ); + orCustomDash.emplace_back( aValues[ 2 * nPairIdx ], aValues[ 2 * nPairIdx + 1 ] ); } } } diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index d6a14caf16b5..420b92f595cc 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -1019,25 +1019,25 @@ Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes // Curve defined by to, from, control1 and control2 attributes if ( maShapeModel.maVmlPath.isEmpty() ) { - aCoordLists.push_back( ::std::vector< awt::Point >() ); - aFlagLists.push_back( ::std::vector< PolygonFlags >() ); + aCoordLists.emplace_back( ); + aFlagLists.emplace_back( ); // Start point - aCoordLists[ 0 ].push_back( - awt::Point(ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maFrom.getToken( 0, ',', nIndex ), 0, true, true ), - ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maFrom.getToken( 0, ',', nIndex ), 0, false, true ) ) ); + aCoordLists[ 0 ].emplace_back( + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maFrom.getToken( 0, ',', nIndex ), 0, true, true ), + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maFrom.getToken( 0, ',', nIndex ), 0, false, true ) ); // Control point 1 - aCoordLists[ 0 ].push_back( - awt::Point( ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl1.getToken( 0, ',', nIndex ), 0, true, true ), - ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl1.getToken( 0, ',', nIndex ), 0, false, true ) ) ); + aCoordLists[ 0 ].emplace_back( + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl1.getToken( 0, ',', nIndex ), 0, true, true ), + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl1.getToken( 0, ',', nIndex ), 0, false, true ) ); // Control point 2 - aCoordLists[ 0 ].push_back( - awt::Point( ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl2.getToken( 0, ',', nIndex ), 0, true, true ), - ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl2.getToken( 0, ',', nIndex ), 0, false, true ) ) ); + aCoordLists[ 0 ].emplace_back( + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl2.getToken( 0, ',', nIndex ), 0, true, true ), + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl2.getToken( 0, ',', nIndex ), 0, false, true ) ); // End point - aCoordLists[ 0 ].push_back( - awt::Point( ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maTo.getToken( 0, ',', nIndex ), 0, true, true ), - ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maTo.getToken( 0, ',', nIndex ), 0, false, true ) ) ); + aCoordLists[ 0 ].emplace_back( + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maTo.getToken( 0, ',', nIndex ), 0, true, true ), + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maTo.getToken( 0, ',', nIndex ), 0, false, true ) ); // First and last points are normals, points 2 and 4 are controls aFlagLists[ 0 ].resize( aCoordLists[ 0 ].size(), PolygonFlags_CONTROL ); diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index 4ddd8c5d8e0a..84185d40ecfd 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -501,7 +501,7 @@ void ShapeContext::setPoints( const OUString& rPoints ) { sal_Int32 nX = rPoints.getToken( 0, ',', nIndex ).toInt32(); sal_Int32 nY = rPoints.getToken( 0, ',', nIndex ).toInt32(); - mrShapeModel.maPoints.push_back( awt::Point( nX, nY ) ); + mrShapeModel.maPoints.emplace_back( nX, nY ); } } diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx index cfa07b0546db..810b7fd7cc46 100644 --- a/oox/source/vml/vmltextbox.cxx +++ b/oox/source/vml/vmltextbox.cxx @@ -57,7 +57,7 @@ TextBox::TextBox(ShapeTypeModel& rTypeModel) void TextBox::appendPortion( const TextParagraphModel& rParagraph, const TextFontModel& rFont, const OUString& rText ) { - maPortions.push_back( TextPortionModel( rParagraph, rFont, rText ) ); + maPortions.emplace_back( rParagraph, rFont, rText ); } const TextFontModel* TextBox::getFirstFont() const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits