From 23d7910c1e1fc41ab3b7b931cb91e007e09a4086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 14 Oct 2024 08:50:12 +0100 Subject: [PATCH] cid#1554844 COPY_INSTEAD_OF_MOVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and cid#1554878 COPY_INSTEAD_OF_MOVE cid#1554907 COPY_INSTEAD_OF_MOVE cid#1555082 COPY_INSTEAD_OF_MOVE cid#1555224 COPY_INSTEAD_OF_MOVE cid#1555301 COPY_INSTEAD_OF_MOVE cid#1555378 COPY_INSTEAD_OF_MOVE cid#1555395 COPY_INSTEAD_OF_MOVE cid#1555452 COPY_INSTEAD_OF_MOVE cid#1555466 COPY_INSTEAD_OF_MOVE cid#1555514 COPY_INSTEAD_OF_MOVE cid#1555566 COPY_INSTEAD_OF_MOVE cid#1555753 COPY_INSTEAD_OF_MOVE cid#1555782 COPY_INSTEAD_OF_MOVE cid#1555825 COPY_INSTEAD_OF_MOVE cid#1555842 COPY_INSTEAD_OF_MOVE cid#1555891 COPY_INSTEAD_OF_MOVE cid#1555917 COPY_INSTEAD_OF_MOVE cid#1555961 COPY_INSTEAD_OF_MOVE cid#1556021 COPY_INSTEAD_OF_MOVE cid#1556055 COPY_INSTEAD_OF_MOVE cid#1556307 COPY_INSTEAD_OF_MOVE cid#1556349 COPY_INSTEAD_OF_MOVE cid#1556436 COPY_INSTEAD_OF_MOVE cid#1556665 COPY_INSTEAD_OF_MOVE cid#1556696 COPY_INSTEAD_OF_MOVE cid#1556718 COPY_INSTEAD_OF_MOVE cid#1556775 COPY_INSTEAD_OF_MOVE cid#1556835 COPY_INSTEAD_OF_MOVE cid#1556877 COPY_INSTEAD_OF_MOVE cid#1556994 COPY_INSTEAD_OF_MOVE cid#1557010 COPY_INSTEAD_OF_MOVE cid#1557074 COPY_INSTEAD_OF_MOVE cid#1557111 COPY_INSTEAD_OF_MOVE cid#1557142 COPY_INSTEAD_OF_MOVE cid#1557163 COPY_INSTEAD_OF_MOVE cid#1557164 COPY_INSTEAD_OF_MOVE cid#1557214 COPY_INSTEAD_OF_MOVE cid#1557254 COPY_INSTEAD_OF_MOVE cid#1557322 COPY_INSTEAD_OF_MOVE cid#1557327 COPY_INSTEAD_OF_MOVE cid#1557492 COPY_INSTEAD_OF_MOVE cid#1557565 COPY_INSTEAD_OF_MOVE cid#1557663 COPY_INSTEAD_OF_MOVE cid#1557798 COPY_INSTEAD_OF_MOVE Change-Id: I2ae9c184dcc18d44a65437e18c49e16b27f4d81d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174893 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- .../source/standard/accessiblemenubasecomponent.cxx | 2 +- chart2/source/model/main/Diagram.cxx | 4 ++-- chart2/source/model/template/StockDataInterpreter.cxx | 2 +- chart2/source/view/charttypes/VSeriesPlotter.cxx | 4 ++-- codemaker/source/codemaker/typemanager.cxx | 2 +- configmgr/source/access.cxx | 4 ++-- connectivity/source/drivers/odbc/OConnection.cxx | 2 +- cui/source/tabpages/tplnedef.cxx | 2 +- dbaccess/source/core/api/KeySet.cxx | 2 +- desktop/source/app/officeipcthread.cxx | 2 +- filter/source/msfilter/svdfppt.cxx | 2 +- forms/source/component/FormattedFieldWrapper.cxx | 4 ++-- framework/source/loadenv/loadenv.cxx | 2 +- lotuswordpro/source/filter/lwpbulletstylemgr.cxx | 2 +- lotuswordpro/source/filter/lwppagelayout.cxx | 4 ++-- package/source/zippackage/ZipPackageStream.cxx | 2 +- sc/source/ui/app/seltrans.cxx | 2 +- sc/source/ui/docshell/externalrefmgr.cxx | 4 ++-- sd/source/core/drawdoc3.cxx | 4 ++-- sd/source/ui/animations/CustomAnimationPane.cxx | 2 +- sd/source/ui/annotations/annotationmanager.cxx | 2 +- sfx2/source/appl/shutdownicon.cxx | 2 +- store/source/stordir.cxx | 2 +- store/source/storlckb.cxx | 2 +- svx/source/accessibility/GraphCtlAccessibleContext.cxx | 4 ++-- svx/source/accessibility/svxpixelctlaccessiblecontext.cxx | 2 +- svx/source/svdraw/svdobj.cxx | 2 +- svx/source/svdraw/svdograf.cxx | 2 +- svx/source/table/accessibletableshape.cxx | 6 +++--- svx/source/table/tablemodel.cxx | 4 ++-- svx/source/unodraw/unopage.cxx | 2 +- sw/source/core/unocore/unostyle.cxx | 2 +- sw/source/filter/ww8/wrtww8.cxx | 6 +++--- sw/source/uibase/misc/glosdoc.cxx | 4 ++-- toolkit/source/awt/vclxwindows.cxx | 2 +- toolkit/source/controls/tree/treedatamodel.cxx | 2 +- unoidl/source/sourceprovider-parser.y | 2 +- xmloff/source/text/XMLIndexTOCContext.cxx | 2 +- 38 files changed, 52 insertions(+), 52 deletions(-) diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx index 6489e14f7e6f..dc268b5caad6 100644 --- a/accessibility/source/standard/accessiblemenubasecomponent.cxx +++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx @@ -325,7 +325,7 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChild( sal_Int64 i ) // set states pChild->SetStates(); - xChild = pChild; + xChild = std::move(pChild); // insert into menu item list m_aAccessibleChildren[i] = xChild; diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 9d34f04dbe8d..8e29af3a70ef 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -1124,7 +1124,7 @@ static bool lcl_moveSeriesOrCheckIfMoveIsAllowed( } } } - xFormerChartType = xCurrentChartType; + xFormerChartType = std::move(xCurrentChartType); } } } @@ -1762,7 +1762,7 @@ Diagram::tTemplateWithServiceName if (xTempl.is() && xTempl->matchesTemplate2(this, true)) { - aResult.xChartTypeTemplate = xTempl; + aResult.xChartTypeTemplate = std::move(xTempl); aResult.sServiceName = aServiceNames[ i ]; bTemplateFound = true; } diff --git a/chart2/source/model/template/StockDataInterpreter.cxx b/chart2/source/model/template/StockDataInterpreter.cxx index 237b18b30667..75e0bb439c72 100644 --- a/chart2/source/model/template/StockDataInterpreter.cxx +++ b/chart2/source/model/template/StockDataInterpreter.cxx @@ -241,7 +241,7 @@ InterpretedData StockDataInterpreter::interpretDataSource( xSeries = new DataSeries; assert( xSeries.is() ); xSeries->setData( aSequences[nGroupIndex][nSeriesIdx] ); - pResultSerie[nSeriesIdx] = xSeries; + pResultSerie[nSeriesIdx] = std::move(xSeries); } catch( const uno::Exception & ) { diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index e9cdc7fa089f..5370c3f381af 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -2816,7 +2816,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( // set CID to symbol for selection if( xShape.is() ) { - aEntry.xSymbol = xSymbolGroup; + aEntry.xSymbol = std::move(xSymbolGroup); OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_DATA_POINT, nIdx ) ); aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) ); @@ -2932,7 +2932,7 @@ std::vector VSeriesPlotter::createSymbolsForSeries( // set CID to symbol for selection if (xShape.is()) { - aEntry.xSymbol = xSymbolGroup; + aEntry.xSymbol = std::move(xSymbolGroup); aResult.push_back(aEntry); } } diff --git a/codemaker/source/codemaker/typemanager.cxx b/codemaker/source/codemaker/typemanager.cxx index 48588e2c4200..f160a5cfa7ec 100644 --- a/codemaker/source/codemaker/typemanager.cxx +++ b/codemaker/source/codemaker/typemanager.cxx @@ -241,7 +241,7 @@ codemaker::UnoType::Sort TypeManager::decompose( } } if (entity != nullptr) { - *entity = ent; + *entity = std::move(ent); } return codemaker::UnoType::Sort::InstantiatedPolymorphicStruct; diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 0a8d42beb21f..0b82089aa9e0 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -159,7 +159,7 @@ void Access::markChildAsModified(rtl::Reference< ChildAccess > const & child) { parent->modifiedChildren_.emplace( p->getNameInternal(), ModifiedChild(static_cast< ChildAccess * >(p.get()), false)); - p = parent; + p = std::move(parent); } } @@ -2287,7 +2287,7 @@ rtl::Reference< Access > Access::getNotificationRoot() { if (!parent.is()) { return p; } - p = parent; + p = std::move(parent); } } diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx index e3e685cb772d..57b3891958fa 100644 --- a/connectivity/source/drivers/odbc/OConnection.cxx +++ b/connectivity/source/drivers/odbc/OConnection.cxx @@ -544,7 +544,7 @@ SQLHANDLE OConnection::createStatementHandle() { rtl::Reference xConnection(new OConnection(m_pDriverHandleCopy,m_xDriver.get())); xConnection->Construct(m_sURL,getConnectionInfo()); - xConnectionTemp = xConnection; + xConnectionTemp = std::move(xConnection); bNew = true; } } diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index d1db86e4956e..f40aae97531f 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -700,7 +700,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, weld::Button&, void) if( pDshLst->Load() ) { - pDashList = pDshLst; + pDashList = std::move(pDshLst); static_cast(GetDialogController())->SetNewDashList( pDashList ); m_xLbLineStyles->clear(); diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index f931adbab02f..324daa6e6662 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -797,7 +797,7 @@ void OKeySet::copyRowValue(const ORowSetRow& _rInsertRow, ORowSetRow const & _rK rtl::Reference aCopy( new ORowSetValueVector(*m_aParameterValueForCache)); (*aCopy)[i] = (*_rInsertRow)[parameterName.second.nPosition]; - m_aUpdatedParameter[i_nBookmark] = aCopy; + m_aUpdatedParameter[i_nBookmark] = std::move(aCopy); bChanged = true; } ++aParaValuesIter; diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 33455d26725d..274a822fcc30 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -730,7 +730,7 @@ RequestHandler::Status RequestHandler::Enable(bool ipc) assert(thread.is() == (stat == IPC_STATUS_OK)); if (stat == IPC_STATUS_OK) { pGlobal = new RequestHandler; - pGlobal->mIpcThread = thread; + pGlobal->mIpcThread = std::move(thread); pGlobal->mIpcThread->start(pGlobal.get()); } return stat; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index ce1b211c3c3f..d1705e9eb1cf 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1195,7 +1195,7 @@ rtl::Reference SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData rtl::Reference pGroup = new SdrObjGroup(*pSdrModel); pGroup->GetSubList()->NbcInsertObject( pRet.get() ); pGroup->GetSubList()->NbcInsertObject( pTObj.get() ); - pRet = pGroup; + pRet = std::move(pGroup); } else pRet = pTObj.get(); diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index 5f68eece2bd6..0c3b8103442a 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -276,14 +276,14 @@ void SAL_CALL OFormattedFieldWrapper::read(const Reference& if (!pBasicReader->lastReadWasFormattedFake()) { // yes -> all fine - m_xAggregate = pBasicReader; + m_xAggregate = std::move(pBasicReader); } else { // no -> substitute it with a formatted model // let the formatted model do the reading m_xFormattedPart.set(new OFormattedModel(m_xContext)); m_xFormattedPart->read(_rxInStream); - m_pEditPart = pBasicReader; + m_pEditPart = std::move(pBasicReader); m_xAggregate.set( m_xFormattedPart, UNO_QUERY ); } } diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 299b0fcd5ba4..57f2715c4121 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -345,7 +345,7 @@ void LoadEnv::initializeUIDefaults( const css::uno::Reference< css::uno::XCompon xInteractionHandler = pQuietInteraction.get(); if ( o_ppQuietInteraction != nullptr ) { - *o_ppQuietInteraction = pQuietInteraction; + *o_ppQuietInteraction = std::move(pQuietInteraction); } } diff --git a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx index b633f9d18626..bafd4c4e8854 100644 --- a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx +++ b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx @@ -300,7 +300,7 @@ rtl::Reference LwpBulletStyleMgr::AddBulletList( { theItem->Add(prevList.get()); } - prevList = theList; + prevList = std::move(theList); } return InnerItem; } diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index 4a83bfd7e15c..ae5d63ae42a8 100644 --- a/lotuswordpro/source/filter/lwppagelayout.cxx +++ b/lotuswordpro/source/filter/lwppagelayout.cxx @@ -514,7 +514,7 @@ LwpHeaderLayout* LwpPageLayout::GetHeaderLayout() SAL_WARN("lwp", "loop in layout"); break; } - xLay = xNext; + xLay = std::move(xNext); } return nullptr; } @@ -534,7 +534,7 @@ LwpFooterLayout* LwpPageLayout::GetFooterLayout() SAL_WARN("lwp", "loop in layout"); break; } - xLay = xNext; + xLay = std::move(xNext); } return nullptr; } diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 19017a11748f..536f6658edb1 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -422,7 +422,7 @@ bool ZipPackageStream::ParsePackageRawStream() return false; } - m_xBaseEncryptionData = xTempEncrData; + m_xBaseEncryptionData = std::move(xTempEncrData); SetIsEncrypted ( true ); // it's already compressed and encrypted m_bToBeEncrypted = m_bToBeCompressed = false; diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index e7ffa1c42869..cb83f310951a 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -342,7 +342,7 @@ void ScSelectionTransferObj::CreateDrawData() pTransferObj->SetDrawPersist(aDragShellRef); // keep persist for ole objects alive pTransferObj->SetDragSource( pDrawView ); // copies selection - mxDrawData = pTransferObj; + mxDrawData = std::move(pTransferObj); } } OSL_ENSURE( mxDrawData.is(), "can't create DrawData" ); diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index b95b1c0c1155..6e078d63041e 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -3034,13 +3034,13 @@ bool ScExternalRefManager::refreshSrcDocument(sal_uInt16 nFileId) if (it != maDocShells.end()) { it->second.maShell->DoClose(); - it->second.maShell = xDocShell; + it->second.maShell = std::move(xDocShell); it->second.maLastAccess = tools::Time(tools::Time::SYSTEM); } else { SrcShell aSrcDoc; - aSrcDoc.maShell = xDocShell; + aSrcDoc.maShell = std::move(xDocShell); aSrcDoc.maLastAccess = tools::Time(tools::Time::SYSTEM); cacheNewDocShell(nFileId, aSrcDoc); } diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 664bf7ae6473..3b2c64f10888 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1527,8 +1527,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, return; } - pNotesMaster = pNewNotesMaster; - pMaster = pNewMaster; + pNotesMaster = std::move(pNewNotesMaster); + pMaster = std::move(pNewMaster); // layout name needs to be unique aTargetNewLayoutName = pMaster->GetLayoutName(); diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 8c37ec9354e4..1925e4fdf8e9 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -766,7 +766,7 @@ static bool updateMotionPathImpl( CustomAnimationPane& rPane, ::sd::View& rView, rtl::Reference< MotionPathTag > xTag( *aMIter ); if( !xTag->isDisposed() ) { - xMotionPathTag = xTag; + xMotionPathTag = std::move(xTag); rOldTags.erase( aMIter ); } } diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 965fd73aae05..ad88bff0ca6e 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -910,7 +910,7 @@ void AnnotationManagerImpl::onSelectionChanged() rtl::Reference xPage = mrBase.GetMainViewShell()->getCurrentPage(); if (xPage != mxCurrentPage) { - mxCurrentPage = xPage; + mxCurrentPage = std::move(xPage); UpdateTags(true); } } diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 939a03c396b1..b16be15bcf70 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -454,7 +454,7 @@ ShutdownIcon* ShutdownIcon::createInstance() try { rtl::Reference pIcon(new ShutdownIcon( comphelper::getProcessComponentContext() )); pIcon->init (); - pShutdownIcon = pIcon; + pShutdownIcon = std::move(pIcon); } catch (...) { } diff --git a/store/source/stordir.cxx b/store/source/stordir.cxx index 26e60910c0ef..bd4139b96d58 100644 --- a/store/source/stordir.cxx +++ b/store/source/stordir.cxx @@ -106,7 +106,7 @@ storeError OStoreDirectory_Impl::create ( m_nPath = rtl_crc32 (m_nPath, "/", 1); // Save page manager, and descriptor. - m_xManager = xManager; + m_xManager = std::move(xManager); m_aDescr = xNode->m_aDescr; return store_E_None; diff --git a/store/source/storlckb.cxx b/store/source/storlckb.cxx index bde235ad8e85..9c8605f9760c 100644 --- a/store/source/storlckb.cxx +++ b/store/source/storlckb.cxx @@ -87,7 +87,7 @@ storeError OStoreLockBytes::create ( if (eErrCode != store_E_None) return eErrCode; - m_xManager = xManager; + m_xManager = std::move(xManager); m_xNode = xNode; m_bWriteable = (eMode != storeAccessMode::ReadOnly); diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index a3a3e76d616c..be0594ed7327 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -133,9 +133,9 @@ Reference< XAccessible > SvxGraphCtrlAccessibleContext::getAccessible( const Sdr xAccessibleShape = pAcc.get(); if (pAcc.is()) { - pAcc->Init (); + pAcc->Init(); } - mxShapes[pObj] = pAcc; + mxShapes[pObj] = std::move(pAcc); // Create event and inform listeners of the object creation. CommitChange( AccessibleEventId::CHILD, Any( xAccessibleShape ), Any( Reference() ) ); diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index c339c0a6c4f9..667fe8c76849 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -255,7 +255,7 @@ void SvxPixelCtlAccessible::NotifyChild(tools::Long nIndex,bool bSelect ,bool bC { xNewChild->CheckChild(); } - m_xCurChild = xNewChild; + m_xCurChild = std::move(xNewChild); } rtl::Reference SvxPixelCtlAccessible::CreateChild (tools::Long nIndex,Point mPoint) diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 5b90f222c412..76a4d4483743 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2612,7 +2612,7 @@ rtl::Reference SdrObject::ConvertToContourObj(SdrObject* pRet1, bool for (const rtl::Reference& pIterObj : *pObjList2) pGroup->GetSubList()->NbcInsertObject(ConvertToContourObj(pIterObj.get(), bForceLineDash).get()); - pRet = pGroup; + pRet = std::move(pGroup); } else { diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index a0c97cc3dde9..57cb8780fef3 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -977,7 +977,7 @@ rtl::Reference SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAdd } else { - pRetval = pLineFill; + pRetval = std::move(pLineFill); } } diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index f0079da0e5ca..a2ea65e4f056 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -156,7 +156,7 @@ rtl::Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (sa xAccessibleCell->Init(); maChildMap[xCell] = xAccessibleCell; - xChild = xAccessibleCell; + xChild = std::move(xAccessibleCell); } return xChild; } @@ -268,7 +268,7 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/ } // move still existing cell from temporary child map to our child map - maChildMap[xCell] = xAccessibleCell; + maChildMap[xCell] = std::move(xAccessibleCell); aTempChildMap.erase( iter ); } else @@ -276,7 +276,7 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/ rtl::Reference< AccessibleCell > xAccessibleCell( new AccessibleCell( mxAccessible, xCell, nChildIndex, mrShapeTreeInfo ) ); xAccessibleCell->Init(); - maChildMap[xCell] = xAccessibleCell; + maChildMap[xCell] = std::move(xAccessibleCell); } ++nChildIndex; diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index 83facdaaaa99..184eaa13cfb4 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -598,7 +598,7 @@ void TableModel::insertColumns( sal_Int32 nIndex, sal_Int32 nCount ) { TableColumnRef xNewCol( new TableColumn( this, nIndex+nOffset ) ); maColumns[nIndex+nOffset] = xNewCol; - aNewColumns[nOffset] = xNewCol; + aNewColumns[nOffset] = std::move(xNewCol); } const bool bUndo(mpTableObj->IsInserted() && rModel.IsUndoEnabled()); @@ -788,7 +788,7 @@ void TableModel::insertRows( sal_Int32 nIndex, sal_Int32 nCount ) { TableRowRef xNewRow( new TableRow( this, nIndex+nOffset, nColCount ) ); maRows[nIndex+nOffset] = xNewRow; - aNewRows[nOffset] = xNewRow; + aNewRows[nOffset] = std::move(xNewRow); } if( bUndo ) diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 9bf61e49af53..dea32b511d39 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -177,7 +177,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape pClonedSdrShape->setUnoShape(pShape); // pShape->InvalidateSdrObject(); // pShape->Create(pClonedSdrShape, this); - pObj = pClonedSdrShape; + pObj = std::move(pClonedSdrShape); bNeededToClone = true; } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index e4d1628f33ef..014884802c11 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -4678,7 +4678,7 @@ void SAL_CALL SwXTextTableStyle::replaceByName(const OUString& rName, const uno: xStyleToReplaceWith->SetBoxFormat(&m_pTableAutoFormat->GetBoxFormat(nBoxFormat)); m_pTableAutoFormat->GetBoxFormat(nBoxFormat).SetXObject(xStyleToReplaceWith); // make this SwXTextTableStyle use new SwXTextCellStyle - m_aCellStyles[nCellStyle] = xStyleToReplaceWith; + m_aCellStyles[nCellStyle] = std::move(xStyleToReplaceWith); } void SAL_CALL SwXTextTableStyle::removeByName(const OUString& /*Name*/) diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index df4b5f6627c6..cf0e047dd9c2 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3805,7 +3805,7 @@ void WW8Export::PrepareStorage() ErrCodeMsg SwWW8Writer::WriteStorage() { - rtl::Reference pOrigStg; + rtl::Reference xOrigStg; uno::Reference< packages::XPackageEncryption > xPackageEncryption; std::shared_ptr pSotStorageStream; uno::Sequence< beans::NamedValue > aEncryptionData; @@ -3831,7 +3831,7 @@ ErrCodeMsg SwWW8Writer::WriteStorage() { // We have an encryptor // Create new temporary storage for content - pOrigStg = m_pStg; + xOrigStg = m_pStg; pSotStorageStream = std::make_shared(); m_pStg = new SotStorage(*pSotStorageStream); } @@ -3854,7 +3854,7 @@ ErrCodeMsg SwWW8Writer::WriteStorage() uno::Reference xInputStream(new utl::OSeekableInputStreamWrapper(pSotStorageStream.get(), false)); uno::Sequence aStreams = xPackageEncryption->encrypt(xInputStream); - m_pStg = pOrigStg; + m_pStg = std::move(xOrigStg); for (const beans::NamedValue& aStreamData : aStreams) { // To avoid long paths split and open substorages recursively diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index 9899158a9dee..2ca96274ba90 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -541,7 +541,7 @@ Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup( std::u16string { // the group is already cached if ( !sCompleteGroupName.isEmpty() ) { // the group still exists -> return it - xGroup = pSwGroup; + xGroup = std::move(pSwGroup); break; } else @@ -602,7 +602,7 @@ Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry( && pEntry->GetEntryName() == rEntryName ) { - xReturn = pEntry; + xReturn = std::move(pEntry); break; } diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 371990eff960..2e3ab973b443 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -7008,7 +7008,7 @@ void SVTXFormattedField::setFormatsSupplier(const css::uno::Reference< css::util if (!pNew) return; // TODO : how to process ? - m_xCurrentSupplier = pNew; + m_xCurrentSupplier = std::move(pNew); if (!pField) return; diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx index 70156f44c23c..4265d6175c78 100644 --- a/toolkit/source/controls/tree/treedatamodel.cxx +++ b/toolkit/source/controls/tree/treedatamodel.cxx @@ -193,7 +193,7 @@ void SAL_CALL MutableTreeDataModel::setRoot( const Reference< XMutableTreeNode > throw IllegalArgumentException(); xImpl->mbIsInserted = true; - mxRootNode = xImpl; + mxRootNode = std::move(xImpl); Reference< XTreeNode > xParentNode; broadcastImpl( aGuard, structure_changed, xParentNode, mxRootNode ); diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y index 2b126d4811bb..5e3dfac23be1 100644 --- a/unoidl/source/sourceprovider-parser.y +++ b/unoidl/source/sourceprovider-parser.y @@ -580,7 +580,7 @@ Found findEntity( } e->kind = unoidl::detail::SourceProviderEntity::KIND_EXTERNAL; - e->entity = ent; + e->entity = std::move(ent); } break; case unoidl::detail::SourceProviderEntity::KIND_MODULE: diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 205199269fda..224f48c9589a 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -282,7 +282,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexTOCContext::cr xContext = xNewBodyContext; if ( !xBodyContextRef.is() || !xBodyContextRef->HasContent() ) { - xBodyContextRef = xNewBodyContext; + xBodyContextRef = std::move(xNewBodyContext); } } else if (nElement == XML_ELEMENT(TEXT, aIndexSourceElementMap[eIndexType]))