chart2/source/controller/dialogs/DataBrowser.cxx | 4 +-- chart2/source/view/axes/VCartesianAxis.cxx | 2 - comphelper/source/misc/threadpool.cxx | 1 connectivity/source/commontools/TDatabaseMetaDataBase.cxx | 2 - connectivity/source/drivers/firebird/DatabaseMetaData.cxx | 2 - connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx | 4 +-- dbaccess/source/filter/hsqldb/createparser.cxx | 2 - dbaccess/source/ui/relationdesign/RelationTableView.cxx | 2 - drawinglayer/source/primitive2d/shadowprimitive2d.cxx | 6 ++--- drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx | 3 -- emfio/inc/mtftools.hxx | 4 +-- extensions/source/scanner/scanunx.cxx | 2 - framework/source/layoutmanager/toolbarlayoutmanager.cxx | 2 - framework/source/uielement/toolbarmerger.cxx | 3 -- libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx | 2 - lingucomponent/source/languageguessing/simpleguesser.cxx | 3 -- lingucomponent/source/lingutil/lingutil.cxx | 2 - oox/source/ole/vbacontrol.cxx | 2 - oox/source/ppt/customshowlistcontext.cxx | 2 - sc/source/core/data/PivotTableFormatOutput.cxx | 2 - sc/source/core/data/colorscale.cxx | 3 -- sc/source/core/data/dpgroup.cxx | 2 - sc/source/core/opencl/formulagroupcl.cxx | 2 - sc/source/filter/excel/xichart.cxx | 12 +++++----- sc/source/filter/excel/xilink.cxx | 3 -- sc/source/filter/excel/xistyle.cxx | 2 - sc/source/filter/excel/xltoolbar.cxx | 2 - sc/source/ui/xmlsource/xmlsourcedlg.cxx | 2 - sd/source/console/PresenterPaneContainer.cxx | 2 - sd/source/console/PresenterTextView.cxx | 2 - sd/source/core/CustomAnimationEffect.cxx | 2 - sdext/source/pdfimport/tree/pdfiprocessor.cxx | 2 - sfx2/source/control/recentdocsviewitem.cxx | 2 - sfx2/source/control/templatelocalview.cxx | 2 - sfx2/source/doc/objmisc.cxx | 4 +-- slideshow/source/engine/slide/layermanager.cxx | 4 +-- svx/source/table/tablehtmlimporter.cxx | 4 +-- sw/source/core/text/itrform2.cxx | 4 +-- sw/source/core/undo/untbl.cxx | 2 - sw/source/filter/ww8/WW8Sttbf.hxx | 2 - sw/source/filter/ww8/wrtw8esh.cxx | 2 - sw/source/filter/ww8/ww8scan.cxx | 2 - sw/source/uibase/dbui/mmconfigitem.cxx | 2 - sw/source/uibase/shells/drwbassh.cxx | 3 -- sw/source/uibase/shells/textsh2.cxx | 2 - sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 2 - sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx | 4 +-- toolkit/source/awt/animatedimagespeer.cxx | 2 - ucb/source/ucp/webdav-curl/webdavresponseparser.cxx | 2 - unoxml/source/rdf/librdf_repository.cxx | 8 +++--- vcl/source/window/builder.cxx | 2 - vcl/source/window/toolbox2.cxx | 2 - xmloff/source/chart/SchXMLExport.cxx | 2 - xmloff/source/draw/shapeimport.cxx | 4 +-- xmlsecurity/source/helper/xsecctl.cxx | 3 -- xmlsecurity/source/helper/xsecverify.cxx | 2 - 56 files changed, 74 insertions(+), 82 deletions(-)
New commits: commit aa1932f8aa3c8900bc2182d1bfb49913210302f0 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Aug 7 11:59:52 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Aug 7 20:51:34 2025 +0200 this comment doesn't apply anymore Change-Id: Ida3ae43f26f8d7053b0ed58ead93b3099b44703f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189066 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx index 9f13dbe34f91..32b2e00e7d6e 100644 --- a/comphelper/source/misc/threadpool.cxx +++ b/comphelper/source/misc/threadpool.cxx @@ -189,7 +189,6 @@ void ThreadPool::shutdownLocked(std::unique_lock<std::mutex>& aGuard) } assert( maTasks.empty() ); - // coverity[missing_lock] - on purpose mbTerminate = true; maTasksChanged.notify_all(); commit b1ec05b4b1928433cd8c9130b0ae78ba62269537 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Aug 7 08:35:00 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Aug 7 20:51:26 2025 +0200 cid#1662031 Variable copied when it could be moved and cid#1660225 Variable copied when it could be moved cid#1660211 Variable copied when it could be moved cid#1660185 Variable copied when it could be moved cid#1660173 Variable copied when it could be moved cid#1660168 Variable copied when it could be moved cid#1660166 Variable copied when it could be moved cid#1660165 Variable copied when it could be moved cid#1660163 Variable copied when it could be moved cid#1660152 Variable copied when it could be moved cid#1660149 Variable copied when it could be moved cid#1660147 Variable copied when it could be moved cid#1660145 Variable copied when it could be moved cid#1660142 Variable copied when it could be moved cid#1660140 Variable copied when it could be moved cid#1660137 Variable copied when it could be moved cid#1660136 Variable copied when it could be moved cid#1660135 Variable copied when it could be moved cid#1660128 Variable copied when it could be moved cid#1660124 Variable copied when it could be moved cid#1660122 Variable copied when it could be moved cid#1660117 Variable copied when it could be moved cid#1660114 Variable copied when it could be moved cid#1660110 Variable copied when it could be moved cid#1660109 Variable copied when it could be moved cid#1660105 Variable copied when it could be moved cid#1660104 Variable copied when it could be moved cid#1660102 Variable copied when it could be moved cid#1660100 Variable copied when it could be moved cid#1660098 Variable copied when it could be moved cid#1660080 Variable copied when it could be moved cid#1660079 Variable copied when it could be moved cid#1660078 Variable copied when it could be moved cid#1660075 Variable copied when it could be moved cid#1660071 Variable copied when it could be moved cid#1660070 Variable copied when it could be moved cid#1660064 Variable copied when it could be moved cid#1660063 Variable copied when it could be moved cid#1660060 Variable copied when it could be moved cid#1660058 Variable copied when it could be moved cid#1660053 Variable copied when it could be moved cid#1660050 Variable copied when it could be moved cid#1660049 Variable copied when it could be moved cid#1660046 Variable copied when it could be moved cid#1660042 Variable copied when it could be moved cid#1660028 Variable copied when it could be moved cid#1660023 Variable copied when it could be moved cid#1660022 Variable copied when it could be moved cid#1660021 Variable copied when it could be moved cid#1660020 Variable copied when it could be moved cid#1660017 Variable copied when it could be moved cid#1660013 Variable copied when it could be moved cid#1660005 Variable copied when it could be moved cid#1660003 Variable copied when it could be moved cid#1659999 Variable copied when it could be moved cid#1659998 Variable copied when it could be moved cid#1659995 Variable copied when it could be moved cid#1659993 Variable copied when it could be moved cid#1659989 Variable copied when it could be moved cid#1659988 Variable copied when it could be moved Change-Id: I2a30c8a2ac8785050d49b98635b0b406535b185a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189056 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index ae07eb5c233d..517ef207ff1f 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -657,7 +657,7 @@ void DataBrowser::RenewTable() spHeader->SetRange( elemHeader.m_nStartColumn + 1, elemHeader.m_nEndColumn + 1 ); spHeader->SetGetFocusHdl( aFocusLink ); spHeader->SetEditChangedHdl( aSeriesHeaderChangedLink ); - m_aSeriesHeaders.push_back( spHeader ); + m_aSeriesHeaders.push_back(std::move(spHeader)); } ImplAdjustHeaderControls(); @@ -1282,7 +1282,7 @@ void DataBrowser::RenewSeriesHeaders() spHeader->SetRange( elemHeader.m_nStartColumn + 1, elemHeader.m_nEndColumn + 1 ); spHeader->SetGetFocusHdl( aFocusLink ); spHeader->SetEditChangedHdl( aSeriesHeaderChangedLink ); - m_aSeriesHeaders.push_back( spHeader ); + m_aSeriesHeaders.push_back(std::move(spHeader)); } ImplAdjustHeaderControls(); diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 81fc3dbee032..d8e284516a24 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -608,7 +608,7 @@ void VCartesianAxis::createAllTickInfosFromComplexCategories( TickInfoArraysType if( nCatIndex + 1.0 >= m_aScale.Maximum ) break; } - rAllTickInfos.push_back(aTickInfoVector); + rAllTickInfos.push_back(std::move(aTickInfoVector)); } } else //bShiftedPosition==false diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index 3ad805e7d3ab..9918c7612903 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -160,7 +160,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) else ++aIter; } - aTypeInfoRows.push_back(aRow); + aTypeInfoRows.push_back(std::move(aRow)); } m_aTypeInfoRows = std::move(aTypeInfoRows); } diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx index ffe22f1ef294..cadf9558cd47 100644 --- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx @@ -1209,7 +1209,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() aRow[12] = new ORowSetValueDecorator(ORowSetValue(false)); // Autoincrement aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale - tmp.push_back(aRow); + tmp.push_back(std::move(aRow)); return tmp; }(); // [-loplugin:redundantfcast] false positive: diff --git a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx index 4da76dbe51f7..27d405c55c6a 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx @@ -641,7 +641,7 @@ Reference<XResultSet> SAL_CALL ODatabaseMetaData::getSchemas() OUString columnStringValue = xRow->getString(i); aRow.push_back(Any(columnStringValue)); } - rRows.push_back(aRow); + rRows.push_back(std::move(aRow)); } lcl_setRows_throw(xResultSet, 1, rRows); @@ -795,7 +795,7 @@ Reference<XResultSet> SAL_CALL ODatabaseMetaData::getColumns(const Any& /*catalo aRow.emplace_back(xRow->getString(12)); // is nullable aRow.emplace_back(sIsNullable); - aRows.push_back(aRow); + aRows.push_back(std::move(aRow)); } lcl_setRows_throw(xResultSet, 1, aRows); return xResultSet; diff --git a/dbaccess/source/filter/hsqldb/createparser.cxx b/dbaccess/source/filter/hsqldb/createparser.cxx index 9fe720095ac3..b93186ddb5c2 100644 --- a/dbaccess/source/filter/hsqldb/createparser.cxx +++ b/dbaccess/source/filter/hsqldb/createparser.cxx @@ -275,7 +275,7 @@ void CreateStmtParser::parseColumnPart(std::u16string_view sColumnPart) lcl_isNullable(sColumnWithoutName), bCaseInsensitive, OUString(lcl_getDefaultValue(sColumnWithoutName))); - m_aColumns.push_back(aColDef); + m_aColumns.push_back(std::move(aColDef)); } } diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index 00c01b8db2ee..a73697858dea 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -299,7 +299,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin VclPtr<OTableWindow> pNewTabWin = createWindow( pNewTabWinData ); if(pNewTabWin->Init()) { - m_pView->getController().getTableWindowData().push_back( pNewTabWinData); + m_pView->getController().getTableWindowData().push_back(std::move(pNewTabWinData)); // when we already have a table with this name insert the full qualified one instead GetTabWinMap()[_rComposedName] = pNewTabWin; diff --git a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx index 6c4a0c8121fa..dddd9cb3f5c5 100644 --- a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx @@ -79,10 +79,10 @@ void ShadowPrimitive2D::getFullyEmbeddedShadowPrimitives(Primitive2DContainer& r return; // create a modifiedColorPrimitive containing the shadow color and the content - const basegfx::BColorModifierSharedPtr aBColorModifier + basegfx::BColorModifierSharedPtr aBColorModifier = std::make_shared<basegfx::BColorModifier_replace>(getShadowColor()); - const Primitive2DReference xRefA( - new ModifiedColorPrimitive2D(Primitive2DContainer(getChildren()), aBColorModifier)); + Primitive2DReference xRefA(new ModifiedColorPrimitive2D(Primitive2DContainer(getChildren()), + std::move(aBColorModifier))); Primitive2DContainer aSequenceB{ xRefA }; // build transformed primitiveVector with shadow offset and add to target diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx index eaa100c41fc5..42e2f9e75b71 100644 --- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx @@ -296,8 +296,7 @@ namespace drawinglayer::primitive3d if(getBuffered3DDecomposition().empty()) { - const Primitive3DContainer aNewSequence(impCreate3DDecomposition()); - const_cast< HatchTexturePrimitive3D* >(this)->maBuffered3DDecomposition = aNewSequence; + const_cast<HatchTexturePrimitive3D*>(this)->maBuffered3DDecomposition = impCreate3DDecomposition(); } return getBuffered3DDecomposition(); diff --git a/emfio/inc/mtftools.hxx b/emfio/inc/mtftools.hxx index f99abab2f1d1..01e5f391099a 100644 --- a/emfio/inc/mtftools.hxx +++ b/emfio/inc/mtftools.hxx @@ -443,8 +443,8 @@ namespace emfio : aPaletteColors(std::vector< Color >{}) {} - WinMtfPalette(const std::vector< Color > rPaletteColors) - : aPaletteColors(rPaletteColors) + WinMtfPalette(std::vector<Color> paletteColors) + : aPaletteColors(std::move(paletteColors)) {} }; diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index 2afc24b3454d..f3ae87ef8ea4 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -220,7 +220,7 @@ Sequence< ScannerContext > ScannerManager::getAvailableScanners() { auto pSaneHolder = std::make_shared<SaneHolder>(); if( Sane::IsSane() ) - rSanes.push_back( pSaneHolder ); + rSanes.push_back(std::move(pSaneHolder)); } if( Sane::IsSane() ) diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 30c36b90eec8..e1d5edc17405 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1979,7 +1979,7 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD nCurrPos = rElement.m_aDockedData.m_aPos.X; SingleRowColumnWindowData aRowColumnWindowData; aRowColumnWindowData.nRowColumn = nCurrPos; - rRowColumnsWindowData.push_back( aRowColumnWindowData ); + rRowColumnsWindowData.push_back(std::move(aRowColumnWindowData)); } // Calc space before an element and store it diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx index 5588ff0522d3..1a61c0533861 100644 --- a/framework/source/uielement/toolbarmerger.cxx +++ b/framework/source/uielement/toolbarmerger.cxx @@ -464,8 +464,7 @@ void ToolBarMerger::MergeItems( { CommandInfo aCmdInfo; aCmdInfo.nId = rItemId; - const CommandToInfoMap::value_type aValue( rItem.aCommandURL, aCmdInfo ); - rCommandMap.insert( aValue ); + rCommandMap.emplace(rItem.aCommandURL, aCmdInfo); } else { diff --git a/libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx b/libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx index 4b304ab895cd..46d6ff5c7da8 100644 --- a/libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx +++ b/libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx @@ -53,7 +53,7 @@ namespace GtvHelpers std::stringstream strstream(*ppCoordinate); T item; strstream >> item; - aRet.push_back(item); + aRet.push_back(std::move(item)); ++ppCoordinate; } g_strfreev(ppCoordinates); diff --git a/lingucomponent/source/languageguessing/simpleguesser.cxx b/lingucomponent/source/languageguessing/simpleguesser.cxx index cec24af8b85c..4d2d669699c6 100644 --- a/lingucomponent/source/languageguessing/simpleguesser.cxx +++ b/lingucomponent/source/languageguessing/simpleguesser.cxx @@ -161,8 +161,7 @@ std::vector<Guess> SimpleGuesser::GetManagedLanguages(const char mask) { std::string langStr = "["; langStr += fp_Name(tables->fprint[i]); - Guess g(langStr.c_str()); - lang.push_back(g); + lang.emplace_back(langStr.c_str()); } } diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx index 21b04520e122..10a69a517fde 100644 --- a/lingucomponent/source/lingutil/lingutil.cxx +++ b/lingucomponent/source/lingutil/lingutil.cxx @@ -134,7 +134,7 @@ static void GetOldStyleDicsInDir( }; else aDicEntry.aLocaleNames = { aLocaleName }; - aRes.push_back( aDicEntry ); + aRes.push_back(std::move(aDicEntry)); } } } diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx index 1160df328d3f..f6b30ee12da9 100644 --- a/oox/source/ole/vbacontrol.cxx +++ b/oox/source/ole/vbacontrol.cxx @@ -645,7 +645,7 @@ void VbaFormControl::finalizeEmbeddedControls() aControlGroups.push_back( xDummyGroup ); OUString aName = aControlNames.generateDummyName(); VbaFormControlRef xDummyControl = std::make_shared<VbaDummyFormControl>( aName ); - xDummyGroup->push_back( xDummyControl ); + xDummyGroup->push_back(std::move(xDummyControl)); } rxOptionGroup = std::make_shared<VbaFormControlVector>(); aControlGroups.push_back( rxOptionGroup ); diff --git a/oox/source/ppt/customshowlistcontext.cxx b/oox/source/ppt/customshowlistcontext.cxx index 5bcd4102cfec..18663e08f055 100644 --- a/oox/source/ppt/customshowlistcontext.cxx +++ b/oox/source/ppt/customshowlistcontext.cxx @@ -55,7 +55,7 @@ CustomShowContext::CustomShowContext( FragmentHandler2 const & rParent, CustomShow aCustomShow; aCustomShow.maCustomShowName = rxAttribs->getOptionalValue( XML_name ); aCustomShow.mnId = rxAttribs->getOptionalValue( XML_id ); - mrCustomShowList.push_back(aCustomShow); + mrCustomShowList.push_back(std::move(aCustomShow)); } ::oox::core::ContextHandlerRef CustomShowContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) diff --git a/sc/source/core/data/PivotTableFormatOutput.cxx b/sc/source/core/data/PivotTableFormatOutput.cxx index c9073d6be07b..2eef2b311e62 100644 --- a/sc/source/core/data/PivotTableFormatOutput.cxx +++ b/sc/source/core/data/PivotTableFormatOutput.cxx @@ -207,7 +207,7 @@ void FormatOutput::prepare(SCTAB nTab, std::vector<ScDPOutLevelData> const& rCol rFormat, aNameResolver); } - maFormatOutputEntries.push_back(aEntry); + maFormatOutputEntries.push_back(std::move(aEntry)); } } } diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 736f2c76582d..6f569fb18bd6 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -1555,8 +1555,7 @@ BitmapEx& ScIconSetFormat::getBitmap(sc::IconSetBitmapMap & rIconSetBitmapMap, return itr->second; BitmapEx aBitmap(sBitmap); - std::pair<OUString, BitmapEx> aPair(sBitmap, aBitmap); - std::pair<std::map<OUString, BitmapEx>::iterator, bool> itrNew = rIconSetBitmapMap.insert(aPair); + auto itrNew = rIconSetBitmapMap.emplace(sBitmap, aBitmap); assert(itrNew.second); return itrNew.first->second; diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx index 31cc61eed125..97f38e5a7d8e 100644 --- a/sc/source/core/data/dpgroup.cxx +++ b/sc/source/core/data/dpgroup.cxx @@ -741,7 +741,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio pGrpItem->FillGroupFilter(*pGrpFilter); } - aNewCriteria.push_back(aCri); + aNewCriteria.push_back(std::move(aCri)); } } } diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 1a88b55c961c..38b49abdeb76 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -2789,7 +2789,7 @@ std::shared_ptr<DynamicKernel> DynamicKernel::create( const ScCalcConfig& rConfi { FormulaTreeNodeRef pChildTreeNode = std::make_shared<FormulaTreeNode>(pTempFormula); - pCurNode->Children.push_back(pChildTreeNode); + pCurNode->Children.push_back(std::move(pChildTreeNode)); } } std::reverse(pCurNode->Children.begin(), pCurNode->Children.end()); diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 087e57d4bbdd..ccb003e388c6 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -3692,9 +3692,9 @@ void XclImpChAxesSet::ReadChAxis( XclImpStream& rStrm ) switch( xAxis->GetAxisType() ) { - case EXC_CHAXIS_X: mxXAxis = xAxis; break; - case EXC_CHAXIS_Y: mxYAxis = xAxis; break; - case EXC_CHAXIS_Z: mxZAxis = xAxis; break; + case EXC_CHAXIS_X: mxXAxis = std::move(xAxis); break; + case EXC_CHAXIS_Y: mxYAxis = std::move(xAxis); break; + case EXC_CHAXIS_Z: mxZAxis = std::move(xAxis); break; } } @@ -3705,9 +3705,9 @@ void XclImpChAxesSet::ReadChText( XclImpStream& rStrm ) switch( xText->GetLinkTarget() ) { - case EXC_CHOBJLINK_XAXIS: mxXAxisTitle = xText; break; - case EXC_CHOBJLINK_YAXIS: mxYAxisTitle = xText; break; - case EXC_CHOBJLINK_ZAXIS: mxZAxisTitle = xText; break; + case EXC_CHOBJLINK_XAXIS: mxXAxisTitle = std::move(xText); break; + case EXC_CHOBJLINK_YAXIS: mxYAxisTitle = std::move(xText); break; + case EXC_CHOBJLINK_ZAXIS: mxZAxisTitle = std::move(xText); break; } } diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx index c37e1ecb1488..0bae231e7741 100644 --- a/sc/source/filter/excel/xilink.cxx +++ b/sc/source/filter/excel/xilink.cxx @@ -567,8 +567,7 @@ XclImpSupbookTab::XclImpSupbookTab( OUString aTabName ) : void XclImpSupbookTab::ReadCrn( XclImpStream& rStrm, const XclAddress& rXclPos ) { - XclImpCrnRef crnRef = std::make_shared<XclImpCrn>(rStrm, rXclPos); - maCrnList.push_back( crnRef ); + maCrnList.push_back(std::make_shared<XclImpCrn>(rStrm, rXclPos)); } void XclImpSupbookTab::LoadCachedValues( const ScExternalRefCache::TableTypeRef& pCacheTable, diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index caa55afd7edb..7cf0f136681c 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -1406,7 +1406,7 @@ void XclImpXF::ApplyPatternToAttrVector( ScAttrEntry aEntry; aEntry.nEndRow = nRow2; aEntry.setScPatternAttr(&rPat, false); - rAttrs.push_back(aEntry); + rAttrs.push_back(std::move(aEntry)); } void XclImpXF::ApplyPattern( diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx index ad514c9092f9..eb030f155654 100644 --- a/sc/source/filter/excel/xltoolbar.cxx +++ b/sc/source/filter/excel/xltoolbar.cxx @@ -119,7 +119,7 @@ bool ScCTB::Read( SvStream &rS ) { ScTBC aTBC; aTBC.Read( rS ); - rTBC.push_back( aTBC ); + rTBC.push_back(std::move(aTBC)); } } diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index fd29d13f93ea..728dc8ab6a1d 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -522,7 +522,7 @@ void ScXMLSourceDlg::OkPressed() aRangeLink.maRowGroups.push_back( OUStringToOString(aThisEntry, RTL_TEXTENCODING_UTF8)); - aParam.maRangeLinks.push_back(aRangeLink); + aParam.maRangeLinks.push_back(std::move(aRangeLink)); } // Remove duplicate namespace IDs. diff --git a/sd/source/console/PresenterPaneContainer.cxx b/sd/source/console/PresenterPaneContainer.cxx index 5c5184ce1308..28121cadcc24 100644 --- a/sd/source/console/PresenterPaneContainer.cxx +++ b/sd/source/console/PresenterPaneContainer.cxx @@ -71,7 +71,7 @@ void PresenterPaneContainer::PreparePane ( pDescriptor->mbIsOpaque = bIsOpaque; pDescriptor->mbIsSprite = false; - maPanes.push_back(pDescriptor); + maPanes.push_back(std::move(pDescriptor)); } void SAL_CALL PresenterPaneContainer::disposing() diff --git a/sd/source/console/PresenterTextView.cxx b/sd/source/console/PresenterTextView.cxx index 24df805dc0c8..8812e7670f9b 100644 --- a/sd/source/console/PresenterTextView.cxx +++ b/sd/source/console/PresenterTextView.cxx @@ -710,7 +710,7 @@ void PresenterTextParagraph::AddLine ( aLine.mnLineEndCellIndex = nCellIndex; aLine.mnWidth = nWidth; - maLines.push_back(aLine); + maLines.push_back(std::move(aLine)); rCurrentLine.startPos = rCurrentLine.endPos; } diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index e5d4aac776fb..2c6beb28b30a 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -3140,7 +3140,7 @@ void MainSequence::createMainSequence() Reference< XTimeContainer > xInteractiveRoot( xChildNode, UNO_QUERY_THROW ); InteractiveSequencePtr pIS = std::make_shared<InteractiveSequence>( xInteractiveRoot, this ); pIS->addListener( this ); - maInteractiveSequenceVector.push_back( pIS ); + maInteractiveSequenceVector.push_back(std::move(pIS)); } } diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 0a45cf0d96bd..5fa7984b6303 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -318,7 +318,7 @@ void PDFIProcessor::drawGlyphs( const OUString& rGlyphs, CharGlyph aGlyph(m_pCurElement, getCurrentContext(), charWidth, prevSpaceWidth, rGlyphs); aGlyph.getGC().Transformation = totalTextMatrix1; - m_GlyphsList.push_back(aGlyph); + m_GlyphsList.push_back(std::move(aGlyph)); prevCharWidth = charWidth; prevTextMatrix = totalTextMatrix1; diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx index b5230cbe9eeb..8f28696636f8 100644 --- a/sfx2/source/control/recentdocsviewitem.cxx +++ b/sfx2/source/control/recentdocsviewitem.cxx @@ -232,7 +232,7 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUStri } maTitle = aTitle; - maPreview = aThumbnail; + maPreview = std::move(aThumbnail); } ::tools::Rectangle RecentDocsViewItem::updateHighlight(bool bVisible, const Point& rPoint) diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index 4085da25b973..8ccba5098d74 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -567,7 +567,7 @@ bool TemplateLocalView::copyFrom (TemplateContainerItem *pItem, const OUString & aTemplate.aPath = rPath; aTemplate.aRegionName = getRegionName(nRegionId); - pItem->maTemplates.push_back(aTemplate); + pItem->maTemplates.push_back(std::move(aTemplate)); CalculateItemPositions(); diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index a0296194e807..9dbf71c0948b 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1932,7 +1932,7 @@ bool SfxObjectShell_Impl::hasTrustedScriptingSignature( uno::Reference< security::XDocumentDigitalSignatures > xSigner( security::DocumentDigitalSignatures::createWithVersion(comphelper::getProcessComponentContext(), aVersion) ); - const uno::Sequence< security::DocumentSignatureInformation > aInfo = rDocShell.GetDocumentSignatureInformation( true, xSigner ); + uno::Sequence<security::DocumentSignatureInformation> aInfo = rDocShell.GetDocumentSignatureInformation( true, xSigner ); if ( aInfo.hasElements() ) { @@ -1951,7 +1951,7 @@ bool SfxObjectShell_Impl::hasTrustedScriptingSignature( task::DocumentMacroConfirmationRequest aRequest; aRequest.DocumentURL = getDocumentLocation(); aRequest.DocumentStorage = rDocShell.GetMedium()->GetScriptingStorageToSign_Impl(); - aRequest.DocumentSignatureInformation = aInfo; + aRequest.DocumentSignatureInformation = std::move(aInfo); aRequest.DocumentVersion = aVersion; aRequest.Classification = task::InteractionClassification_QUERY; bResult = SfxMedium::CallApproveHandler( _rxInteraction, uno::Any( aRequest ), true ); diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index 947b4f2580b6..d399e461e080 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -241,9 +241,9 @@ namespace slideshow::internal if( mbDisableAnimationZOrder ) putShape2BackgroundLayer( - *maAllShapes.insert(aValue).first ); + *maAllShapes.insert(std::move(aValue)).first ); else - maAllShapes.insert(aValue); + maAllShapes.insert(std::move(aValue)); // update shape, it's just added and not yet painted if( rShape->isVisible() ) diff --git a/svx/source/table/tablehtmlimporter.cxx b/svx/source/table/tablehtmlimporter.cxx index d59d956dc37e..df0cad795572 100644 --- a/svx/source/table/tablehtmlimporter.cxx +++ b/svx/source/table/tablehtmlimporter.cxx @@ -254,7 +254,7 @@ void SdrTableHTMLParser::InsertCell(sal_Int32 nStartPara, sal_Int32 nEndPara) xCellInfo->mxVMergeCell->mnRowSpan++; } - xColumn->push_back(xCellInfo); + xColumn->push_back(std::move(xCellInfo)); } } @@ -502,7 +502,7 @@ void SdrTableHTMLParser::ProcToken(HtmlImportInfo* pInfo) for (sal_Int32 nCol = 0; nCol < nSpan; ++nCol) { std::shared_ptr<HTMLCellDefault> pDefault(mpInsDefault.release()); - maDefaultList.push_back(pDefault); + maDefaultList.push_back(std::move(pDefault)); const sal_Int32 nSize = lcl_GetWidth(options) + mnLastEdge; if (nSize > mnLastEdge) InsertColumnEdge(nSize); diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index a426886d3011..8a0c4ecf615d 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1648,13 +1648,13 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf) // check this *last* so that BuildMultiPortion() can find it! if (!pPor && rInf.CheckCurrentPosBookmark()) { - const auto bookmark = m_pScriptInfo->GetBookmarks(rInf.GetIdx()); + auto bookmark = m_pScriptInfo->GetBookmarks(rInf.GetIdx()); if (!bookmark.empty()) { // only for character width, maybe replaced with ] later sal_Unicode mark = '['; - pPor = new SwBookmarkPortion(mark, bookmark); + pPor = new SwBookmarkPortion(mark, std::move(bookmark)); } } diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index dbe7925cdd9a..727ee4d75362 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -930,7 +930,7 @@ sal_uInt16 SaveTable::AddFormat( SwFrameFormat* pFormat, bool bIsLine ) } } nRet = m_aSets.size(); - m_aSets.push_back(pSet); + m_aSets.push_back(std::move(pSet)); m_aFrameFormats.insert(m_aFrameFormats.begin() + nRet, pFormat); } return o3tl::narrowing<sal_uInt16>(nRet); diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx index c061362bf829..c929c8a807b1 100644 --- a/sw/source/filter/ww8/WW8Sttbf.hxx +++ b/sw/source/filter/ww8/WW8Sttbf.hxx @@ -106,7 +106,7 @@ namespace ww8 if (ncbExtra > 0) { ExtraPointer_t pExtra = std::make_shared<T>(this, nOffset, ncbExtra); - m_Extras.push_back(pExtra); + m_Extras.push_back(std::move(pExtra)); nOffset += ncbExtra; } diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 1f0460162af5..99bbc708db14 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -892,7 +892,7 @@ bool PlcDrawObj::Append( WW8Export const & rWrt, WW8_CP nCp, const ww8::Frame& r { DrawObj aObj(rFormat, nCp, rNdTopLeft, rWrt.TrueFrameDirection(rFrameFormat), rWrt.GetHdFtIndex()); - maDrawObjs.push_back(aObj); + maDrawObjs.push_back(std::move(aObj)); } return bRet; } diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index b5e4ccefe3f8..a4ee1b641488 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -4194,7 +4194,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen { ww::bytes extraData(nExtraLen); rStrm.ReadBytes(extraData.data(), nExtraLen); - pExtraArray->push_back(extraData); + pExtraArray->push_back(std::move(extraData)); } else rStrm.SeekRel( nExtraLen ); diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index efa53439bf40..d8b507fa6d2d 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -327,7 +327,7 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() : pAssignValues[nAssign + 2] >>= aAssignment.aDBData.nCommandType; pAssignValues[nAssign + 3] >>= aAssignment.aDBColumnAssignments; aAssignment.sConfigNodeName = pAssignments[nAssign / 4]; - m_aAddressDataAssignments.push_back(aAssignment); + m_aAddressDataAssignments.push_back(std::move(aAssignment)); } } //check if the saved documents still exist diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 11f2a7cfd8ac..cf5b8241b78d 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -214,8 +214,7 @@ void SwDrawBaseShell::Execute(SfxRequest& rReq) } SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked()); - const WhichRangesContainer aRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); - SfxItemSet aSet( *aNewAttr.GetPool(), aRange ); + SfxItemSet aSet(*aNewAttr.GetPool(), pDlg->GetInputRanges(*aNewAttr.GetPool())); FieldUnit eMetric = ::GetDfltMetric( dynamic_cast<SwWebView*>(&GetView()) != nullptr ); SwModule::get()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx index feba747ebf6a..f0c4fddfbb2e 100644 --- a/sw/source/uibase/shells/textsh2.cxx +++ b/sw/source/uibase/shells/textsh2.cxx @@ -119,7 +119,7 @@ void SwTextShell::ExecDB(SfxRequest const &rReq) pNew->aDBData.sDataSource = sSourceArg; pNew->aDBData.sCommand = sCommandArg; pNew->aDBData.nCommandType = nCommandTypeArg; - pNew->aSelection = aSelection; + pNew->aSelection = std::move(aSelection); //if the cursor is NULL, it must be created inside InsertDBTextHdl // because it called via a PostUserEvent pNew->xCursor = xCursor; diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx index 80ee101c0d7a..1aac739ab3ed 100644 --- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx +++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx @@ -454,7 +454,7 @@ static void MetadataToTreeNode(const css::uno::Reference<css::uno::XInterface>& aCurNode.children.push_back(SimplePropToTreeNode(pair.first, uno::Any(pair.second))); } - rNode.children.push_back(aCurNode); + rNode.children.push_back(std::move(aCurNode)); } static svx::sidebar::TreeNode diff --git a/sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx b/sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx index 05ce425579f6..95aebf8f730e 100644 --- a/sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx @@ -587,8 +587,8 @@ void DomainMapperTableManager::endOfRowAction() m_aTableGrid.pop_back(); m_aCellWidths.pop_back(); m_nCell.pop_back(); - m_aTableGrid.push_back(pTmpTableGrid); - m_aCellWidths.push_back(pTmpCellWidths); + m_aTableGrid.push_back(std::move(pTmpTableGrid)); + m_aCellWidths.push_back(std::move(pTmpCellWidths)); m_nCell.push_back(nTmpCell); m_aParagraphsToEndTable.pop( ); m_aParagraphsToEndTable.push( pTableParagraphs ); diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx index 836da6aa52a3..960a542fb38c 100644 --- a/toolkit/source/awt/animatedimagespeer.cxx +++ b/toolkit/source/awt/animatedimagespeer.cxx @@ -458,7 +458,7 @@ namespace toolkit const Sequence< OUString > aImageURLs( i_images->getImageSet( set ) ); ::std::vector< CachedImage > aImages; lcl_init( aImageURLs, aImages ); - maCachedImageSets.push_back( aImages ); + maCachedImageSets.push_back(std::move(aImages)); } updateImageList_nothrow(); diff --git a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx index 267114b3b189..dec15a49dd67 100644 --- a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx +++ b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx @@ -820,7 +820,7 @@ namespace aDAVResource.uri = maHref; aDAVResource.properties = maResponseProperties; - maResult_PropFind.push_back(aDAVResource); + maResult_PropFind.push_back(std::move(aDAVResource)); } } else diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index f58877c94bf5..ce9691fb984c 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -1362,7 +1362,7 @@ librdf_Repository::getStatements( safe_librdf_free_statement); OSL_ENSURE(pStatement, "mkStatement failed"); - const std::shared_ptr<librdf_stream> pStream( + std::shared_ptr<librdf_stream> pStream( librdf_model_find_statements(m_pModel.get(), pStatement.get()), safe_librdf_free_stream); if (!pStream) { @@ -1371,7 +1371,7 @@ librdf_Repository::getStatements( "librdf_model_find_statements failed"_ustr, *this); } - return new librdf_GraphResult(this, m_aMutex, pStream, + return new librdf_GraphResult(this, m_aMutex, std::move(pStream), std::shared_ptr<librdf_node>()); } @@ -1446,7 +1446,7 @@ librdf_Repository::queryConstruct(const OUString & i_rQuery) u"librdf_Repository::queryConstruct: " "query result is null or not graph"_ustr, *this); } - const std::shared_ptr<librdf_stream> pStream( + std::shared_ptr<librdf_stream> pStream( librdf_query_results_as_stream(pResults.get()), safe_librdf_free_stream); if (!pStream) { @@ -1455,7 +1455,7 @@ librdf_Repository::queryConstruct(const OUString & i_rQuery) "librdf_query_results_as_stream failed"_ustr, *this); } - return new librdf_GraphResult(this, m_aMutex, pStream, + return new librdf_GraphResult(this, m_aMutex, std::move(pStream), std::shared_ptr<librdf_node>(), pQuery); } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index ec7d5ca49dd1..2f30dd6ff689 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2676,7 +2676,7 @@ void BuilderBase::handleRow(xmlreader::XmlReader& reader, const OUString& rID) break; } - m_pParserState->m_aModels[rID].m_aEntries.push_back(aRow); + m_pParserState->m_aModels[rID].m_aEntries.push_back(std::move(aRow)); } void BuilderBase::handleListStore(xmlreader::XmlReader& reader, const OUString& rID, std::u16string_view rClass) diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 07ada8b6fa40..e48c8ae5428f 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -497,7 +497,7 @@ void ToolBox::InsertSpace() ImplToolItem aItem; aItem.meType = ToolBoxItemType::SPACE; aItem.mbEnabled = false; - mpData->m_aItems.push_back( aItem ); + mpData->m_aItems.push_back(std::move(aItem)); mpData->ImplClearLayoutData(); ImplInvalidate(); diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 198f6a14c4e3..f75b318e1912 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -3569,7 +3569,7 @@ void SchXMLExportHelper_Impl::exportDataPoints( aPoint.mCustomLabel = lcl_getCustomLabelField(mrExport, nElement, xSeries); aPoint.mCustomLabelPos = lcl_getCustomLabelPosition(mrExport, nElement, xSeries); - aDataPointVector.push_back( aPoint ); + aDataPointVector.push_back(std::move(aPoint)); } else { diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 4c4e7478fea2..fcd12a711194 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -886,9 +886,9 @@ sal_Int32 XMLShapeImportHelper::getGluePointId( const css::uno::Reference< css:: /** this method must be calling before the first shape is imported for the given page */ void XMLShapeImportHelper::startPage( css::uno::Reference< css::drawing::XShapes > const & rShapes ) { - const std::shared_ptr<XMLShapeImportPageContextImpl> pOldContext = mpPageContext; + std::shared_ptr<XMLShapeImportPageContextImpl> pOldContext = mpPageContext; mpPageContext = std::make_shared<XMLShapeImportPageContextImpl>(); - mpPageContext->mpNext = pOldContext; + mpPageContext->mpNext = std::move(pOldContext); mpPageContext->mxShapes = rShapes; } diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx index bda9fa0ef1b3..ed22b25e0257 100644 --- a/xmlsecurity/source/helper/xsecctl.cxx +++ b/xmlsecurity/source/helper/xsecctl.cxx @@ -949,8 +949,7 @@ SignatureInformations XSecController::getSignatureInformations() const for (int i=0; i<sigNum; ++i) { - SignatureInformation si = m_vInternalSignatureInformations[i].signatureInfor; - vInfors.push_back(si); + vInfors.push_back(m_vInternalSignatureInformations[i].signatureInfor); } return vInfors; diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx index 46bb01e8e480..055b7aad3a0b 100644 --- a/xmlsecurity/source/helper/xsecverify.cxx +++ b/xmlsecurity/source/helper/xsecverify.cxx @@ -104,7 +104,7 @@ void XSecController::addSignature() } InternalSignatureInformation isi( nSignatureId, xReferenceResolvedListener ); - m_vInternalSignatureInformations.push_back( isi ); + m_vInternalSignatureInformations.push_back(std::move(isi)); } void XSecController::setSignatureMethod(svl::crypto::SignatureMethodAlgorithm eAlgorithmID)