dbaccess/source/filter/xml/xmlDataSourceSetting.cxx |    2 +-
 filter/source/config/cache/filtercache.cxx          |    3 +--
 sc/source/core/data/dpfilteredcache.cxx             |    2 +-
 test/source/sheet/databaseimportdescriptor.cxx      |   10 +++-------
 4 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit ad338cae4efa3f05907ccec0fbf54c9c35e2f3ce
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun Dec 1 14:37:23 2024 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Dec 1 16:59:29 2024 +0100

    cid#1606986 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1556101 COPY_INSTEAD_OF_MOVE
    cid#1555475 COPY_INSTEAD_OF_MOVE
    cid#1555310 COPY_INSTEAD_OF_MOVE
    
    Change-Id: Ibabd8fd59a5435b8ab6c33d78c1303e5e1bdfd9a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177609
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx 
b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index fd29d71b9e97..b3b8310dde51 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -138,7 +138,7 @@ void OXMLDataSourceSetting::addValue(const OUString& 
_sValue)
         aValue = convertString(m_aPropType, _sValue);
 
     if ( !m_bIsList )
-        m_aSetting.Value = aValue;
+        m_aSetting.Value = std::move(aValue);
     else
     {
         sal_Int32 nPos = m_aInfoSequence.getLength();
diff --git a/filter/source/config/cache/filtercache.cxx 
b/filter/source/config/cache/filtercache.cxx
index e92708ded4d7..95f43c63a68d 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -1507,8 +1507,7 @@ void FilterCache::impl_readPatchUINames(const 
css::uno::Reference< css::containe
         lUINames[locale] <<= sValue;
     }
 
-    aVal <<= lUINames.getAsConstPropertyValueList();
-    rItem[PROPNAME_UINAMES] = aVal;
+    rItem[PROPNAME_UINAMES] <<= lUINames.getAsConstPropertyValueList();
 
     // find right UIName for current office locale
     // Use fallbacks too!
diff --git a/sc/source/core/data/dpfilteredcache.cxx 
b/sc/source/core/data/dpfilteredcache.cxx
index 55fcafb26698..d1c6b38b06d2 100644
--- a/sc/source/core/data/dpfilteredcache.cxx
+++ b/sc/source/core/data/dpfilteredcache.cxx
@@ -340,7 +340,7 @@ void ScDPFilteredCache::filterTable(const 
vector<Criterion>& rCriteria, Sequence
                   OUString string (pData->GetString() );
                   any <<= string;
             }
-            pRow[nCol] = any;
+            pRow[nCol] = std::move(any);
         }
         tableData.push_back(row);
     }
diff --git a/test/source/sheet/databaseimportdescriptor.cxx 
b/test/source/sheet/databaseimportdescriptor.cxx
index c55188b8f092..c6af313216c1 100644
--- a/test/source/sheet/databaseimportdescriptor.cxx
+++ b/test/source/sheet/databaseimportdescriptor.cxx
@@ -33,7 +33,6 @@ void 
DatabaseImportDescriptor::testDatabaseImportDescriptorProperties()
     for (auto& rPropValue : asNonConstRange(aPropValues))
     {
         uno::Any aOldValue;
-        uno::Any aNewValue;
         if (rPropValue.Name == "DatabaseName" || rPropValue.Name == 
"SourceObject"
             || rPropValue.Name == "ConnectionResource")
         {
@@ -44,8 +43,7 @@ void 
DatabaseImportDescriptor::testDatabaseImportDescriptorProperties()
                               + OUStringToOString(rPropValue.Name, 
RTL_TEXTENCODING_UTF8);
             CPPUNIT_ASSERT_EQUAL_MESSAGE(aMsgGet.getStr(), u""_ustr, aValue);
 
-            aNewValue <<= u"New"_ustr;
-            rPropValue.Value = std::move(aNewValue);
+            rPropValue.Value <<= u"New"_ustr;
 
             aOldValue = rPropValue.Value;
             aOldValue >>= aValue;
@@ -62,8 +60,7 @@ void 
DatabaseImportDescriptor::testDatabaseImportDescriptorProperties()
                               + OUStringToOString(rPropValue.Name, 
RTL_TEXTENCODING_UTF8);
             CPPUNIT_ASSERT_MESSAGE(aMsgGet.getStr(), !aValue);
 
-            aNewValue <<= true;
-            rPropValue.Value = std::move(aNewValue);
+            rPropValue.Value <<= true;
 
             aOldValue = rPropValue.Value;
             aOldValue >>= aValue;
@@ -80,8 +77,7 @@ void 
DatabaseImportDescriptor::testDatabaseImportDescriptorProperties()
                               + OUStringToOString(rPropValue.Name, 
RTL_TEXTENCODING_UTF8);
             CPPUNIT_ASSERT_EQUAL_MESSAGE(aMsgGet.getStr(), 
sheet::DataImportMode_NONE, aValue);
 
-            aNewValue <<= sheet::DataImportMode_SQL;
-            rPropValue.Value = aNewValue;
+            rPropValue.Value <<= sheet::DataImportMode_SQL;
 
             aOldValue = rPropValue.Value;
             aOldValue >>= aValue;

Reply via email to