basctl/source/basicide/moduldl2.cxx                     |    4 +++-
 basic/source/classes/codecompletecache.cxx              |    2 +-
 dbaccess/source/ui/misc/UITools.cxx                     |    2 +-
 framework/source/uielement/generictoolbarcontroller.cxx |    2 +-
 sc/source/ui/unoobj/chart2uno.cxx                       |    2 +-
 sd/source/ui/animations/motionpathtag.cxx               |    4 ++--
 svx/source/svdraw/svdocirc.cxx                          |    2 +-
 sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx    |    2 +-
 vcl/source/control/wizardmachine.cxx                    |    4 ++--
 vcl/source/gdi/print.cxx                                |    2 +-
 vcl/source/gdi/print3.cxx                               |    2 +-
 vcl/source/window/bubblewindow.cxx                      |    2 +-
 12 files changed, 16 insertions(+), 14 deletions(-)

New commits:
commit 7f9f32aa11852e8ea9588f6fbe3416484cadd229
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Aug 2 08:53:15 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 2 17:27:10 2024 +0200

    cid#1556472 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1556481 COPY_INSTEAD_OF_MOVE
    cid#1556486 COPY_INSTEAD_OF_MOVE
    cid#1556491 COPY_INSTEAD_OF_MOVE
    cid#1556507 COPY_INSTEAD_OF_MOVE
    cid#1556515 COPY_INSTEAD_OF_MOVE
    cid#1556518 COPY_INSTEAD_OF_MOVE
    cid#1556519 COPY_INSTEAD_OF_MOVE
    cid#1556533 COPY_INSTEAD_OF_MOVE
    cid#1556536 COPY_INSTEAD_OF_MOVE
    cid#1556559 COPY_INSTEAD_OF_MOVE
    cid#1556577 COPY_INSTEAD_OF_MOVE
    cid#1556581 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I2ad2f2194e2a89c7246e8742b2fc8be7580e38c3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171394
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/basctl/source/basicide/moduldl2.cxx 
b/basctl/source/basicide/moduldl2.cxx
index ee1ea8564636..85e284f16342 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -685,7 +685,9 @@ void LibPage::InsertLib()
     if ( aExtension != aLibExtension && aExtension != aContExtension )
         xLibDlg->EnableReference(false);
 
