From 6342aa6c665012f51a5c11f0293d5d3ff3a573ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 7 Jan 2024 16:24:23 +0000 Subject: [PATCH] cid#1545370 COPY_INSTEAD_OF_MOVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and cid#1545364 COPY_INSTEAD_OF_MOVE cid#1545363 COPY_INSTEAD_OF_MOVE cid#1545344 COPY_INSTEAD_OF_MOVE cid#1545299 COPY_INSTEAD_OF_MOVE cid#1545287 COPY_INSTEAD_OF_MOVE cid#1545267 COPY_INSTEAD_OF_MOVE cid#1545256 COPY_INSTEAD_OF_MOVE cid#1545226 COPY_INSTEAD_OF_MOVE cid#1545500 COPY_INSTEAD_OF_MOVE cid#1545538 COPY_INSTEAD_OF_MOVE cid#1545618 COPY_INSTEAD_OF_MOVE cid#1545681 COPY_INSTEAD_OF_MOVE cid#1545750 COPY_INSTEAD_OF_MOVE cid#1545778 COPY_INSTEAD_OF_MOVE cid#1545785 COPY_INSTEAD_OF_MOVE cid#1545799 COPY_INSTEAD_OF_MOVE cid#1545847 COPY_INSTEAD_OF_MOVE cid#1545958 COPY_INSTEAD_OF_MOVE cid#1545963 COPY_INSTEAD_OF_MOVE cid#1545990 COPY_INSTEAD_OF_MOVE cid#1546013 COPY_INSTEAD_OF_MOVE cid#1546029 COPY_INSTEAD_OF_MOVE cid#1546079 COPY_INSTEAD_OF_MOVE cid#1546104 COPY_INSTEAD_OF_MOVE cid#1546127 COPY_INSTEAD_OF_MOVE cid#1546133 COPY_INSTEAD_OF_MOVE cid#1546155 COPY_INSTEAD_OF_MOVE cid#1546190 COPY_INSTEAD_OF_MOVE cid#1546216 COPY_INSTEAD_OF_MOVE cid#1546273 COPY_INSTEAD_OF_MOVE cid#1546315 COPY_INSTEAD_OF_MOVE cid#1546326 COPY_INSTEAD_OF_MOVE cid#1546387 COPY_INSTEAD_OF_MOVE accept some reasonable suggestions Change-Id: I7b004086d490c7618d8fe7a21a53cfa8ac1f8408 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161748 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- chart2/source/controller/main/UndoActions.cxx | 2 +- .../source/processor2d/vclprocessor2d.cxx | 2 +- .../source/processor3d/defaultprocessor3d.cxx | 2 +- emfio/source/reader/mtftools.cxx | 6 +++--- filter/source/msfilter/msdffimp.cxx | 2 +- .../drawingml/diagram/layoutatomvisitors.cxx | 4 ++-- sc/source/core/data/tabprotection.cxx | 16 +++++++++------- sc/source/core/tool/addincol.cxx | 7 ++----- sc/source/ui/docshell/externalrefmgr.cxx | 3 ++- sc/source/ui/view/dbfunc3.cxx | 3 +-- sd/source/filter/grf/sdgrffilter.cxx | 5 ++--- sd/source/ui/app/sdxfer.cxx | 2 +- sfx2/source/doc/objstor.cxx | 3 ++- sw/source/core/access/AccessibilityIssue.cxx | 4 ++-- sw/source/core/text/pormulti.cxx | 2 +- sw/source/core/unocore/unochart.cxx | 2 +- sw/source/core/unocore/unoparagraph.cxx | 2 +- sw/source/core/unocore/unostyle.cxx | 4 ++-- sw/source/filter/ww8/docxattributeoutput.cxx | 4 ++-- sw/source/filter/ww8/rtfattributeoutput.cxx | 4 ++-- sw/source/filter/ww8/ww8par.cxx | 4 ++-- sw/source/filter/ww8/ww8par2.cxx | 6 +++--- sw/source/ui/fldui/fldedt.cxx | 2 +- toolkit/source/helper/unowrapper.cxx | 7 +++---- vcl/source/outdev/font.cxx | 2 +- writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 5 +++-- .../source/ooxml/OOXMLFastContextHandler.cxx | 3 +-- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 2 +- 28 files changed, 54 insertions(+), 56 deletions(-) diff --git a/chart2/source/controller/main/UndoActions.cxx b/chart2/source/controller/main/UndoActions.cxx index cf2de5eb5a37..a3c899253295 100644 --- a/chart2/source/controller/main/UndoActions.cxx +++ b/chart2/source/controller/main/UndoActions.cxx @@ -65,7 +65,7 @@ void UndoElement::impl_toggleModelState() // apply the previous snapshot to our model m_pModelClone->applyToModel( m_xDocumentModel ); // remember the new snapshot, for the next toggle - m_pModelClone = pNewClone; + m_pModelClone = std::move(pNewClone); } void SAL_CALL UndoElement::undo( ) diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 2c3521ace0dd..9049bec591b2 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -974,7 +974,7 @@ void VclProcessor2D::RenderTransparencePrimitive2D( process(rTransCandidate.getTransparence()); // back to old color stack - maBColorModifierStack = aLastBColorModifierStack; + maBColorModifierStack = std::move(aLastBColorModifierStack); // back to old OutDev mpOutputDevice = pLastOutputDevice; diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index 0d07b0a5c343..fda4e267b6be 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -269,7 +269,7 @@ namespace drawinglayer::processor3d // restore values mbModulate = bOldModulate; mbFilter = bOldFilter; - mpGeoTexSvx = pOldTex; + mpGeoTexSvx = std::move(pOldTex); } void DefaultProcessor3D::impRenderModifiedColorPrimitive3D(const primitive3d::ModifiedColorPrimitive3D& rModifiedCandidate) diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index f5516648780a..546a7595ced9 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -1322,7 +1322,7 @@ namespace emfio void MtfTools::DrawRectWithBGColor(const tools::Rectangle& rRect) { WinMtfFillStyle aFillStyleBackup = maFillStyle; - bool aTransparentBackup = maLineStyle.bTransparent; + bool bTransparentBackup = maLineStyle.bTransparent; BackgroundMode mnBkModeBackup = mnBkMode; const tools::Polygon aPoly( rRect ); @@ -1332,8 +1332,8 @@ namespace emfio ImplSetNonPersistentLineColorTransparenz(); DrawPolygon(aPoly, false); mnBkMode = mnBkModeBackup; // The rectangle needs to be always drawned even if mode is transparent - maFillStyle = aFillStyleBackup; - maLineStyle.bTransparent = aTransparentBackup; + maFillStyle = std::move(aFillStyleBackup); + maLineStyle.bTransparent = bTransparentBackup; } void MtfTools::DrawRect( const tools::Rectangle& rRect, bool bEdge ) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 0435acce0c07..b1bbea6efaed 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( aArrowName, aPolyPoly) ); + rSet.Put( XLineStartItem( std::move(aArrowName), std::move(aPolyPoly)) ); rSet.Put( XLineStartCenterItem( bArrowCenter ) ); } diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx b/oox/source/drawingml/diagram/layoutatomvisitors.cxx index f34d93d98fc8..a1fd3bd4721f 100644 --- a/oox/source/drawingml/diagram/layoutatomvisitors.cxx +++ b/oox/source/drawingml/diagram/layoutatomvisitors.cxx @@ -121,7 +121,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom) mpCurrentNode = pNewNode; // set new parent for children - ShapePtr pPreviousParent(mpParentShape); + ShapePtr xPreviousParent(mpParentShape); mpParentShape = pCurrParent; // process children @@ -133,7 +133,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom) meLookFor = LAYOUT_NODE; // restore parent - mpParentShape = pPreviousParent; + mpParentShape = std::move(xPreviousParent); mpCurrentNode = pPreviousNode; } diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx index cc4a783d5300..266c5c380790 100644 --- a/sc/source/core/data/tabprotection.cxx +++ b/sc/source/core/data/tabprotection.cxx @@ -456,13 +456,15 @@ bool ScTableProtectionImpl::isBlockEditable( const ScRange& rRange ) const // present we assume the permission to edit is not granted. Until we // actually can evaluate the descriptors... - auto lIsEditable = [rRange](const ScEnhancedProtection& rEnhancedProtection) { - return !rEnhancedProtection.hasSecurityDescriptor() - && rEnhancedProtection.maRangeList.is() && rEnhancedProtection.maRangeList->Contains( rRange) - && !rEnhancedProtection.hasPassword(); // Range is editable if no password is assigned. - }; - if (std::any_of(maEnhancedProtection.begin(), maEnhancedProtection.end(), lIsEditable)) - return true; + { + auto lIsEditable = [rRange](const ScEnhancedProtection& rEnhancedProtection) { + return !rEnhancedProtection.hasSecurityDescriptor() + && rEnhancedProtection.maRangeList.is() && rEnhancedProtection.maRangeList->Contains( rRange) + && !rEnhancedProtection.hasPassword(); // Range is editable if no password is assigned. + }; + if (std::any_of(maEnhancedProtection.begin(), maEnhancedProtection.end(), std::move(lIsEditable))) + return true; + } // For a single address, a simple check with single ranges was sufficient. if (rRange.aStart == rRange.aEnd) diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx index a18800781bda..08eedd67358d 100644 --- a/sc/source/core/tool/addincol.cxx +++ b/sc/source/core/tool/addincol.cxx @@ -1330,11 +1330,8 @@ bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r rDesc.pDefArgFlags[nArg].bOptional = pArgs[nArg].bOptional; // no empty names... - if ( rDesc.maDefArgNames[nArg].isEmpty() ) - { - OUString aDefName = "arg" + OUString::number( nArg+1 ); - rDesc.maDefArgNames[nArg] = aDefName; - } + if (rDesc.maDefArgNames[nArg].isEmpty()) + rDesc.maDefArgNames[nArg] = "arg" + OUString::number(nArg + 1); // last argument repeated? if ( nArg+1 == nArgCount && ( pArgs[nArg].eType == SC_ADDINARG_VARARGS ) ) diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 799999050cdf..860ea8058c6e 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2596,7 +2596,8 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt pSet->Put( SfxUInt16Item( SID_UPDATEDOCMODE, css::document::UpdateDocMode::FULL_UPDATE)); } - unique_ptr pMedium(new SfxMedium(aFile, StreamMode::STD_READ, pFilter, std::move(pSet))); + unique_ptr pMedium(new SfxMedium(aFile, StreamMode::STD_READ, + std::move(pFilter), std::move(pSet))); if (pMedium->GetErrorIgnoreWarning() != ERRCODE_NONE) return nullptr; diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 41c8d9e9e268..8e7a5da93cc4 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -1214,8 +1214,7 @@ void ScDBFunc::GroupDataPilot() } OUString aGroupDimName = pGroupDimension->GetGroupDimName(); - OUString aGroupName = pGroupDimension->CreateGroupName(ScResId(STR_PIVOT_GROUP)); - ScDPSaveGroupItem aGroup( aGroupName ); + ScDPSaveGroupItem aGroup(pGroupDimension->CreateGroupName(ScResId(STR_PIVOT_GROUP))); for (const OUString& aEntryName : aEntries) { if ( pBaseGroupDim ) diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index 1bb51ae40f95..36594fbcd588 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -167,9 +167,8 @@ bool SdGRFFilter::Import() } for (size_t nPageIndex = 0; nPageIndex < nImages; ++nPageIndex) { - Graphic pGraphic = aAnim.Get(nPageIndex).maBitmapEx; - SdPage* pPage = mrDocument.GetSdPage(nPageIndex, PageKind::Standard); - InsertSdrGrafObj(pGraphic, pPage); + InsertSdrGrafObj(aAnim.Get(nPageIndex).maBitmapEx, + mrDocument.GetSdPage(nPageIndex, PageKind::Standard)); } } else diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 74728dd0e64a..257a7c10aee4 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -489,7 +489,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo } } - maDocShellRef = aOldRef; + maDocShellRef = std::move(aOldRef); } else if( nFormat == SotClipboardFormatId::GDIMETAFILE ) { diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index befe3f33c109..a7253f7a0b83 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2713,7 +2713,8 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) // create a medium as a copy; this medium is only for writing, because it // uses the same name as the original one writing is done through a copy, // that will be transferred to the target (of course after calling HandsOff) - SfxMedium* pMediumTmp = new SfxMedium( pRetrMedium->GetName(), pRetrMedium->GetOpenMode(), pFilter, std::move(pSet) ); + SfxMedium* pMediumTmp = new SfxMedium(pRetrMedium->GetName(), pRetrMedium->GetOpenMode(), + std::move(pFilter), std::move(pSet)); pMediumTmp->SetInCheckIn( pRetrMedium->IsInCheckIn( ) ); pMediumTmp->SetLongName( pRetrMedium->GetLongName() ); if ( pMediumTmp->GetErrorCode() != ERRCODE_NONE ) diff --git a/sw/source/core/access/AccessibilityIssue.cxx b/sw/source/core/access/AccessibilityIssue.cxx index 346d8bb293c6..53f5d906340e 100644 --- a/sw/source/core/access/AccessibilityIssue.cxx +++ b/sw/source/core/access/AccessibilityIssue.cxx @@ -191,9 +191,9 @@ void AccessibilityIssue::gotoIssue() const SwPosition aMark(*pContentNode, TempIssueObject.m_nEnd); pWrtShell->StartAllAction(); SwPaM* pPaM = pWrtShell->GetCursor(); - *pPaM->GetPoint() = aPoint; + *pPaM->GetPoint() = std::move(aPoint); pPaM->SetMark(); - *pPaM->GetMark() = aMark; + *pPaM->GetMark() = std::move(aMark); pWrtShell->EndAllAction(); // bring issue to attention diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 7d79b990b2f9..9fb6011f0db5 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -618,7 +618,7 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt, } OUString aStr = rRuby.GetText().copy( sal_Int32(nOffs) ); - SwFieldPortion *pField = new SwFieldPortion( aStr, std::move(pRubyFont) ); + SwFieldPortion *pField = new SwFieldPortion( std::move(aStr), std::move(pRubyFont) ); pField->SetNextOffset( nOffs ); pField->SetFollow( true ); diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 686a5809c46d..6bc5a2431c01 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -2365,7 +2365,7 @@ bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox ) m_pTableCursor->GetPoint() : m_pTableCursor->GetMark(); if (pPos) { - *pPos = aNewPos; + *pPos = std::move(aNewPos); } else { OSL_FAIL( "neither point nor mark available for change" ); diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index dab5270588e3..3a227f5be1d1 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -1167,7 +1167,7 @@ SwXParagraph::setPropertyToDefault(const OUString& rPropertyName) } pTemp->SetMark(); - *pTemp->GetPoint() = aEnd; + *pTemp->GetPoint() = std::move(aEnd); SwUnoCursorHelper::SelectPam(*pTemp, true); diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index e4c7b89bc3df..23b6d85141d5 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -3761,9 +3761,9 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle( } SwAttrSet aEmptySet(m_pDocShell->GetDoc()->GetAttrPool(), pRange); - auto pSet = PropValuesToAutoStyleItemSet(*m_pDocShell->GetDoc(), m_eFamily, Values, aEmptySet); + auto xSet = PropValuesToAutoStyleItemSet(*m_pDocShell->GetDoc(), m_eFamily, Values, aEmptySet); - uno::Reference xRet = new SwXAutoStyle(m_pDocShell->GetDoc(), pSet, m_eFamily); + uno::Reference xRet = new SwXAutoStyle(m_pDocShell->GetDoc(), std::move(xSet), m_eFamily); return xRet; } diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 5c966234e0e0..5ec368a97b40 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1171,7 +1171,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT spawned from within the VML & DML block and alter the contents. */ - ww8::WW8TableInfo::Pointer_t pOldTableInfo = m_rExport.m_pTableInfo; + ww8::WW8TableInfo::Pointer_t xOldTableInfo = m_rExport.m_pTableInfo; //Reset the table infos after saving. m_rExport.m_pTableInfo = std::make_shared(); @@ -1198,7 +1198,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT DocxTableExportContext aVMLTableExportContext(*this); m_rExport.SdrExporter().writeVMLTextFrame(&aFrame); } - m_rExport.m_pTableInfo = pOldTableInfo; + m_rExport.m_pTableInfo = std::move(xOldTableInfo); m_pSerializer->endElementNS(XML_mc, XML_Fallback); m_pSerializer->endElementNS(XML_mc, XML_AlternateContent); diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 3fe6215f5e44..1a3d7973e08d 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1962,7 +1962,7 @@ void RtfAttributeOutput::WriteHeaderFooter_Impl(const SwFrameFormat& rFormat, bo m_aSectionHeaders.append('}'); m_aSectionBreaks = aSectionBreaks; - m_aRun = aRun; + m_aRun = std::move(aRun); } namespace @@ -3061,7 +3061,7 @@ void RtfAttributeOutput::TextFootnote_Impl(const SwFormatFootnote& rFootnote) m_bBufferSectionHeaders = false; m_bInRun = bInRunOrig; m_bSingleEmptyRun = bSingleEmptyRunOrig; - m_aRun = aRun; + m_aRun = std::move(aRun); m_aRun->append(m_aSectionHeaders); m_aSectionHeaders.setLength(0); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 2940e4d82b61..fd7bae571d69 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2310,7 +2310,7 @@ void SwWW8ImplReader::Read_HdFtText(WW8_CP nStart, WW8_CP nLen, SwFrameFormat co Read_HdFtFootnoteText(pSttIdx, nStart, nLen - 1, MAN_HDFT); - *m_pPaM->GetPoint() = aTmpPos; + *m_pPaM->GetPoint() = std::move(aTmpPos); } bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const @@ -4573,7 +4573,7 @@ void wwSectionManager::InsertSegments() // create a new following page style SwFormatPageDesc aFollow(SetSwFormatPageDesc(aIter, aStart, bIgnoreCols)); // restore any contents of aIter trashed by SetSwFormatPageDesc - *aIter = aTmpSection; + *aIter = std::move(aTmpSection); // Handle the section break UseOnPage eUseOnPage = UseOnPage::Left; diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 602256428563..061144045b12 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -309,9 +309,9 @@ sal_uInt16 SwWW8ImplReader::End_Footnote() } } - *m_pPaM->GetPoint() = aTmpPos; // restore Cursor + *m_pPaM->GetPoint() = std::move(aTmpPos); // restore Cursor - m_xPlcxMan = xOldPlcxMan; // Restore attributes + m_xPlcxMan = std::move(xOldPlcxMan); // Restore attributes m_xPlcxMan->RestoreAllPLCFx( aSave ); } @@ -1058,7 +1058,7 @@ void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack) SwPosition aTmpPos(*m_pPaM->GetPoint()); m_pPaM->Move(fnMoveBackward, GoInContent); m_xCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_FLTR_NUMRULE); - *m_pPaM->GetPoint() = aTmpPos; + *m_pPaM->GetPoint() = std::move(aTmpPos); } else m_xCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_FLTR_NUMRULE); diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 306d864fab02..c947c064e5d4 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -88,7 +88,7 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) if (bSelectionFailed) { pCursor->DeleteMark(); - *pCursor->GetPoint() = aOrigPos; + *pCursor->GetPoint() = std::move(aOrigPos); } } diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index 82b4dd17338a..50e1c8e74d90 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -252,7 +252,7 @@ void UnoWrapper::WindowDestroyed( vcl::Window* pWindow ) pClient.disposeAndClear(); } - pChild = pNextChild; + pChild = std::move(pNextChild); } // find system windows... @@ -271,7 +271,7 @@ void UnoWrapper::WindowDestroyed( vcl::Window* pWindow ) xComp->dispose(); } - pOverlap = pNextOverlap; + pOverlap = std::move(pNextOverlap); } } @@ -308,11 +308,10 @@ void UnoWrapper::WindowDestroyed( vcl::Window* pWindow ) VclPtr< vcl::Window > pNextTopChild = pTopWindowChild->GetWindow( GetWindowType::NextTopWindowSibling ); pTopWindowChild.disposeAndClear(); - pTopWindowChild = pNextTopChild; + pTopWindowChild = std::move(pNextTopChild); } } - css::uno::Reference< css::accessibility::XAccessible > UnoWrapper::CreateAccessible( Menu* pMenu, bool bIsMenuBar ) { return maAccessibleFactoryAccess.getFactory().createAccessible( pMenu, bIsMenuBar ); diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index b66b827222dc..0b87c8ef8418 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -1151,7 +1151,7 @@ std::unique_ptr OutputDevice::ImplGlyphFallbackLayout( std::unique_pt // restore orig font settings pSalLayout->InitFont(); - rLayoutArgs.maRuns = aLayoutRuns; + rLayoutArgs.maRuns = std::move(aLayoutRuns); return pSalLayout; } diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index e51b13247884..b43ce2fdce52 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -116,7 +116,7 @@ void OOXMLDocumentImpl::resolveFastSubStream(Stream & rStreamHandler, } } - mpStream = savedStream; + mpStream = std::move(savedStream); } void OOXMLDocumentImpl::resolveFastSubStreamWithId(Stream & rStream, @@ -248,7 +248,8 @@ OOXMLDocumentImpl::getSubStream(const OUString & rId) OOXMLDocumentImpl * pTemp; // Do not pass status indicator to sub-streams: they are typically marginal in size, so we just track the main document for now. - writerfilter::Reference::Pointer_t pRet( pTemp = new OOXMLDocumentImpl(pStream, uno::Reference(), mbSkipImages, maMediaDescriptor)); + writerfilter::Reference::Pointer_t pRet( pTemp = + new OOXMLDocumentImpl(std::move(pStream), uno::Reference(), mbSkipImages, maMediaDescriptor)); pTemp->setModel(mxModel); pTemp->setDrawPage(mxDrawPage); pTemp->mbIsSubstream = true; diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index cbc75c14070a..e392988e74d6 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -1203,9 +1203,8 @@ OOXMLFastContextHandlerPropertyTable::~OOXMLFastContextHandlerPropertyTable() void OOXMLFastContextHandlerPropertyTable::lcl_endFastElement (Token_t /*Element*/) { - OOXMLPropertySet::Pointer_t pPropSet(mpPropertySet->clone()); OOXMLTable::ValuePointer_t pTmpVal - (new OOXMLPropertySetValue(pPropSet)); + (new OOXMLPropertySetValue(mpPropertySet->clone())); mTable.add(pTmpVal); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index c7624da50012..62e346e2cfda 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1784,7 +1784,7 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, RTFSprms* const pSprms, m_aStates.top().getShape() = std::get<1>(aTuple)->getShape(); m_pSdrImport->resolve(std::get<1>(aTuple)->getShape(), true, RTFSdrImport::SHAPE); - m_aStates.top().getShape() = aShape; + m_aStates.top().getShape() = std::move(aShape); m_aStates.top().setCurrentBuffer(pCurrentBuffer); } else if (std::get<0>(aTuple) == BUFFER_ENDSHAPE)