chart2/source/controller/main/ChartController_Insert.cxx    |    3 ++-
 chart2/source/model/main/Diagram.cxx                        |    2 +-
 dbaccess/source/core/api/RowSetCache.cxx                    |    2 +-
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |    2 +-
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx        |    5 ++---
 pyuno/source/module/pyuno_callable.cxx                      |    4 ++--
 sc/source/filter/excel/excel.cxx                            |    5 ++---
 sd/source/filter/eppt/pptx-text.cxx                         |    6 +++---
 svgio/source/svgreader/svgnode.cxx                          |    6 ++----
 sw/source/filter/html/htmltab.cxx                           |    4 ++--
 10 files changed, 18 insertions(+), 21 deletions(-)

New commits:
commit e68f28ec9f68a1f70afce7acfa38ce7a63ccdafe
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Jul 10 17:12:06 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Jul 11 09:26:28 2024 +0200

    cid#1607892 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1607910 COPY_INSTEAD_OF_MOVE
    cid#1607818 COPY_INSTEAD_OF_MOVE
    cid#1557402 COPY_INSTEAD_OF_MOVE
    cid#1556530 COPY_INSTEAD_OF_MOVE
    cid#1557396 COPY_INSTEAD_OF_MOVE
    cid#1556522 COPY_INSTEAD_OF_MOVE
    cid#1555628 COPY_INSTEAD_OF_MOVE
    cid#1554705 COPY_INSTEAD_OF_MOVE
    
    Change-Id: Iae3fbf4a04bf3714f416995640b9d70fe204cf73
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170321
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/chart2/source/controller/main/ChartController_Insert.cxx 
b/chart2/source/controller/main/ChartController_Insert.cxx
index 787d094c8635..442c1e66a032 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -101,7 +101,8 @@ void ChartController::executeDispatch_InsertAxes()
 
         SolarMutexGuard aGuard;
         auto aDlg = std::make_shared<SchAxisDlg>(GetChartFrame(), 
*aDialogInput);
-        weld::DialogController::runAsync(aDlg, [this, aDlg, aDialogInput, 
xUndoGuard=std::move(xUndoGuard)](int nResult) {
+        weld::DialogController::runAsync(aDlg, [this, aDlg, 
aDialogInput=std::move(aDialogInput),
+                                                
xUndoGuard=std::move(xUndoGuard)](int nResult) {
             if ( nResult == RET_OK )
             {
                 // lock controllers till end of block
diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 3979f0bcf34c..9d34f04dbe8d 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -1230,7 +1230,7 @@ static std::vector< rtl::Reference< Axis > > 
lcl_getAxisHoldingCategoriesFromDia
                             aRet.push_back(xAxis);
                         }
                         if( (nN == 0) && !xFallBack.is())
-                            xFallBack = xAxis;
+                            xFallBack = std::move(xAxis);
                     }
                 }
             }
diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index 3ff599c6fa49..ae596d48d1d4 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -605,7 +605,7 @@ void ORowSetCache::updateObject( sal_Int32 columnIndex, 
const Any& x
     if ( rInsert[columnIndex] != aTemp )
     {
         rInsert[columnIndex].setBound(true);
-        rInsert[columnIndex] = aTemp;
+        rInsert[columnIndex] = std::move(aTemp);
         rInsert[columnIndex].setModified(true);
         io_aRow[columnIndex] = rInsert[columnIndex];
 
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx 
b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index e8543bda4e80..1c784db88ef3 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -2372,7 +2372,7 @@ namespace accessibility
                 {
                     continue;
                 }
-                pProperties[ nCurLen++ ] = aProp;
+                pProperties[nCurLen++] = std::move(aProp);
             }
             aProperties.realloc( nCurLen );
         }
diff --git a/pyuno/source/module/pyuno_callable.cxx 
b/pyuno/source/module/pyuno_callable.cxx
index 8f19fc8eb654..9b1550f7789b 100644
--- a/pyuno/source/module/pyuno_callable.cxx
+++ b/pyuno/source/module/pyuno_callable.cxx
@@ -128,11 +128,11 @@ static PyObject* PyUNO_callable_call(
                 PyRef ref = runtime.any2PyObject( aOutParam[i] );
                 PyTuple_SetItem (return_list.get(), 1+i, ref.getAcquired());
             }
-            ret = return_list;
+            ret = std::move(return_list);
         }
         else
         {
-            ret = temp;
+            ret = std::move(temp);
         }
     }
     catch( const css::reflection::InvocationTargetException & e )
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 79e4c9073627..44fe3b31a0b1 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -185,9 +185,8 @@ ErrCode ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& 
rMedium, ScDocument*
         rtl::Reference<SotStorageStream> xDRMStrm = 
