chart2/source/controller/main/ChartController_Insert.cxx |    3 ++-
 sc/source/filter/xml/xmlwrap.cxx                         |    8 ++++----
 sc/source/ui/docshell/docsh4.cxx                         |    3 ++-
 sc/source/ui/view/tabvwsh3.cxx                           |    3 ++-
 sc/source/ui/view/tabvwsha.cxx                           |    7 ++++---
 sc/source/ui/view/viewfun5.cxx                           |    3 ++-
 sfx2/source/doc/SfxDocumentMetaData.cxx                  |    4 +---
 svx/source/table/tablehtmlimporter.cxx                   |    2 +-
 sw/source/uibase/shells/textsh1.cxx                      |    2 +-
 sw/source/uibase/utlui/content.cxx                       |    2 +-
 vcl/source/bitmap/Vectorizer.cxx                         |    2 +-
 11 files changed, 21 insertions(+), 18 deletions(-)

New commits:
commit 3133788fb5b8598ae275c566a9f55f88a668abf3
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jul 21 20:51:24 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Jul 22 11:14:41 2024 +0200

    cid#1608424 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1607592 COPY_INSTEAD_OF_MOVE
    cid#1607487 COPY_INSTEAD_OF_MOVE
    cid#1607480 COPY_INSTEAD_OF_MOVE
    cid#1607444 COPY_INSTEAD_OF_MOVE
    cid#1607369 COPY_INSTEAD_OF_MOVE
    cid#1607356 COPY_INSTEAD_OF_MOVE
    cid#1607342 COPY_INSTEAD_OF_MOVE
    cid#1607329 COPY_INSTEAD_OF_MOVE
    cid#1607327 COPY_INSTEAD_OF_MOVE
    cid#1607303 COPY_INSTEAD_OF_MOVE
    cid#1607284 COPY_INSTEAD_OF_MOVE
    
    Change-Id: Ia2d5d4e2de8ca96a9557df5266754e52efa4f60e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170826
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/chart2/source/controller/main/ChartController_Insert.cxx 
b/chart2/source/controller/main/ChartController_Insert.cxx
index 442c1e66a032..c5d0822346bc 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -565,7 +565,8 @@ void ChartController::executeDispatch_InsertErrorBars( bool 
bYError )
 
         // note: when a user pressed "OK" but didn't change any settings in the
         // dialog, the SfxTabDialog returns "Cancel"
