diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-07-29 14:05:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-07-31 09:33:06 +0200 |
commit | 07d357756922e35220a924dab82d315fea22cecb (patch) | |
tree | 065a0c5cce1418f6982b70235e266246fd0b9afa | |
parent | ef7429f86788f0616db5b274ec77eb67cd41cb3d (diff) |
cid#1555417 COPY_INSTEAD_OF_MOVE
and
cid#1555423 COPY_INSTEAD_OF_MOVE
cid#1555430 COPY_INSTEAD_OF_MOVE
cid#1555436 COPY_INSTEAD_OF_MOVE
cid#1555440 COPY_INSTEAD_OF_MOVE
cid#1555443 COPY_INSTEAD_OF_MOVE
cid#1555454 COPY_INSTEAD_OF_MOVE
cid#1555459 COPY_INSTEAD_OF_MOVE
cid#1555461 COPY_INSTEAD_OF_MOVE
cid#1555468 COPY_INSTEAD_OF_MOVE
cid#1555477 COPY_INSTEAD_OF_MOVE
cid#1555484 COPY_INSTEAD_OF_MOVE
cid#1555511 COPY_INSTEAD_OF_MOVE
cid#1555515 COPY_INSTEAD_OF_MOVE
cid#1555519 COPY_INSTEAD_OF_MOVE
cid#1555534 COPY_INSTEAD_OF_MOVE
cid#1555537 COPY_INSTEAD_OF_MOVE
cid#1555544 COPY_INSTEAD_OF_MOVE
cid#1555553 COPY_INSTEAD_OF_MOVE
cid#1555559 COPY_INSTEAD_OF_MOVE
cid#1555561 COPY_INSTEAD_OF_MOVE
cid#1555563 COPY_INSTEAD_OF_MOVE
cid#1555564 COPY_INSTEAD_OF_MOVE
cid#1555568 COPY_INSTEAD_OF_MOVE
cid#1555571 COPY_INSTEAD_OF_MOVE
cid#1555580 COPY_INSTEAD_OF_MOVE
Change-Id: Ia42a78bffddc80d0e82144f4db51dc6e4d2e9a1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171237
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
25 files changed, 29 insertions, 28 deletions
diff --git a/basegfx/source/tools/bgradient.cxx b/basegfx/source/tools/bgradient.cxx index bac738ad3221..d80f52974a35 100644 --- a/basegfx/source/tools/bgradient.cxx +++ b/basegfx/source/tools/bgradient.cxx @@ -560,7 +560,7 @@ void BColorStops::removeSpaceAtStart(double fOffset) } } - *this = aNewStops; + *this = std::move(aNewStops); } // try to detect if an empty/no-color-change area exists @@ -730,7 +730,7 @@ void BColorStops::doApplySteps(sal_uInt16 nStepCount) } // apply the change to color stops - *this = aNewColorStops; + *this = std::move(aNewColorStops); } void BColorStops::tryToApplyBColorModifierStack(const BColorModifierStack& rBColorModifierStack) diff --git a/chart2/source/view/axes/Tickmarks_Equidistant.cxx b/chart2/source/view/axes/Tickmarks_Equidistant.cxx index c1991fb3ba6e..b55af39ca8bf 100644 --- a/chart2/source/view/axes/Tickmarks_Equidistant.cxx +++ b/chart2/source/view/axes/Tickmarks_Equidistant.cxx @@ -409,7 +409,7 @@ void EquidistantTickFactory::getAllTicksShifted( TickInfoArraysType& rAllTickInf { ExplicitIncrementData aShiftedIncrement( m_rIncrement ); aShiftedIncrement.BaseValue = m_rIncrement.BaseValue-m_rIncrement.Distance/2.0; - EquidistantTickFactory( m_rScale, aShiftedIncrement ).getAllTicks(rAllTickInfos); + EquidistantTickFactory( m_rScale, std::move(aShiftedIncrement) ).getAllTicks(rAllTickInfos); } EquidistantTickIter::EquidistantTickIter( const uno::Sequence< uno::Sequence< double > >& rTicks diff --git a/connectivity/source/drivers/postgresql/pq_array.cxx b/connectivity/source/drivers/postgresql/pq_array.cxx index 03c93537f828..2b7ab3c9491f 100644 --- a/connectivity/source/drivers/postgresql/pq_array.cxx +++ b/connectivity/source/drivers/postgresql/pq_array.cxx @@ -96,7 +96,7 @@ css::uno::Reference< css::sdbc::XResultSet > Array::getResultSetAtIndex( std::vector< Any > row( 2 ); row[0] <<= static_cast<sal_Int32>( i + index ); row[1] = m_data[i+index-1]; - ret[i] = row; + ret[i] = std::move(row); } return new SequenceResultSet( diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index d4f6712a710c..a66697f61789 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -796,7 +796,7 @@ void SpellCheckerDispatcher::SetServiceList( const Locale &rLocale, { auto pTmpEntry = std::make_shared<LangSvcEntries_Spell>( rSvcImplNames ); pTmpEntry->aSvcRefs = Sequence< Reference < XSpellChecker > >( nLen ); - m_aSvcMap[ nLanguage ] = pTmpEntry; + m_aSvcMap[ nLanguage ] = std::move(pTmpEntry); } } } diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx index ae893ed64cfa..de7d25286f64 100644 --- a/oox/source/drawingml/diagram/layoutnodecontext.cxx +++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx @@ -260,7 +260,7 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement, // CT_Choose LayoutAtomPtr pAtom = std::make_shared<ChooseAtom>(mpNode->getLayoutNode()); LayoutAtom::connect(mpNode, pAtom); - return new ChooseContext( *this, rAttribs, pAtom ); + return new ChooseContext( *this, rAttribs, std::move(pAtom) ); } case DGM_TOKEN( forEach ): { diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index 39eda41d5ced..eef146b5d47a 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -76,14 +76,14 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken { TextRunPtr pRun = std::make_shared<TextRun>(); mrParagraph.addRun( pRun ); - return new RegularTextRunContext( *this, pRun ); + return new RegularTextRunContext( *this, std::move(pRun) ); } case A_TOKEN( br ): // "CT_TextLineBreak" Soft return line break (vertical tab). { TextRunPtr pRun = std::make_shared<TextRun>(); pRun->setLineBreak(); mrParagraph.addRun( pRun ); - return new RegularTextRunContext( *this, pRun ); + return new RegularTextRunContext( *this, std::move(pRun) ); } case A_TOKEN( fld ): // "CT_TextField" Text Field. { diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 6ee8b660a1b9..08e6bf1cbee9 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -437,7 +437,7 @@ void PPTShape::addShape( } else { - aMasterTextListStyle = aSlideStyle; + aMasterTextListStyle = std::move(aSlideStyle); } } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 78f36e0bc462..ceb1de82cc38 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1129,7 +1129,7 @@ void ScDocument::LimitChartIfAll( ScRangeListRef& rRangeList ) { OSL_FAIL("LimitChartIfAll: Ref==0"); } - rRangeList = aNew; + rRangeList = std::move(aNew); } static void lcl_GetFirstTabRange( SCTAB& rTabRangeStart, SCTAB& rTabRangeEnd, const ScMarkData* pTabMark, SCTAB aMaxTab ) diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 649219f89bdb..0b3835527576 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -794,7 +794,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico } // font color - aNewData.maComplexColor = aComplexColor; + aNewData.maComplexColor = std::move(aComplexColor); Color aNewColor = aNewData.maComplexColor.getFinalColor(); if (!aFontData.maComplexColor.getFinalColor().IsRGBEqual(aNewColor)) diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index d02634e811f3..440664ae1176 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -684,7 +684,7 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, SdrTextObj con basegfx::B2DPolyPolygon aDashed; basegfx::utils::applyLineDashing(aGeometry, aPattern, &aDashed); - aGeometry = aDashed; + aGeometry = std::move(aDashed); } // determine line color diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx index fc51677a2f00..c87498503043 100644 --- a/sdext/source/minimizer/optimizerdialog.cxx +++ b/sdext/source/minimizer/optimizerdialog.cxx @@ -579,7 +579,7 @@ bool OptimizerDialog::onFinish() if ( aIter == rSettings.end() ) rSettings.push_back( aNewSettings ); else - *aIter = aNewSettings; + *aIter = std::move(aNewSettings); } } if ( bSuccessfullyExecuted ) diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index 0a168a4cda7a..2f10e457e910 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -630,7 +630,7 @@ private: if( aNewClip != maClip ) { - maClip = aNewClip; + maClip = std::move(aNewClip); if(mpOutputCanvas ) mpOutputCanvas->setClip( diff --git a/svgio/source/svgreader/svgtextnode.cxx b/svgio/source/svgreader/svgtextnode.cxx index ca17c2fc4237..38f80a86e0f3 100644 --- a/svgio/source/svgreader/svgtextnode.cxx +++ b/svgio/source/svgreader/svgtextnode.cxx @@ -229,7 +229,7 @@ namespace svgio::svgreader drawinglayer::primitive2d::Primitive2DContainer aNewTarget2; addTextPrimitives(*this, aNewTarget2, std::move(aNewTarget)); - aNewTarget = aNewTarget2; + aNewTarget = std::move(aNewTarget2); } if(!aNewTarget.empty()) diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 92d0a6f5a76d..4f82ec7eb83c 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -755,7 +755,7 @@ basegfx::B2DPolygon SdrEditView::ImpCombineToSinglePolygon(const basegfx::B2DPol } else { - aRetval = aCandidate; + aRetval = std::move(aCandidate); } } diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 8486866fca0d..f75177d5fc07 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -496,7 +496,7 @@ void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPo if (!rPara.bFixedAngle) { // TODO: Implementation missing. } - rPoly=aPol; + rPoly = std::move(aPol); } void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, tools::Polygon& rPoly, tools::Rectangle const & rRect) diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 044058545de4..e3643498835d 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -557,7 +557,7 @@ namespace rInfo.mnTextStart, rInfo.mnTextLen, std::vector(rDXArray), - std::vector(aKashidaArray), + std::move(aKashidaArray), rFontAttribute, rInfo.mpLocale ? *rInfo.mpLocale : css::lang::Locale(), aBFontColor, @@ -586,7 +586,7 @@ namespace rInfo.mnTextStart, rInfo.mnTextLen, std::vector(rDXArray), - std::vector(aKashidaArray), + std::move(aKashidaArray), rFontAttribute, rInfo.mpLocale ? *rInfo.mpLocale : css::lang::Locale(), aBFontColor, diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index a888f66d797c..29a3a4304c4f 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -962,7 +962,8 @@ void SvxTableController::onFormatTable(const SfxRequest& rReq) rModel, false) ); // Even Cancel Button is returning positive(101) value, - xDlg->StartExecuteAsync([xDlg, this, xBoxItem, xBoxInfoItem](int nResult){ + xDlg->StartExecuteAsync([xDlg, this, xBoxItem=std::move(xBoxItem), + xBoxInfoItem=std::move(xBoxInfoItem)](int nResult){ if (nResult == RET_OK) { SfxItemSet aNewSet(*(xDlg->GetOutputItemSet())); diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 93f29d72f1fb..9536bc443b79 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1329,7 +1329,7 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM) { aListStyleData.bCreateNewList = false; aListStyleData.sListId = pCNd->GetListId(); - aMyNumRuleMap[pRule] = aListStyleData; + aMyNumRuleMap[pRule] = std::move(aListStyleData); } bFirst = false; diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 36b8c91eac94..0a133327c6f1 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -199,7 +199,7 @@ ErrCodeMsg ReadThroughComponent( { xml::sax::SAXException aTmp; if ( aSaxEx.WrappedException >>= aTmp ) - aSaxEx = aTmp; + aSaxEx = std::move(aTmp); else bTryChild = false; } diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx index 64a3596ce9d1..850210dfdfe8 100644 --- a/sw/source/uibase/uno/SwXDocumentSettings.cxx +++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx @@ -455,7 +455,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf if( pNewPrinter->IsKnown() ) { // set printer only once; in _postSetValues - mpPrinter = pNewPrinter; + mpPrinter = std::move(pNewPrinter); } else { diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx index 24099817ce9e..9ce0a042e4cd 100644 --- a/tools/source/generic/poly2.cxx +++ b/tools/source/generic/poly2.cxx @@ -126,7 +126,7 @@ void PolyPolygon::Optimize( PolyOptimizeFlags nOptimizeFlags ) AdaptiveSubdivide(aPolyPoly); aPolyPoly.Optimize(nOptimizeFlags); - *this = aPolyPoly; + *this = std::move(aPolyPoly); } else { diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index e381a79209da..ccfee4d937fe 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -1211,7 +1211,7 @@ bool Bitmap::ImplConvertDown8BPP(Color const * pExtColor) const MapMode aMap(maPrefMapMode); const Size aSize(maPrefSize); - *this = aNewBmp; + *this = std::move(aNewBmp); maPrefMapMode = aMap; maPrefSize = aSize; diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 502c2d0aa3f6..3a792047e52a 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -982,7 +982,7 @@ bool Printer::SetJobSetup( const JobSetup& rSetup ) { ImplUpdateJobSetupPaper( aJobSetup ); mbNewJobSetup = true; - maJobSetup = aJobSetup; + maJobSetup = std::move(aJobSetup); ImplUpdatePageData(); ImplUpdateFontList(); return true; diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index cd0b014e5112..e0f424736a2f 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -1768,7 +1768,7 @@ bool TransferableDataHelper::GetGraphic( const css::datatransfer::DataFlavor& rF { if (GraphicConverter::Import(*xStm, aGraphic) == ERRCODE_NONE) { - rGraphic = aGraphic; + rGraphic = std::move(aGraphic); bRet = true; } } diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx index 82e8e59d3fd8..6d43c2483e5e 100644 --- a/xmloff/source/forms/formattributes.cxx +++ b/xmloff/source/forms/formattributes.cxx @@ -393,7 +393,7 @@ namespace xmloff aAssignment.aPropertyType = _rType; // redundance, the accessor is stored in aAssignment.sAttributeName, too - m_aKnownProperties[nAttributeToken] = aAssignment; + m_aKnownProperties[nAttributeToken] = std::move(aAssignment); return m_aKnownProperties[nAttributeToken]; } |