sc/source/core/data/dptabsrc.cxx              |    2 +-
 sc/source/filter/excel/xistyle.cxx            |    2 +-
 sd/source/core/TransitionPreset.cxx           |    2 +-
 sdext/source/pdfimport/tree/pdfiprocessor.cxx |    4 ++--
 vcl/source/filter/png/PngImageWriter.cxx      |    5 ++---
 vcl/source/treelist/transfer.cxx              |    2 +-
 xmloff/source/chart/SchXMLExport.cxx          |    2 +-
 7 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 05fb33a4296b48b2910422a2b12228f0a7dfb64a
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Aug 10 17:52:12 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Aug 10 22:32:18 2025 +0200

    cid#1662135 Variable copied when it could be moved
    
    and
    
    cid#1660117 Variable copied when it could be moved
    cid#1659950 Variable copied when it could be moved
    cid#1659946 Variable copied when it could be moved
    cid#1659945 Variable copied when it could be moved
    cid#1659936 Variable copied when it could be moved
    cid#1659933 Variable copied when it could be moved
    
    Change-Id: Ib6cbb6751a230e62b416b33ca082b279a2ecb878
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189318
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 61123f89cd8a..8ac4bfcf4783 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -699,7 +699,7 @@ void ScDPSource::FilterCacheByPageDimensions()
         }
         if (pGrpFilter->getMatchItemCount() < o3tl::make_unsigned(nMemCount))
             // there is at least one invisible item.  Add this filter 
criterion to the mix.
-            aCriteria.push_back(aFilter);
+            aCriteria.push_back(std::move(aFilter));
 
         if (!pDim->HasSelectedPage())
             continue;
diff --git a/sc/source/filter/excel/xistyle.cxx 
b/sc/source/filter/excel/xistyle.cxx
index 393a948ed979..2ee264ed9dc6 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -2023,7 +2023,7 @@ void XclImpXFRangeBuffer::Finalize()
                 ScAttrEntry aEntry;
                 aEntry.nEndRow = rDoc.MaxRow();
                 
aEntry.setScPatternAttr(&rDoc.getCellAttributeHelper().getDefaultCellAttribute());
-                aAttrs.push_back(aEntry);
+                aAttrs.push_back(std::move(aEntry));
             }
 
             aAttrs.shrink_to_fit();
diff --git a/sd/source/core/TransitionPreset.cxx 
b/sd/source/core/TransitionPreset.cxx
index 8b831e3f6408..4bb2f7fffbee 100644
--- a/sd/source/core/TransitionPreset.cxx
+++ b/sd/source/core/TransitionPreset.cxx
@@ -308,7 +308,7 @@ bool TransitionPreset::importTransitionsFile( 
TransitionPresetList& rList,
                                 pPreset->maSetLabel = sSet;
                                 SAL_INFO("sd.transitions", aPresetId << ": " 
<< sGroup << "/" << sSet << (sVariant.isEmpty() ? OUString() : OUString("/" + 
sVariant)));
 
-                                rList.push_back( pPreset );
+                                rList.push_back(std::move(pPreset));
                             }
                             else
                                 SAL_WARN("sd.transitions", "group node " << 
sGroup << " not found");
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx 
b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index 3e5bd4215f86..3d083fcbb0f3 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -86,8 +86,8 @@ void PDFIProcessor::setPageNum( sal_Int32 nPages )
 
 void PDFIProcessor::pushState()
 {
-    GraphicsContextStack::value_type const a(m_aGCStack.back());
-    m_aGCStack.push_back(a);
+    GraphicsContextStack::value_type a(m_aGCStack.back());
+    m_aGCStack.push_back(std::move(a));
 }
 
 void PDFIProcessor::popState()
diff --git a/vcl/source/filter/png/PngImageWriter.cxx 
b/vcl/source/filter/png/PngImageWriter.cxx
index 151e3a2f2f2d..ce05ea70f203 100644
--- a/vcl/source/filter/png/PngImageWriter.cxx
+++ b/vcl/source/filter/png/PngImageWriter.cxx
@@ -471,9 +471,8 @@ void 
PngImageWriter::setParameters(css::uno::Sequence<css::beans::PropertyValue>
                             if (nChunkSize)
                             {
                                 const sal_Int8* pSource = 
aByteSeq.getConstArray();
-                                std::vector<sal_uInt8> aData(pSource, pSource 
+ nChunkSize);
-                                aChunk.data = std::move(aData);
-                                maAdditionalChunks.push_back(aChunk);
+                                aChunk.data = std::vector<sal_uInt8>(pSource, 
pSource + nChunkSize);
+                                
maAdditionalChunks.push_back(std::move(aChunk));
                             }
                         }
                     }
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index bc36fa8ba7a8..2841f0f7f15c 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -1612,7 +1612,7 @@ bool TransferableDataHelper::GetBitmapEx( const 
DataFlavor& rFlavor, Bitmap& rBm
 
             if(aMask.GetBitmap().IsEmpty())
             {
-                rBmp = aBitmap;
+                rBmp = std::move(aBitmap);
             }
             else
             {
diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index 944d168b491b..f475718c6088 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -3655,7 +3655,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
                             maAutoStyleNameQueue.pop();
                         }
 
-                        aDataPointVector.push_back( aPoint );
+                        aDataPointVector.push_back(std::move(aPoint));
                         nLastIndex = nCurrIndex;
                     }
                     else

Reply via email to