chart2/source/controller/main/ChartController_Insert.cxx |   36 +++++++--------
 framework/source/services/pathsettings.cxx               |    2 
 sc/source/ui/view/gridwin.cxx                            |    8 +--
 sd/source/ui/view/ViewShellManager.cxx                   |    4 -
 sdext/source/pdfimport/tree/pdfiprocessor.cxx            |    2 
 sfx2/source/doc/objstor.cxx                              |    3 -
 svl/source/numbers/zforlist.cxx                          |    2 
 svx/source/engine3d/obj3d.cxx                            |    2 
 svx/source/form/fmshimp.cxx                              |    2 
 svx/source/sdr/overlay/overlaytools.cxx                  |    2 
 sw/source/uibase/docvw/PostItMgr.cxx                     |    2 
 sw/source/uibase/utlui/content.cxx                       |    2 
 ucb/source/ucp/webdav-curl/webdavcontent.cxx             |    2 
 vcl/source/filter/png/PngImageReader.cxx                 |    2 
 vcl/source/text/ImplLayoutRuns.cxx                       |    2 
 15 files changed, 38 insertions(+), 35 deletions(-)

New commits:
commit ce18ff2e7df7f5162ac18da18796b2623b500768
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Aug 8 09:05:03 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Aug 8 13:35:27 2024 +0200

    cid#1607356 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1607117 COPY_INSTEAD_OF_MOVE
    cid#1607089 COPY_INSTEAD_OF_MOVE
    cid#1606977 COPY_INSTEAD_OF_MOVE
    cid#1606899 COPY_INSTEAD_OF_MOVE
    cid#1606785 COPY_INSTEAD_OF_MOVE
    cid#1606769 COPY_INSTEAD_OF_MOVE
    cid#1606740 COPY_INSTEAD_OF_MOVE
    cid#1606738 COPY_INSTEAD_OF_MOVE
    cid#1606675 COPY_INSTEAD_OF_MOVE
    cid#1606533 COPY_INSTEAD_OF_MOVE
    cid#1558100 COPY_INSTEAD_OF_MOVE
    cid#1558098 COPY_INSTEAD_OF_MOVE
    cid#1558083 COPY_INSTEAD_OF_MOVE
    cid#1558077 COPY_INSTEAD_OF_MOVE
    cid#1558074 COPY_INSTEAD_OF_MOVE
    
    Change-Id: Ica17dec2c2102ef85283fd883a0a4e64aec307c2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171620
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/chart2/source/controller/main/ChartController_Insert.cxx 
b/chart2/source/controller/main/ChartController_Insert.cxx
index c5d0822346bc..707ca4b0e702 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -94,14 +94,14 @@ void ChartController::executeDispatch_InsertAxes()
 
     try
     {
-        auto aDialogInput = std::make_shared<InsertAxisOrGridDialogData>();
+        auto xDialogInput = std::make_shared<InsertAxisOrGridDialogData>();
         rtl::Reference< Diagram > xDiagram = getFirstDiagram();
-        AxisHelper::getAxisOrGridExistence( aDialogInput->aExistenceList, 
xDiagram );
-        AxisHelper::getAxisOrGridPossibilities( 
aDialogInput->aPossibilityList, xDiagram );
+        AxisHelper::getAxisOrGridExistence( xDialogInput->aExistenceList, 
xDiagram );
+        AxisHelper::getAxisOrGridPossibilities( 
xDialogInput->aPossibilityList, xDiagram );
 
         SolarMutexGuard aGuard;
-        auto aDlg = std::make_shared<SchAxisDlg>(GetChartFrame(), 
*aDialogInput);
-        weld::DialogController::runAsync(aDlg, [this, aDlg, 
aDialogInput=std::move(aDialogInput),
+        auto aDlg = std::make_shared<SchAxisDlg>(GetChartFrame(), 
*xDialogInput);
+        weld::DialogController::runAsync(aDlg, [this, aDlg, 
xDialogInput=std::move(xDialogInput),
                                                 
xUndoGuard=std::move(xUndoGuard)](int nResult) {
             if ( nResult == RET_OK )
             {
@@ -112,7 +112,7 @@ void ChartController::executeDispatch_InsertAxes()
                 aDlg->getResult(aDialogOutput);
                 ReferenceSizeProvider 
aRefSizeProvider(impl_createReferenceSizeProvider());
                 bool bChanged = AxisHelper::changeVisibilityOfAxes( 
getFirstDiagram()
-                    , aDialogInput->aExistenceList, 
aDialogOutput.aExistenceList, m_xCC
+                    , xDialogInput->aExistenceList, 
aDialogOutput.aExistenceList, m_xCC
                     , &aRefSizeProvider );
                 if( bChanged )
                     xUndoGuard->commit();
@@ -281,19 +281,20 @@ void ChartController::executeDispatch_InsertTitles()
 
     try
     {
-        auto aDialogInput = std::make_shared<TitleDialogData>();
-        aDialogInput->readFromModel( getChartModel() );
+        auto xDialogInput = std::make_shared<TitleDialogData>();
+        xDialogInput->readFromModel( getChartModel() );
 
         SolarMutexGuard aGuard;
-        auto aDlg = std::make_shared<SchTitleDlg>(GetChartFrame(), 
*aDialogInput);
-        weld::DialogController::runAsync(aDlg, [this, aDlg, aDialogInput, 
xUndoGuard=std::move(xUndoGuard)](int nResult){
+        auto aDlg = std::make_shared<SchTitleDlg>(GetChartFrame(), 
*xDialogInput);
+        weld::DialogController::runAsync(aDlg, [this, aDlg, 
xDialogInput=std::move(xDialogInput),
+                                                
xUndoGuard=std::move(xUndoGuard)](int nResult){
             if ( nResult == RET_OK )
             {
                 // lock controllers till end of block
                 ControllerLockGuardUNO aCLGuard( getChartModel() );
                 TitleDialogData aDialogOutput( 
impl_createReferenceSizeProvider() );
                 aDlg->getResult( aDialogOutput );
-                bool bChanged = aDialogOutput.writeDifferenceToModel( 
getChartModel(), m_xCC, aDialogInput.get() );
+                bool bChanged = aDialogOutput.writeDifferenceToModel( 
getChartModel(), m_xCC, xDialogInput.get() );
                 if( bChanged )
                     xUndoGuard->commit();
             }
@@ -590,10 +591,10 @@ void ChartController::executeDispatch_InsertErrorBars( 
bool bYError )
 
         try
         {
-            auto aItemConverter = 
std::make_shared<wrapper::AllSeriesStatisticsConverter>(
+            auto xItemConverter = 
std::make_shared<wrapper::AllSeriesStatisticsConverter>(
                 getChartModel(), m_pDrawModelWrapper->GetItemPool() );
-            SfxItemSet aItemSet = aItemConverter->CreateEmptyItemSet();
-            aItemConverter->FillItemSet( aItemSet );
+            SfxItemSet aItemSet = xItemConverter->CreateEmptyItemSet();
+            xItemConverter->FillItemSet( aItemSet );
 
             //prepare and open dialog
             SolarMutexGuard aGuard;
@@ -605,15 +606,16 @@ void ChartController::executeDispatch_InsertErrorBars( 
bool bYError )
             aDlg->SetAxisMinorStepWidthForErrorBarDecimals(
                 
InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( 
getChartModel(), m_xChartView, u"" ) );
 
-            weld::DialogController::runAsync(aDlg, [this, aDlg, 
aItemConverter, xUndoGuard=std::move(xUndoGuard)](int nResult) {
+            weld::DialogController::runAsync(aDlg, [this, aDlg, 
xItemConverter=std::move(xItemConverter),
+                                                    
xUndoGuard=std::move(xUndoGuard)](int nResult) {
                 if ( nResult == RET_OK )
                 {
-                    SfxItemSet aOutItemSet = 
aItemConverter->CreateEmptyItemSet();
+                    SfxItemSet aOutItemSet = 
xItemConverter->CreateEmptyItemSet();
                     aDlg->FillItemSet( aOutItemSet );
 
                     // lock controllers till end of block
                     ControllerLockGuardUNO aCLGuard( getChartModel() );
-                    bool bChanged = aItemConverter->ApplyItemSet( aOutItemSet 
);//model should be changed now
+                    bool bChanged = xItemConverter->ApplyItemSet( aOutItemSet 
);//model should be changed now
                     if( bChanged )
                         xUndoGuard->commit();
                 }
diff --git a/framework/source/services/pathsettings.cxx 
b/framework/source/services/pathsettings.cxx
index 66367397f2a5..a183cff67bff 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -1189,7 +1189,7 @@ void PathSettings::impl_setPathValue(      sal_Int32      
nID ,
                 std::vector<OUString> lList = 
comphelper::sequenceToContainer<std::vector<OUString>>(lTmpList);
                 if (! impl_isValidPath(lList))
                     throw css::lang::IllegalArgumentException();
-                aChangePath.lUserPaths = lList;
+                aChangePath.lUserPaths = std::move(lList);
              }
              break;
 
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index dbafb6f7bdc9..6df4629748b4 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5845,14 +5845,14 @@ static void lcl_SetEngineTextKeepingDefaults(const 
std::shared_ptr<ScFieldEditEn
     }
 }
 
-static std::vector<std::unique_ptr<SvxFieldItem>> 
lcl_GetEditEngineFields(std::shared_ptr<ScFieldEditEngine> pEditEngine)
+static std::vector<std::unique_ptr<SvxFieldItem>> 
lcl_GetEditEngineFields(const ScFieldEditEngine& rEditEngine)
 {
     std::vector<std::unique_ptr<SvxFieldItem>> vFieldVect;
 
-    sal_Int32 nPara = pEditEngine->GetParagraphCount();
+    sal_Int32 nPara = rEditEngine.GetParagraphCount();
     for (sal_Int32 nCurrPara = 0; nCurrPara < nPara; ++nCurrPara)
     {
-        for (EFieldInfo& rFieldInfo : pEditEngine->GetFieldInfo(nCurrPara))
+        for (EFieldInfo& rFieldInfo : rEditEngine.GetFieldInfo(nCurrPara))
         {
             vFieldVect.push_back(std::move(rFieldInfo.pFieldItem));
         }
@@ -5885,7 +5885,7 @@ std::vector<UrlData> ScGridWindow::GetEditUrls(const 
ScAddress& rSelectedCell)
 
     lcl_SetEngineTextKeepingDefaults(pEngine, rDoc, aCell, sURL);
 
-    std::vector<std::unique_ptr<SvxFieldItem>> vFieldItems = 
lcl_GetEditEngineFields(pEngine);
+    std::vector<std::unique_ptr<SvxFieldItem>> vFieldItems = 
lcl_GetEditEngineFields(*pEngine);
     for (auto& pFieldItem : vFieldItems)
     {
         UrlData aData;
diff --git a/sd/source/ui/view/ViewShellManager.cxx 
b/sd/source/ui/view/ViewShellManager.cxx
index 46ccf6c34446..bae997eb7446 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -114,7 +114,7 @@ public:
     void ActivateSubShell (const SfxShell& rParentShell, ShellId nId);
     void DeactivateSubShell (const SfxShell& rParentShell, ShellId nId);
     void RemoveOverridingMainShell();
-    void SetOverridingShell(std::shared_ptr<ViewShell> pViewShell);
+    void SetOverridingShell(const std::shared_ptr<ViewShell>& pViewShell);
     std::shared_ptr<ViewShell> GetOverridingShell();
     void MoveToTop (const SfxShell& rParentShell);
     SfxShell* GetShell (ShellId nId) const;
@@ -604,7 +604,7 @@ void 
ViewShellManager::Implementation::RemoveOverridingMainShell()
     mpOverridingShell.reset();
 }
 
-void 
ViewShellManager::Implementation::SetOverridingShell(std::shared_ptr<ViewShell> 
pViewShell)
+void ViewShellManager::Implementation::SetOverridingShell(const 
std::shared_ptr<ViewShell>& pViewShell)
 {
     mpOverridingShell = pViewShell;
 }
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx 
b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index 70386dbba35f..e12a73cb407e 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -498,7 +498,7 @@ void PDFIProcessor::intersectClip(const uno::Reference< 
rendering::XPolyPolygon2
     if( aCurClip.count() )  // #i92985# adapted API from (..., false, false) 
to (..., true, false)
         aNewClip = basegfx::utils::clipPolyPolygonOnPolyPolygon( aCurClip, 
aNewClip, true, false );
 
-    getCurrentContext().Clip = aNewClip;
+    getCurrentContext().Clip = std::move(aNewClip);
 }
 
 void PDFIProcessor::intersectEoClip(const uno::Reference< 
rendering::XPolyPolygon2D >& rPath)
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 86717c1f428a..fefea8c2969a 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3138,7 +3138,8 @@ bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
             pFilter = SfxFilterMatcher( GetFactory().GetFactoryName() 
).GetFilter4FilterName( OUString() );
 
         SfxMedium *pMed = new SfxMedium(
-            pSalvageItem->GetValue(), StreamMode::READWRITE | 
StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, pFilter );
+            pSalvageItem->GetValue(), StreamMode::READWRITE | 
StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC,
+            std::move(pFilter) );
 
         const SfxStringItem* pPasswordItem = 
GetMedium()->GetItemSet().GetItem(SID_PASSWORD, false);
         if ( pPasswordItem )
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index bd5ef47a595b..d15201f9c505 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -3707,7 +3707,7 @@ OUString SvNFEngine::GenerateFormat(SvNFLanguageData& 
rCurrentLanguage,
             {
                 sTmpStr.append("-" + sString);
             }
-            sString = sTmpStr;
+            sString = std::move(sTmpStr);
         }
     }
     sString.insert( 0, sPosNatNumModifier );
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index 57eb2f9f5e29..a5ea33938b32 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -343,7 +343,7 @@ const basegfx::B3DHomMatrix& E3dObject::GetFullTransform() 
const
             aNewFullTransformation = pParent->GetFullTransform() * 
aNewFullTransformation;
         }
 
-        const_cast< E3dObject* >(this)->maFullTransform = 
aNewFullTransformation;
+        const_cast< E3dObject* >(this)->maFullTransform = 
std::move(aNewFullTransformation);
         const_cast< E3dObject* >(this)->mbTfHasChanged = false;
     }
 
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index e75742bf4f0d..1b91ac1585bd 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1960,7 +1960,7 @@ bool FmXFormShell::setCurrentSelection_Lock( 
InterfaceBag&& _rSelection )
         }
     }
 
-    m_aCurrentSelection = _rSelection;
+    m_aCurrentSelection = std::move(_rSelection);
 
     // determine the form which all the selected objects belong to, if any
     Reference< XForm > xNewCurrentForm;
diff --git a/svx/source/sdr/overlay/overlaytools.cxx 
b/svx/source/sdr/overlay/overlaytools.cxx
index 3013f7e834d4..5fe5d20ab784 100644
--- a/svx/source/sdr/overlay/overlaytools.cxx
+++ b/svx/source/sdr/overlay/overlaytools.cxx
@@ -363,7 +363,7 @@ sal_uInt32 
OverlayStaticRectanglePrimitive::getPrimitive2DID() const
                 const basegfx::BColor 
aHighContrastLineColor(Application::GetSettings().GetStyleSettings().GetHighlightColor().getBColor());
                 const attribute::LineAttribute 
aLineAttribute(aHighContrastLineColor, getDiscreteUnit() * getDiscreteGrow());
 
-                aRetval = new PolygonStrokePrimitive2D(aInnerPolygon, 
aLineAttribute);
+                aRetval = new 
PolygonStrokePrimitive2D(std::move(aInnerPolygon), aLineAttribute);
             }
 
             return aRetval;
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 26cebad5fe8e..08bbdbd57dbe 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1738,7 +1738,7 @@ void SwPostItMgr::ExecuteFormatAllDialog(SwView& rView)
     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
     VclPtr<SfxAbstractTabDialog> 
pDlg(pFact->CreateSwCharDlg(rView.GetFrameWeld(), rView, *xDlgAttr, 
SwCharDlgMode::Ann));
     pDlg->StartExecuteAsync(
-        [this, pDlg, xDlgAttr, pOrigActiveWin] (sal_Int32 nResult)->void
+        [this, pDlg, xDlgAttr=std::move(xDlgAttr), pOrigActiveWin] (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 de71d32cdc86..ad8048837e50 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2585,7 +2585,7 @@ void SwContentTree::Expand(const weld::TreeIter& rParent,
                     }
                 }
             }
-            m_aRegionNodeExpandMap = aCurrentRegionNodeExpandMap;
+            m_aRegionNodeExpandMap = std::move(aCurrentRegionNodeExpandMap);
             return;
         }
         else // content entry
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 4b3589ea7bf9..636272362691 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -2106,7 +2106,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
 
         m_aEscapedTitle     = EncodeSegment(aNewTitle);
 
-        aChanges.getArray()[ nChanged ] = aEvent;
+        aChanges.getArray()[ nChanged ] = std::move(aEvent);
         nChanged++;
     }
 
diff --git a/vcl/source/filter/png/PngImageReader.cxx 
b/vcl/source/filter/png/PngImageReader.cxx
index 27e0e5bd766a..e64343dd0070 100644
--- a/vcl/source/filter/png/PngImageReader.cxx
+++ b/vcl/source/filter/png/PngImageReader.cxx
@@ -870,7 +870,7 @@ bool ImportPNG(SvStream& rInputStream, Graphic& rGraphic, 
GraphicFilterImportFla
     if (reader(rInputStream, aGraphic, nImportFlags, pAccess, pAlphaAccess))
     {
         if (!(nImportFlags & GraphicFilterImportFlags::UseExistingBitmap))
-            rGraphic = aGraphic;
+            rGraphic = std::move(aGraphic);
         return true;
     }
     return false;
diff --git a/vcl/source/text/ImplLayoutRuns.cxx 
b/vcl/source/text/ImplLayoutRuns.cxx
index f7bbd161650a..ab459da2e9ad 100644
--- a/vcl/source/text/ImplLayoutRuns.cxx
+++ b/vcl/source/text/ImplLayoutRuns.cxx
@@ -201,7 +201,7 @@ void ImplLayoutRuns::PrepareFallbackRuns(ImplLayoutRuns* 
paRuns, ImplLayoutRuns*
         }
     }
 
-    *paRuns = aNewRuns;
+    *paRuns = std::move(aNewRuns);
     paRuns->ResetPos();
 
     paFallbackRuns->Clear();

Reply via email to