comphelper/source/container/enumerablemap.cxx        |    4 ++--
 connectivity/source/cpool/ZConnectionPool.cxx        |    2 +-
 oox/source/drawingml/diagram/layoutatomvisitors.cxx  |    8 ++++----
 sc/source/ui/vba/vbaeventshelper.cxx                 |    2 +-
 sd/source/filter/sdpptwrp.cxx                        |    4 +---
 sfx2/source/bastyp/fltfnc.cxx                        |   14 +++++++-------
 sfx2/source/dialog/filtergrouping.cxx                |    2 +-
 svx/source/items/customshapeitem.cxx                 |    2 +-
 sw/source/uibase/wrtsh/wrtsh1.cxx                    |    2 +-
 sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx |    4 ++--
 sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx    |    2 +-
 tools/source/fsys/urlobj.cxx                         |    2 +-
 12 files changed, 23 insertions(+), 25 deletions(-)

New commits:
commit 309dc58aee022ea804d04f33c80dddefcdafb987
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Jul 13 21:13:00 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Jul 14 15:16:40 2024 +0200

    cid#1555652 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1555655 COPY_INSTEAD_OF_MOVE
    cid#1555658 COPY_INSTEAD_OF_MOVE
    cid#1555665 COPY_INSTEAD_OF_MOVE
    cid#1555667 COPY_INSTEAD_OF_MOVE
    cid#1555670 COPY_INSTEAD_OF_MOVE
    cid#1555675 COPY_INSTEAD_OF_MOVE
    cid#1555684 COPY_INSTEAD_OF_MOVE
    cid#1555687 COPY_INSTEAD_OF_MOVE
    cid#1556539 COPY_INSTEAD_OF_MOVE
    cid#1556542 COPY_INSTEAD_OF_MOVE
    cid#1557448 COPY_INSTEAD_OF_MOVE
    cid#1557449 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I3567528e559bca0031c4f5b46801e3130073633b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170448
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/comphelper/source/container/enumerablemap.cxx 
b/comphelper/source/container/enumerablemap.cxx
index cc827822d57d..dd42518c5faf 100644
--- a/comphelper/source/container/enumerablemap.cxx
+++ b/comphelper/source/container/enumerablemap.cxx
@@ -353,8 +353,8 @@ namespace comphelper
             throw IllegalTypeException(u"Unsupported key type."_ustr, *this );
 
         // init members
-        m_aData.m_aKeyType = aKeyType;
-        m_aData.m_aValueType = aValueType;
+        m_aData.m_aKeyType = std::move(aKeyType);
+        m_aData.m_aValueType = std::move(aValueType);
         m_aData.m_pKeyCompare = std::move(pComparator);
         m_aData.m_pValues.emplace( *m_aData.m_pKeyCompare );
         m_aData.m_bMutable = bMutable;
diff --git a/connectivity/source/cpool/ZConnectionPool.cxx 
b/connectivity/source/cpool/ZConnectionPool.cxx
index e9c447a0db58..9d38b2e99e2d 100644
--- a/connectivity/source/cpool/ZConnectionPool.cxx
+++ b/connectivity/source/cpool/ZConnectionPool.cxx
@@ -272,7 +272,7 @@ Reference< XConnection> 
OConnectionPool::getPooledConnection(TConnectionMap::ite
         TActiveConnectionInfo aActiveInfo;
         aActiveInfo.aPos = _rIter;
         aActiveInfo.xPooledConnection = xPooledConnection;
-        m_aActiveConnections[xConnection] = aActiveInfo;
+        m_aActiveConnections[xConnection] = std::move(aActiveInfo);
     }
     return xConnection;
 }
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx 
b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
index fe451570f516..1b06fad37fc6 100644
--- a/oox/source/drawingml/diagram/layoutatomvisitors.cxx
+++ b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
@@ -73,7 +73,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
     if (!bIsChild)
         return;
 
