basctl/source/basicide/bastype3.cxx | 3 ++- chart2/source/controller/sidebar/ChartColorWrapper.cxx | 2 +- dbaccess/source/ui/dlg/queryfilter.cxx | 2 +- drawinglayer/source/processor3d/defaultprocessor3d.cxx | 4 ++-- framework/source/helper/tagwindowasmodified.cxx | 2 +- oox/source/drawingml/table/predefined-table-styles.cxx | 10 +++++----- oox/source/drawingml/textbodycontext.cxx | 2 +- sc/source/core/data/documen2.cxx | 4 ++-- sc/source/core/data/queryiter.cxx | 2 +- sc/source/core/tool/interpr5.cxx | 4 ++-- sc/source/filter/xml/xmlwrap.cxx | 2 +- sc/source/ui/drawfunc/drawsh.cxx | 2 +- sc/source/ui/miscdlgs/optsolver.cxx | 2 +- sd/source/filter/xml/sdxmlwrp.cxx | 2 +- sfx2/source/bastyp/fltfnc.cxx | 4 +++- sfx2/source/dialog/dinfdlg.cxx | 2 +- smoketest/smoketest.cxx | 2 +- starmath/source/mathml/mathmlimport.cxx | 2 +- svx/source/svdraw/svdedxv.cxx | 4 ++-- sw/source/filter/ww8/docxattributeoutput.cxx | 2 +- sw/source/filter/ww8/rtfattributeoutput.cxx | 2 +- sw/source/uibase/shells/basesh.cxx | 2 +- tools/source/fsys/urlobj.cxx | 2 +- ucb/source/ucp/cmis/cmis_content.cxx | 2 +- vcl/source/bitmap/bitmap.cxx | 2 +- 25 files changed, 36 insertions(+), 33 deletions(-)
New commits: commit ac0514fb3d7e93c06242dc72c5f56031dcb8a3c9 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Aug 5 15:18:16 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Aug 6 09:13:52 2024 +0200 cid#1555415 COPY_INSTEAD_OF_MOVE and cid#1555430 COPY_INSTEAD_OF_MOVE cid#1555497 COPY_INSTEAD_OF_MOVE cid#1555542 COPY_INSTEAD_OF_MOVE cid#1555543 COPY_INSTEAD_OF_MOVE cid#1555564 COPY_INSTEAD_OF_MOVE cid#1555593 COPY_INSTEAD_OF_MOVE cid#1555602 COPY_INSTEAD_OF_MOVE cid#1555610 COPY_INSTEAD_OF_MOVE cid#1555667 COPY_INSTEAD_OF_MOVE cid#1555693 COPY_INSTEAD_OF_MOVE cid#1555719 COPY_INSTEAD_OF_MOVE cid#1555757 COPY_INSTEAD_OF_MOVE cid#1555795 COPY_INSTEAD_OF_MOVE cid#1555826 COPY_INSTEAD_OF_MOVE cid#1555847 COPY_INSTEAD_OF_MOVE cid#1555851 COPY_INSTEAD_OF_MOVE cid#1555863 COPY_INSTEAD_OF_MOVE cid#1555865 COPY_INSTEAD_OF_MOVE cid#1555867 COPY_INSTEAD_OF_MOVE cid#1555869 COPY_INSTEAD_OF_MOVE cid#1555879 COPY_INSTEAD_OF_MOVE cid#1555890 COPY_INSTEAD_OF_MOVE cid#1555893 COPY_INSTEAD_OF_MOVE cid#1555900 COPY_INSTEAD_OF_MOVE cid#1555922 COPY_INSTEAD_OF_MOVE cid#1555925 COPY_INSTEAD_OF_MOVE Change-Id: I5d362a09e80eecd282e63c745bfe26eac2631a0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171492 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index b025859a611c..deb28b7cf41d 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -338,7 +338,8 @@ EntryDescriptor SbTreeListBox::GetEntryDescriptor(const weld::TreeIter* pEntry) } } - return EntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, aName, aMethodName, eType ); + return EntryDescriptor(std::move(aDocument), eLocation, aLibName, + aLibSubName, aName, aMethodName, eType); } SbxItemType SbTreeListBox::ConvertType (EntryType eType) diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx index 5e6e60d9017f..64126b13a06c 100644 --- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx +++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx @@ -196,7 +196,7 @@ void ChartLineStyleWrapper::updateData() XLineDashItem aDashItem; aDashItem.PutValue(aLineDash, MID_LINEDASH); - aEvent.FeatureURL = aUrl; + aEvent.FeatureURL = std::move(aUrl); aDashItem.QueryValue(aEvent.State); mpControl->statusChanged(aEvent); } diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 5ab9766bae9a..5bc0f2f56ef9 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -702,7 +702,7 @@ void DlgFilterCrit::BuildWherePart() sal_Int32 nAndPos = _rValues[nPos].getLength(); auto pValues = _rValues.getArray(); pValues[nPos].realloc( _rValues[nPos].getLength() + 1); - pValues[nPos].getArray()[nAndPos] = aValue; + pValues[nPos].getArray()[nAndPos] = std::move(aValue); } try { diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index 498cc93d86cc..5f316879b4c5 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -172,11 +172,11 @@ namespace drawinglayer::processor3d if(bTransparence) { - mpTransparenceGeoTexSvx = pOldTex; + mpTransparenceGeoTexSvx = std::move(pOldTex); } else { - mpGeoTexSvx = pOldTex; + mpGeoTexSvx = std::move(pOldTex); } } diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx index cc27a194e1fb..5776d5cee19e 100644 --- a/framework/source/helper/tagwindowasmodified.cxx +++ b/framework/source/helper/tagwindowasmodified.cxx @@ -134,7 +134,7 @@ void TagWindowAsModified::impl_update (const css::uno::Reference< css::frame::XF // Note: frame was set as member outside ! we have to refresh connections // regarding window and model only here. - m_xWindow = pWindow; + m_xWindow = std::move(pWindow); m_xModel = xModel; } diff --git a/oox/source/drawingml/table/predefined-table-styles.cxx b/oox/source/drawingml/table/predefined-table-styles.cxx index a02c8ddf0c89..9011b5c8c628 100644 --- a/oox/source/drawingml/table/predefined-table-styles.cxx +++ b/oox/source/drawingml/table/predefined-table-styles.cxx @@ -905,11 +905,11 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) pTableStyle->getFirstCol().getTextBoldStyle() = bFirstColTextBoldStyle; pTableStyle->getLastCol().getTextBoldStyle() = bLastColTextBoldStyle; - pTableStyle->getWholeTbl().getTextColor() = wholeTblTextColor; - pTableStyle->getFirstRow().getTextColor() = firstRowTextColor; - pTableStyle->getFirstCol().getTextColor() = firstColTextColor; - pTableStyle->getLastRow().getTextColor() = lastRowTextColor; - pTableStyle->getLastCol().getTextColor() = lastColTextColor; + pTableStyle->getWholeTbl().getTextColor() = std::move(wholeTblTextColor); + pTableStyle->getFirstRow().getTextColor() = std::move(firstRowTextColor); + pTableStyle->getFirstCol().getTextColor() = std::move(firstColTextColor); + pTableStyle->getLastRow().getTextColor() = std::move(lastRowTextColor); + pTableStyle->getLastCol().getTextColor() = std::move(lastColTextColor); pTableStyle->getBand1H().getTextColor() = ::oox::drawingml::Color(); //band1HTextColor pTableStyle->getBand1V().getTextColor() = ::oox::drawingml::Color(); //band1VTextColor diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index eef146b5d47a..ce8de24a09be 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -114,7 +114,7 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken rtl::Reference<HyperLinkContext> pContext(new HyperLinkContext( *this, rAttribs, pRun->getTextCharacterProperties().maHyperlinkPropertyMap)); // but create text run context because HyperLinkContext can't process internal w:r, w:t, etc - return new RegularTextRunContext(*this, pRun); + return new RegularTextRunContext(*this, std::move(pRun)); } default: SAL_WARN("oox", "TextParagraphContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 028975850f96..e1455e735e88 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -1039,14 +1039,14 @@ bool ScDocument::TransferTab( ScDocument& rSrcDoc, SCTAB nSrcPos, { aRepeatColRange->aStart.SetTab(nDestPos); aRepeatColRange->aEnd.SetTab(nDestPos); - maTabs[nDestPos]->SetRepeatColRange(aRepeatColRange); + maTabs[nDestPos]->SetRepeatColRange(std::move(aRepeatColRange)); } if (auto aRepeatRowRange = rSrcDoc.maTabs[nSrcPos]->GetRepeatRowRange()) { aRepeatRowRange->aStart.SetTab(nDestPos); aRepeatRowRange->aEnd.SetTab(nDestPos); - maTabs[nDestPos]->SetRepeatRowRange(aRepeatRowRange); + maTabs[nDestPos]->SetRepeatRowRange(std::move(aRepeatRowRange)); } if (rSrcDoc.IsPrintEntireSheet(nSrcPos)) diff --git a/sc/source/core/data/queryiter.cxx b/sc/source/core/data/queryiter.cxx index 5c93502db908..e1558fcc5304 100644 --- a/sc/source/core/data/queryiter.cxx +++ b/sc/source/core/data/queryiter.cxx @@ -1022,7 +1022,7 @@ bool ScQueryCellIterator< accessType >::FindEqualOrSortedLastInRange( SCCOL& nFo // Step back conditions are the same as above nCol = nFoundCol; nRow = nFoundRow; - maCurPos = aPosSave; + maCurPos = std::move(aPosSave); return true; } if ( (maParam.eSearchType != utl::SearchParam::SearchType::Normal) && diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 04cc6d34eac4..3db43c8677cd 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1448,11 +1448,11 @@ void ScInterpreter::ScAmpersand() { OUString sStr; bool bFlag; - ScMatrixRef pMat = pMat1; + ScMatrixRef pMat = std::move(pMat1); if (!pMat) { sStr = sStr1; - pMat = pMat2; + pMat = std::move(pMat2); bFlag = true; // double - Matrix } else diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 9052cb2106c1..2bab3ae9a43e 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -199,7 +199,7 @@ ErrCodeMsg ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo { xml::sax::SAXException aTmp; if ( aSaxEx.WrappedException >>= aTmp ) - aSaxEx = aTmp; + aSaxEx = std::move(aTmp); else bTryChild = false; } diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index c4006146827e..c818820a7cda 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -374,7 +374,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView)); - pDlg->StartExecuteAsync([pDlg, pRequest, pView, this]( + pDlg->StartExecuteAsync([pDlg, pRequest=std::move(pRequest), pView, this]( sal_Int32 nResult){ if (nResult == RET_OK) { diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 3a9d319bf015..7ef0eba43b15 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -353,7 +353,7 @@ void ScOptSolverDlg::ReadConditions() m_aConditions.resize( nVecPos + 1 ); if ( nVecPos < static_cast<tools::Long>(m_aConditions.size()) ) - m_aConditions[nVecPos] = aRowEntry; + m_aConditions[nVecPos] = std::move(aRowEntry); // remove default entries at the end size_t nSize = m_aConditions.size(); diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 5a7563eb4d49..a72830eb6c07 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -240,7 +240,7 @@ ErrCodeMsg ReadThroughComponent( { xml::sax::SAXException aTmp; if ( aSaxEx.WrappedException >>= aTmp ) - aSaxEx = aTmp; + aSaxEx = std::move(aTmp); else bTryChild = false; } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 547364c84fe4..4309c1bc50c2 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -525,8 +525,10 @@ ErrCode SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, std::shared_ptr<cons if ( pInstallFilter ) { if ( IsFilterInstalled_Impl( pInstallFilter ) ) + { // Maybe the filter was installed afterwards. - pFilter = pInstallFilter; + pFilter = std::move(pInstallFilter); + } } else { diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index ec594ddedac4..a5b3d15ff572 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -931,7 +931,7 @@ IMPL_LINK_NOARG(SfxDocumentPage, ChangePassHdl, weld::Button&, void) VclAbstractDialogFactory * pFact = VclAbstractDialogFactory::Create(); m_xPasswordDialog = pFact->CreatePasswordToOpenModifyDialog(GetFrameWeld(), maxPwdLen, false); m_xPasswordDialog->AllowEmpty(); // needed to remove password - m_xPasswordDialog->StartExecuteAsync([this, pFilter, &rMedSet, pShell](sal_Int32 nResult) + m_xPasswordDialog->StartExecuteAsync([this, pFilter=std::move(pFilter), &rMedSet, pShell](sal_Int32 nResult) { if (nResult == RET_OK) { diff --git a/smoketest/smoketest.cxx b/smoketest/smoketest.cxx index cbf201450384..dfddf60c20c4 100644 --- a/smoketest/smoketest.cxx +++ b/smoketest/smoketest.cxx @@ -174,7 +174,7 @@ void Test::test() { css::awt::AsyncCallback::create( connection_.getComponentContext())->addCallback( new Callback( - disp, url, css::uno::Sequence< css::beans::PropertyValue >(), + disp, std::move(url), css::uno::Sequence< css::beans::PropertyValue >(), new Listener(&result)), css::uno::Any()); // Wait for result.condition or connection_ going stale: diff --git a/starmath/source/mathml/mathmlimport.cxx b/starmath/source/mathml/mathmlimport.cxx index 1ed7b5815b2c..4a0ac6a438e2 100644 --- a/starmath/source/mathml/mathmlimport.cxx +++ b/starmath/source/mathml/mathmlimport.cxx @@ -1394,7 +1394,7 @@ void SmXMLOperatorContext_Impl::TCharacters(const OUString& rChars) bToken = starmathdatabase::Identify_SmXMLOperatorContext_Impl(aToken.cMathChar, bIsStretchy); if (bToken.eType != TERROR) - aToken = bToken; + aToken = std::move(bToken); } void SmXMLOperatorContext_Impl::endFastElement(sal_Int32) diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index b2d7cb85bd9d..60c739190e58 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -606,8 +606,8 @@ TextEditHighContrastOverlaySelection::createOverlayObjectPrimitive2DSequence() basegfx::utils::createPolygonFromRect(aClipPolyPolygon.getB2DRange())), aRGBColor)); aRetval.append(mrTextEditOverlayObject.getTextPrimitives()); - aRetval.append( - new drawinglayer::primitive2d::MaskPrimitive2D(aClipPolyPolygon, std::move(aRetval))); + aRetval.append(new drawinglayer::primitive2d::MaskPrimitive2D(std::move(aClipPolyPolygon), + std::move(aRetval))); } return aRetval; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 4c0b51108b2a..b3daa01bba03 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7483,7 +7483,7 @@ bool DocxAttributeOutput::EmbedFontStyle(std::u16string_view name, int tag, Font oox::getRelationship(Relationship::FONT), Concat2View("fonts/font" + OUString::number( m_nextFontId ) + ".odttf") ), RTL_TEXTENCODING_UTF8 ); ref.fontKey = fontKeyStr; - m_FontFilesMap[ fontUrl ] = ref; + m_FontFilesMap[ fontUrl ] = std::move(ref); ++m_nextFontId; } m_pSerializer->singleElementNS( XML_w, tag, diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 50003bda6d9c..2a910cc9aced 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2157,7 +2157,7 @@ void RtfAttributeOutput::writeTextFrame(const ww8::Frame& rFrame, bool bTextBox) if (bTextBox) { - m_aRunText = aRunText; + m_aRunText = std::move(aRunText); m_aRunText->append(m_rExport.getStream()); m_rExport.resetStream(); } diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 8a65fad61070..51e2a2ea7064 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2578,7 +2578,7 @@ void SwBaseShell::GetTextFontCtrlState( SfxItemSet& rSet ) bool bVertical = rSh.IsInVerticalText(); aFont.SetOrientation(Degree10(bVertical ? 2700 : 0)); aFont.SetVertical(bVertical); - GetView().GetEditWin().SetInputContext( InputContext( aFont, InputContextFlags::Text | + GetView().GetEditWin().SetInputContext( InputContext( std::move(aFont), InputContextFlags::Text | InputContextFlags::ExtText ) ); } } diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index c77e7f84cd93..e965b32752d8 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -1717,7 +1717,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef, if (bIgnoreFragment) aNewURI.clearFragment(); - rTheAbsURIRef = aNewURI; + rTheAbsURIRef = std::move(aNewURI); return true; } diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index f89ab5242f56..2eda3608151d 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -462,7 +462,7 @@ namespace cmis { if ( nullptr == m_pObjectType.get( ) && m_bTransient ) { - std::string typeId = m_bIsFolder ? "cmis:folder" : "cmis:document"; + const std::string typeId = m_bIsFolder ? "cmis:folder" : "cmis:document"; // The type to create needs to be fetched from the possible children types // defined in the parent folder. Then, we'll pick up the first one we find matching // cmis:folder or cmis:document (depending what we need to create). diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index ccfee4d937fe..4122052ee00e 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -1008,7 +1008,7 @@ bool Bitmap::ImplMakeGreyscales() const MapMode aMap( maPrefMapMode ); const Size aSize( maPrefSize ); - *this = aNewBmp; + *this = std::move(aNewBmp); maPrefMapMode = aMap; maPrefSize = aSize;