basctl/source/basicide/basobj2.cxx                          |    2 +-
 cppuhelper/source/shlib.cxx                                 |    2 +-
 cui/source/dialogs/hldocntp.cxx                             |    2 +-
 cui/source/options/connpoolconfig.cxx                       |    2 +-
 framework/source/services/autorecovery.cxx                  |    4 ++--
 oox/source/drawingml/shape.cxx                              |    2 +-
 oox/source/drawingml/table/tablecell.cxx                    |    4 ++--
 sc/source/core/data/queryiter.cxx                           |    2 +-
 sc/source/core/tool/interpr5.cxx                            |    4 ++--
 scripting/source/vbaevents/eventhelper.cxx                  |    2 +-
 sdext/source/pdfimport/tree/pdfiprocessor.cxx               |    2 +-
 sfx2/source/view/viewsh.cxx                                 |    4 ++--
 svx/source/sdr/primitive2d/sdrattributecreator.cxx          |    2 +-
 svx/source/svdraw/svdedtv2.cxx                              |    4 ++--
 svx/source/svdraw/svdocapt.cxx                              |    2 +-
 sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx |    3 ++-
 sw/source/writerfilter/dmapper/DomainMapperTableManager.hxx |    3 ++-
 vcl/source/bitmap/bitmappaint.cxx                           |    2 +-
 vcl/source/gdi/lineinfo.cxx                                 |    2 +-
 vcl/source/gdi/pdfextoutdevdata.cxx                         |    2 +-
 vcl/source/gdi/print.cxx                                    |    2 +-
 vcl/source/outdev/line.cxx                                  |    2 +-
 vcl/source/window/stacking.cxx                              |    2 +-
 xmloff/source/meta/xmlversion.cxx                           |    2 +-
 24 files changed, 31 insertions(+), 29 deletions(-)

New commits:
commit 329e913b0b82875a9f2f427cf1fae9e7f90b021a
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Jul 27 21:00:08 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Jul 28 18:36:01 2024 +0200

    cid#1556624 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1556622 COPY_INSTEAD_OF_MOVE
    cid#1556629 COPY_INSTEAD_OF_MOVE
    cid#1556632 COPY_INSTEAD_OF_MOVE
    cid#1556634 COPY_INSTEAD_OF_MOVE
    cid#1556642 COPY_INSTEAD_OF_MOVE
    cid#1556644 COPY_INSTEAD_OF_MOVE
    cid#1556663 COPY_INSTEAD_OF_MOVE
    cid#1556674 COPY_INSTEAD_OF_MOVE
    cid#1556682 COPY_INSTEAD_OF_MOVE
    cid#1556683 COPY_INSTEAD_OF_MOVE
    cid#1556685 COPY_INSTEAD_OF_MOVE
    cid#1556694 COPY_INSTEAD_OF_MOVE
    cid#1556708 COPY_INSTEAD_OF_MOVE
    cid#1556711 COPY_INSTEAD_OF_MOVE
    cid#1556712 COPY_INSTEAD_OF_MOVE
    cid#1556714 COPY_INSTEAD_OF_MOVE
    cid#1556719 COPY_INSTEAD_OF_MOVE
    cid#1556727 COPY_INSTEAD_OF_MOVE
    cid#1556744 COPY_INSTEAD_OF_MOVE
    cid#1556757 COPY_INSTEAD_OF_MOVE
    cid#1556782 COPY_INSTEAD_OF_MOVE
    cid#1556784 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I5d5bc884cd7351a81c18b35aaf4e304256242988
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171128
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/basctl/source/basicide/basobj2.cxx 
b/basctl/source/basicide/basobj2.cxx
index 0aa3b8b37bf5..1cb6f23fe2b3 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -342,7 +342,7 @@ OUString ChooseMacro(weld::Window* pParent,
             if ( !rxLimitToDocument.is() )
             {
                 MacroExecutionData* pExecData = new MacroExecutionData;
-                pExecData->aDocument = aDocument;
+                pExecData->aDocument = std::move(aDocument);
                 pExecData->xMethod = pMethod;   // keep alive until the event 
has been processed
                 Application::PostUserEvent( LINK( nullptr, MacroExecution, 
ExecuteMacroEvent ), pExecData );
             }
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index c1a66ae66704..afc96beaa76c 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -205,7 +205,7 @@ cppuhelper::WrapperConstructorFn mapConstructorFn(
             u"cannot get mappings"_ustr,
             css::uno::Reference<css::uno::XInterface>());
     }
