basctl/source/basicide/moduldl2.cxx                        |    2 +-
 basegfx/source/tools/bgradient.cxx                         |    4 ++--
 canvas/source/cairo/cairo_canvashelper.cxx                 |    2 +-
 chart2/source/controller/main/ObjectHierarchy.cxx          |    2 +-
 comphelper/source/misc/numberedcollection.cxx              |    2 +-
 connectivity/source/drivers/dbase/dindexnode.cxx           |    2 +-
 cui/source/options/optsave.cxx                             |    4 ++--
 dbaccess/source/core/api/KeySet.cxx                        |    2 +-
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |    8 ++++----
 drawinglayer/source/processor3d/defaultprocessor3d.cxx     |    8 ++------
 extensions/source/bibliography/datman.cxx                  |    2 +-
 fpicker/source/office/iodlg.cxx                            |    2 +-
 framework/source/services/pathsettings.cxx                 |    2 +-
 helpcompiler/source/HelpLinker.cxx                         |    2 +-
 linguistic/source/thesdsp.cxx                              |    2 +-
 oox/source/drawingml/customshapeproperties.cxx             |    2 +-
 package/source/zipapi/ZipFile.cxx                          |    8 +++-----
 sc/source/core/tool/interpr4.cxx                           |    2 +-
 sc/source/core/tool/interpr5.cxx                           |    4 ++--
 sc/source/ui/drawfunc/fuins2.cxx                           |    2 +-
 sc/source/ui/unoobj/linkuno.cxx                            |    2 +-
 sccomp/source/solver/DifferentialEvolution.hxx             |    2 +-
 sfx2/source/dialog/filtergrouping.cxx                      |    2 +-
 sfx2/source/doc/objserv.cxx                                |    2 +-
 sfx2/source/doc/sfxbasemodel.cxx                           |    2 +-
 sfx2/source/inet/inettbc.cxx                               |    2 +-
 slideshow/source/engine/shapes/backgroundshape.cxx         |    2 +-
 slideshow/source/engine/slide/layermanager.cxx             |    2 +-
 svx/source/sdr/overlay/overlaymanager.cxx                  |    2 +-
 svx/source/svdraw/svdocapt.cxx                             |    2 +-
 svx/source/table/tablertfimporter.cxx                      |    2 +-
 svx/source/xml/xmlgrhlp.cxx                                |    2 +-
 sw/source/core/edit/edfcol.cxx                             |    2 +-
 sw/source/core/unocore/unocrsrhelper.cxx                   |    2 +-
 sw/source/filter/basflt/iodetect.cxx                       |    2 +-
 sw/source/filter/ww8/ww8par5.cxx                           |    2 +-
 sw/source/uibase/app/docst.cxx                             |    4 +++-
 sw/source/uibase/shells/tabsh.cxx                          |    2 +-
 sw/source/uibase/shells/textsh1.cxx                        |    3 ++-
 sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx       |    2 +-
 toolkit/source/awt/vclxwindows.cxx                         |    2 +-
 ucb/source/ucp/webdav-curl/webdavcontent.cxx               |    2 +-
 ucbhelper/source/client/content.cxx                        |    3 +--
 unotools/source/i18n/textsearch.cxx                        |    2 +-
 vcl/inc/jsdialog/jsdialogbuilder.hxx                       |    2 +-
 vcl/jsdialog/jsdialogbuilder.cxx                           |    2 +-
 vcl/source/bitmap/BitmapEmbossGreyFilter.cxx               |    2 +-
 vcl/source/filter/GraphicNativeTransform.cxx               |    2 +-
 vcl/source/gdi/pdfwriter_impl.cxx                          |    2 +-
 vcl/source/gdi/region.cxx                                  |    2 +-
 vcl/unx/generic/printer/ppdparser.cxx                      |    2 +-
 xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx     |    2 +-
 52 files changed, 64 insertions(+), 68 deletions(-)

