accessibility/source/extended/textwindowaccessibility.cxx | 2 - chart2/source/controller/main/ChartController_Properties.cxx | 4 +- cui/source/dialogs/hlmarkwn.cxx | 2 - cui/source/options/optlingu.cxx | 2 - dbaccess/source/core/recovery/dbdocrecovery.cxx | 2 - embeddedobj/source/commonembedding/visobj.cxx | 2 - filter/source/msfilter/msdffimp.cxx | 4 +- helpcompiler/source/HelpLinker.cxx | 4 ++ l10ntools/source/po.cxx | 4 +- package/source/zipapi/ZipOutputStream.cxx | 2 - sc/source/core/inc/interpre.hxx | 2 - sc/source/core/tool/interpr1.cxx | 10 +++--- sc/source/core/tool/interpr5.cxx | 8 ++--- sc/source/filter/excel/xetable.cxx | 2 - sc/source/filter/excel/xichart.cxx | 4 ++ sc/source/filter/oox/PivotTableFormat.cxx | 2 - sc/source/ui/docshell/tablink.cxx | 2 - sc/source/ui/unoobj/linkuno.cxx | 16 ++++++----- sc/source/ui/view/tabvwsh3.cxx | 3 +- sd/source/core/drawdoc3.cxx | 2 - sd/source/filter/ppt/pptin.cxx | 16 +++++------ sd/source/filter/xml/sdxmlwrp.cxx | 4 +- sd/source/ui/func/fumorph.cxx | 2 - sd/source/ui/inc/ViewShellManager.hxx | 2 - sd/source/ui/view/ViewShellManager.cxx | 2 - sfx2/source/appl/appopen.cxx | 2 - slideshow/source/engine/animationnodes/animationbasenode.cxx | 2 - stoc/source/javavm/javavm.cxx | 2 - svx/source/svdraw/svddrgmt.cxx | 3 -- sw/source/core/access/accpara.cxx | 2 - sw/source/core/crsr/crsrsh.cxx | 2 - sw/source/core/doc/docredln.cxx | 2 - sw/source/core/unocore/unotext.cxx | 2 - sw/source/uibase/shells/textsh1.cxx | 2 - sw/source/uibase/uiview/viewsrch.cxx | 8 ++--- sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx | 6 ++-- sw/source/writerfilter/dmapper/TableData.hxx | 4 +- ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx | 4 +- vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx | 2 - vcl/source/control/wizardmachine.cxx | 4 +- vcl/source/gdi/pdfwriter_impl.cxx | 2 - 41 files changed, 81 insertions(+), 73 deletions(-)
New commits: commit d33d592801fa3c865613d9bdf4d715d8b1f637ca Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat Jul 20 19:24:48 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sat Jul 20 23:03:28 2024 +0200 cid#1554791 COPY_INSTEAD_OF_MOVE and cid#1554819 COPY_INSTEAD_OF_MOVE cid#1554837 COPY_INSTEAD_OF_MOVE cid#1554881 COPY_INSTEAD_OF_MOVE cid#1554882 COPY_INSTEAD_OF_MOVE cid#1554884 COPY_INSTEAD_OF_MOVE cid#1554891 COPY_INSTEAD_OF_MOVE cid#1554892 COPY_INSTEAD_OF_MOVE cid#1554897 COPY_INSTEAD_OF_MOVE cid#1554904 COPY_INSTEAD_OF_MOVE cid#1554918 COPY_INSTEAD_OF_MOVE cid#1554928 COPY_INSTEAD_OF_MOVE cid#1554931 COPY_INSTEAD_OF_MOVE cid#1554944 COPY_INSTEAD_OF_MOVE cid#1554945 COPY_INSTEAD_OF_MOVE cid#1554959 COPY_INSTEAD_OF_MOVE cid#1554960 COPY_INSTEAD_OF_MOVE cid#1554963 COPY_INSTEAD_OF_MOVE cid#1554966 COPY_INSTEAD_OF_MOVE cid#1554969 COPY_INSTEAD_OF_MOVE cid#1554973 COPY_INSTEAD_OF_MOVE cid#1555011 COPY_INSTEAD_OF_MOVE cid#1555012 COPY_INSTEAD_OF_MOVE cid#1555015 COPY_INSTEAD_OF_MOVE cid#1555044 COPY_INSTEAD_OF_MOVE cid#1555051 COPY_INSTEAD_OF_MOVE cid#1555055 COPY_INSTEAD_OF_MOVE cid#1555063 COPY_INSTEAD_OF_MOVE cid#1555068 COPY_INSTEAD_OF_MOVE cid#1555073 COPY_INSTEAD_OF_MOVE cid#1555074 COPY_INSTEAD_OF_MOVE cid#1555078 COPY_INSTEAD_OF_MOVE cid#1555080 COPY_INSTEAD_OF_MOVE cid#1555091 COPY_INSTEAD_OF_MOVE cid#1555099 COPY_INSTEAD_OF_MOVE cid#1555101 COPY_INSTEAD_OF_MOVE cid#1555121 COPY_INSTEAD_OF_MOVE cid#1610739 COPY_INSTEAD_OF_MOVE cid#1608424 COPY_INSTEAD_OF_MOVE cid#1608059 COPY_INSTEAD_OF_MOVE cid#1607952 COPY_INSTEAD_OF_MOVE cid#1607653 COPY_INSTEAD_OF_MOVE cid#1607614 COPY_INSTEAD_OF_MOVE cid#1607592 COPY_INSTEAD_OF_MOVE Change-Id: Ie9f922a9fe1b8001dfab31e2741fe8bd5558e442 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170802 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 94b65098ed5e..375c2900beb5 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -1053,7 +1053,7 @@ void Document::retrieveRunAttributesImpl( } if ( !RequestedAttributes.hasElements() ) { - rRunAttrSeq = aRunAttrSeq; + rRunAttrSeq = std::move(aRunAttrSeq); } else { diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index 62b7ad8a6beb..7ff6db70e922 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -791,8 +791,8 @@ void ChartController::executeDlg_ObjectProperties_withUndoGuard( } //open the dialog - SfxTabDialogController::runAsync(aDlgPtr, [aDlgPtr, xChartDoc, pItemConverter,bSuccessOnUnchanged, - xUndoGuard=std::move(xUndoGuard)] (int nResult) + SfxTabDialogController::runAsync(aDlgPtr, [aDlgPtr, xChartDoc, pItemConverter=std::move(pItemConverter), + bSuccessOnUnchanged, xUndoGuard=std::move(xUndoGuard)] (int nResult) { if (nResult == RET_OK || (bSuccessOnUnchanged && aDlgPtr->DialogWasClosedWithOK())) { const SfxItemSet* pOutItemSet = aDlgPtr->GetOutputItemSet(); diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 0f45cfe9680a..f35be2db2aea 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -201,7 +201,7 @@ void SvxHlinkDlgMarkWnd::RestoreLastSelection() //now to what was available at dialog close time if (!bSelectedEntry && !aLastSelectedPath.empty()) { - std::deque<OUString> aTmpSelectedPath(aLastSelectedPath); + std::deque<OUString> aTmpSelectedPath(std::move(aLastSelectedPath)); std::unique_ptr<weld::TreeIter> xEntry(mxLbTree->make_iterator()); if (!mxLbTree->get_iter_first(*xEntry)) xEntry.reset(); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 8cdc7997531b..d3b4c59d8d23 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1964,7 +1964,7 @@ void SvxEditModulesDlg::LangSelectHdl_Impl(const SvxLanguageBox* pBox) } } } - aLastLocale = aCurLocale; + aLastLocale = std::move(aCurLocale); } IMPL_LINK( SvxEditModulesDlg, UpDownHdl_Impl, weld::Button&, rBtn, void ) diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx index 76131911d805..d367517a0315 100644 --- a/dbaccess/source/core/recovery/dbdocrecovery.cxx +++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx @@ -178,7 +178,7 @@ namespace dbaccess SubComponentDescriptor aCompDesc; if ( !lcl_extractCompDesc( sLine, sStorageName, aCompDesc ) ) continue; - o_mapStorageToObjectName[ sStorageName ] = aCompDesc; + o_mapStorageToObjectName[ sStorageName ] = std::move(aCompDesc); } } diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx index ea86e73084f2..469d38e56b87 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.cxx @@ -197,7 +197,7 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe if( !xTransferable->isDataFlavorSupported( aDataFlavor )) throw uno::RuntimeException(); aVisualRepresentation.Data = xTransferable->getTransferData( aDataFlavor ); - aVisualRepresentation.Flavor = aDataFlavor; + aVisualRepresentation.Flavor = std::move(aDataFlavor); } if ( bBackToLoaded ) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 28819f802134..7350c76c4327 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1453,12 +1453,12 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co aGraf = Graphic(vcl::bitmap::CreateFromData(std::move(aResult))); } - rSet.Put(XFillBitmapItem(OUString(), aGraf)); + rSet.Put(XFillBitmapItem(OUString(), std::move(aGraf))); } else if ( eMSO_FillType == mso_fillTexture ) { rSet.Put(XFillBmpTileItem(true)); - rSet.Put(XFillBitmapItem(OUString(), aGraf)); + rSet.Put(XFillBitmapItem(OUString(), std::move(aGraf))); rSet.Put(XFillBmpSizeXItem(GetPropertyValue(DFF_Prop_fillWidth, 0) / 360)); rSet.Put(XFillBmpSizeYItem(GetPropertyValue(DFF_Prop_fillHeight, 0) / 360)); rSet.Put(XFillBmpSizeLogItem(true)); diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx index 70b9af1fe4b4..d028b866fd94 100644 --- a/helpcompiler/source/HelpLinker.cxx +++ b/helpcompiler/source/HelpLinker.cxx @@ -827,7 +827,9 @@ static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, xmlErrorPtr if( error->file != nullptr ) aXMLParsingFile = error->file; int nXMLParsingLine = error->line; - GpXMLParsingException = new HelpProcessingException(error->message, aXMLParsingFile, nXMLParsingLine); + GpXMLParsingException = new HelpProcessingException(error->message, + std::move(aXMLParsingFile), + nXMLParsingLine); // Reset error handler xmlSetStructuredErrorFunc( nullptr, nullptr ); diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index fc0b5bbfbf7a..729b01921d16 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -625,11 +625,11 @@ void PoIfstream::readEntry( PoEntry& rPoEntry ) { if( rPoEntry.m_pGenPo ) { - *(rPoEntry.m_pGenPo) = aGenPo; + *(rPoEntry.m_pGenPo) = std::move(aGenPo); } else { - rPoEntry.m_pGenPo.reset( new GenPoEntry( aGenPo ) ); + rPoEntry.m_pGenPo.reset( new GenPoEntry(std::move(aGenPo)) ); } rPoEntry.m_bIsInitialized = true; } diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx index 87a713220a8b..1bbf106d62b5 100644 --- a/package/source/zipapi/ZipOutputStream.cxx +++ b/package/source/zipapi/ZipOutputStream.cxx @@ -142,7 +142,7 @@ void ZipOutputStream::consumeFinishedScheduledThreadTaskEntries() } // always reset to non-consumed entries - m_aEntries = aNonFinishedEntries; + m_aEntries = std::move(aNonFinishedEntries); } void ZipOutputStream::reduceScheduledThreadTasksToGivenNumberOrLess(std::size_t nThreadTasks) diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 2567f85a7847..954fe092d39a 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -517,7 +517,7 @@ private: // Get tokens at specific parameters for LET (lambda) function void getTokensAtParameter( std::unique_ptr<ScTokenArray>& pTokens, short nPos ); - static void replaceNamesToResult( const std::unordered_map<OUString, formula::FormulaToken*> nResultIndexes, + static void replaceNamesToResult( const std::unordered_map<OUString, formula::FormulaToken*>& rResultIndexes, std::unique_ptr<ScTokenArray>& pTokens ); void ScTableOp(); // repeated operations diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 7a23828c2402..64fc44b382fb 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -1015,7 +1015,7 @@ sc::RangeMatrix ScInterpreter::CompareMat( ScQueryOp eOp, sc::CompareOptions* pO { svl::SharedString aStr; GetCellString(aStr, aCell); - rCell.maStr = aStr; + rCell.maStr = std::move(aStr); rCell.mbValue = false; } else @@ -7885,7 +7885,7 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry) { svl::SharedString aStr; const ScMatValType nType = GetDoubleOrStringFromMatrix(rItem.mfVal, aStr); - rItem.maString = aStr; + rItem.maString = std::move(aStr); rItem.meType = ScMatrix::IsNonValueType(nType) ? ScQueryEntry::ByString : ScQueryEntry::ByValue; } @@ -8966,14 +8966,14 @@ void ScInterpreter::getTokensAtParameter( std::unique_ptr<ScTokenArray>& pTokens } } -void ScInterpreter::replaceNamesToResult( const std::unordered_map<OUString, formula::FormulaToken*> nResultIndexes, +void ScInterpreter::replaceNamesToResult(const std::unordered_map<OUString, formula::FormulaToken*>& rResultIndexes, std::unique_ptr<ScTokenArray>& pTokens ) { formula::FormulaTokenArrayPlainIterator aIterResult(*pTokens); for (FormulaToken* t = aIterResult.GetNextStringName(); t; t = aIterResult.GetNextStringName()) { - auto iRes = nResultIndexes.find(t->GetString().getString()); - if (iRes != nResultIndexes.end()) + auto iRes = rResultIndexes.find(t->GetString().getString()); + if (iRes != rResultIndexes.end()) pTokens->ReplaceToken(aIterResult.GetIndex() - 1, iRes->second->Clone(), FormulaTokenArray::ReplaceMode::CODE_ONLY); } diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 406d379c7eec..4684324094ce 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1565,11 +1565,11 @@ void ScInterpreter::ScMul() else if (pMat1 || pMat2) { double fVal; - ScMatrixRef pMat = pMat1; + ScMatrixRef pMat = std::move(pMat1); if (!pMat) { fVal = fVal1; - pMat = pMat2; + pMat = std::move(pMat2); } else fVal = fVal2; @@ -1638,11 +1638,11 @@ void ScInterpreter::ScDiv() { 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/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 3a9a02cbc6c2..90ea25795f43 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -2510,7 +2510,7 @@ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 nXclRow, bool bRowAlwaysE } RowRef p = std::make_shared<XclExpRow>(GetRoot(), nFrom, maOutlineBfr, bRowAlwaysEmpty, bHidden, nHeight); maRowMap.emplace(nFrom, p); - pPrevEntry = p; + pPrevEntry = std::move(p); } ++nFrom; } diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 3d7e47e7f5fc..e5ad452c4f19 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -3730,8 +3730,10 @@ void XclImpChAxesSet::ReadChTypeGroup( XclImpStream& rStrm ) sal_uInt16 nGroupIdx = xTypeGroup->GetGroupIdx(); XclImpChTypeGroupMap::iterator itr = maTypeGroups.lower_bound(nGroupIdx); if (itr != maTypeGroups.end() && !maTypeGroups.key_comp()(nGroupIdx, itr->first)) + { // Overwrite the existing element. - itr->second = xTypeGroup; + itr->second = std::move(xTypeGroup); + } else maTypeGroups.insert( itr, XclImpChTypeGroupMap::value_type(nGroupIdx, xTypeGroup)); diff --git a/sc/source/filter/oox/PivotTableFormat.cxx b/sc/source/filter/oox/PivotTableFormat.cxx index 51b44596ea23..8072d680ddda 100644 --- a/sc/source/filter/oox/PivotTableFormat.cxx +++ b/sc/source/filter/oox/PivotTableFormat.cxx @@ -102,7 +102,7 @@ void PivotTableFormat::finalizeImport() aFormat.bOutline = mbOutline; aFormat.oFieldPosition = moFieldPosition; - aFormat.pPattern = pPattern; + aFormat.pPattern = std::move(pPattern); for (auto& rReference : maReferences) { if (rReference->mnField) diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 65fe4981c932..3732bddf949f 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -171,7 +171,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, if (!aOptions.isEmpty()) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) ); - SfxMedium* pMed = new SfxMedium(aNewUrl, StreamMode::STD_READ, pFilter, std::move(pSet)); + SfxMedium* pMed = new SfxMedium(aNewUrl, StreamMode::STD_READ, std::move(pFilter), std::move(pSet)); if ( bInEdit ) // only if using the edit dialog, pMed->UseInteractionHandler(true); // enable the filter options dialog diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index 847e5a41f4b4..389ccf07269e 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -1491,12 +1491,15 @@ uno::Reference< sheet::XExternalSheetCache > SAL_CALL ScExternalDocLinkObj::addS { SolarMutexGuard aGuard; size_t nIndex = 0; - ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, aSheetName, true, &nIndex); + ScExternalRefCache::TableTypeRef xTable = mpRefMgr->getCacheTable(mnFileId, aSheetName, true, &nIndex); if (!bDynamicCache) + { // Set the whole table cached to prevent access to the source document. - pTable->setWholeTableCached(); + xTable->setWholeTableCached(); + } - uno::Reference< sheet::XExternalSheetCache > aSheetCache(new ScExternalSheetCacheObj(mpDocShell, pTable, nIndex)); + uno::Reference< sheet::XExternalSheetCache > aSheetCache(new ScExternalSheetCacheObj( + mpDocShell, std::move(xTable), nIndex)); return aSheetCache; } @@ -1504,11 +1507,12 @@ Any SAL_CALL ScExternalDocLinkObj::getByName(const OUString &aName) { SolarMutexGuard aGuard; size_t nIndex = 0; - ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, aName, false, &nIndex); - if (!pTable) + ScExternalRefCache::TableTypeRef xTable = mpRefMgr->getCacheTable(mnFileId, aName, false, &nIndex); + if (!xTable) throw container::NoSuchElementException(); - uno::Reference< sheet::XExternalSheetCache > aSheetCache(new ScExternalSheetCacheObj(mpDocShell, pTable, nIndex)); + uno::Reference< sheet::XExternalSheetCache > aSheetCache(new ScExternalSheetCacheObj( + mpDocShell, std::move(xTable), nIndex)); return Any(aSheetCache); } diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 5da074866770..7445a23d1d3b 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -259,7 +259,8 @@ void ScTabViewShell::ExecProtectTable( SfxRequest& rReq ) const ScTableProtection* pProtect = rDoc.GetTabProtection(nTab); if (pProtect) pDlg->SetDialogData(*pProtect); - weld::DialogController::runAsync(pDlg, [this, pDlg, pScMod, nTab, xRequest](sal_uInt32 nResult) { + weld::DialogController::runAsync(pDlg, [this, pDlg, pScMod, nTab, + xRequest=std::move(xRequest)](sal_uInt32 nResult) { if (nResult == RET_OK) { pScMod->InputEnterHandler(); diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index ee2b36bc94ef..664bf7ae6473 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -342,7 +342,7 @@ lcl_removeUnusedStyles(SfxStyleSheetBasePool* const pStyleSheetPool, StyleSheetC else pStyleSheetPool->Remove(a.m_xStyleSheet.get()); } - rStyles = aUsedStyles; + rStyles = std::move(aUsedStyles); } void diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 0afb14a5b59e..bcca6cdd624e 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -2625,15 +2625,15 @@ rtl::Reference<SdrObject> ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData if ( SeekToRec( rSt, PPT_PST_AnimationInfoAtom, nHdRecEnd, &aHdAnimInfoAtom ) ) { // read data from stream - Ppt97AnimationPtr pAnimation = std::make_shared<Ppt97Animation>( rSt ); + Ppt97AnimationPtr xAnimation = std::make_shared<Ppt97Animation>( rSt ); // store animation information - if( pAnimation->HasEffect() ) + if( xAnimation->HasEffect() ) { // translate color to RGB - pAnimation->SetDimColor( MSO_CLR_ToColor(pAnimation->GetDimColor()) ); + xAnimation->SetDimColor( MSO_CLR_ToColor(xAnimation->GetDimColor()) ); // translate sound bits to file url - if( pAnimation->HasSoundEffect() ) - pAnimation->SetSoundFileUrl( ReadSound( pAnimation->GetSoundRef() ) ); + if( xAnimation->HasSoundEffect() ) + xAnimation->SetSoundFileUrl( ReadSound( xAnimation->GetSoundRef() ) ); bool bDontAnimateInvisibleShape = false; { @@ -2641,7 +2641,7 @@ rtl::Reference<SdrObject> ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData if( pTextObj && pTextObj->HasText() && dynamic_cast< SdrObjGroup *>( pObj.get() ) == nullptr && - pAnimation->HasAnimateAssociatedShape() ) + xAnimation->HasAnimateAssociatedShape() ) { const SfxItemSet& rObjItemSet = pObj->GetMergedItemSet(); @@ -2653,12 +2653,12 @@ rtl::Reference<SdrObject> ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData } } if( bDontAnimateInvisibleShape ) - pAnimation->SetAnimateAssociatedShape(false); + xAnimation->SetAnimateAssociatedShape(false); //maybe some actions necessary to ensure that animations on master pages are played before animations on normal pages //maybe todo in future: bool bIsEffectOnMasterPage = !bInhabitanceChecked;? - maAnimations[pObj.get()] = pAnimation; + maAnimations[pObj.get()] = std::move(xAnimation); bAnimationInfoFound = true; } diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 32d8cbe49fb0..5a7563eb4d49 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -622,9 +622,9 @@ bool SdXMLFilter::Import( ErrCode& nError ) if( !nRet ) { if( nWarn ) - nRet = nWarn; + nRet = std::move(nWarn); else if( nWarn2 ) - nRet = nWarn2; + nRet = std::move(nWarn2); } } diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index e62f21e1a7e3..1de932fb68f5 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -256,7 +256,7 @@ void FuMorph::ImpEqualizePolyPointCount( } aPoly2.setClosed(rBig.isClosed()); - rSmall = aPoly2; + rSmall = std::move(aPoly2); } sal_uInt32 FuMorph::ImpGetNearestIndex( diff --git a/sd/source/ui/inc/ViewShellManager.hxx b/sd/source/ui/inc/ViewShellManager.hxx index 1ad4f138d8ae..70fe4d548cbe 100644 --- a/sd/source/ui/inc/ViewShellManager.hxx +++ b/sd/source/ui/inc/ViewShellManager.hxx @@ -80,7 +80,7 @@ public: void ActivateViewShell(ViewShell* pViewShell); void RemoveOverridingMainShell(); - void SetOverridingMainShell(std::shared_ptr<ViewShell> pViewShell); + void SetOverridingMainShell(const std::shared_ptr<ViewShell>& pViewShell); std::shared_ptr<ViewShell> GetOverridingMainShell(); /** Activate the given shell which is not a view shell. For view shells diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx index f158e32e3296..46ccf6c34446 100644 --- a/sd/source/ui/view/ViewShellManager.cxx +++ b/sd/source/ui/view/ViewShellManager.cxx @@ -271,7 +271,7 @@ void ViewShellManager::RemoveOverridingMainShell() mpImpl->RemoveOverridingMainShell(); } -void ViewShellManager::SetOverridingMainShell(std::shared_ptr<ViewShell> pViewShell) +void ViewShellManager::SetOverridingMainShell(const std::shared_ptr<ViewShell>& pViewShell) { if(mbValid) mpImpl->SetOverridingShell(pViewShell); diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index c627056160c4..a271df27c472 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -353,7 +353,7 @@ ErrCodeMsg SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStrin xDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName() ); //pMedium takes ownership of pSet - SfxMedium *pMedium = new SfxMedium( rFileName, StreamMode::STD_READ, pFilter, std::move(pSet) ); + SfxMedium *pMedium = new SfxMedium(rFileName, StreamMode::STD_READ, std::move(pFilter), std::move(pSet)); if(!xDoc->DoLoad(pMedium)) { ErrCodeMsg nErrCode = xDoc->GetErrorCode(); diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx index cc0a9ac9fac0..935fd27e1cb5 100644 --- a/slideshow/source/engine/animationnodes/animationbasenode.cxx +++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx @@ -467,7 +467,7 @@ AnimationBaseNode::fillCommonParameters() const basegfx::fround(nDuration * FrameRate::MinimumFramesPerSecond), 1, 10)); return ActivitiesFactory::CommonParameters( - pEndEvent, + std::move(pEndEvent), getContext().mrEventQueue, getContext().mrActivitiesQueue, nDuration, diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index b2c03c9fc0a1..2d10d3f3876a 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -431,7 +431,7 @@ void initVMConfiguration( SAL_INFO("stoc", "couldn't get safety settings because of " << exception); } - *pjvm= jvm; + *pjvm = std::move(jvm); // rhbz#1285356, native look will be gtk2, which crashes // when gtk3 is already loaded. Until there is a solution diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 6ae713bba303..885dd8fcc277 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -3481,8 +3481,7 @@ void SdrDragDistort::MovAllPoints(basegfx::B2DPolyPolygon& rTarget) const basegfx::B2DPoint aBottomLeft(aDistortedRect[3].X(), aDistortedRect[3].Y()); const basegfx::B2DPoint aBottomRight(aDistortedRect[2].X(), aDistortedRect[2].Y()); - aDragPolygon = basegfx::utils::distort(aDragPolygon, aOriginalRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight); - rTarget = aDragPolygon; + rTarget = basegfx::utils::distort(aDragPolygon, aOriginalRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight); } } diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 64a1e622c272..8ba66ce80a11 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1717,7 +1717,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( if ( !aRequestedAttributes.hasElements() ) { - rRunAttrSeq = aRunAttrSeq; + rRunAttrSeq = std::move(aRunAttrSeq); } else { diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index a092c19a6e68..c4575aef2bc7 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -4255,7 +4255,7 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt, SwRect& rSelectRect ) aPos.SetContent( nBegin + nLeft ); pCursor = GetCursor(); - *pCursor->GetPoint() = aPos; + *pCursor->GetPoint() = std::move(aPos); pCursor->SetMark(); ExtendSelection( true, nLen - nLeft - nRight ); // do not determine the rectangle in the current line diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 2283febbf429..a71224f2eac8 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -2124,7 +2124,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos) } SetMark(); - *GetPoint() = aPos; + *GetPoint() = std::move(aPos); GetMark()->Assign(aNdIdx.GetIndex() + 1); pCNd = GetMark()->GetNode().GetContentNode(); if( pCNd ) diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 4de4897ab223..e569b4c40f18 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1555,7 +1555,7 @@ SwXText::convertToTextFrame( bParaAfterInserted = GetDoc()->getIDocumentContentOperations().AppendTextNode( aEnd ); pEndPam->DeleteMark(); *pEndPam->GetPoint() = aEnd; - *oAnchorCheckPam->End() = aEnd; + *oAnchorCheckPam->End() = std::move(aEnd); } pStartPam->SetMark(); *pStartPam->End() = *pEndPam->End(); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index f92c44cea183..31ba3ff8e7d4 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1266,7 +1266,7 @@ void SwTextShell::Execute(SfxRequest &rReq) rReq.Ignore(); // the 'old' request is not relevant any more VclPtr<AbstractSwModalRedlineAcceptDlg> pDlg(pFact->CreateSwModalRedlineAcceptDlg(GetView().GetEditWin().GetFrameWeld())); pDlg->StartExecuteAsync( - [pDlg, xRequest] (sal_Int32 /*nResult*/)->void + [pDlg, xRequest=std::move(xRequest)] (sal_Int32 /*nResult*/)->void { pDlg->disposeOnce(); xRequest->Done(); diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index c03492adfc30..8234cf5501af 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -694,13 +694,13 @@ void SwView::Replace() if(! s_pSrchItem->GetBackward() ) { - (* m_pWrtShell->GetCursor()->Start()) = aStartPos; - (* m_pWrtShell->GetCursor()->End()) = aEndPos; + (* m_pWrtShell->GetCursor()->Start()) = std::move(aStartPos); + (* m_pWrtShell->GetCursor()->End()) = std::move(aEndPos); } else { - (* m_pWrtShell->GetCursor()->Start()) = aEndPos; - (* m_pWrtShell->GetCursor()->End()) = aStartPos; + (* m_pWrtShell->GetCursor()->Start()) = std::move(aEndPos); + (* m_pWrtShell->GetCursor()->End()) = std::move(aStartPos); } bReqReplace = false; } diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx index 62b7849f8a56..5c22378a166f 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx @@ -1534,7 +1534,7 @@ uno::Any DomainMapper_Impl::GetPropertyFromParaStyleSheet(PropertyIds eId) pEntry = GetStyleSheetTable()->GetCurrentEntry(); else pEntry = GetStyleSheetTable()->FindStyleSheetByConvertedStyleName(GetCurrentParaStyleName()); - return GetPropertyFromStyleSheet(eId, pEntry, /*bDocDefaults=*/true, /*bPara=*/true); + return GetPropertyFromStyleSheet(eId, std::move(pEntry), /*bDocDefaults=*/true, /*bPara=*/true); } uno::Any DomainMapper_Impl::GetInheritedParaProperty(PropertyIds eId) @@ -1547,7 +1547,7 @@ uno::Any DomainMapper_Impl::GetInheritedParaProperty(PropertyIds eId) pEntry = GetStyleSheetTable()->FindStyleSheetByConvertedStyleName(GetCurrentParaStyleName()); const bool bCheckDocDefaults = !IsDocDefaultsImport(); - return GetPropertyFromStyleSheet(eId, pEntry, bCheckDocDefaults, /*bPara=*/true); + return GetPropertyFromStyleSheet(eId, std::move(pEntry), bCheckDocDefaults, /*bPara=*/true); } uno::Any DomainMapper_Impl::GetPropertyFromCharStyleSheet(PropertyIds eId, const PropertyMapPtr& rContext) @@ -1559,7 +1559,7 @@ uno::Any DomainMapper_Impl::GetPropertyFromCharStyleSheet(PropertyIds eId, const OUString sCharStyleName; if ( GetAnyProperty(PROP_CHAR_STYLE_NAME, rContext) >>= sCharStyleName ) pEntry = GetStyleSheetTable()->FindStyleSheetByConvertedStyleName(sCharStyleName); - return GetPropertyFromStyleSheet(eId, pEntry, /*bDocDefaults=*/false, /*bPara=*/false); + return GetPropertyFromStyleSheet(eId, std::move(pEntry), /*bDocDefaults=*/false, /*bPara=*/false); } uno::Any DomainMapper_Impl::GetAnyProperty(PropertyIds eId, const PropertyMapPtr& rContext) diff --git a/sw/source/writerfilter/dmapper/TableData.hxx b/sw/source/writerfilter/dmapper/TableData.hxx index ded929696e5a..c87e291f7d2f 100644 --- a/sw/source/writerfilter/dmapper/TableData.hxx +++ b/sw/source/writerfilter/dmapper/TableData.hxx @@ -74,7 +74,7 @@ public: @param pProps the properties to add */ - void insertProperties(TablePropertyMapPtr pProps) + void insertProperties(const TablePropertyMapPtr& pProps) { if( mpProps ) mpProps->InsertProps(pProps.get()); @@ -194,7 +194,7 @@ public: @param pProperties the properties to set */ - void insertProperties(TablePropertyMapPtr pProperties) + void insertProperties(const TablePropertyMapPtr& pProperties) { if( pProperties ) { diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx index 8b0f2b11a7a0..a7d9f5504597 100644 --- a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx @@ -266,7 +266,7 @@ void DAVResourceAccess::PROPFIND( rResInfo, DAVRequestEnvironment( new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders ) ) ; + std::move(aHeaders) ) ) ; } catch (DAVException const& e) { @@ -379,7 +379,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( DAVRequestEnvironment( new DAVAuthListener_Impl( xEnv, m_aURL ), - aHeaders ) ); + std::move(aHeaders) ) ); } catch (DAVException const& e) { diff --git a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx index 4a0d3d89a8db..ea11a1c0a2c5 100644 --- a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx +++ b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx @@ -182,7 +182,7 @@ BitmapEx BitmapConvolutionMatrixFilter::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/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx index 31e84ca37eb7..24b5ceae80f5 100644 --- a/vcl/source/control/wizardmachine.cxx +++ b/vcl/source/control/wizardmachine.cxx @@ -669,7 +669,7 @@ namespace vcl nCurrentRollbackState = aTravelVirtually.top(); aTravelVirtually.pop(); } - m_xWizardImpl->aStateHistory = aTravelVirtually; + m_xWizardImpl->aStateHistory = std::move(aTravelVirtually); if ( !ShowPage( _nTargetState ) ) { m_xWizardImpl->aStateHistory = std::move(aOldStateHistory); @@ -1110,7 +1110,7 @@ namespace vcl // get the next state nCurrentState = nNextState; } - m_pImpl->aStateHistory = aTravelVirtually; + m_pImpl->aStateHistory = std::move(aTravelVirtually); // show the target page if ( !ShowPage( nCurrentState ) ) { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 37da6e745be7..f0c49730a03a 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1389,7 +1389,7 @@ void PDFWriterImpl::setupDocInfo() m_aCreationDateString = PDFWriter::GetDateTime(); computeDocumentIdentifier( aId, m_aContext.DocumentInfo, m_aCreationDateString, m_aContext.DocumentInfo.ModificationDate, m_aCreationMetaDateString ); if( m_aContext.Encryption.DocumentIdentifier.empty() ) - m_aContext.Encryption.DocumentIdentifier = aId; + m_aContext.Encryption.DocumentIdentifier = std::move(aId); } OString PDFWriter::GetDateTime()