comphelper/source/misc/asyncnotification.cxx              |    2 +-
 dbaccess/source/ui/misc/indexcollection.cxx               |    2 +-
 drawinglayer/source/primitive2d/texteffectprimitive2d.cxx |    4 ++--
 framework/source/layoutmanager/toolbarlayoutmanager.cxx   |    4 ++--
 libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx          |    3 +--
 sc/source/core/data/dpgroup.cxx                           |    2 +-
 sc/source/filter/excel/xipivot.cxx                        |    6 +++---
 sc/source/filter/excel/xltoolbar.cxx                      |    2 +-
 svl/source/numbers/zforfind.cxx                           |    4 ++--
 sw/source/core/edit/edlingu.cxx                           |    2 +-
 vcl/source/bitmap/bitmapfilter.cxx                        |    2 +-
 xmlsecurity/source/helper/xsecsign.cxx                    |    2 +-
 xmlsecurity/source/helper/xsecverify.cxx                  |    2 +-
 13 files changed, 18 insertions(+), 19 deletions(-)

New commits:
commit d3563415352dedcbe605b4d38e6e2f5a9d9f9dc0
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Aug 5 17:08:02 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Aug 5 22:12:32 2025 +0200

    cid#1660220 Variable copied when it could be moved
    
    and
    
    cid#1660211 Variable copied when it could be moved
    cid#1660204 Variable copied when it could be moved
    cid#1660195 Variable copied when it could be moved
    cid#1660194 Variable copied when it could be moved
    cid#1660193 Variable copied when it could be moved
    cid#1660191 Variable copied when it could be moved
    cid#1660188 Variable copied when it could be moved
    cid#1660187 Variable copied when it could be moved
    
    Change-Id: Ifcb179f73723e2d43144e242fa9c1b5ac332cd4f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188965
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/dbaccess/source/ui/misc/indexcollection.cxx 
b/dbaccess/source/ui/misc/indexcollection.cxx
index f61c68452be8..5949333b57c8 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -282,7 +282,7 @@ namespace dbaui
         OSL_ENSURE(end() == find(_rName), "OIndexCollection::insert: invalid 
new name!");
         OIndex aNewIndex((OUString()));  // the empty string indicates the 
index is a new one
         aNewIndex.sName = _rName;
-        m_aIndexes.push_back(aNewIndex);
+        m_aIndexes.push_back(std::move(aNewIndex));
         return m_aIndexes.end() - 1;    // the last element is the new one ...
     }
 
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index f7d6ea9c72f3..30c36b90eec8 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -1906,7 +1906,7 @@ void 
ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD
 
                 SingleRowColumnWindowData aRowColumnWindowData;
                 aRowColumnWindowData.nRowColumn = nCurrPos;
-                rRowColumnsWindowData.push_back( aRowColumnWindowData );
+                
rRowColumnsWindowData.push_back(std::move(aRowColumnWindowData));
             }
 
             sal_Int32 nSpace( 0 );
@@ -1921,7 +1921,7 @@ void 
ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD
                 nCurrPos = rElement.m_aDockedData.m_aPos.Y;
                 SingleRowColumnWindowData aRowColumnWindowData;
                 aRowColumnWindowData.nRowColumn = nCurrPos;
-                rRowColumnsWindowData.push_back( aRowColumnWindowData );
+                
rRowColumnsWindowData.push_back(std::move(aRowColumnWindowData));
             }
 
             // Calc space before an element and store it
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx
index f2c1e9b9351a..3f205d5706e2 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx
@@ -144,8 +144,7 @@ GtkWidget* GtvHelpers::createCommentBox(const 
boost::property_tree::ptree& aComm
 std::string GtvHelpers::getDirPath(const std::string& filePath)
 {
     int position = filePath.find_last_of('/');
-    const std::string dirPath = filePath.substr(0, position + 1);
-    return dirPath;
+    return filePath.substr(0, position + 1);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xipivot.cxx 
b/sc/source/filter/excel/xipivot.cxx
index fb14ec4d07eb..3e234540c6fb 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -353,16 +353,16 @@ void XclImpPCField::ReadItem( XclImpStream& rStrm )
     {
         // there are 3 items after SXNUMGROUP that contain grouping limits and 
step count
         if( maNumGroupItems.size() < 3 )
-            maNumGroupItems.push_back( xItem );
+            maNumGroupItems.push_back(std::move(xItem));
         else
-            maOrigItems.push_back( xItem );
+            maOrigItems.push_back(std::move(xItem));
     }
     else if( HasInlineItems() || HasPostponedItems() )
     {
         maItems.push_back( xItem );
         // visible item is original item in standard fields
         if( IsStandardField() )
-            maOrigItems.push_back( xItem );
+            maOrigItems.push_back(std::move(xItem));
     }
 }
 
diff --git a/sc/source/filter/excel/xltoolbar.cxx 
b/sc/source/filter/excel/xltoolbar.cxx
index 33de884957b1..ad514c9092f9 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -384,7 +384,7 @@ ScCTBWrapper::Read( SvStream &rS)
         ScCTB aCTB( ctbSet.ctbViews );
         if ( !aCTB.Read( rS ) )
             return false;
-        rCTB.push_back( aCTB );
+        rCTB.push_back(std::move(aCTB));
     }
     return true;
 }
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 715146b821d9..be587e23c6aa 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -1331,7 +1331,7 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( 
sal_uInt16 nStartPatternAt )
             assert(mpFormat->GetLanguage() == aSaveLocale.getLanguageType());  
 // prerequisite
             // Obtain formatter's locale's (e.g. system) patterns.
             xLocaleData.changeLocale( LanguageTag( 
mrCurrentLanguageData.GetIniLanguage()));
-            const css::uno::Sequence<OUString> aLocalePatterns( 
xLocaleData->getDateAcceptancePatterns());
+            css::uno::Sequence<OUString> aLocalePatterns( 
xLocaleData->getDateAcceptancePatterns());
             // Reset to format's locale.
             xLocaleData.changeLocale( aSaveLocale);
             // When concatenating don't care about duplicates, combining