-    weld::DialogController::runAsync(xLibDlg, [aContExtension, xDlgURLObj, 
aExtension, aLibExtension, xModURLObj, xLibDlg, xDlgLibContImport, 
xModLibContImport, this](sal_Int32 nResult)
+    weld::DialogController::runAsync(xLibDlg, [aContExtension, 
xDlgURLObj=std::move(xDlgURLObj), aExtension,
+                                               aLibExtension, xModURLObj, 
xLibDlg,
+                                               xDlgLibContImport, 
xModLibContImport, this](sal_Int32 nResult)
         {
             if (!nResult )
                 return;
diff --git a/basic/source/classes/codecompletecache.cxx 
b/basic/source/classes/codecompletecache.cxx
index 8f03797c32dd..26275b570306 100644
--- a/basic/source/classes/codecompletecache.cxx
+++ b/basic/source/classes/codecompletecache.cxx
@@ -146,7 +146,7 @@ void CodeCompleteDataCache::InsertLocalVar( const OUString& 
sProcName, const OUS
     {
         CodeCompleteVarTypes aTypes = aVarScopes[ sProcName ];
         aTypes.emplace( sVarName, sVarType );
-        aVarScopes[ sProcName ] = aTypes;
+        aVarScopes[ sProcName ] = std::move(aTypes);
     }
 }
 
diff --git a/dbaccess/source/ui/misc/UITools.cxx 
b/dbaccess/source/ui/misc/UITools.cxx
index 195ff401e5a7..831116797646 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -231,7 +231,7 @@ Reference< XDataSource > getDataSourceByName( const 
OUString& _rDataSourceName,
     {
         if ( _pErrorInfo )
         {
-            *_pErrorInfo = aSQLError;
+            *_pErrorInfo = std::move(aSQLError);
         }
         else
         {
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx 
b/framework/source/uielement/generictoolbarcontroller.cxx
index c1ba51d78c13..e672ce7d4ca8 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -167,7 +167,7 @@ void SAL_CALL GenericToolbarController::execute( sal_Int16 
KeyModifier )
     // Execute dispatch asynchronously
     ExecuteInfo* pExecuteInfo = new ExecuteInfo;
     pExecuteInfo->xDispatch     = xDispatch;
-    pExecuteInfo->aTargetURL    = aTargetURL;
+    pExecuteInfo->aTargetURL    = std::move(aTargetURL);
     // Add key modifier to argument list
     pExecuteInfo->aArgs = { comphelper::makePropertyValue(u"KeyModifier"_ustr, 
KeyModifier) };
 
diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index e4830dd78f86..e2ac6f5b0917 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2770,7 +2770,7 @@ void ScChart2DataSequence::UpdateTokensFromRanges(const 
ScRangeList& rRanges)
 
         ScRefTokenHelper::getTokenFromRange(m_pDocument, pToken, rRange);
         sal_uInt32 nOrigPos = (*m_oRangeIndices)[i];
-        m_aTokens[nOrigPos] = pToken;
+        m_aTokens[nOrigPos] = std::move(pToken);
     }
 
     RefChanged();
diff --git a/sd/source/ui/animations/motionpathtag.cxx 
b/sd/source/ui/animations/motionpathtag.cxx
index 503ab57c0b5e..7a43fe07f54a 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -527,12 +527,12 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& 
rMEvt, SmartHdl& rHdl )
 
                     if( (pHdl->GetKind() == SdrHdlKind::Move) || 
(pHdl->GetKind() == SdrHdlKind::SmartTag) )
                     {
-                        pDragMethod = new PathDragMove( mrView, xTag, 
aDragPoly );
+                        pDragMethod = new PathDragMove( mrView, xTag, 
std::move(aDragPoly) );
                         pHdl->SetPos( aMDPos );
                     }
                     else if( pHdl->GetKind() == SdrHdlKind::Poly )
                     {
-                        pDragMethod = new PathDragObjOwn( mrView, aDragPoly );
+                        pDragMethod = new PathDragObjOwn( mrView, 
std::move(aDragPoly) );
                     }
                     else
                     {
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index ba656c32f353..a42d8c5c33d7 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -282,7 +282,7 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const 
SdrCircKind eCircleKind,
                 basegfx::B2DPolygon aSector;
                 aSector.append(aRange.getCenter());
                 aSector.append(aCircPolygon);
-                aCircPolygon = aSector;
+                aCircPolygon = std::move(aSector);
             }
 
             // close
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index 344dbe261341..6138bc7834a6 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -8760,7 +8760,7 @@ void DomainMapper_Impl::SetFieldResult(OUString const& 
rResult)
                             aValues.realloc(aValues.getLength() + 1);
                             propertyVal.Name = "Title";
                             propertyVal.Value <<= rResult;
-                            aValues.getArray()[aValues.getLength() - 1] = 
propertyVal;
+                            aValues.getArray()[aValues.getLength() - 1] = 
std::move(propertyVal);
                         }
                         xFieldProperties->setPropertyValue(u"Fields"_ustr,
                                 uno::Any(aValues));
diff --git a/vcl/source/control/wizardmachine.cxx 
b/vcl/source/control/wizardmachine.cxx
index 24b5ceae80f5..d9f125e33014 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -700,7 +700,7 @@ namespace vcl
             // get the next state
             nCurrentState = nNextState;
         }
-        m_xWizardImpl->aStateHistory = aTravelVirtually;
+        m_xWizardImpl->aStateHistory = std::move(aTravelVirtually);
         // show the target page
         if ( !ShowPage( nCurrentState ) )
         {
@@ -1075,7 +1075,7 @@ namespace vcl
             nCurrentRollbackState = aTravelVirtually.top();
             aTravelVirtually.pop();
         }
-        m_pImpl->aStateHistory = aTravelVirtually;
+        m_pImpl->aStateHistory = std::move(aTravelVirtually);
         if ( !ShowPage( _nTargetState ) )
         {
             m_pImpl->aStateHistory = std::move(aOldStateHistory);
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 3a792047e52a..308d7408c3c7 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1294,7 +1294,7 @@ void Printer::SetPaper( Paper ePaper )
     {
         ImplUpdateJobSetupPaper( aJobSetup );
         mbNewJobSetup = true;
-        maJobSetup = aJobSetup;
+        maJobSetup = std::move(aJobSetup);
         ImplUpdatePageData();
         ImplUpdateFontList();
     }
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 5b5226717774..95745b61eaf6 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1619,7 +1619,7 @@ void PrinterController::setUIOptions( const 
css::uno::Sequence< css::beans::Prop
                 mpImplData->maUIPropertyEnabled[ it->second ] = bIsEnabled;
             }
             if( !aDep.maDependsOnName.isEmpty() )
-                mpImplData->maControlDependencies[ aPropName ] = aDep;
+                mpImplData->maControlDependencies[ aPropName ] = 
std::move(aDep);
             if( aChoicesDisabled.hasElements() )
                 mpImplData->maChoiceDisableMap[ aPropName ] = aChoicesDisabled;
         }
diff --git a/vcl/source/window/bubblewindow.cxx 
b/vcl/source/window/bubblewindow.cxx
index aa9e51dfa364..f05dab15e681 100644
--- a/vcl/source/window/bubblewindow.cxx
+++ b/vcl/source/window/bubblewindow.cxx
@@ -72,7 +72,7 @@ void BubbleWindow::Resize()
     vcl::Region aTriRegion( maTriPoly );
 
     aRegion.Union( aTriRegion);
-    maBounds = aRegion;
+    maBounds = std::move(aRegion);
 
     SetWindowRegionPixel( maBounds );
 }

Reply via email to