-        SfxTabDialogController::runAsync(aDlg, [this, aDlg, aItemConverter, 
xUndoGuard=std::move(xUndoGuard)](int nResult) {
+        SfxTabDialogController::runAsync(aDlg, [this, aDlg, 
aItemConverter=std::move(aItemConverter),
+                                                
xUndoGuard=std::move(xUndoGuard)](int nResult) {
             if ( nResult == RET_OK || aDlg->DialogWasClosedWithOK() )
             {
                 const SfxItemSet* pOutItemSet = aDlg->GetOutputItemSet();
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 48d6af197ad2..9052cb2106c1 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -519,13 +519,13 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, 
ErrCodeMsg& rError )
         xStatusIndicator->end();
 
     if (nDocRetval)
-        rError = nDocRetval;
+        rError = std::move(nDocRetval);
     else if (nStylesRetval)
-        rError = nStylesRetval;
+        rError = std::move(nStylesRetval);
     else if (nMetaRetval)
-        rError = nMetaRetval;
+        rError = std::move(nMetaRetval);
     else if (nSettingsRetval)
-        rError = nSettingsRetval;
+        rError = std::move(nSettingsRetval);
 
     bool bRet = !rError.IsError();
 
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index c01145f38886..0b3d687eefc2 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1480,7 +1480,8 @@ void ScDocShell::ExecuteChartSource(SfxRequest& rReq)
         ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
         VclPtr<AbstractScColRowLabelDlg> 
pDlg(pFact->CreateScColRowLabelDlg(pParent, bRowHeaders, bColHeaders));
         pDlg->StartExecuteAsync(
-            [this, pDlg, xRequest=std::move(xRequest), bUndo, bMultiRange, 
aChartName, aRangeListRef, bAddRange,
+            [this, pDlg, xRequest=std::move(xRequest), bUndo, bMultiRange,
+             aChartName, aRangeListRef=std::move(aRangeListRef), bAddRange,
              nCol1, nRow1, nCol2, nRow2, nTab] (sal_Int32 nResult)->void
             {
                 if (nResult == RET_OK)
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 7445a23d1d3b..2984cb3c9e19 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -219,7 +219,8 @@ void ScTabViewShell::ExecProtectTable( SfxRequest& rReq )
 
             pDlg->PreRun();
 
-            weld::DialogController::runAsync(pDlg, [this, nTab, pDlg, 
xRequest](sal_Int32 response) {
+            weld::DialogController::runAsync(pDlg, [this, nTab, pDlg,
+                                                    
xRequest=std::move(xRequest)](sal_Int32 response) {
                 if (response == RET_OK)
                 {
                     OUString aPassword = pDlg->GetPassword();
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index c4d48418d0ac..a784e9d759d4 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -1580,9 +1580,10 @@ void ScTabViewShell::ExecuteStyleEdit(SfxRequest& rReq, 
SfxStyleSheetBase* pStyl
     auto xRequest = std::make_shared<SfxRequest>(rReq);
     rReq.Ignore(); // the 'old' request is not relevant any more
     pDlg->StartExecuteAsync(
-        [this, pDlg, xRequest=std::move(xRequest), pStyleSheet, nRetMask, 
xOldSet, nSlotId, bAddUndo, bUndo,
-            aOldData=rOldData, aNewData=rNewData, aOldName, eFamily, 
bStyleToMarked, bListAction,
-            pEditObject, aSelection]
+        [this, pDlg, xRequest=std::move(xRequest), pStyleSheet,
+            nRetMask, xOldSet=std::move(xOldSet), nSlotId, bAddUndo, bUndo,
+            aOldData=rOldData, aNewData=rNewData, aOldName, eFamily, 
bStyleToMarked,
+            bListAction, pEditObject, aSelection]
         (sal_Int32 nResult) mutable -> void
         {
             SetInFormatDialog(false);
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 223a06f6424b..86840978f6fb 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -749,7 +749,8 @@ bool ScViewFunc::PasteDataFormatFormattedText( 
SotClipboardFormatId nFormatId,
 
             bAllowDialogs = bAllowDialogs && !SC_MOD()->IsInExecuteDrop();
 
-            pDlg->StartExecuteAsync([this, pDlg, &rDoc, pStrm, nFormatId, 
pStrBuffer,
+            pDlg->StartExecuteAsync([this, pDlg, &rDoc, pStrm=std::move(pStrm),
+                                     nFormatId, 
pStrBuffer=std::move(pStrBuffer),
                                      pObj=std::move(pObj), 
bAllowDialogs](sal_Int32 nResult){
                 bool bShowErrorDialog = bAllowDialogs;
                 if (RET_OK == nResult)
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx 
b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 3a017cdeb73f..73b270e78f54 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -1229,9 +1229,7 @@ void SfxDocumentMetaData::init(
 
     // select nodes for elements of which we handle all occurrences
     for (const auto & name : s_stdMetaList) {
-        std::vector<css::uno::Reference<css::xml::dom::XNode> > nodes =
-            getChildNodeListByName(m_xParent, name);
-        m_metaList[name] = nodes;
+        m_metaList[name] = getChildNodeListByName(m_xParent, name);
     }
 
     // initialize members corresponding to attributes from DOM nodes
diff --git a/svx/source/table/tablehtmlimporter.cxx 
b/svx/source/table/tablehtmlimporter.cxx
index 964eb5aada31..b540ccc2934b 100644
--- a/svx/source/table/tablehtmlimporter.cxx
+++ b/svx/source/table/tablehtmlimporter.cxx
@@ -239,7 +239,7 @@ void SdrTableHTMLParser::InsertCell(sal_Int32 nStartPara, 
sal_Int32 nEndPara)
         {
             HTMLCellInfoPtr xLastCell((*mxLastRow)[mnVMergeIdx]);
             if (xLastCell->mnRowSpan)
-                xCellInfo->mxVMergeCell = xLastCell;
+                xCellInfo->mxVMergeCell = std::move(xLastCell);
             else
                 xCellInfo->mxVMergeCell = xLastCell->mxVMergeCell;
         }
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 31ba3ff8e7d4..d37180489ef4 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -2046,7 +2046,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
             auto xRequest = std::make_shared<SfxRequest>(rReq);
             rReq.Ignore(); // the 'old' request is not relevant any more
             pDlg->StartExecuteAsync(
-                [pDlg, pWrtSh, pDateField, xRequest] (sal_Int32 nResult)->void
+                [pDlg, pWrtSh, pDateField, xRequest=std::move(xRequest)] 
(sal_Int32 nResult)->void
                 {
                     if (nResult == RET_OK)
                     {
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index b3e35752dde6..f0c33a247eef 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2624,7 +2624,7 @@ void SwContentTree::Expand(const weld::TreeIter& rParent,
                     }
                 }
             }
-            m_aPostItNodeExpandMap = aCurrentPostItNodeExpandMap;
+            m_aPostItNodeExpandMap = std::move(aCurrentPostItNodeExpandMap);
             return;
         }
         else // content entry
diff --git a/vcl/source/bitmap/Vectorizer.cxx b/vcl/source/bitmap/Vectorizer.cxx
index 1740a3eb3cad..f9ffa6ef618d 100644
--- a/vcl/source/bitmap/Vectorizer.cxx
+++ b/vcl/source/bitmap/Vectorizer.cxx
@@ -776,7 +776,7 @@ void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly )
     }
     while( nNewCount > VECT_POLY_MAX );
 
-    rPolyPoly = aNewPolyPoly;
+    rPolyPoly = std::move(aNewPolyPoly);
 }
 
 void ImplExpand( std::optional<ImplVectMap>& oMap, const BitmapReadAccess* 
pRAcc, const Color& rColor )

Reply via email to