basctl/source/basicide/scriptdocument.cxx               |    2 +-
 chart2/source/view/axes/VCartesianAxis.cxx              |    2 +-
 dbaccess/source/core/misc/DatabaseDataProvider.cxx      |    2 +-
 framework/source/layoutmanager/toolbarlayoutmanager.cxx |    2 +-
 sc/source/filter/excel/xistyle.cxx                      |    2 +-
 svx/source/table/tablehtmlimporter.cxx                  |    3 +--
 vcl/source/gdi/pdfwriter_impl.cxx                       |    2 +-
 vcl/source/image/ImplImage.cxx                          |    2 +-
 vcl/source/image/ImplImageTree.cxx                      |    4 ++--
 xmloff/source/chart/SchXMLExport.cxx                    |    2 +-
 10 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit fc6d103827687ee424a3ac9c764278dd899ef714
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Aug 8 09:07:05 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 8 12:35:37 2025 +0200

    cid#1662042 Variable copied when it could be moved
    
    and
    
    cid#1662041 Variable copied when it could be moved
    cid#1662040 Variable copied when it could be moved
    cid#1662038 Variable copied when it could be moved
    cid#1660211 Variable copied when it could be moved
    cid#1660147 Variable copied when it could be moved
    cid#1660117 Variable copied when it could be moved
    cid#1660071 Variable copied when it could be moved
    cid#1660046 Variable copied when it could be moved
    cid#1660046 Variable copied when it could be moved
    cid#1659985 Variable copied when it could be moved
    
    Change-Id: I34627585e593f9de6bfa195ee0617848d9ed6135
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189157
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/basctl/source/basicide/scriptdocument.cxx 
b/basctl/source/basicide/scriptdocument.cxx
index c7f1630ec52b..320d5cc1148c 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -1112,7 +1112,7 @@ namespace basctl
                 if ( !aDoc.isValid() )
                     continue;
 
-                aScriptDocs.push_back( aDoc );
+                aScriptDocs.push_back(std::move(aDoc));
             }
         }
         catch( const Exception& )
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx 
b/chart2/source/view/axes/VCartesianAxis.cxx
index d8e284516a24..a1bb2855b11d 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -651,7 +651,7 @@ void 
VCartesianAxis::createAllTickInfosFromComplexCategories( TickInfoArraysType
                 aTickInfo.fScaledTickValue = m_aScale.Maximum;
                 aTickInfoVector.push_back(aTickInfo);
             }
-            rAllTickInfos.push_back(aTickInfoVector);
+            rAllTickInfos.push_back(std::move(aTickInfoVector));
         }
     }
 }
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx 
b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index 8bf661362cd4..aa3166fd2c11 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -736,7 +736,7 @@ void 
DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategor
                 aRow.push_back( aValue.getDouble() );
         }
 
-        aDataValues.push_back( aRow );
+        aDataValues.push_back(std::move(aRow));
     }
 
     // insert default data when no rows exist
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index e1d5edc17405..6d3550da4663 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -1964,7 +1964,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 );
diff --git a/sc/source/filter/excel/xistyle.cxx 
b/sc/source/filter/excel/xistyle.cxx
index 8c488b3b0b8d..393a948ed979 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1400,7 +1400,7 @@ void XclImpXF::ApplyPatternToAttrVector(
         ScAttrEntry aEntry;
         aEntry.nEndRow = nRow1 - 1;
         
aEntry.setScPatternAttr(&rDoc.getCellAttributeHelper().getDefaultCellAttribute());
-        rAttrs.push_back(aEntry);
+        rAttrs.push_back(std::move(aEntry));
     }
 
     ScAttrEntry aEntry;
diff --git a/svx/source/table/tablehtmlimporter.cxx 
b/svx/source/table/tablehtmlimporter.cxx
index df0cad795572..7a0b369eb7c5 100644
--- a/svx/source/table/tablehtmlimporter.cxx
+++ b/svx/source/table/tablehtmlimporter.cxx
@@ -483,8 +483,7 @@ void SdrTableHTMLParser::ProcToken(HtmlImportInfo* pInfo)
         break;
         case HtmlTokenId::COL_ON:
         {
-            std::shared_ptr<HTMLCellDefault> pDefault(mpInsDefault.release());
-            maDefaultList.push_back(pDefault);
+            
maDefaultList.push_back(std::shared_ptr<HTMLCellDefault>(mpInsDefault.release()));
 
             const sal_Int32 nSize = lcl_GetWidth(options) + mnLastEdge;
             if (nSize > mnLastEdge)
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 90dafccd62f8..e3419c65d282 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10055,7 +10055,7 @@ const BitmapEmit& PDFWriterImpl::createBitmapEmit(const 
Bitmap& i_rBitmap, const
     {
         rBitmaps.push_front(BitmapEmit());
         rBitmaps.front().m_aID = aID;
-        rBitmaps.front().m_aBitmap = aBitmap;
+        rBitmaps.front().m_aBitmap = std::move(aBitmap);
         if (!rGraphic.getVectorGraphicData() || 
rGraphic.getVectorGraphicData()->getType() != VectorGraphicDataType::Pdf || 
m_aContext.UseReferenceXObject)
             rBitmaps.front().m_nObject = createObject();
         createEmbeddedFile(rGraphic, rBitmaps.front().m_aReferenceXObject, 
rBitmaps.front().m_nObject);
diff --git a/vcl/source/image/ImplImage.cxx b/vcl/source/image/ImplImage.cxx
index c47d04bad907..3ef3ca668eaf 100644
--- a/vcl/source/image/ImplImage.cxx
+++ b/vcl/source/image/ImplImage.cxx
@@ -105,7 +105,7 @@ bool ImplImage::loadStockAtScale(SalGraphics* pGraphics, 
Bitmap &rBitmap)
             return false;
         }
     }
-    rBitmap = aBitmap;
+    rBitmap = std::move(aBitmap);
     return true;
 }
 
diff --git a/vcl/source/image/ImplImageTree.cxx 
b/vcl/source/image/ImplImageTree.cxx
index 29587c07ba44..e39109819deb 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -176,7 +176,7 @@ void loadImageFromStream(std::shared_ptr<SvStream> const & 
xStream, OUString con
         vcl::PngImageReader aPNGReader(*xStream);
         Bitmap aTmp;
         aPNGReader.read(aTmp);
-        rParameters.mrBitmap = aTmp;
+        rParameters.mrBitmap = std::move(aTmp);
     }
     else if (rPath.endsWith(".svg"))
     {
@@ -397,7 +397,7 @@ bool loadDiskCachedVersion(std::u16string_view sVariant, 
ImageRequestParameters&
     vcl::PngImageReader aPNGReader(aFileStream);
     Bitmap aTmp;
     aPNGReader.read(aTmp);
-    rParameters.mrBitmap = aTmp;
+    rParameters.mrBitmap = std::move(aTmp);
     return true;
 }
 
diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index f75b318e1912..2b2b06031bed 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -3599,7 +3599,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
             {
                 SchXMLDataPointStruct aPoint;
                 aPoint.mnRepeat = nCurrIndex - nLastIndex - 1;
-                aDataPointVector.push_back( aPoint );
+                aDataPointVector.push_back(std::move(aPoint));
             }
 
             uno::Reference< beans::XPropertySet > xPropSet;

Reply via email to