New commits:
commit d9841ab37825c220f887ff43ecab1522d770d5bd
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Aug 15 21:08:57 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 16 09:30:49 2024 +0200

    cid#1606710 Overflowed constant
    
    Change-Id: Ic1ed59ffa3d3dd8224e3eaaf2cf98db9fb920a6a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171928
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx 
b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
index a3ef81d634aa..aa1fd6092e2c 100644
--- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
@@ -101,7 +101,7 @@ void XMLIndexChapterInfoEntryContext::startFastElement(
             case XML_ELEMENT(TEXT, XML_OUTLINE_LEVEL):
             {
                 sal_Int32 nTmp;
-                if (::sax::Converter::convertNumber(nTmp, aIter.toView()))
+                if (::sax::Converter::convertNumber(nTmp, aIter.toView(), 0, 
SAL_MAX_UINT16))
                 {
 //control on range is carried out in the UNO level
                     nOutlineLevel = static_cast<sal_uInt16>(nTmp);
commit c93eb54c872ea279ee43bbf0abe00cc92e9a72e2
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Aug 15 20:19:59 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 16 09:30:37 2024 +0200

    cid#1557618 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1557535 COPY_INSTEAD_OF_MOVE
    cid#1557520 COPY_INSTEAD_OF_MOVE
    cid#1557513 COPY_INSTEAD_OF_MOVE
    cid#1557503 COPY_INSTEAD_OF_MOVE
    cid#1557487 COPY_INSTEAD_OF_MOVE
    cid#1557483 COPY_INSTEAD_OF_MOVE
    cid#1557479 COPY_INSTEAD_OF_MOVE
    cid#1557474 COPY_INSTEAD_OF_MOVE
    cid#1557461 COPY_INSTEAD_OF_MOVE
    cid#1557446 COPY_INSTEAD_OF_MOVE
    cid#1557445 COPY_INSTEAD_OF_MOVE
    cid#1557441 COPY_INSTEAD_OF_MOVE
    cid#1557435 COPY_INSTEAD_OF_MOVE
    cid#1557433 COPY_INSTEAD_OF_MOVE
    cid#1557429 COPY_INSTEAD_OF_MOVE
    cid#1557375 COPY_INSTEAD_OF_MOVE
    cid#1557372 COPY_INSTEAD_OF_MOVE
    cid#1557356 COPY_INSTEAD_OF_MOVE
    cid#1557350 COPY_INSTEAD_OF_MOVE
    cid#1557344 COPY_INSTEAD_OF_MOVE
    cid#1557339 COPY_INSTEAD_OF_MOVE
    cid#1557332 COPY_INSTEAD_OF_MOVE
    cid#1557330 COPY_INSTEAD_OF_MOVE
    cid#1557328 COPY_INSTEAD_OF_MOVE
    cid#1557323 COPY_INSTEAD_OF_MOVE
    cid#1557315 COPY_INSTEAD_OF_MOVE
    cid#1557313 COPY_INSTEAD_OF_MOVE
    cid#1557304 COPY_INSTEAD_OF_MOVE
    cid#1557297 COPY_INSTEAD_OF_MOVE
    cid#1557291 COPY_INSTEAD_OF_MOVE
    cid#1557290 COPY_INSTEAD_OF_MOVE
    cid#1557271 COPY_INSTEAD_OF_MOVE
    cid#1557266 COPY_INSTEAD_OF_MOVE
    cid#1557262 COPY_INSTEAD_OF_MOVE
    cid#1557259 COPY_INSTEAD_OF_MOVE
    cid#1557246 COPY_INSTEAD_OF_MOVE
    cid#1557242 COPY_INSTEAD_OF_MOVE
    cid#1557241 COPY_INSTEAD_OF_MOVE
    cid#1557236 COPY_INSTEAD_OF_MOVE
    cid#1557228 COPY_INSTEAD_OF_MOVE
    cid#1557225 COPY_INSTEAD_OF_MOVE
    cid#1557221 COPY_INSTEAD_OF_MOVE
    cid#1557217 COPY_INSTEAD_OF_MOVE
    cid#1557213 COPY_INSTEAD_OF_MOVE
    cid#1557211 COPY_INSTEAD_OF_MOVE
    cid#1557209 COPY_INSTEAD_OF_MOVE
    cid#1557205 COPY_INSTEAD_OF_MOVE
    cid#1557204 COPY_INSTEAD_OF_MOVE
    cid#1557193 COPY_INSTEAD_OF_MOVE
    cid#1556082 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I07f195a79a69d4bac0d14317854efc88d6fe94d7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171927
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/basctl/source/basicide/moduldl2.cxx 
b/basctl/source/basicide/moduldl2.cxx
index 85e284f16342..386e26b31733 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -686,7 +686,7 @@ void LibPage::InsertLib()
         xLibDlg->EnableReference(false);
 
     weld::DialogController::runAsync(xLibDlg, [aContExtension, 
xDlgURLObj=std::move(xDlgURLObj), aExtension,
-                                               aLibExtension, xModURLObj, 
xLibDlg,
+                                               aLibExtension, 
xModURLObj=std::move(xModURLObj), xLibDlg,
                                                xDlgLibContImport, 
xModLibContImport, this](sal_Int32 nResult)
         {
             if (!nResult )
diff --git a/basegfx/source/tools/bgradient.cxx 
b/basegfx/source/tools/bgradient.cxx
index 225bebfe0f6b..150e7362fb85 100644
--- a/basegfx/source/tools/bgradient.cxx
+++ b/basegfx/source/tools/bgradient.cxx
@@ -213,7 +213,7 @@ void BColorStops::replaceStartColor(const BColor& rStart)
     aNewColorStops.insert(aNewColorStops.end(), a1stNonStartColor, end());
 
     // assign & done
-    *this = aNewColorStops;
+    *this = std::move(aNewColorStops);
 }
 
 /* Tooling method that allows to replace the EndColor in a
@@ -657,7 +657,7 @@ void BColorStops::doApplyAxial()
     }
 
     // apply color stops
-    *this = aNewColorStops;
+    *this = std::move(aNewColorStops);
 }
 
 void BColorStops::doApplySteps(sal_uInt16 nStepCount)
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx 
b/canvas/source/cairo/cairo_canvashelper.cxx
index f09ce8c480bf..e4c781803e3f 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -1120,7 +1120,7 @@ constexpr OUStringLiteral 
PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
                 cairo_set_source_surface( pCairo.get(), 
pSurface->getCairoSurface().get(), 0, 0 );
                 cairo_paint( pCairo.get() );
 
-                pSurface = pScaledSurface;
+                pSurface = std::move(pScaledSurface);
 
                 aMatrix.xx = aMatrix.yy = 1;
                 cairo_set_matrix( mpCairo.get(), &aMatrix );
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx 
b/chart2/source/controller/main/ObjectHierarchy.cxx
index ee8d543571cb..1c46cfba5eb7 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -201,7 +201,7 @@ void ObjectHierarchy::createLegendTree(
         tChildContainer aLegendEntryOIDs;
         lcl_getChildOIDs( aLegendEntryOIDs, xLegendShapeContainer );
 
-        m_aChildMap[ aLegendOID ] = aLegendEntryOIDs;
+        m_aChildMap[aLegendOID] = std::move(aLegendEntryOIDs);
     }
 }
 
diff --git a/comphelper/source/misc/numberedcollection.cxx 
b/comphelper/source/misc/numberedcollection.cxx
index e47c30ee0a32..616bfb8aca77 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -86,7 +86,7 @@ void NumberedCollection::setUntitledPrefix(const OUString& 
sPrefix)
     TNumberedItem aItem;
     aItem.xItem   = css::uno::WeakReference< css::uno::XInterface 
>(xComponent);
     aItem.nNumber = nFreeNumber;
-    m_lComponents[pComponent] = aItem;
+    m_lComponents[pComponent] = std::move(aItem);
 
     return nFreeNumber;
 
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx 
b/connectivity/source/drivers/dbase/dindexnode.cxx
index f88f72d445f7..1e7add25e42f 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -269,7 +269,7 @@ bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
         ONDXPagePtr aTempParent = aParent;
         if (IsLeaf())
         {
-            rIndex.m_aCurLeaf = aNewPage;
+            rIndex.m_aCurLeaf = std::move(aNewPage);
             rIndex.m_nCurNode = rIndex.m_aCurLeaf->Count() - 1;
 
             // free not needed pages, there are no references to those on the 
page
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 84ecc43b5766..63106cb923ef 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -454,8 +454,8 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
                             lODFList.push_back( isODFFormat( sFilter ) );
                         }
                     }
-                    pImpl->aFilterArr[nData] = lList;
-                    pImpl->aODFArr[nData] = lODFList;
+                    pImpl->aFilterArr[nData] = std::move(lList);
+                    pImpl->aODFArr[nData] = std::move(lODFList);
                 }
             }
             OUString sModule = 
OfaTreeOptionsDialog::getCurrentFactory_Impl(GetFrame());
diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index 804a400f5067..9366c990c87e 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1419,7 +1419,7 @@ void getColumnPositions(const Reference<XNameAccess>& 
_rxQueryColumns,
                     {
                         sName = sRealName;
                     }
-                    o_rColumnNames[sName] = aColDesc;
+                    o_rColumnNames[sName] = std::move(aColDesc);
 
                     break;
                 }
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index a5f49e9e654b..a365beebae4d 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -2258,7 +2258,7 @@ void VclMetafileProcessor2D::processMaskPrimitive2D(
         else
         {
             // use mask directly
-            maClipPolyPolygon = aMask;
+            maClipPolyPolygon = std::move(aMask);
         }
 
         if (maClipPolyPolygon.count())
@@ -2501,9 +2501,9 @@ void 
VclMetafileProcessor2D::processTransparencePrimitive2D(
             // VclMetafileProcessor2D anyways to allow to get it
             // completely independent from OutputDevice in the long run
             GDIMetaFile* pMetaFile(mpOutputDevice->GetConnectMetaFile());
-            rtl::Reference<::MetaFloatTransparentAction> pAction(
-                new MetaFloatTransparentAction(aContentMetafile, 
aPrimitiveRectangle.TopLeft(),
-                                               aPrimitiveRectangle.GetSize(), 
aVCLGradient));
+            rtl::Reference<::MetaFloatTransparentAction> pAction(new 
MetaFloatTransparentAction(
+                aContentMetafile, aPrimitiveRectangle.TopLeft(), 
aPrimitiveRectangle.GetSize(),
+                std::move(aVCLGradient)));
 
             pAction->addSVGTransparencyColorStops(aSVGTransparencyColorStops);
             pMetaFile->AddAction(pAction);
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx 
b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
index 5f316879b4c5..7331ed842165 100644
--- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
@@ -154,13 +154,9 @@ namespace drawinglayer::processor3d
 
             // set created texture
             if(bTransparence)
-            {
-                mpTransparenceGeoTexSvx = pNewTex;
-            }
+                mpTransparenceGeoTexSvx = std::move(pNewTex);
             else
-            {
-                mpGeoTexSvx = pNewTex;
-            }
+                mpGeoTexSvx = std::move(pNewTex);
 
             // process sub-list
             process(rSubSequence);
diff --git a/extensions/source/bibliography/datman.cxx 
b/extensions/source/bibliography/datman.cxx
index 398ab9b74579..5ad672660aea 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -927,7 +927,7 @@ void BibDataManager::setActiveDataSource(const OUString& 
rURL)
     if(pToolbar)
     {
         aURL.Complete =".uno:Bib/source";
-        aEvent.FeatureURL = aURL;
+        aEvent.FeatureURL = std::move(aURL);
         pToolbar->statusChanged( aEvent );
     }
 
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 27049aa0aaa4..35a44787dac1 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1304,7 +1304,7 @@ OUString SvtFileDialog::implGetInitialURL( const 
OUString& _rPath, std::u16strin
         bIsInvalid = implIsInvalid( aFallback.GetMainURL( 
INetURLObject::DecodeMechanism::NONE ) );
 
         if ( !bIsInvalid )
-            aURLParser = aFallback;
+            aURLParser = std::move(aFallback);
     }
 
     if ( bIsInvalid )
diff --git a/framework/source/services/pathsettings.cxx 
b/framework/source/services/pathsettings.cxx
index 133b819394a2..d1f1cff83803 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -765,7 +765,7 @@ PathSettings::EChangeOp PathSettings::impl_updatePath(const 
OUString& sPath
                     pPathNew = &aPath;
                     impl_notifyPropListener(sPath, pPathOld, pPathNew);
                 }
-                m_lPaths[sPath] = aPath;
+                m_lPaths[sPath] = std::move(aPath);
              }
              break;
 
diff --git a/helpcompiler/source/HelpLinker.cxx 
b/helpcompiler/source/HelpLinker.cxx
index 086ae3359ec6..507ab05b5d0c 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -505,7 +505,7 @@ void HelpLinker::main( std::vector<std::string> &args,
         }
         fileReader.close();
 
-        args = stringList;
+        args = std::move(stringList);
     }
 
     size_t i = 0;
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index 2ffe3642e324..f4c21bfdf524 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.cxx
@@ -213,7 +213,7 @@ void ThesaurusDispatcher::SetServiceList( const Locale 
&rLocale,
         {
             auto pTmpEntry = std::make_shared<LangSvcEntries_Thes>( 
rSvcImplNames );
             pTmpEntry->aSvcRefs = Sequence< Reference < XThesaurus > >( nLen );
-            aSvcMap[ nLanguage ] = pTmpEntry;
+            aSvcMap[ nLanguage ] = std::move(pTmpEntry);
         }
     }
 }
diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index 2efb2dd68078..ff71d59912aa 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -248,7 +248,7 @@ void CustomShapeProperties::pushToPropSet(
             aAdjustmentVal.Value <<= maAdjustmentGuideList[ i 
].maFormula.toInt32();
             aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
             aAdjustmentVal.Name = maAdjustmentGuideList[ i ].maName;
-            aAdjustmentValuesRange[ i ] = aAdjustmentVal;
+            aAdjustmentValuesRange[i] = std::move(aAdjustmentVal);
         }
         aPropertyMap.setProperty( PROP_AdjustmentValues, aAdjustmentValues);
 
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 519387445aa2..4f88ad3b4d27 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1215,7 +1215,7 @@ void ScInterpreter::PopExternalSingleRef(
     if (xNew->GetType() == svError)
         SetError( xNew->GetError());
 
-    rToken = xNew;
+    rToken = std::move(xNew);
     if (pFmt)
         *pFmt = aFmt;
 }
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 3db43c8677cd..af04d06897db 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -1705,11 +1705,11 @@ void ScInterpreter::ScPow()
     {
         double fVal;
         bool bFlag;
-        ScMatrixRef pMat = pMat1;
+        ScMatrixRef pMat = std::move(pMat1);
         if (!pMat)
         {
             fVal = fVal1;
-            pMat = pMat2;
+            pMat = std::move(pMat2);
             bFlag = true;           // double - Matrix
         }
         else
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 6b9f63ab0963..a5fb251b7ef0 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -163,7 +163,7 @@ void lcl_ChartInit(const uno::Reference 
<embed::XEmbeddedObject>& xObj, ScViewDa
         aRangeListRef->Format( aTmpStr, ScRefFlags::RANGE_ABS_3D, rScDoc, 
rScDoc.GetAddressConvention() );
         aRangeString = aTmpStr;
 
-        ScChartPositioner aChartPositioner( rScDoc, aRangeListRef );
+        ScChartPositioner aChartPositioner( rScDoc, std::move(aRangeListRef) );
         const ScChartPositionMap* pPositionMap( 
aChartPositioner.GetPositionMap() );
         if( pPositionMap )
         {
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 389ccf07269e..33d27d8c8f8d 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1564,7 +1564,7 @@ Any SAL_CALL ScExternalDocLinkObj::getByIndex(sal_Int32 
nApiIndex)
     if (!pTable)
         throw lang::IndexOutOfBoundsException();
 
-    uno::Reference< sheet::XExternalSheetCache > aSheetCache(new 
ScExternalSheetCacheObj(mpDocShell, pTable, nIndex));
+    uno::Reference< sheet::XExternalSheetCache > aSheetCache(new 
ScExternalSheetCacheObj(mpDocShell, std::move(pTable), nIndex));
 
     return Any(aSheetCache);
 }
diff --git a/sccomp/source/solver/DifferentialEvolution.hxx 
b/sccomp/source/solver/DifferentialEvolution.hxx
index 97453437cdb3..37f4c35064ab 100644
--- a/sccomp/source/solver/DifferentialEvolution.hxx
+++ b/sccomp/source/solver/DifferentialEvolution.hxx
@@ -140,7 +140,7 @@ public:
             // see if is better than original, if so replace
             if (fCandidateFitness > 
mrDataProvider.calculateFitness(rOriginal.mVariables))
             {
-                maPopulation[x] = aCandidate;
+                maPopulation[x] = std::move(aCandidate);
 
                 if (fCandidateFitness > mfBestFitness)
                 {
diff --git a/sfx2/source/dialog/filtergrouping.cxx 
b/sfx2/source/dialog/filtergrouping.cxx
index ef7e8a681891..793d33d8fe4e 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -304,7 +304,7 @@ namespace sfx2
         ::std::for_each(
             aFilterClasses.begin(),
             aFilterClasses.end(),
-            ReadLocalFilter( aFilterClassesNode, _rLocalClasses )
+            ReadLocalFilter( std::move(aFilterClassesNode), _rLocalClasses )
         );
     }
 
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index ab43f0482492..3b0dea6d40ea 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -462,7 +462,7 @@ uno::Reference<security::XCertificate> 
SfxObjectShell::GetSignPDFCertificate() c
     return uno::Reference<security::XCertificate>(it->second, uno::UNO_QUERY);
 }
 
-static void sendErrorToLOK(ErrCodeMsg error)
+static void sendErrorToLOK(const ErrCodeMsg& error)
 {
     if (error.GetCode().GetClass() == ErrCodeClass::NONE)
         return;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index d52c3cbe7a86..fc0db4f66f6f 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3824,7 +3824,7 @@ embed::VisualRepresentation SAL_CALL 
SfxBaseModel::getPreferredVisualRepresentat
 
     embed::VisualRepresentation aVisualRepresentation;
     aVisualRepresentation.Data = getTransferData( aDataFlavor );
-    aVisualRepresentation.Flavor = aDataFlavor;
+    aVisualRepresentation.Flavor = std::move(aDataFlavor);
 
     return aVisualRepresentation;
 }
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index 7aa3a97f6eff..b106f7f98fcf 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -146,7 +146,7 @@ void SfxURLToolBoxControl_Impl::OpenURL( const OUString& 
rName ) const
 
     SfxURLToolBoxControl_Impl::ExecuteInfo* pExecuteInfo = new 
SfxURLToolBoxControl_Impl::ExecuteInfo;
     pExecuteInfo->xDispatch     = xDispatch;
-    pExecuteInfo->aTargetURL    = aTargetURL;
+    pExecuteInfo->aTargetURL    = std::move(aTargetURL);
     pExecuteInfo->aArgs         = {
         comphelper::makePropertyValue(u"Referer"_ustr, u"private:user"_ustr),
         comphelper::makePropertyValue(u"FileName"_ustr, aName)
diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx 
b/slideshow/source/engine/shapes/backgroundshape.cxx
index e3e3fb9ccc88..4afb48189e28 100644
--- a/slideshow/source/engine/shapes/backgroundshape.cxx
+++ b/slideshow/source/engine/shapes/backgroundshape.cxx
@@ -145,7 +145,7 @@ namespace slideshow::internal
             xPropSet->getPropertyValue(u"Width"_ustr) >>= nDocWidth;
             xPropSet->getPropertyValue(u"Height"_ustr) >>= nDocHeight;
 
-            mpMtf = xMtf;
+            mpMtf = std::move(xMtf);
             maBounds = ::basegfx::B2DRectangle( 0,0,nDocWidth, nDocHeight );
         }
 
diff --git a/slideshow/source/engine/slide/layermanager.cxx 
b/slideshow/source/engine/slide/layermanager.cxx
index 4d722cb61e32..5857de99997d 100644
--- a/slideshow/source/engine/slide/layermanager.cxx
+++ b/slideshow/source/engine/slide/layermanager.cxx
@@ -55,7 +55,7 @@ namespace slideshow::internal
                 LayerSharedPtr pLayer = rShape.second.lock();
                 if( pLayer && pLayer != pCurrLayer )
                 {
-                    pCurrLayer = pLayer;
+                    pCurrLayer = std::move(pLayer);
                     pCurrViewLayer = layerFunc(pCurrLayer);
                 }
 
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx 
b/svx/source/sdr/overlay/overlaymanager.cxx
index 7edd853cf03b..e2552631b094 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -174,7 +174,7 @@ namespace sdr::overlay
                 drawinglayer::geometry::ViewInformation2D 
aViewInformation(maViewInformation2D);
                 aViewInformation.setViewTransformation(maViewTransformation);
                 aViewInformation.setViewport(aViewRange);
-                pThis->maViewInformation2D = aViewInformation;
+                pThis->maViewInformation2D = std::move(aViewInformation);
 
                 pThis->mfDiscreteOne = 0.0;
             }
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index f75177d5fc07..f2528d588216 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -463,7 +463,7 @@ void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& 
rPara, tools::Polygon& rPo
     if (!rPara.bFixedAngle) {
         // TODO: Implementation missing.
     }
-    rPoly=aPol;
+    rPoly = std::move(aPol);
 }
 
 void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& 
rPoly, tools::Rectangle const & rRect)
diff --git a/svx/source/table/tablertfimporter.cxx 
b/svx/source/table/tablertfimporter.cxx
index c2e3de7ab144..9b34e5fe7a48 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -235,7 +235,7 @@ void SdrTableRTFParser::InsertCell( RtfImportInfo const * 
pInfo )
         {
             RTFCellInfoPtr xLastCell( (*mxLastRow)[mnVMergeIdx] );
             if (xLastCell->mnRowSpan)
-                xCellInfo->mxVMergeCell = xLastCell;
+                xCellInfo->mxVMergeCell = std::move(xLastCell);
             else
                 xCellInfo->mxVMergeCell = xLastCell->mxVMergeCell;
         }
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 432288a710dc..a2709bb8c943 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -502,7 +502,7 @@ Graphic SvXMLGraphicHelper::ImplReadGraphic( const 
OUString& rPictureStorageName
         std::unique_ptr<SvStream> 
pStream(utl::UcbStreamHelper::CreateStream(aStream.xStream));
         Graphic aGraphic = rGraphicFilter.ImportUnloadedGraphic(*pStream);
         if (!aGraphic.IsNone())
-            aReturnGraphic = aGraphic;
+            aReturnGraphic = std::move(aGraphic);
         else
             rGraphicFilter.ImportGraphic(aReturnGraphic, u"", *pStream);
     }
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 2fb0d9ac8611..18fb6455d76b 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -2009,7 +2009,7 @@ void 
SwEditShell::RestoreMetadataFieldsAndValidateParagraphSignatures()
             }
 
             // Update classification based on results.
-            lcl_ApplyParagraphClassification(GetDoc(), xModel, xParagraph, 
xSubject, aResults);
+            lcl_ApplyParagraphClassification(GetDoc(), xModel, xParagraph, 
xSubject, std::move(aResults));
 
             // Get Signatures
             std::map<OUString, SignatureDescr> aSignatures;
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx 
b/sw/source/core/unocore/unocrsrhelper.cxx
index fa6b6ef60fb2..6564d9b5aaff 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1112,7 +1112,7 @@ void InsertFile(SwUnoCursor* pUnoCursor, const OUString& 
rURL,
                 pMed->SetFilter( pFilter );
             }
             else
-                pMed.reset(new SfxMedium(sFileName, StreamMode::READ, pFilter, 
nullptr));
+                pMed.reset(new SfxMedium(sFileName, StreamMode::READ, 
std::move(pFilter), nullptr));
         }
         if(!sFilterOptions.isEmpty())
             pMed->GetItemSet().Put( SfxStringItem( SID_FILE_FILTEROPTIONS, 
sFilterOptions ) );
diff --git a/sw/source/filter/basflt/iodetect.cxx 
b/sw/source/filter/basflt/iodetect.cxx
index bfd7b613cd6f..9afe8ddca42e 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -227,7 +227,7 @@ std::shared_ptr<const SfxFilter> 
SwIoSystem::GetFileFilter(const OUString& rFile
 
                 // there's only a template filter that could be found
                 if ( pTemplateFilter )
-                    pFilter = pTemplateFilter;
+                    pFilter = std::move(pTemplateFilter);
 
             }
         }
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index a20379b4a92e..73125adf4188 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -3261,7 +3261,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, 
OUString& rStr )
                                             SwFormToken aToken(TOKEN_TEXT);
                                             aToken.sText = sDelimiter;
 
-                                            *aIt = aToken;
+                                            *aIt = std::move(aToken);
                                             aForm.SetPattern(nLevel,
                                                              
std::move(aPattern));
                                         }
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 433d91df57ce..05348aa6e805 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -1012,7 +1012,9 @@ void SwDocShell::Edit(
                                     && pStyle->IsUsed()
                                     && !pStyle->IsUserDefined();
 
-        pDlg->StartExecuteAsync([bIsDefaultPage, bNew, nFamily, nSlot, 
nNewStyleUndoId, pApplyStyleHelper, pRequest, xTmp, this](sal_Int32 nResult){
+        pDlg->StartExecuteAsync([bIsDefaultPage, bNew, nFamily, nSlot, 
nNewStyleUndoId,
+                                 
pApplyStyleHelper=std::move(pApplyStyleHelper),
+                                 pRequest, xTmp, this](sal_Int32 nResult){
             if (RET_OK == nResult)
                 pApplyStyleHelper->apply();
 
diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index 2fa9db78f6cb..97589cd2c7b6 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -717,7 +717,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
                 SwAbstractDialogFactory* pFact = 
SwAbstractDialogFactory::Create();
                 VclPtr<SfxAbstractDialog> 
pDlg(pFact->CreateNumFormatDialog(GetView().GetFrameWeld(), *pCoreSet));
 
-                pDlg->StartExecuteAsync([pDlg, pCoreSet, pSh](sal_uInt32 
nResult){
+                pDlg->StartExecuteAsync([pDlg, pCoreSet=std::move(pCoreSet), 
pSh](sal_uInt32 nResult){
                     if (RET_OK == nResult)
                     {
                         const SvxNumberInfoItem* pNumberFormatItem
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 4b1212b288d9..9b11e6f1b4ef 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -214,7 +214,8 @@ static void sw_CharDialog(SwWrtShell& rWrtSh, bool 
bUseDialog, bool bApplyToPara
             pReq->Ignore(); // the 'old' request is not relevant any more
         }
         pDlg->StartExecuteAsync([pDlg, &rWrtSh, pCoreSet=std::move(pCoreSet), 
bSel,
-                                 bSelectionPut, bApplyToParagraph, 
pRequest](sal_Int32 nResult){
+                                 bSelectionPut, bApplyToParagraph,
+                                 pRequest=std::move(pRequest)](sal_Int32 
nResult){
             if (nResult == RET_OK)
             {
                 sw_CharDialogResult(pDlg->GetOutputItemSet(), rWrtSh, 
pCoreSet, bSel, bSelectionPut,
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index 9dde50e56336..b195c5280b09 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -9673,7 +9673,7 @@ void DomainMapper_Impl::AddNewRedline( sal_uInt32 sprmId )
         m_pParaMarkerRedline = pNew;
     }
     // Newly read data will go into this redline.
-    m_currentRedline = pNew;
+    m_currentRedline = std::move(pNew);
 }
 
 void DomainMapper_Impl::SetCurrentRedlineIsRead()
diff --git a/toolkit/source/awt/vclxwindows.cxx 
b/toolkit/source/awt/vclxwindows.cxx
index d564c69a099c..371990eff960 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -584,7 +584,7 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& 
rVclWindowEvent )
                 aEvent.Source = getXWeak();
                 aEvent.ActionCommand = maActionCommand;
 
-                Callback aCallback = [ this, aEvent ]()
+                Callback aCallback = [ this, aEvent=std::move(aEvent) ]()
                                      { 
this->maActionListeners.actionPerformed( aEvent ); };
 
                 ImplExecuteAsyncWithoutSolarLock( aCallback );
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 636272362691..4dec9779fd4e 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -1093,7 +1093,7 @@ Content::queryCreatableContentsInfo()
         = ucb::ContentInfoAttribute::KIND_FOLDER;
 
     uno::Sequence< beans::Property > aFolderProps( 1 );
-    aFolderProps.getArray()[ 0 ] = aProp;
+    aFolderProps.getArray()[0] = std::move(aProp);
     aSeq.getArray()[ 1 ].Properties = aFolderProps;
     return aSeq;
 }
diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index cc5fe291febe..27f1296e41b0 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -937,11 +937,10 @@ bool Content::insertNewContent( const OUString& 
rContentType,
                                         false /* ReplaceExisting */ ) ) );
     aNewContent.m_xImpl->inserted();
 
-    rNewContent = aNewContent;
+    rNewContent = std::move(aNewContent);
     return true;
 }
 
