cui/source/options/optlingu.cxx | 4 ++-- drawinglayer/source/processor3d/defaultprocessor3d.cxx | 4 ++-- filter/source/msfilter/msdffimp.cxx | 4 ++-- oox/source/shape/WpgContext.cxx | 15 ++++++++------- sfx2/source/appl/fileobj.cxx | 2 +- svtools/source/control/ruler.cxx | 2 +- svx/source/smarttags/SmartTagMgr.cxx | 4 +--- svx/source/unodraw/unoshape.cxx | 4 ++-- sw/source/core/crsr/swcrsr.cxx | 2 +- sw/source/core/doc/doctxm.cxx | 2 +- sw/source/core/unocore/unoobj.cxx | 2 +- sw/source/filter/ww8/wrtww8.cxx | 4 ++-- vcl/source/gdi/pdfwriter_impl.cxx | 4 ++-- xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 6 +++--- 14 files changed, 29 insertions(+), 30 deletions(-)
New commits: commit 212bbbe5cafab06b408ddde930bf9c8d37b7c3aa Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Wed Jan 10 09:13:00 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Jan 10 13:44:58 2024 +0100 cid#1546141 COPY_INSTEAD_OF_MOVE and cid#1546004 COPY_INSTEAD_OF_MOVE cid#1545934 COPY_INSTEAD_OF_MOVE cid#1545563 COPY_INSTEAD_OF_MOVE cid#1545533 COPY_INSTEAD_OF_MOVE cid#1545529 COPY_INSTEAD_OF_MOVE cid#1545502 COPY_INSTEAD_OF_MOVE cid#1545499 COPY_INSTEAD_OF_MOVE cid#1545479 COPY_INSTEAD_OF_MOVE cid#1545344 COPY_INSTEAD_OF_MOVE cid#1545324 COPY_INSTEAD_OF_MOVE cid#1545313 COPY_INSTEAD_OF_MOVE cid#1545252 COPY_INSTEAD_OF_MOVE cid#1545186 COPY_INSTEAD_OF_MOVE Change-Id: I44a783876699f88c769f239ae84eb5cae44d5f07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161879 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index de908b943995..f95015c03025 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1385,10 +1385,10 @@ IMPL_LINK(SvxLinguTabPage, ClickHdl_Impl, weld::Button&, rBtn, void) if (!pLinguData) pLinguData.reset( new SvxLinguData_Impl ); - SvxLinguData_Impl aOldLinguData( *pLinguData ); + SvxLinguData_Impl aOldLinguData(*pLinguData); SvxEditModulesDlg aDlg(GetFrameWeld(), *pLinguData); if (aDlg.run() != RET_OK) - *pLinguData = aOldLinguData; + *pLinguData = std::move(aOldLinguData); // evaluate new status of 'bConfigured' flag sal_uInt32 nLen = pLinguData->GetDisplayServiceCount(); diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index fda4e267b6be..498cc93d86cc 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -190,7 +190,7 @@ namespace drawinglayer::processor3d // rescue values const bool bOldModulate(getModulate()); mbModulate = rPrimitive.getModulate(); const bool bOldFilter(getFilter()); mbFilter = rPrimitive.getFilter(); - std::shared_ptr< texture::GeoTexSvx > pOldTex = mpGeoTexSvx; + std::shared_ptr<texture::GeoTexSvx> xOldTex(mpGeoTexSvx); // calculate logic pixel size in object coordinates. Create transformation view // to object by inverting ObjectToView @@ -218,7 +218,7 @@ namespace drawinglayer::processor3d // restore values mbModulate = bOldModulate; mbFilter = bOldFilter; - mpGeoTexSvx = pOldTex; + mpGeoTexSvx = std::move(xOldTex); } void DefaultProcessor3D::impRenderBitmapTexturePrimitive3D(const primitive3d::BitmapTexturePrimitive3D& rPrimitive) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index b1bbea6efaed..ccd0f53f4313 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1092,7 +1092,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh basegfx::B2DPolyPolygon aPolyPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLength, nArrowWidth, bArrowCenter, aArrowName, bScaleArrows )); rSet.Put( XLineStartWidthItem( nArrowWidth ) ); - rSet.Put( XLineStartItem( std::move(aArrowName), std::move(aPolyPoly)) ); + rSet.Put( XLineStartItem( std::move(aArrowName), std::move(aPolyPoly) ) ); rSet.Put( XLineStartCenterItem( bArrowCenter ) ); } @@ -1110,7 +1110,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh basegfx::B2DPolyPolygon aPolyPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLength, nArrowWidth, bArrowCenter, aArrowName, bScaleArrows )); rSet.Put( XLineEndWidthItem( nArrowWidth ) ); - rSet.Put( XLineEndItem( aArrowName, aPolyPoly ) ); + rSet.Put( XLineEndItem( std::move(aArrowName), std::move(aPolyPoly) ) ); rSet.Put( XLineEndCenterItem( bArrowCenter ) ); } } diff --git a/oox/source/shape/WpgContext.cxx b/oox/source/shape/WpgContext.cxx index 339e7a70eac5..ee9e58b7c18e 100644 --- a/oox/source/shape/WpgContext.cxx +++ b/oox/source/shape/WpgContext.cxx @@ -45,18 +45,19 @@ oox::core::ContextHandlerRef WpgContext::onCreateContext(sal_Int32 nElementToken { if (m_bFullWPGSupport) { - oox::drawingml::ShapePtr pShape = std::make_shared<oox::drawingml::Shape>( - "com.sun.star.drawing.CustomShape", /*bDefaultHeight=*/false); - return new oox::shape::WpsContext(*this, uno::Reference<drawing::XShape>(), mpShape, - pShape); + return new oox::shape::WpsContext( + *this, uno::Reference<drawing::XShape>(), mpShape, + std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.CustomShape", + /*bDefaultHeight=*/false)); } // Don't set default character height, Writer has its own way to set // the default, and if we don't set it here, editeng properly inherits // it. - oox::drawingml::ShapePtr pShape = std::make_shared<oox::drawingml::Shape>( - "com.sun.star.drawing.CustomShape", /*bDefaultHeight=*/false); - return new oox::drawingml::ShapeContext(*this, mpShape, pShape); + return new oox::drawingml::ShapeContext( + *this, mpShape, + std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.CustomShape", + /*bDefaultHeight=*/false)); } case XML_pic: return new oox::drawingml::GraphicShapeContext( diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 18aea4a590a6..543c82ac4f45 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -174,7 +174,7 @@ bool SvFileObject::LoadFile_Impl() bClearMedium = !xMed.is(); if( bClearMedium ) - xMed = xTmpMed; // If already finished in Download + xMed = std::move(xTmpMed); // If already finished in Download return bDataReady; } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 6ddac0ccd7d3..5dbe5014f94b 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -1867,7 +1867,7 @@ void Ruler::ImplDrag( const Point& rPos ) Invalidate(InvalidateFlags::NoErase); // reset the data as before cancel - *mpDragData = aTempData; + *mpDragData = std::move(aTempData); } } else diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx index fd4f0e2f727e..e53576dc583a 100644 --- a/svx/source/smarttags/SmartTagMgr.cxx +++ b/svx/source/smarttags/SmartTagMgr.cxx @@ -375,11 +375,9 @@ void SmartTagMgr::LoadLibraries() void SmartTagMgr::PrepareConfiguration( std::u16string_view rConfigurationGroupName ) { - Any aAny( - OUString::Concat("/org.openoffice.Office.Common/SmartTags/") + rConfigurationGroupName ); beans::PropertyValue aPathArgument; aPathArgument.Name = "nodepath"; - aPathArgument.Value = aAny; + aPathArgument.Value <<= OUString::Concat("/org.openoffice.Office.Common/SmartTags/") + rConfigurationGroupName; Sequence< Any > aArguments{ Any(aPathArgument) }; Reference< lang::XMultiServiceFactory > xConfProv = configuration::theDefaultProvider::get( mxContext ); diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 9b3ea432ba04..f0e1f89ce132 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -3593,8 +3593,8 @@ uno::Reference< container::XIndexContainer > SAL_CALL SvxShape::getGluePoints() if( HasSdrObject() && !xGluePoints.is() ) { - uno::Reference< container::XIndexContainer > xNew( SvxUnoGluePointAccess_createInstance( GetSdrObject() ), uno::UNO_QUERY ); - mxGluePoints = xGluePoints = xNew; + xGluePoints.set(SvxUnoGluePointAccess_createInstance(GetSdrObject()), uno::UNO_QUERY); + mxGluePoints = xGluePoints; } return xGluePoints; diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 8d0246bed14f..0f0b6d4f258a 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -1099,7 +1099,7 @@ sal_Int32 SwCursor::FindAll( SwFindParas& rParas, nFound = rParas.DoFind(*this, fnMove, aRegion, bInReadOnly, xSearchItem) ? 1 : 0; if (0 != nFound && bMarkPos) - *GetMark() = aMarkPos; + *GetMark() = std::move(aMarkPos); } if( nFound && SwCursor::IsSelOvr( SwCursorSelOverFlags::Toggle ) ) diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index f03687d810e4..5caf0a3f9bd3 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1118,7 +1118,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, rDoc.GetDocumentSettingManager().get(DocumentSettingId::TABS_RELATIVE_TO_INDENT) ? sw::DefaultToxTabStopTokenHandler::TABSTOPS_RELATIVE_TO_INDENT : sw::DefaultToxTabStopTokenHandler::TABSTOPS_RELATIVE_TO_PAGE); - sw::ToxTextGenerator ttgn(GetTOXForm(), tabStopTokenHandler); + sw::ToxTextGenerator ttgn(GetTOXForm(), std::move(tabStopTokenHandler)); ttgn.GenerateText(GetFormat()->GetDoc(), markURLs, m_aSortArr, nCnt, nRange, pLayout); nCnt += nRange - 1; } diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index b2f83fee30ea..8cbfbf7f3808 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -2134,7 +2134,7 @@ lcl_SelectParaAndReset( SwPaM &rPaM, SwDoc & rDoc, pTemp->MovePara(GoCurrPara, fnParaStart); } pTemp->SetMark(); - *pTemp->GetPoint() = aEnd; + *pTemp->GetPoint() = std::move(aEnd); SwUnoCursorHelper::SelectPam(*pTemp, true); if(!SwUnoCursorHelper::IsEndOfPara(*pTemp)) { diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 20fa9f6892b7..170d4bd497c1 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1821,12 +1821,12 @@ void MSWordExportBase::WriteSpecialText( SwNodeOffset nStart, SwNodeOffset nEnd, // tdf#106261 Reset table infos, otherwise the depth of the cells will be // incorrect, in case the header/footer had table(s) and we try to export // the same table second time. - ww8::WW8TableInfo::Pointer_t pOldTableInfo = m_pTableInfo; + ww8::WW8TableInfo::Pointer_t xOldTableInfo(m_pTableInfo); m_pTableInfo = std::make_shared<ww8::WW8TableInfo>(); WriteText(); - m_pTableInfo = pOldTableInfo; + m_pTableInfo = std::move(xOldTableInfo); m_bOutPageDescs = bOldPageDescs; m_pCurPam = pOldPam; // delete Pam diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 6591debb5910..3a86641ae9fb 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -10168,7 +10168,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode) if( rNewState.m_bClipRegion ) { // clip region is always stored in private PDF mapmode - MapMode aNewMapMode = rNewState.m_aMapMode; + MapMode aNewMapMode = std::move(rNewState.m_aMapMode); rNewState.m_aMapMode = m_aMapMode; SetMapMode( rNewState.m_aMapMode ); m_aCurrentPDFState.m_aMapMode = rNewState.m_aMapMode; @@ -10187,7 +10187,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode) } aLine.append( "W* n " ); - rNewState.m_aMapMode = aNewMapMode; + rNewState.m_aMapMode = std::move(aNewMapMode); SetMapMode( rNewState.m_aMapMode ); m_aCurrentPDFState.m_aMapMode = rNewState.m_aMapMode; } diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx index ce3de66bf373..be53d05e669a 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -1768,10 +1768,10 @@ Reference< xml::sax::XDocumentHandler > importDialogModel( Reference< XModel > const & xDocument ) { // single set of styles and stylenames apply to all containers - auto pStyleNames = std::make_shared<std::vector< OUString >>(); - auto pStyles = std::make_shared<std::vector< css::uno::Reference< css::xml::input::XElement > >>(); + auto xStyleNames = std::make_shared<std::vector< OUString >>(); + auto xStyles = std::make_shared<std::vector< css::uno::Reference< css::xml::input::XElement > >>(); return ::xmlscript::createDocumentHandler( - new DialogImport(xContext, xDialogModel, pStyleNames, pStyles, xDocument)); + new DialogImport(xContext, xDialogModel, std::move(xStyleNames), std::move(xStyles), xDocument)); } }