-    ShapePtr pCurrParent(mpParentShape);
+    ShapePtr xCurrParent(mpParentShape);
 
     if (rAtom.getExistingShape())
     {
@@ -101,8 +101,8 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
             if (rAtom.setupShape(pShape, pNewNode, mnCurrIdx))
             {
                 pShape->setInternalName(rAtom.getName());
-                pCurrParent->addChild(pShape);
-                pCurrParent = pShape;
+                xCurrParent->addChild(pShape);
+                xCurrParent = pShape;
                 rAtom.addNodeShape(pShape);
                 mrDgm.getLayout()->getPresPointShapeMap()[pNewNode] = pShape;
             }
@@ -120,7 +120,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
 
     // set new parent for children
     ShapePtr xPreviousParent(mpParentShape);
-    mpParentShape = pCurrParent;
+    mpParentShape = std::move(xCurrParent);
 
     // process children
     meLookFor = LAYOUT_NODE;
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx 
b/sc/source/ui/vba/vbaeventshelper.cxx
index f9544e1f3c20..19e91f5711a0 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -291,7 +291,7 @@ void SAL_CALL ScVbaEventListener::windowActivated( const 
lang::EventObject& rEve
             processWindowActivateEvent( mpActiveWindow, false );
         // fire activation event for the new window
         processWindowActivateEvent( pWindow, true );
-        mpActiveWindow = pWindow;
+        mpActiveWindow = std::move(pWindow);
     }
 }
 
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index 4f7013824592..a6369fb22875 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -152,12 +152,10 @@ bool SdPPTFilter::Import()
     {
         /* check if there is a dualstorage, then the
         document is probably a PPT95 containing PPT97 */
-        rtl::Reference<SotStorage> xDualStorage;
         OUString sDualStorage( u"PP97_DUALSTORAGE"_ustr  );
         if ( pStorage->IsContained( sDualStorage ) )
         {
-            xDualStorage = pStorage->OpenSotStorage( sDualStorage, 
StreamMode::STD_READ );
-            pStorage = xDualStorage;
+            pStorage = pStorage->OpenSotStorage(sDualStorage, 
StreamMode::STD_READ);
         }
         if (pStorage->IsContained(u"   DRMContent"_ustr))
         {
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 3b0fbdcd9478..a304e7a9494d 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -404,14 +404,14 @@ ErrCode  SfxFilterMatcher::GuessFilterControlDefaultUI( 
SfxMedium& rMedium, std:
 
         if (!sTypeName.isEmpty())
         {
-            std::shared_ptr<const SfxFilter> pNewFilter;
+            std::shared_ptr<const SfxFilter> xNewFilter;
             if (!aFilterName.isEmpty())
                 // Type detection returned a suitable filter for this.  Use it.
-                pNewFilter = SfxFilter::GetFilterByName(aFilterName);
+                xNewFilter = SfxFilter::GetFilterByName(aFilterName);
 
             // fdo#78742 respect requested document service if set
-            if (!pNewFilter || (!m_rImpl.aName.isEmpty()
-                             && m_rImpl.aName != pNewFilter->GetServiceName()))
+            if (!xNewFilter || (!m_rImpl.aName.isEmpty()
+                             && m_rImpl.aName != xNewFilter->GetServiceName()))
             {
                 // detect filter by given type
                 // In case of this matcher is bound to a particular document 
type:
@@ -420,12 +420,12 @@ ErrCode  SfxFilterMatcher::GuessFilterControlDefaultUI( 
SfxMedium& rMedium, std:
                 // This "wrong" type will be sorted out now because we match 
only allowed filters to the detected type
                 uno::Sequence< beans::NamedValue > lQuery { { u"Name"_ustr, 
css::uno::Any(sTypeName) } };
 
-                pNewFilter = GetFilterForProps(lQuery, nMust, nDont);
+                xNewFilter = GetFilterForProps(lQuery, nMust, nDont);
             }
 
-            if (pNewFilter)
+            if (xNewFilter)
             {
-                rpFilter = pNewFilter;
+                rpFilter = std::move(xNewFilter);
                 return ERRCODE_NONE;
             }
         }
diff --git a/sfx2/source/dialog/filtergrouping.cxx 
b/sfx2/source/dialog/filtergrouping.cxx
index 6fd58613c2ef..ef7e8a681891 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -259,7 +259,7 @@ namespace sfx2
         ::std::for_each(
             aFilterClasses.begin(),
             aFilterClasses.end(),
-            ReadGlobalFilter( aFilterClassesNode, aClassReferrer )
+            ReadGlobalFilter( std::move(aFilterClassesNode), aClassReferrer )
         );
     }
 
diff --git a/svx/source/items/customshapeitem.cxx 
b/svx/source/items/customshapeitem.cxx
index be40036d3445..9663fdf84d36 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -155,7 +155,7 @@ void SdrCustomShapeGeometryItem::SetPropertyValue( const 
OUString& rSequenceName
             sal_uInt32 nIndex = m_aPropSeq.getLength();
             m_aPropSeq.realloc( nIndex + 1 );
             auto pPropSeq = m_aPropSeq.getArray();
-            pPropSeq[ nIndex ] = aValue;
+            pPropSeq[ nIndex ] = std::move(aValue);
             m_aPropHashMap[ rSequenceName ] = nIndex;
 
             pSeqAny = &pPropSeq[ nIndex ].Value;
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 78170708ebad..c6848b5ead50 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1121,7 +1121,7 @@ void 
SwWrtShell::InsertContentControl(SwContentControlType eType)
             }
             SwContentControlListItem aListItem;
             aListItem.m_aValue = aPlaceholder;
-            pContentControl->SetListItems({ aListItem });
+            pContentControl->SetListItems({ std::move(aListItem) });
             break;
         }
         case SwContentControlType::PICTURE:
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index 00050f5009d2..00c098a11b8e 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -248,7 +248,7 @@ static uno::Any 
lcl_GetPropertyFromParaStyleSheetNoNum(PropertyIds eId, StyleShe
         if (pEntry == pNewEntry) //fdo#49587
             break;
 
-        pEntry = pNewEntry;
+        pEntry = std::move(pNewEntry);
     }
     return uno::Any();
 }
@@ -5997,7 +5997,7 @@ void 
DomainMapper_Impl::AttachTextBoxContentToShape(css::uno::Reference<css::dra
             if (!bSuccess)
             {
                 aNewGrabBagSeq.realloc(aNewGrabBagSeq.size() + 1);
-                aNewGrabBagSeq.getArray()[aNewGrabBagSeq.size() - 1] = 
aLinkProp;
+                aNewGrabBagSeq.getArray()[aNewGrabBagSeq.size() - 1] = 
std::move(aLinkProp);
                 bSuccess = true;
             }
         }
diff --git a/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx 
b/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx
index ce71589da36e..b8cf2e775bd2 100644
--- a/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx
+++ b/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx
@@ -2402,7 +2402,7 @@ RTFError RTFDocumentImpl::beforePopState(RTFParserState& 
rState)
                                 aBuf.append("0");
                             aBuf.append(static_cast<sal_Int32>(ch), 16);
                         }
-                        m_aStates.top().getDestinationText() = aBuf;
+                        m_aStates.top().getDestinationText() = std::move(aBuf);
                     }
                 }
                 popState();
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 9c27aea1de80..d42ad3181fbc 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -1974,7 +1974,7 @@ bool INetURLObject::convertRelToAbs(OUString const & 
rTheRelURIRef,
         return false;
     }
 
-    rTheAbsURIRef = aNewURI;
+    rTheAbsURIRef = std::move(aNewURI);
     return true;
 }
 

Reply via email to