@@ -1343,7 +1343,7 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( 
sal_uInt16 nStartPatternAt )
                     assert(!"shouldn't reach here");
                 break;
                 case NfEvalDateFormat::International:
-                    sDateAcceptancePatterns = aLocalePatterns;
+                    sDateAcceptancePatterns = std::move(aLocalePatterns);
                 break;
                 case NfEvalDateFormat::InternationalThenFormat:
                     sDateAcceptancePatterns = comphelper::concatSequences(
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 7b9bda1e0803..d62404093ae0 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1541,7 +1541,7 @@ void SwSpellIter::CreatePortion(uno::Reference< 
XSpellAlternatives > const & xAl
     SwPaM *pCursor = GetSh()->GetCursor();
     aPosition.nLeft = pCursor->Start()->GetContentIndex();
     aPosition.nRight = pCursor->End()->GetContentIndex();
-    m_aLastPortions.push_back(aPortion);
+    m_aLastPortions.push_back(std::move(aPortion));
     m_aLastPositions.push_back(aPosition);
 }
 
diff --git a/xmlsecurity/source/helper/xsecsign.cxx 
b/xmlsecurity/source/helper/xsecsign.cxx
index 1e44744b0773..8c564c456868 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -293,7 +293,7 @@ void XSecController::setDescription(sal_Int32 nSecurityId, 
const OUString& rDesc
     {
         InternalSignatureInformation aInformation(nSecurityId, nullptr);
         aInformation.signatureInfor.ouDescription = rDescription;
-        m_vInternalSignatureInformations.push_back(aInformation);
+        m_vInternalSignatureInformations.push_back(std::move(aInformation));
     }
     else
     {
diff --git a/xmlsecurity/source/helper/xsecverify.cxx 
b/xmlsecurity/source/helper/xsecverify.cxx
index 0cc6528cb175..46bb01e8e480 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -289,7 +289,7 @@ void XSecController::setX509Data(
     }
     if (!data.empty())
     {
-        isi.signatureInfor.X509Datas.push_back(data);
+        isi.signatureInfor.X509Datas.push_back(std::move(data));
     }
 }
 
commit 2dd405749922e9e9f11b3f15a2d0281a76d4aa39
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue Aug 5 16:48:35 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Aug 5 22:12:24 2025 +0200

    cid#1662007 Variable copied when it could be moved
    
    and
    
    cid#1660297 Variable copied when it could be moved
    cid#1660225 Variable copied when it could be moved
    cid#1660221 Variable copied when it could be moved
    
    Change-Id: I3b0d8a60b216339b0220ff80255e5d24882d8f1b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188964
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/comphelper/source/misc/asyncnotification.cxx 
b/comphelper/source/misc/asyncnotification.cxx
index 68cd57388bcd..a086c56f307d 100644
--- a/comphelper/source/misc/asyncnotification.cxx
+++ b/comphelper/source/misc/asyncnotification.cxx
@@ -215,7 +215,7 @@ namespace comphelper
     std::shared_ptr<AsyncEventNotifierAutoJoin>
     AsyncEventNotifierAutoJoin::newAsyncEventNotifierAutoJoin(char const* name)
     {
-        std::shared_ptr<AsyncEventNotifierAutoJoin> const ret(
+        std::shared_ptr<AsyncEventNotifierAutoJoin> ret(
                 new AsyncEventNotifierAutoJoin(name));
         std::scoped_lock g(GetTheNotifiersMutex());
         g_Notifiers.push_back(ret);
diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx 
b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
index 115c7ac16272..f1bb6812bfd2 100644
--- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
@@ -158,10 +158,10 @@ Primitive2DReference 
TextEffectPrimitive2D::create2DDecomposition(
                 new TransformPrimitive2D(aTransform, 
Primitive2DContainer(getTextContent())));
 
             // at last, place original over it, but force to white
-            const basegfx::BColorModifierSharedPtr aBColorModifierToWhite
+            basegfx::BColorModifierSharedPtr aBColorModifierToWhite
                 = 
std::make_shared<basegfx::BColorModifier_replace>(basegfx::BColor(1.0, 1.0, 
1.0));
             aContainer.push_back(new ModifiedColorPrimitive2D(
-                Primitive2DContainer(getTextContent()), 
aBColorModifierToWhite));
+                Primitive2DContainer(getTextContent()), 
std::move(aBColorModifierToWhite)));
 
             break;
         }
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 07f584e552f3..31cc61eed125 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -715,7 +715,7 @@ void 
ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio
                     std::make_shared<ScDPGroupDateFilter>(
                         std::move(aMatchValues), 
pDoc->GetFormatTable()->GetNullDate(), *pNumInfo);
 
-                aNewCriteria.push_back(aCri);
+                aNewCriteria.push_back(std::move(aCri));
             }
             else
             {
diff --git a/vcl/source/bitmap/bitmapfilter.cxx 
b/vcl/source/bitmap/bitmapfilter.cxx
index 30704191b9e7..e0084f1460a6 100644
--- a/vcl/source/bitmap/bitmapfilter.cxx
+++ b/vcl/source/bitmap/bitmapfilter.cxx
@@ -36,7 +36,7 @@ bool BitmapFilter::Filter(Bitmap& rBmp, BitmapFilter const& 
rFilter)
         return false;
     }
 
-    rBmp = aTmpBmp;
+    rBmp = std::move(aTmpBmp);
     return true;
 }
 

Reply via email to