basic/source/classes/sbunoobj.cxx                      |    2 -
 connectivity/source/drivers/file/FDatabaseMetaData.cxx |    2 -
 drawinglayer/inc/texture/texture.hxx                   |   14 ++++-----
 drawinglayer/source/texture/texture.cxx                |   24 ++++++++---------
 editeng/source/editeng/impedit2.cxx                    |    2 -
 fpicker/source/office/OfficeFilePicker.cxx             |    2 -
 oox/source/drawingml/table/predefined-table-styles.cxx |   20 +++++++-------
 sd/source/ui/animations/CustomAnimationList.cxx        |    2 -
 unotools/source/config/dynamicmenuoptions.cxx          |    2 -
 9 files changed, 35 insertions(+), 35 deletions(-)

New commits:
commit 8f008bf4b968f219d2fe97ef8175ef6be0555943
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Jul 29 08:40:58 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Mon Jul 29 14:50:38 2024 +0200

    cid#1554812 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1555227 COPY_INSTEAD_OF_MOVE
    cid#1555329 COPY_INSTEAD_OF_MOVE
    cid#1555384 COPY_INSTEAD_OF_MOVE
    cid#1555387 COPY_INSTEAD_OF_MOVE
    cid#1555399 COPY_INSTEAD_OF_MOVE
    cid#1555400 COPY_INSTEAD_OF_MOVE
    cid#1555406 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I85dc45e2686c6b3e8b97a23872cb26416edc27c8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171178
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/basic/source/classes/sbunoobj.cxx 
b/basic/source/classes/sbunoobj.cxx
index 7b0ba32e3b7e..247235b6b5e5 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -897,7 +897,7 @@ static Type getUnoTypeForSbxValue( const SbxValue* pVal )
                                 aElementType = cppu::UnoType<Any>::get();
                                 break;
                             }
-                            aElementType = aType;
+                            aElementType = std::move(aType);
                             bNeedsInit = false;
                         }
                         else if( aElementType != aType )
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx 
b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index f645d19277e0..efc8f8149f08 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -84,7 +84,7 @@ namespace
             {
                 ::ucbhelper::Content aFolderOrDoc( _rFolderOrDoc, Reference< 
XCommandEnvironment >(), comphelper::getProcessComponentContext() );
                 if ( aFolderOrDoc.isDocument() )
-                    aContent1 = aFolderOrDoc;
+                    aContent1 = std::move(aFolderOrDoc);
                 else
                 {
                     aContentURL = INetURLObject( _rFolderOrDoc, 
INetURLObject::EncodeMechanism::WasEncoded );
diff --git a/drawinglayer/inc/texture/texture.hxx 
b/drawinglayer/inc/texture/texture.hxx
index 5128a30cf2a8..aa6e79515b37 100644
--- a/drawinglayer/inc/texture/texture.hxx
+++ b/drawinglayer/inc/texture/texture.hxx
@@ -69,7 +69,7 @@ namespace drawinglayer::texture
 
             // virtual base methods
             virtual void appendTransformationsAndColors(
-                std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback) = 0;
+                const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback) = 0;
         };
 
         class GeoTexSvxGradientLinear final : public GeoTexSvxGradient
@@ -89,7 +89,7 @@ namespace drawinglayer::texture
             virtual ~GeoTexSvxGradientLinear() override;
 
             virtual void appendTransformationsAndColors(
-                std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback) override;
+                const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback) override;
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, 
basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
@@ -109,7 +109,7 @@ namespace drawinglayer::texture
             virtual ~GeoTexSvxGradientAxial() override;
 
             virtual void appendTransformationsAndColors(
-                std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback) override;
+                const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback) override;
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, 
basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
@@ -126,7 +126,7 @@ namespace drawinglayer::texture
             virtual ~GeoTexSvxGradientRadial() override;
 
             virtual void appendTransformationsAndColors(
-                std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback) override;
+                const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback) override;
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, 
basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
@@ -144,7 +144,7 @@ namespace drawinglayer::texture
             virtual ~GeoTexSvxGradientElliptical() override;
 
             virtual void appendTransformationsAndColors(
-                std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback) override;
+                const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback) override;
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, 
basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
@@ -162,7 +162,7 @@ namespace drawinglayer::texture
             virtual ~GeoTexSvxGradientSquare() override;
 
             virtual void appendTransformationsAndColors(
-                std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback) override;
+                const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback) override;
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, 
basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
@@ -180,7 +180,7 @@ namespace drawinglayer::texture
             virtual ~GeoTexSvxGradientRect() override;
 
             virtual void appendTransformationsAndColors(
-                std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback) override;
+                const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback) override;
             virtual void modifyBColor(const basegfx::B2DPoint& rUV, 
basegfx::BColor& rBColor, double& rfOpacity) const override;
         };
 
