basic/source/classes/eventatt.cxx                    |    4 -
 desktop/source/migration/migration.cxx               |    2 
 oox/source/export/shapes.cxx                         |   50 +++++++++----------
 sc/source/filter/oox/SparklineFragment.cxx           |    2 
 sc/source/ui/unoobj/nameuno.cxx                      |    4 -
 sd/source/ui/func/fuconrec.cxx                       |    2 
 sfx2/source/doc/guisaveas.cxx                        |    2 
 sfx2/source/sidebar/SidebarController.cxx            |    2 
 slideshow/source/engine/shapes/drawshape.cxx         |    2 
 slideshow/source/engine/slide/layermanager.cxx       |    2 
 sw/source/uibase/misc/glosdoc.cxx                    |    2 
 sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx |    4 -
 vcl/source/gdi/region.cxx                            |    2 
 vcl/source/outdev/text.cxx                           |    2 
 14 files changed, 41 insertions(+), 41 deletions(-)

New commits:
commit d5ad9c0777602541fb39dea5da71e7bfd70595fb
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Aug 1 12:05:36 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Aug 2 10:05:45 2024 +0200

    cid#1556086 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1556087 COPY_INSTEAD_OF_MOVE
    cid#1556093 COPY_INSTEAD_OF_MOVE
    cid#1556094 COPY_INSTEAD_OF_MOVE
    cid#1556105 COPY_INSTEAD_OF_MOVE
    cid#1556121 COPY_INSTEAD_OF_MOVE
    cid#1556184 COPY_INSTEAD_OF_MOVE
    cid#1556399 COPY_INSTEAD_OF_MOVE
    cid#1556405 COPY_INSTEAD_OF_MOVE
    cid#1556419 COPY_INSTEAD_OF_MOVE
    cid#1556421 COPY_INSTEAD_OF_MOVE
    cid#1556444 COPY_INSTEAD_OF_MOVE
    cid#1556448 COPY_INSTEAD_OF_MOVE
    cid#1556457 COPY_INSTEAD_OF_MOVE
    cid#1556468 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I1f352682daebd4e3ed2e7fe669aa0943dcc33edd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171372
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/basic/source/classes/eventatt.cxx 
b/basic/source/classes/eventatt.cxx
index 3ffe183e3a3b..f97f1a77afef 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -226,11 +226,11 @@ void BasicScriptListener_Impl::firing_impl( const 
ScriptEvent& aScriptEvent, Any
         StarBASICRef xLibSearchBasic;
         if( aLocation == "application" )
         {
-            xLibSearchBasic = xAppStandardBasic;
+            xLibSearchBasic = std::move(xAppStandardBasic);
         }
         else if( aLocation == "document" )
         {
-            xLibSearchBasic = xDocStandardBasic;
+            xLibSearchBasic = std::move(xDocStandardBasic);
         }
         else
         {
diff --git a/desktop/source/migration/migration.cxx 
b/desktop/source/migration/migration.cxx
index 76c769eba0bb..eb2c548eb10a 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -493,7 +493,7 @@ sal_Int32 
MigrationImpl::findPreferredMigrationProcess(const migrations_availabl
     {
         install_info aInstallInfo = 
findInstallation(availableMigration.supported_versions);
         if (!aInstallInfo.productname.isEmpty() ) {
-            m_aInfo = aInstallInfo;
+            m_aInfo = std::move(aInstallInfo);
             nIndex  = i;
             break;
         }
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index d3e847d84211..e948a352de73 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1506,10 +1506,10 @@ static void lcl_Rotate(sal_Int32 nAngle, Point center, 
awt::Point& pt)
     pt.Y = center.Y() + y * nCos + x * nSin;
 }
 
-static void lcl_FlipHFlipV(tools::Polygon aPoly, sal_Int32 nAngle, bool& 
rFlipH, bool& rFlipV)
+static void lcl_FlipHFlipV(const tools::Polygon& rPoly, sal_Int32 nAngle, 
bool& rFlipH, bool& rFlipV)
 {
-    Point aStart = aPoly[0];
-    Point aEnd = aPoly[aPoly.GetSize() - 1];
+    Point aStart = rPoly[0];
+    Point aEnd = rPoly[rPoly.GetSize() - 1];
 
     if (aStart.X() > aEnd.X() && aStart.Y() > aEnd.Y())
     {
@@ -1576,12 +1576,12 @@ static void lcl_FlipHFlipV(tools::Polygon aPoly, 
sal_Int32 nAngle, bool& rFlipH,
     }
 }
 
-static sal_Int32 lcl_GetAngle(tools::Polygon aPoly)
+static sal_Int32 lcl_GetAngle(const tools::Polygon& rPoly)
 {
     sal_Int32 nAngle;
-    Point aStartPoint = aPoly[0];
-    Point aEndPoint = aPoly[aPoly.GetSize() - 1];
-    if (aStartPoint.X() == aPoly[1].X())
+    Point aStartPoint = rPoly[0];
+    Point aEndPoint = rPoly[rPoly.GetSize() - 1];
+    if (aStartPoint.X() == rPoly[1].X())
     {
         if ((aStartPoint.X() < aEndPoint.X() && aStartPoint.Y() > 
aEndPoint.Y())
             || (aStartPoint.X() > aEndPoint.X() && aStartPoint.Y() < 
aEndPoint.Y()))
@@ -1593,7 +1593,7 @@ static sal_Int32 lcl_GetAngle(tools::Polygon aPoly)
     }
     else
     {
-        if (aStartPoint.X() > aPoly[1].X())
+        if (aStartPoint.X() > rPoly[1].X())
             nAngle = 180;
         else
             nAngle = 0;
@@ -1603,7 +1603,7 @@ static sal_Int32 lcl_GetAngle(tools::Polygon aPoly)
 }
 
 // Adjust value decide the position, where the connector should turn.
-static void lcl_GetConnectorAdjustValue(const Reference<XShape>& xShape, 
tools::Polygon aPoly,
+static void lcl_GetConnectorAdjustValue(const Reference<XShape>& xShape, const 
tools::Polygon& rPoly,
                                         ConnectorType eConnectorType,
                                         std::vector<std::pair<sal_Int32, 
sal_Int32>>& rAvList)
 {
@@ -1615,22 +1615,22 @@ static void lcl_GetConnectorAdjustValue(const 
Reference<XShape>& xShape, tools::
     {
         if (bIsOOXMLCurve)
         {
-            nAdjCount = (aPoly.GetSize() - 4) / 3;
+            nAdjCount = (rPoly.GetSize() - 4) / 3;
         }
-        else if (aPoly.GetSize() == 4)
+        else if (rPoly.GetSize() == 4)
         {
-            if ((aPoly[0].X() == aPoly[1].X() && aPoly[2].X() == aPoly[3].X())
-                || (aPoly[0].Y() == aPoly[1].Y() && aPoly[2].Y() == 
aPoly[3].Y()))
+            if ((rPoly[0].X() == rPoly[1].X() && rPoly[2].X() == rPoly[3].X())
+                || (rPoly[0].Y() == rPoly[1].Y() && rPoly[2].Y() == 
rPoly[3].Y()))
             {
                 nAdjCount = 1; // curvedConnector3, control vectors parallel
             }
             else
                 nAdjCount = 0; // curvedConnector2, control vectors orthogonal
         }
-        else if (aPoly.GetSize() > 4)
+        else if (rPoly.GetSize() > 4)
         {
-            if ((aPoly[2].X() == aPoly[3].X() && aPoly[3].X() == aPoly[4].X())
-                || (aPoly[2].Y() == aPoly[3].Y() && aPoly[3].Y() == 
aPoly[4].Y()))
+            if ((rPoly[2].X() == rPoly[3].X() && rPoly[3].X() == rPoly[4].X())
+                || (rPoly[2].Y() == rPoly[3].Y() && rPoly[3].Y() == 
rPoly[4].Y()))
             {
                 nAdjCount = 3; // curvedConnector5
             }
@@ -1640,7 +1640,7 @@ static void lcl_GetConnectorAdjustValue(const 
Reference<XShape>& xShape, tools::
     }
     else
     {
-        switch (aPoly.GetSize())
+        switch (rPoly.GetSize())
         {
             case 3:
                 nAdjCount = 0; // bentConnector2
@@ -1660,19 +1660,19 @@ static void lcl_GetConnectorAdjustValue(const 
Reference<XShape>& xShape, tools::
     if (nAdjCount)
     {
         sal_Int32 nAdjustValue;
-        Point aStart = aPoly[0];
-        Point aEnd = aPoly[aPoly.GetSize() - 1];
+        Point aStart = rPoly[0];
+        Point aEnd = rPoly[rPoly.GetSize() - 1];
 
         for (sal_Int32 i = 1; i <= nAdjCount; ++i)
         {
-            Point aPt = aPoly[i];
+            Point aPt = rPoly[i];
 
             if (aEnd.Y() == aStart.Y())
                 aEnd.setY(aStart.Y() + 1);
             if (aEnd.X() == aStart.X())
                 aEnd.setX(aStart.X() + 1);
 
-            bool bVertical = aPoly[1].X() - aStart.X() != 0 ? true : false;
+            bool bVertical = rPoly[1].X() - aStart.X() != 0 ? true : false;
             // vertical and horizon alternate
             if (i % 2 == 1)
                 bVertical = !bVertical;
@@ -1681,18 +1681,18 @@ static void lcl_GetConnectorAdjustValue(const 
Reference<XShape>& xShape, tools::
             {
                 if (bIsOOXMLCurve)
                 {
-                    aPt = aPoly[3 *  i];
+                    aPt = rPoly[3 *  i];
                 }
                 else
                 {
                     awt::Size aSize = xShape->getSize();
                     awt::Point aShapePosition = xShape->getPosition();
-                    tools::Rectangle aBoundRect = aPoly.GetBoundRect();
+                    tools::Rectangle aBoundRect = rPoly.GetBoundRect();
 
                     if (bVertical)
                     {
                         if ((aBoundRect.GetSize().Height() - aSize.Height) == 
1)
-                            aPt.setY(aPoly[i + 1].Y());
+                            aPt.setY(rPoly[i + 1].Y());
                         else if (aStart.Y() > aPt.Y())
                             aPt.setY(aShapePosition.Y);
                         else
@@ -1701,7 +1701,7 @@ static void lcl_GetConnectorAdjustValue(const 
Reference<XShape>& xShape, tools::
                     else
                     {
                         if ((aBoundRect.GetSize().Width() - aSize.Width) == 1)
-                            aPt.setX(aPoly[i + 1].X());
+                            aPt.setX(rPoly[i + 1].X());
                         else if (aStart.X() > aPt.X())
                             aPt.setX(aShapePosition.X);
                         else
diff --git a/sc/source/filter/oox/SparklineFragment.cxx 
b/sc/source/filter/oox/SparklineFragment.cxx
index 88097024180a..5486a0f5cc6f 100644
--- a/sc/source/filter/oox/SparklineFragment.cxx
+++ b/sc/source/filter/oox/SparklineFragment.cxx
@@ -238,7 +238,7 @@ void SparklineGroupsContext::onCharacters(const OUString& 
rChars)
             {
                 if (getCurrentElement() == XM_TOKEN(sqref))
                 {
-                    rLastSparkline.m_aTargetRange = aRange;
+                    rLastSparkline.m_aTargetRange = std::move(aRange);
 
                     // Need to set the current sheet index to the range as
                     // it is assumed that the address string refers to
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 1321543d5080..16570353a225 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -1084,9 +1084,9 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 
nIndex )
             xNewList->Remove( nIndex );
 
             if (bColumn)
-                rDoc.GetColNameRangesRef() = xNewList;
+                rDoc.GetColNameRangesRef() = std::move(xNewList);
             else
-                rDoc.GetRowNameRangesRef() = xNewList;
+                rDoc.GetRowNameRangesRef() = std::move(xNewList);
 
             rDoc.CompileColRowNameFormula();
             pDocShell->PostPaint( 0,0,0, rDoc.MaxCol(),rDoc.MaxRow(),MAXTAB, 
PaintPartFlags::Grid );
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index a23f463b6d7f..fe4dde1ca152 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -849,7 +849,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, 
SdrObject const & rObj
         case SID_LINE_SQUARE_ARROW:
         {
             // square start
-            rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_SQUARE), aSquare));
+            rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_SQUARE), 
std::move(aSquare)));
             rAttr.Put(XLineStartWidthItem(nWidth));
         }
         break;
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index dc88659e6b1e..bcbd7679bef5 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1333,7 +1333,7 @@ OUString ModelData_Impl::GetRecommendedDir( const 
OUString& aSuggestedDir )
             {
                 INetURLObject aTmp( aOldURL );
                 if ( aTmp.removeSegment() )
-                    aLocation = aTmp;
+                    aLocation = std::move(aTmp);
             }
 
             if ( aLocation.HasError() )
diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index e421e957f960..e9843f703ee8 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -733,7 +733,7 @@ void SidebarController::CreateDeck(std::u16string_view 
rDeckId, const Context& r
                         mpParentWindow,
                         [this]() { return this->RequestCloseDeck(); });
     }
-    xDeckDescriptor->mpDeck = aDeck;
+    xDeckDescriptor->mpDeck = std::move(aDeck);
     CreatePanels(rDeckId, rContext);
 }
 
diff --git a/slideshow/source/engine/shapes/drawshape.cxx 
b/slideshow/source/engine/shapes/drawshape.cxx
index cdeb03e34f7d..3b08dae0ff18 100644
--- a/slideshow/source/engine/shapes/drawshape.cxx
+++ b/slideshow/source/engine/shapes/drawshape.cxx
@@ -1152,7 +1152,7 @@ namespace slideshow::internal
 
             if( pSubset )
             {
-                o_rSubset = pSubset;
+                o_rSubset = std::move(pSubset);
 
                 // reusing existing subset
             }
diff --git a/slideshow/source/engine/slide/layermanager.cxx 
b/slideshow/source/engine/slide/layermanager.cxx
index 8f6b7163c17b..4d722cb61e32 100644
--- a/slideshow/source/engine/slide/layermanager.cxx
+++ b/slideshow/source/engine/slide/layermanager.cxx
@@ -523,7 +523,7 @@ namespace slideshow::internal
                 LayerSharedPtr pLayer = rShape.second.lock();
                 if( pLayer != pCurrLayer )
                 {
-                    pCurrLayer = pLayer;
+                    pCurrLayer = std::move(pLayer);
                     bIsCurrLayerUpdating = pCurrLayer->isUpdatePending();
 
                     if( bIsCurrLayerUpdating )
diff --git a/sw/source/uibase/misc/glosdoc.cxx 
b/sw/source/uibase/misc/glosdoc.cxx
index f2d896f3af7b..9899158a9dee 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -388,7 +388,7 @@ void SwGlossaries::UpdateGlosPath(bool bFull)
         aInvalidPaths.erase(std::unique(aInvalidPaths.begin(), 
aInvalidPaths.end()), aInvalidPaths.end());
         if (bPathChanged || (m_aInvalidPaths != aInvalidPaths))
         {
-            m_aInvalidPaths = aInvalidPaths;
+            m_aInvalidPaths = std::move(aInvalidPaths);
             // wrong path, that means AutoText directory doesn't exist
 
             ErrorHandler::HandleError( ErrCodeMsg(
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index 15665d93f51f..3a4307228a8f 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -2984,7 +2984,7 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
                 }
             }
             if( !bKeepLastParagraphProperties )
-                rAppendContext.pLastParagraphProperties = pToBeSavedProperties;
+                rAppendContext.pLastParagraphProperties = 
std::move(pToBeSavedProperties);
         }
         catch(const lang::IllegalArgumentException&)
         {
@@ -4068,7 +4068,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool 
bIsFootnote )
 
         // Try scanning for custom footnote labels
         if (!sFootnoteCharStyleName.isEmpty())
-            StartCustomFootnote(pTopContext);
+            StartCustomFootnote(std::move(pTopContext));
         else
             EndCustomFootnote();
     }
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 6bb98e1398bd..efe1d989fc7c 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -1024,7 +1024,7 @@ void vcl::Region::Intersect( const vcl::Region& rRegion )
         // when we have less rectangles, turn around the call
         vcl::Region aTempRegion = rRegion;
         aTempRegion.Intersect( *this );
-        *this = aTempRegion;
+        *this = std::move(aTempRegion);
     }
     else
     {
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index d0bdd7ccf68f..2d41dd412888 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1151,7 +1151,7 @@ static void TrackFontMappingUse( const vcl::Font& 
originalFont, const SalLayout*
             return;
         }
     }
-    fontMappingUseData->push_back( { originalName, usedFontNames, 1 } );
+    fontMappingUseData->push_back( { originalName, std::move(usedFontNames), 1 
} );
 }
 
 void OutputDevice::StartTrackingFontMappingUse()

Reply via email to