-    return [mapFrom, mapTo, target, constructorFunction]
+    return [mapFrom=std::move(mapFrom), mapTo=std::move(mapTo), target, 
constructorFunction]
         (css::uno::XComponentContext *const context, 
css::uno::Sequence<css::uno::Any> const& args)
         {
             void *const ctxt = mapTo.mapInterface(
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index b09fbafe9764..bf10d1df85b1 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -365,7 +365,7 @@ void SvxHyperlinkNewDocTp::DoApply()
     sal_Int32 nPos = m_xLbDocTypes->get_selected_index();
     if (nPos == -1)
         nPos = 0;
-    pExecuteInfo->aURL = aURL;
+    pExecuteInfo->aURL = std::move(aURL);
     pExecuteInfo->aStrDocName = 
weld::fromId<DocumentTypeData*>(m_xLbDocTypes->get_id(nPos))->aStrURL;
 
     // current document
diff --git a/cui/source/options/connpoolconfig.cxx 
b/cui/source/options/connpoolconfig.cxx
index 12aee9933f4e..c637e7d35367 100644
--- a/cui/source/options/connpoolconfig.cxx
+++ b/cui/source/options/connpoolconfig.cxx
@@ -98,7 +98,7 @@ namespace offapp
             aThisDriverSettings.getNodeValue(TIMEOUT) >>= 
aLookup->nTimeoutSeconds;
         }
 
-        _rFillItems.Put(DriverPoolingSettingsItem(SID_SB_DRIVER_TIMEOUTS, 
aSettings));
+        _rFillItems.Put(DriverPoolingSettingsItem(SID_SB_DRIVER_TIMEOUTS, 
std::move(aSettings)));
     }
 
 
diff --git a/framework/source/services/autorecovery.cxx 
b/framework/source/services/autorecovery.cxx
index c4fb2fcf3ed1..f3c2ddfc7b2c 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -3036,7 +3036,7 @@ AutoRecovery::ETimerType AutoRecovery::implts_saveDocs(   
    bool        bAllow
         g.reset();
         // /* SAFE */ {
 
-        *pIt = aInfo;
+        *pIt = std::move(aInfo);
     }
 
     // Did we have some "dangerous candidates" ?
@@ -3054,7 +3054,7 @@ AutoRecovery::ETimerType AutoRecovery::implts_saveDocs(   
    bool        bAllow
         g.reset();
         // /* SAFE */ {
 
-        *pIt = aInfo;
+        *pIt = std::move(aInfo);
     }
 
     } /* SAFE */
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index c9cde9105fff..9d39849e4985 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -2651,7 +2651,7 @@ void Shape::cloneFillProperties()
 {
     auto pFillProperties = std::make_shared<FillProperties>();
     pFillProperties->assignUsed(*mpFillPropertiesPtr);
-    mpFillPropertiesPtr = pFillProperties;
+    mpFillPropertiesPtr = std::move(pFillProperties);
 }
 }
 
diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index c04960240ec7..2784ea818eb2 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -613,11 +613,11 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
         {
             sal_Int32 nLength = aGrabBag.getLength();
             aGrabBag.realloc(nLength + 1);
-            aGrabBag.getArray()[nLength] = aPropertyValue;
+            aGrabBag.getArray()[nLength] = std::move(aPropertyValue);
         }
         else
         {
-            aGrabBag = { aPropertyValue };
+            aGrabBag = { std::move(aPropertyValue) };
         }
         xPropSet->setPropertyValue(u"CellInteropGrabBag"_ustr, Any(aGrabBag));
     }
diff --git a/sc/source/core/data/queryiter.cxx 
b/sc/source/core/data/queryiter.cxx
index cd167fb33280..ee02e8d6f5e2 100644
--- a/sc/source/core/data/queryiter.cxx
+++ b/sc/source/core/data/queryiter.cxx
@@ -1294,7 +1294,7 @@ public:
         assert(nIndex < it->first);
 
         size_t nOffset = nIndex - nBlkIndex;
-        aRet.first = itBlk;
+        aRet.first = std::move(itBlk);
         aRet.second = nOffset;
         return aRet;
     }
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 57b826f08775..04cc6d34eac4 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -2510,8 +2510,8 @@ void ScInterpreter::CalculateRGPRKP(bool _bRKP)
             PushError(FormulaError::CodeOverflow);
             return;
         }
-        pMatX = pNewX;
-        pMatY = pNewY;
+        pMatX = std::move(pNewX);
+        pMatY = std::move(pNewY);
         // DeltaY is possible here; DeltaX depends on nCase, so later
         fMeanY = lcl_GetMeanOverAll(pMatY, N);
         for (SCSIZE i=0; i<N; i++)