ScfTools::OpenStorageStreamRead(xRootStrg, u"      DRMContent"_ustr);
         if (xDRMStrm.is())
         {
-            auto pDecryptedStorage = lcl_DRMDecrypt(rMedium, xRootStrg, 
aNewStorageStrm);
-            if (pDecryptedStorage)
-                xRootStrg = pDecryptedStorage;
+            if (auto xDecryptedStorage = lcl_DRMDecrypt(rMedium, xRootStrg, 
aNewStorageStrm))
+                xRootStrg = std::move(xDecryptedStorage);
             else
             {
                 bUnableToDecryptContent = true;
diff --git a/sd/source/filter/eppt/pptx-text.cxx 
b/sd/source/filter/eppt/pptx-text.cxx
index 745abc3ad477..de1db1a4bcf1 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -356,9 +356,9 @@ void PortionObj::ImplGetPortionValues( FontCollection& 
rFontCollection, bool bGe
     }
     if ( GetPropertyValue( mAny, mXPropSet, aCharLocaleName ) )
     {
-        css::lang::Locale eLocale;
-        if ( mAny >>= eLocale )
-            meCharLocale = eLocale;
+        css::lang::Locale aLocale;
+        if ( mAny >>= aLocale )
+            meCharLocale = std::move(aLocale);
     }
     if ( GetPropertyValue( mAny, mXPropSet, aCharPostureName ) )
     {
diff --git a/svgio/source/svgreader/svgnode.cxx 
b/svgio/source/svgreader/svgnode.cxx
index 7ce5b690bb57..67244a3c2ca7 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -527,10 +527,8 @@ namespace {
                 {
                     SvgStringVector aSvgStringVector;
 
-                    if(readSvgStringVector(aContent, aSvgStringVector, ','))
-                    {
-                        maSystemLanguage = aSvgStringVector;
-                    }
+                    if (readSvgStringVector(aContent, aSvgStringVector, ','))
+                        maSystemLanguage = std::move(aSvgStringVector);
                     break;
                 }
                 case SVGToken::XmlSpace:
diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 9e9727682106..2a9faed4fb63 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -775,8 +775,8 @@ std::unique_ptr<SwHTMLTableLayoutCell> 
HTMLTableCell::CreateLayoutInfo()
     std::shared_ptr<SwHTMLTableLayoutCnts> xCntInfo;
     if (m_xContents)
         xCntInfo = m_xContents->CreateLayoutInfo();
-    return std::unique_ptr<SwHTMLTableLayoutCell>(new 
SwHTMLTableLayoutCell(xCntInfo, m_nRowSpan, m_nColSpan, m_nWidth,
-                                      m_bRelWidth, m_bNoWrap));
+    return std::unique_ptr<SwHTMLTableLayoutCell>(new 
SwHTMLTableLayoutCell(std::move(xCntInfo),
+                                      m_nRowSpan, m_nColSpan, m_nWidth, 
m_bRelWidth, m_bNoWrap));
 }
 
 HTMLTableRow::HTMLTableRow(sal_uInt16 const nCells)
commit 3aac0f9b378e12cb51d8e8239f8c0f7627d0f8ca
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Jul 10 17:02:14 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Jul 11 09:26:19 2024 +0200

    cid#1555404 silence Different smart pointers managing same raw pointer
    
    Change-Id: I6de83a2209129745667e0d3f3768e87a226252e3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170320
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx 
b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index a6e793a3a855..06cb796f28e6 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -1090,9 +1090,8 @@ void XMLFilterSettingsDialog::initFilterList()
                 }
 
                 // add entry to internal container and to ui filter list box
-                maFilterVector.push_back( 
std::unique_ptr<filter_info_impl>(pTempFilter.get()) );
-                addFilterEntry( pTempFilter.release() );
-
+                maFilterVector.push_back(std::move(pTempFilter));
+                addFilterEntry(maFilterVector.back().get());
 
                 pTempFilter.reset( new filter_info_impl );
             }

Reply via email to