-
 void Content::transferContent( const Content& rSourceContent,
                                    InsertOperation eOperation,
                                    const OUString & rTitle,
diff --git a/unotools/source/i18n/textsearch.cxx 
b/unotools/source/i18n/textsearch.cxx
index 8ede24667417..9c4573c38538 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -210,7 +210,7 @@ bool TextSearch::SearchForward( const OUString &rStr,
                 *pStart = aRet.startOffset[ 0 ];
                 *pEnd = aRet.endOffset[ 0 ];
                 if( pRes )
-                    *pRes = aRet;
+                    *pRes = std::move(aRet);
             }
         }
     }
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 28435d6536f1..ac529cef12b0 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -326,7 +326,7 @@ public:
     static void RemoveWindowWidget(const OUString& nWindowId);
 
     // we need to remember original popup window to close it properly (its 
handled by vcl)
-    static void RememberPopup(const OUString& nWindowId, VclPtr<vcl::Window> 
pWidget);
+    static void RememberPopup(const OUString& nWindowId, const 
VclPtr<vcl::Window>& pWidget);
     static void ForgetPopup(const OUString& nWindowId);
     static vcl::Window* FindPopup(const OUString& nWindowId);
 
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 8cc2d0f38c86..7c90d59e8c48 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -785,7 +785,7 @@ void JSInstanceBuilder::RemoveWindowWidget(const OUString& 
nWindowId)
     }
 }
 