diff --git a/scripting/source/vbaevents/eventhelper.cxx 
b/scripting/source/vbaevents/eventhelper.cxx
index 6feed05e6dda..dd68e99cf1b5 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -411,7 +411,7 @@ ScriptEventHelper::createEvents( const OUString& sCodeName )
             ++nEvts;
             if ( nEvts > aDest.getLength() )
                 aDest.realloc( nEvts );// should never happen
-            aDest.getArray()[ dIndex ] = evtDesc;
+            aDest.getArray()[ dIndex ] = std::move(evtDesc);
         }
     }
     aDest.realloc( nEvts );
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx 
b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index c44dce2c77cf..70386dbba35f 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -164,7 +164,7 @@ void PDFIProcessor::setFont( const FontAttributes& i_rFont )
     else
     {
         m_aFontToId[ aChangedFont ] = m_nNextFontId;
-        m_aIdToFont[ m_nNextFontId ] = aChangedFont;
+        m_aIdToFont[ m_nNextFontId ] = std::move(aChangedFont);
         rGC.FontId = m_nNextFontId;
         m_nNextFontId++;
     }
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 068648d56981..0bbc5a2926ea 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -3354,9 +3354,9 @@ void SfxViewShell::SetLOKLanguageTag(const OUString& 
rBcp47LanguageTag)
     // If we want de-CH, and the de localisation is available, we don't want 
to use de-DE as then
     // the magic in Translate::get() won't turn ess-zet into double s. 
Possibly other similar cases?
     if (comphelper::LibreOfficeKit::isActive() && aTag.getLanguage() == 
aFallbackTag.getLanguage())
-        maLOKLanguageTag = aTag;
+        maLOKLanguageTag = std::move(aTag);
     else
-        maLOKLanguageTag = aFallbackTag;
+        maLOKLanguageTag = std::move(aFallbackTag);
 }
 
 LOKDocumentFocusListener& SfxViewShell::GetLOKDocumentFocusListener()
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx 
b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 258831eab9dc..1d99ee733e74 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -869,7 +869,7 @@ namespace drawinglayer::primitive2d
 
                 const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
 
-                return attribute::SdrLineFillEffectsTextAttribute(aLine, 
aFill, aLineStartEnd,
+                return attribute::SdrLineFillEffectsTextAttribute(aLine, 
std::move(aFill), aLineStartEnd,
                                                                   aShadow, 
std::move(aFillFloatTransGradient),
                                                                   aText, 
aGlow, nSoftEdgeRadius);
             }
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 59c5bfe5af3e..92d0a6f5a76d 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1074,7 +1074,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
                         }
                         else
                         {
-                            aMergePolyPolygonA = aTmpPoly;
+                            aMergePolyPolygonA = std::move(aTmpPoly);
                         }
                     }
                     else
@@ -1088,7 +1088,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
                         }
                         else
                         {
-                            aMergePolyPolygonB = aTmpPoly;
+                            aMergePolyPolygonB = std::move(aTmpPoly);
                         }
                     }
                 }
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index d7dc7d926ba1..b3fd7bd536a9 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -446,7 +446,7 @@ void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& 
rPara, tools::Polygon& rPo
         aPol[0].setY( aEscPos.Y() );
     }
 
-    rPoly = aPol;
+    rPoly = std::move(aPol);
 }
 
 void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& 
rPoly, tools::Rectangle const & rRect)
diff --git a/sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx 
b/sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx
index 1ccdc5533645..24e85c325bd9 100644
--- a/sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapperTableManager.cxx
@@ -529,7 +529,8 @@ void DomainMapperTableManager::endOfCellAction()
     ++m_nCell.back( );
 }
 