diff --git a/drawinglayer/source/texture/texture.cxx 
b/drawinglayer/source/texture/texture.cxx
index b965e0e4b933..d0210dbc7b24 100644
--- a/drawinglayer/source/texture/texture.cxx
+++ b/drawinglayer/source/texture/texture.cxx
@@ -133,7 +133,7 @@ namespace drawinglayer::texture
         }
 
         void GeoTexSvxGradientLinear::appendTransformationsAndColors(
-            std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback)
+            const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback)
         {
             // no color at all, done
             if (mnColorStops.empty())
@@ -216,7 +216,7 @@ namespace drawinglayer::texture
                     aNew.translate(0.0, fPos);
 
                     // set and add at target
-                    aCallback(
+                    rCallback(
                         maGradientInfo.getTextureTransform() * aNew,
                         1 == nSteps ? aCStart : 
basegfx::BColor(interpolate(aCStart, aCEnd, double(innerLoop) / double(nSteps - 
1))));
                 }
@@ -285,7 +285,7 @@ namespace drawinglayer::texture
         }
 
         void GeoTexSvxGradientAxial::appendTransformationsAndColors(
-            std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback)
+            const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback)
         {
             // no color at all, done
             if (mnColorStops.empty())
@@ -349,7 +349,7 @@ namespace drawinglayer::texture
                     aNew.scale(1.0, 1.0 - fPos);
 
                     // set and add at target
-                    aCallback(
+                    rCallback(
                         maGradientInfo.getTextureTransform() * aNew,
                         1 == nSteps ? aCStart : 
basegfx::BColor(interpolate(aCStart, aCEnd, double(innerLoop) / double(nSteps - 
1))));
                 }
@@ -405,7 +405,7 @@ namespace drawinglayer::texture
         }
 
         void GeoTexSvxGradientRadial::appendTransformationsAndColors(
-            std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback)
+            const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback)
         {
             // no color at all, done
             if (mnColorStops.empty())
@@ -453,7 +453,7 @@ namespace drawinglayer::texture
                     const double fSize(1.0 - (fOffsetStart + (fStripeWidth * 
innerLoop)));
 
                     // set and add at target
-                    aCallback(
+                    rCallback(
                         maGradientInfo.getTextureTransform() * 
basegfx::utils::createScaleB2DHomMatrix(fSize, fSize),
                         1 == nSteps ? aCStart : 
basegfx::BColor(interpolate(aCStart, aCEnd, double(innerLoop) / double(nSteps - 
1))));
                 }
@@ -508,7 +508,7 @@ namespace drawinglayer::texture
         }
 
         void GeoTexSvxGradientElliptical::appendTransformationsAndColors(
-            std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback)
+            const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback)
         {
             // no color at all, done
             if (mnColorStops.empty())
@@ -560,7 +560,7 @@ namespace drawinglayer::texture
                     const double fSize(fOffsetStart + (fStripeWidth * 
innerLoop));
 
                     // set and add at target
-                    aCallback(
+                    rCallback(
                         maGradientInfo.getTextureTransform()
                         * basegfx::utils::createScaleB2DHomMatrix(
                             1.0 - (bMTO ? fSize / fAR : fSize),
@@ -618,7 +618,7 @@ namespace drawinglayer::texture
         }
 
         void GeoTexSvxGradientSquare::appendTransformationsAndColors(
-            std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback)
+            const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback)
         {
             // no color at all, done
             if (mnColorStops.empty())
@@ -666,7 +666,7 @@ namespace drawinglayer::texture
                     const double fSize(1.0 - (fOffsetStart + (fStripeWidth * 
innerLoop)));
 
                     // set and add at target
-                    aCallback(
+                    rCallback(
                         maGradientInfo.getTextureTransform() * 
basegfx::utils::createScaleB2DHomMatrix(fSize, fSize),
                         1 == nSteps ? aCStart : 
basegfx::BColor(interpolate(aCStart, aCEnd, double(innerLoop) / double(nSteps - 
1))));
                 }
@@ -721,7 +721,7 @@ namespace drawinglayer::texture
         }
 
         void GeoTexSvxGradientRect::appendTransformationsAndColors(
-            std::function<void(const basegfx::B2DHomMatrix& rMatrix, const 
basegfx::BColor& rColor)> aCallback)
+            const std::function<void(const basegfx::B2DHomMatrix& rMatrix, 
const basegfx::BColor& rColor)>& rCallback)
         {
             // no color at all, done
             if (mnColorStops.empty())
@@ -773,7 +773,7 @@ namespace drawinglayer::texture
                     const double fSize(fOffsetStart + (fStripeWidth * 
innerLoop));
 
                     // set and add at target
-                    aCallback(
+                    rCallback(
                         maGradientInfo.getTextureTransform()
                         * basegfx::utils::createScaleB2DHomMatrix(
                             1.0 - (bMTO ? fSize / fAR : fSize),
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 1722b2157480..2123f89ef916 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4047,7 +4047,7 @@ EditSelection ImpEditEngine::PasteText( uno::Reference< 
datatransfer::XTransfera
             {
                 if(bRichtextSupported)
                 {
-                    aFlavor = aFlavorRichtext;
+                    aFlavor = std::move(aFlavorRichtext);
                 }
                 try
                 {
diff --git a/fpicker/source/office/OfficeFilePicker.cxx 
b/fpicker/source/office/OfficeFilePicker.cxx
index e348789037e9..cdb28d34364c 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -141,7 +141,7 @@ void SvtFilePicker::prepareExecute()
             INetURLObject aPath;
             INetURLObject givenPath( m_aDisplayDirectory );
             if (!givenPath.HasError())
-                aPath = givenPath;
+                aPath = std::move(givenPath);
             else
             {
                 aPath = INetURLObject( SvtPathOptions().GetWorkPath() );
diff --git a/oox/source/drawingml/table/predefined-table-styles.cxx 
b/oox/source/drawingml/table/predefined-table-styles.cxx
index 6ca69eb958e4..a02c8ddf0c89 100644
--- a/oox/source/drawingml/table/predefined-table-styles.cxx
+++ b/oox/source/drawingml/table/predefined-table-styles.cxx
@@ -916,16 +916,16 @@ std::unique_ptr<TableStyle> CreateTableStyle(const 
OUString& styleId)
     pTableStyle->getBand2H().getTextColor() = ::oox::drawingml::Color(); 
//band2HTextColor
     pTableStyle->getBand2V().getTextColor() = ::oox::drawingml::Color(); 
//band2VTextColor
 
-    pTableStyle->getBackgroundFillProperties() = pTblBgFillProperties;
-    pTableStyle->getWholeTbl().getFillProperties() = pWholeTblFillProperties;
-    pTableStyle->getFirstRow().getFillProperties() = pFirstRowFillProperties;
-    pTableStyle->getFirstCol().getFillProperties() = pFirstColFillProperties;
-    pTableStyle->getLastRow().getFillProperties() = pLastRowFillProperties;
-    pTableStyle->getLastCol().getFillProperties() = pLastColFillProperties;
-    pTableStyle->getBand1H().getFillProperties() = pBand1HFillProperties;
-    pTableStyle->getBand1V().getFillProperties() = pBand1VFillProperties;
-    pTableStyle->getBand2H().getFillProperties() = pBand2HFillProperties;
-    pTableStyle->getBand2V().getFillProperties() = pBand2VFillProperties;
+    pTableStyle->getBackgroundFillProperties() = 
std::move(pTblBgFillProperties);
+    pTableStyle->getWholeTbl().getFillProperties() = 
std::move(pWholeTblFillProperties);
+    pTableStyle->getFirstRow().getFillProperties() = 
std::move(pFirstRowFillProperties);
+    pTableStyle->getFirstCol().getFillProperties() = 
std::move(pFirstColFillProperties);
+    pTableStyle->getLastRow().getFillProperties() = 
std::move(pLastRowFillProperties);
+    pTableStyle->getLastCol().getFillProperties() = 
std::move(pLastColFillProperties);
+    pTableStyle->getBand1H().getFillProperties() = 
std::move(pBand1HFillProperties);
+    pTableStyle->getBand1V().getFillProperties() = 
std::move(pBand1VFillProperties);
+    pTableStyle->getBand2H().getFillProperties() = 
std::move(pBand2HFillProperties);
+    pTableStyle->getBand2V().getFillProperties() = 
std::move(pBand2VFillProperties);
 
     insertBorderLine(pTableStyle->getWholeTbl(), XML_left, 
pWholeTblLeftBorder);
     insertBorderLine(pTableStyle->getWholeTbl(), XML_right, 
pWholeTblRightBorder);
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx 
b/sd/source/ui/animations/CustomAnimationList.cxx
index 188f30b23960..23ab28669174 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -710,7 +710,7 @@ void CustomAnimationList::update()
                     aSelected.push_back(pEffect);
                     if (nFirstSelOld == -1)
                     {
-                        pFirstSelEffect = pEffect;
+                        pFirstSelEffect = std::move(pEffect);
                         nFirstSelOld = weld::GetAbsPos(*mxTreeView, rEntry);
                     }
                     if (!xLastSelectedEntry)
diff --git a/unotools/source/config/dynamicmenuoptions.cxx 
b/unotools/source/config/dynamicmenuoptions.cxx
index bb76e15e857e..6d38e7f8ef66 100644
--- a/unotools/source/config/dynamicmenuoptions.cxx
+++ b/unotools/source/config/dynamicmenuoptions.cxx
@@ -95,7 +95,7 @@ struct SvtDynMenu
                 {
                     entry = rItem;
                 }
-                lResult[nStep] = entry;
+                lResult[nStep] = std::move(entry);
                 ++nStep;
             }
         }

Reply via email to