-void JSInstanceBuilder::RememberPopup(const OUString& nWindowId, 
VclPtr<vcl::Window> pWidget)
+void JSInstanceBuilder::RememberPopup(const OUString& nWindowId, const 
VclPtr<vcl::Window>& pWidget)
 {
     GetLOKPopupsMap()[nWindowId] = pWidget;
 }
diff --git a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx 
b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
index 37c60e1b341a..3e7694968d1b 100644
--- a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
+++ b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx
@@ -125,7 +125,7 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& 
rBitmapEx) const
     const MapMode aMap(aBitmap.GetPrefMapMode());
     const Size aPrefSize(aBitmap.GetPrefSize());
 
-    aBitmap = aNewBmp;
+    aBitmap = std::move(aNewBmp);
 
     aBitmap.SetPrefMapMode(aMap);
     aBitmap.SetPrefSize(aPrefSize);
diff --git a/vcl/source/filter/GraphicNativeTransform.cxx 
b/vcl/source/filter/GraphicNativeTransform.cxx
index 28f2a987e452..88078b2499cb 100644
--- a/vcl/source/filter/GraphicNativeTransform.cxx
+++ b/vcl/source/filter/GraphicNativeTransform.cxx
@@ -110,7 +110,7 @@ bool GraphicNativeTransform::rotateGeneric(Degree10 
aRotation, std::u16string_vi
     Graphic aGraphic;
     rFilter.ImportGraphic(aGraphic, u"import", aStream);
 
-    mrGraphic = aGraphic;
+    mrGraphic = std::move(aGraphic);
     return true;
 }
 
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index bf6c2c94e404..54deb6230dd1 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10515,7 +10515,7 @@ void PDFWriterImpl::intersectClipRegion( const 
basegfx::B2DPolyPolygon& rRegion
     }
     else
     {
-        m_aGraphicsStack.front().m_aClipRegion = aRegion;
+        m_aGraphicsStack.front().m_aClipRegion = std::move(aRegion);
         m_aGraphicsStack.front().m_bClipRegion = true;
     }
 }
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index efe1d989fc7c..07ca0e54d527 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -1564,7 +1564,7 @@ SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& 
rRegion)
         {
             std::shared_ptr<RegionBand> 
xNewRegionBand(std::make_shared<RegionBand>());
             bool bSuccess = xNewRegionBand->load(rIStrm);
-            rRegion.mpRegionBand = xNewRegionBand;
+            rRegion.mpRegionBand = std::move(xNewRegionBand);
 
             bool bHasPolyPolygon(false);
             if (aCompat.GetVersion() >= 2)
diff --git a/vcl/unx/generic/printer/ppdparser.cxx 
b/vcl/unx/generic/printer/ppdparser.cxx
index f885bc04aada..40ba184603da 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1590,7 +1590,7 @@ PPDValue* PPDKey::insertValue(const OUString& rOption, 
PPDValueType eType, bool
     aValue.m_bCustomOption = bCustomOption;
     aValue.m_bCustomOptionSetViaApp = false;
     aValue.m_eType = eType;
-    m_aValues[ rOption ] = aValue;
+    m_aValues[rOption] = std::move(aValue);
     PPDValue* pValue = &m_aValues[rOption];
     m_aOrderedValues.push_back( pValue );
     return pValue;
commit 4551356827e7c506f76a3da744ac8c8d4a3d0fac
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Aug 12 12:35:39 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 16 09:30:27 2024 +0200

    cid#1615990 silence Overflowed integer argument
    
    Change-Id: I37ff85c8d6363bd1e9fb1097dc107bca2ad73738
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171926
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/package/source/zipapi/ZipFile.cxx 
b/package/source/zipapi/ZipFile.cxx
index 178750c01d26..5c5d29435a77 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -1304,15 +1304,13 @@ sal_Int32 ZipFile::readCEN()
         if (nCenLen < nTotal * CENHDR) // prevent overflow with ZIP_MAXENTRIES
             throw ZipException(u"invalid END header (bad entry count)"_ustr );
 
-        if (SAL_MAX_INT32 < nCenLen)
-        {
+        if (nCenLen > SAL_MAX_INT32 || nCenLen < 0)
             throw ZipException(u"central directory too big"_ustr);
-        }
 
         aGrabber.seek(nCenPos);
-        Sequence < sal_Int8 > aCENBuffer ( nCenLen );
+        Sequence<sal_Int8> aCENBuffer(nCenLen);
         sal_Int64 nRead = aGrabber.readBytes ( aCENBuffer, nCenLen );
-        if ( static_cast < sal_Int64 > ( nCenLen ) != nRead )
+        if (nCenLen != nRead)
             throw ZipException (u"Error reading CEN into memory buffer!"_ustr 
);
 
         MemoryByteGrabber aMemGrabber(aCENBuffer);

Reply via email to