-bool DomainMapperTableManager::shouldInsertRow(IntVectorPtr pCellWidths, 
IntVectorPtr pTableGrid, size_t nGrids, bool& rIsIncompleteGrid)
+bool DomainMapperTableManager::shouldInsertRow(const IntVectorPtr& 
pCellWidths, const IntVectorPtr& pTableGrid,
+                                               size_t nGrids, bool& 
rIsIncompleteGrid)
 {
     if (pCellWidths->empty())
         return false;
diff --git a/sw/source/writerfilter/dmapper/DomainMapperTableManager.hxx 
b/sw/source/writerfilter/dmapper/DomainMapperTableManager.hxx
index 9174b88ed92c..d155adc94b68 100644
--- a/sw/source/writerfilter/dmapper/DomainMapperTableManager.hxx
+++ b/sw/source/writerfilter/dmapper/DomainMapperTableManager.hxx
@@ -66,7 +66,8 @@ class DomainMapperTableManager : public TableManager
     std::unique_ptr<TablePropertiesHandler> m_pTablePropsHandler;
     PropertyMapPtr            m_pStyleProps;
 
-    bool shouldInsertRow(IntVectorPtr pCellWidths, IntVectorPtr pTableGrid, 
size_t nGrids, bool& rIsIncompleteGrid);
+    bool shouldInsertRow(const IntVectorPtr& pCellWidths, const IntVectorPtr& 
pTableGrid,
+                         size_t nGrids, bool& rIsIncompleteGrid);
 
     virtual void clearData() override;
 
diff --git a/vcl/source/bitmap/bitmappaint.cxx 
b/vcl/source/bitmap/bitmappaint.cxx
index 3c509d58e488..7ad31ed0ed1f 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -869,7 +869,7 @@ vcl::Region Bitmap::CreateRegion(const Color& rColor, const 
tools::Rectangle& rR
             }
 
             // copy line as new line
-            aLine = aNewLine;
+            aLine = std::move(aNewLine);
             nYStart = nY;
         }
     }
diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx
index 490b1d920d5e..a6c31bebb741 100644
--- a/vcl/source/gdi/lineinfo.cxx
+++ b/vcl/source/gdi/lineinfo.cxx
@@ -269,7 +269,7 @@ void LineInfo::applyToB2DPolyPolygon(
                 aResult.append(aLineTarget);
             }
 
-            io_rLinePolyPolygon = aResult;
+            io_rLinePolyPolygon = std::move(aResult);
         }
     }
 
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx 
b/vcl/source/gdi/pdfextoutdevdata.cxx
index c81868c97a59..9d3269e9e70c 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -660,7 +660,7 @@ void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 
nDestId, const tools::R
     aLinkDestination.mMapMode = mrOutDev.GetMapMode();
     aLinkDestination.mPageNr = nPageNr == -1 ? mnPage : nPageNr;
     aLinkDestination.mAreaType = eType;
-    mpGlobalSyncData->mFutureDestinations[ nDestId ] = aLinkDestination;
+    mpGlobalSyncData->mFutureDestinations[ nDestId ] = 
std::move(aLinkDestination);
 }
 sal_Int32 PDFExtOutDevData::CreateDest( const tools::Rectangle& rRect, 
sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
 {
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index b9192aa6d854..502c2d0aa3f6 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1172,7 +1172,7 @@ bool Printer::SetPaperBin( sal_uInt16 nPaperBin )
         {
             ImplUpdateJobSetupPaper( aJobSetup );
             mbNewJobSetup = true;
-            maJobSetup = aJobSetup;
+            maJobSetup = std::move(aJobSetup);
             ImplUpdatePageData();
             ImplUpdateFontList();
             return true;
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index 6bb3f1ad9976..637966678a07 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -247,7 +247,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon 
aLinePolyPolygon, const Lin
                 aResult.append(aLineTarget);
             }
 
-            aLinePolyPolygon = aResult;
+            aLinePolyPolygon = std::move(aResult);
         }
     }
 
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 034e6d1056a5..5ce78f69b426 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -231,7 +231,7 @@ void Window::ImplCalcToTop( ImplCalcToTopData* pPrevData )
         ImplCalcToTopData* pData    = new ImplCalcToTopData;
         pPrevData->mpNext.reset(pData);
         pData->mpWindow             = this;
-        pData->mpInvalidateRegion.reset(new vcl::Region( aInvalidateRegion ));
+        pData->mpInvalidateRegion.reset(new 
vcl::Region(std::move(aInvalidateRegion)));
     }
 }
 
diff --git a/xmloff/source/meta/xmlversion.cxx 
b/xmloff/source/meta/xmlversion.cxx
index 4f1dc8ae5bad..c4db4450ba35 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -195,7 +195,7 @@ XMLVersionContext::XMLVersionContext( XMLVersionListImport& 
rImport,
     uno::Sequence < util::RevisionTag >& aList = rImport.GetList();
     sal_Int32 nLength = aList.getLength();
     aList.realloc( nLength+1 );
-    aList.getArray()[nLength] = aInfo;
+    aList.getArray()[nLength] = std::move(aInfo);
 }
 
 XMLVersionContext::~XMLVersionContext()

Reply via email to