diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-08 06:43:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-08 09:05:19 +0200 |
commit | 9fe2ead3d5355224dd94d6462b0ddc6100f6d4e3 (patch) | |
tree | 56746904f7c6428882d0e6b85a7b77f4853b535b | |
parent | 0db7e46536fc23d5201ed9ff610a8ae0efd09a96 (diff) |
loplugin:moveparam in svx
Change-Id: I92fe2882c948e7297e5d54963647b4aa054f8f89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123241
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
22 files changed, 41 insertions, 41 deletions
diff --git a/include/svx/sdr/overlay/overlayselection.hxx b/include/svx/sdr/overlay/overlayselection.hxx index 75a19d48a387..f2402500b8d5 100644 --- a/include/svx/sdr/overlay/overlayselection.hxx +++ b/include/svx/sdr/overlay/overlayselection.hxx @@ -56,7 +56,7 @@ namespace sdr::overlay OverlaySelection( OverlayType eType, const Color& rColor, - const std::vector< basegfx::B2DRange >& rRanges, + std::vector< basegfx::B2DRange >&& rRanges, bool bBorder); virtual ~OverlaySelection() override; diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx index dec7c1b8c42e..bb2ee6188b7c 100644 --- a/include/svx/svddrgmt.hxx +++ b/include/svx/svddrgmt.hxx @@ -104,7 +104,7 @@ private: bool mbIsPointDrag; public: - SdrDragEntryPointGlueDrag(const std::vector< basegfx::B2DPoint >& rPositions, bool bIsPointDrag); + SdrDragEntryPointGlueDrag(std::vector< basegfx::B2DPoint >&& rPositions, bool bIsPointDrag); virtual ~SdrDragEntryPointGlueDrag() override; virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) override; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index facbba012fe2..124650b459f6 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -6286,7 +6286,7 @@ void ScGridWindow::UpdateCursorOverlay() std::unique_ptr<sdr::overlay::OverlayObject> pOverlay(new sdr::overlay::OverlaySelection( sdr::overlay::OverlayType::Solid, aCursorColor, - aRanges, + std::move(aRanges), false)); xOverlayManager->add(*pOverlay); @@ -6372,7 +6372,7 @@ void ScGridWindow::UpdateSelectionOverlay() std::unique_ptr<sdr::overlay::OverlayObject> pOverlay(new sdr::overlay::OverlaySelection( sdr::overlay::OverlayType::Transparent, aHighlight, - aRanges, + std::move(aRanges), true)); xOverlayManager->add(*pOverlay); @@ -6478,7 +6478,7 @@ void ScGridWindow::UpdateAutoFillOverlay() std::unique_ptr<sdr::overlay::OverlayObject> pOverlay(new sdr::overlay::OverlaySelection( sdr::overlay::OverlayType::Solid, aHandleColor, - aRanges, + std::move(aRanges), false)); xOverlayManager->add(*pOverlay); @@ -6604,7 +6604,7 @@ void ScGridWindow::UpdateDragRectOverlay() std::unique_ptr<sdr::overlay::OverlayObject> pOverlay(new sdr::overlay::OverlaySelection( sdr::overlay::OverlayType::Invert, COL_BLACK, - aRanges, + std::move(aRanges), false)); xOverlayManager->add(*pOverlay); @@ -6650,7 +6650,7 @@ void ScGridWindow::UpdateHeaderOverlay() std::unique_ptr<sdr::overlay::OverlayObject> pOverlay(new sdr::overlay::OverlaySelection( sdr::overlay::OverlayType::Invert, COL_BLACK, - aRanges, + std::move(aRanges), false)); xOverlayManager->add(*pOverlay); @@ -6717,7 +6717,7 @@ void ScGridWindow::UpdateShrinkOverlay() std::unique_ptr<sdr::overlay::OverlayObject> pOverlay(new sdr::overlay::OverlaySelection( sdr::overlay::OverlayType::Invert, COL_BLACK, - aRanges, + std::move(aRanges), false)); xOverlayManager->add(*pOverlay); diff --git a/svx/inc/sdr/contact/objectcontactofobjlistpainter.hxx b/svx/inc/sdr/contact/objectcontactofobjlistpainter.hxx index 3f5ebd768940..fcfe510845b7 100644 --- a/svx/inc/sdr/contact/objectcontactofobjlistpainter.hxx +++ b/svx/inc/sdr/contact/objectcontactofobjlistpainter.hxx @@ -65,7 +65,7 @@ public: // basic constructor/destructor ObjectContactOfObjListPainter( OutputDevice& rTargetDevice, - const SdrObjectVector& rObjects, + SdrObjectVector&& rObjects, const SdrPage* pProcessedPage); virtual ~ObjectContactOfObjListPainter() override; diff --git a/svx/inc/sdr/overlay/overlayobjectcell.hxx b/svx/inc/sdr/overlay/overlayobjectcell.hxx index b71a71d9b95c..566f8156d8be 100644 --- a/svx/inc/sdr/overlay/overlayobjectcell.hxx +++ b/svx/inc/sdr/overlay/overlayobjectcell.hxx @@ -40,7 +40,7 @@ namespace sdr::overlay virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; public: - OverlayObjectCell( const Color& rColor, const RangeVector& rRects); + OverlayObjectCell( const Color& rColor, RangeVector&& rRects); virtual ~OverlayObjectCell() override; }; diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index 826d0e804524..f2371a9cb9cf 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -221,7 +221,7 @@ void SvxXConnectionPreview::Paint(vcl::RenderContext& rRenderContext, const tool aObjectVector.push_back(pObject); } - sdr::contact::ObjectContactOfObjListPainter aPainter(rRenderContext, aObjectVector, nullptr); + sdr::contact::ObjectContactOfObjListPainter aPainter(rRenderContext, std::move(aObjectVector), nullptr); sdr::contact::DisplayInfo aDisplayInfo; // do processing diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 4884d94fa454..f88c252fd232 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1166,7 +1166,7 @@ void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rec aObjectVector.push_back(mpLineObjB); aObjectVector.push_back(mpLineObjC); - sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, nullptr); + sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), std::move(aObjectVector), nullptr); sdr::contact::DisplayInfo aDisplayInfo; // do processing @@ -1258,7 +1258,7 @@ void SvxXShadowPreview::Paint(vcl::RenderContext& rRenderContext, const tools::R aObjectVector.push_back(mpRectangleShadow); aObjectVector.push_back(mpRectangleObject); - sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, nullptr); + sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), std::move(aObjectVector), nullptr); sdr::contact::DisplayInfo aDisplayInfo; aPainter.ProcessDisplay(aDisplayInfo); @@ -1411,7 +1411,7 @@ void SvxXRectPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rec aObjectVector.push_back(mpRectangleObject); - sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, nullptr); + sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), std::move(aObjectVector), nullptr); sdr::contact::DisplayInfo aDisplayInfo; aPainter.ProcessDisplay(aDisplayInfo); diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 730f2f4b3eea..341a7cc58a67 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -232,7 +232,7 @@ void WeldEditView::DoPaint(vcl::RenderContext& rRenderContext, const tools::Rect const Color aHighlight(SvtOptionsDrawinglayer::getHilightColor()); sdr::overlay::OverlaySelection aCursorOverlay(sdr::overlay::OverlayType::Transparent, - aHighlight, aLogicRanges, true); + aHighlight, std::move(aLogicRanges), true); const drawinglayer::geometry::ViewInformation2D aViewInformation2D( basegfx::B2DHomMatrix(), rRenderContext.GetViewTransformation(), diff --git a/svx/source/inc/StylesPreviewWindow.hxx b/svx/source/inc/StylesPreviewWindow.hxx index aaddd1ca3ea1..73c688fc9498 100644 --- a/svx/source/inc/StylesPreviewWindow.hxx +++ b/svx/source/inc/StylesPreviewWindow.hxx @@ -97,7 +97,7 @@ protected: public: StylesPreviewWindow_Base( - weld::Builder& xBuilder, const std::vector<std::pair<OUString, OUString>>& aDefaultStyles, + weld::Builder& xBuilder, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles, const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider); ~StylesPreviewWindow_Base(); @@ -113,7 +113,7 @@ class StylesPreviewWindow_Impl final : public InterimItemWindow, public StylesPr { public: StylesPreviewWindow_Impl( - vcl::Window* pParent, const std::vector<std::pair<OUString, OUString>>& aDefaultStyles, + vcl::Window* pParent, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles, const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider); ~StylesPreviewWindow_Impl(); diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx index 2b2da153aa27..ff65e60fcf7c 100644 --- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx +++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx @@ -56,10 +56,10 @@ ViewContact& ObjectContactOfObjListPainter::GetPaintObjectViewContact(sal_uInt32 ObjectContactOfObjListPainter::ObjectContactOfObjListPainter( OutputDevice& rTargetDevice, - const SdrObjectVector& rObjects, + SdrObjectVector&& rObjects, const SdrPage* pProcessedPage) : mrTargetOutputDevice(rTargetDevice), - maStartObjects(rObjects), + maStartObjects(std::move(rObjects)), mpProcessedPage(pProcessedPage) { } diff --git a/svx/source/sdr/overlay/overlayobjectcell.cxx b/svx/source/sdr/overlay/overlayobjectcell.cxx index 7ebc257e3fec..a7da6a299ff5 100644 --- a/svx/source/sdr/overlay/overlayobjectcell.cxx +++ b/svx/source/sdr/overlay/overlayobjectcell.cxx @@ -29,9 +29,9 @@ using namespace ::basegfx; namespace sdr::overlay { - OverlayObjectCell::OverlayObjectCell( const Color& rColor, const RangeVector& rRects ) + OverlayObjectCell::OverlayObjectCell( const Color& rColor, RangeVector&& rRects ) : OverlayObject( rColor ), - maRectangles( rRects ) + maRectangles( std::move(rRects) ) { // no AA for selection overlays allowAntiAliase(false); diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 9896a49ec4e8..f0c40344edaa 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -157,11 +157,11 @@ namespace sdr::overlay OverlaySelection::OverlaySelection( OverlayType eType, const Color& rColor, - const std::vector< basegfx::B2DRange >& rRanges, + std::vector< basegfx::B2DRange >&& rRanges, bool bBorder) : OverlayObject(rColor), meOverlayType(eType), - maRanges(rRanges), + maRanges(std::move(rRanges)), maLastOverlayType(eType), mnLastTransparence(0), mbBorder(bBorder) diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 46ff14f61fa4..7d5fb61569b7 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -200,8 +200,8 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragEntryPrimitive2DSequence: } -SdrDragEntryPointGlueDrag::SdrDragEntryPointGlueDrag(const std::vector< basegfx::B2DPoint >& rPositions, bool bIsPointDrag) -: maPositions(rPositions), +SdrDragEntryPointGlueDrag::SdrDragEntryPointGlueDrag(std::vector< basegfx::B2DPoint >&& rPositions, bool bIsPointDrag) +: maPositions(std::move(rPositions)), mbIsPointDrag(bIsPointDrag) { // add SdrObject parts to transparent overlay stuff @@ -504,7 +504,7 @@ void SdrDragMethod::createSdrDragEntries_PointDrag() if(!aPositions.empty()) { - addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPointGlueDrag(aPositions, true))); + addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPointGlueDrag(std::move(aPositions), true))); } } @@ -545,7 +545,7 @@ void SdrDragMethod::createSdrDragEntries_GlueDrag() if(!aPositions.empty()) { - addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPointGlueDrag(aPositions, false))); + addSdrDragEntry(std::unique_ptr<SdrDragEntry>(new SdrDragEntryPointGlueDrag(std::move(aPositions), false))); } } diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 7b76135472e0..6e2247153b53 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -480,9 +480,9 @@ TextEditOverlayObject::TextEditOverlayObject(const Color& rColor, OutlinerView& // create local OverlaySelection - this is an integral part of EditText // visualization - const std::vector<basegfx::B2DRange> aEmptySelection{}; + std::vector<basegfx::B2DRange> aEmptySelection{}; mxOverlaySelection.reset(new sdr::overlay::OverlaySelection( - sdr::overlay::OverlayType::Transparent, rColor, aEmptySelection, true)); + sdr::overlay::OverlayType::Transparent, rColor, std::move(aEmptySelection), true)); } TextEditOverlayObject::~TextEditOverlayObject() diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 9c39166d5bf1..a8fa52eb7d05 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -154,7 +154,7 @@ public: std::unique_ptr<sdr::overlay::OverlaySelection> pNew = std::make_unique<sdr::overlay::OverlaySelection>( sdr::overlay::OverlayType::Transparent, - aHighlightColor, rSelections, false); + aHighlightColor, std::vector(rSelections), false); xTargetOverlay->add(*pNew); maObjects.append(std::move(pNew)); diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 05f7712c0431..2ec5ba2d2a95 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1056,7 +1056,7 @@ void SdrObject::SingleObjectPainter(OutputDevice& rOut) const sdr::contact::SdrObjectVector aObjectVector; aObjectVector.push_back(const_cast< SdrObject* >(this)); - sdr::contact::ObjectContactOfObjListPainter aPainter(rOut, aObjectVector, getSdrPageFromSdrObject()); + sdr::contact::ObjectContactOfObjListPainter aPainter(rOut, std::move(aObjectVector), getSdrPageFromSdrObject()); sdr::contact::DisplayInfo aDisplayInfo; aPainter.ProcessDisplay(aDisplayInfo); diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 8881336bdcf9..bdbf568c753d 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -698,7 +698,7 @@ void SdrExchangeView::DrawMarkedObj(OutputDevice& rOut) const if(!aSdrObjects.empty()) { - sdr::contact::ObjectContactOfObjListPainter aPainter(rOut, aSdrObjects, aSdrObjects[0]->getSdrPageFromSdrObject()); + sdr::contact::ObjectContactOfObjListPainter aPainter(rOut, std::move(aSdrObjects), aSdrObjects[0]->getSdrPageFromSdrObject()); sdr::contact::DisplayInfo aDisplayInfo; // do processing diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index ba3079e292a3..d11b22988148 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2354,7 +2354,7 @@ void SvxTableController::updateSelectionOverlay() const rtl::Reference < sdr::overlay::OverlayManager >& xOverlayManager = pPaintWindow->GetOverlayManager(); if( xOverlayManager.is() ) { - std::unique_ptr<sdr::overlay::OverlayObjectCell> pOverlay(new sdr::overlay::OverlayObjectCell( aHighlight, aRanges )); + std::unique_ptr<sdr::overlay::OverlayObjectCell> pOverlay(new sdr::overlay::OverlayObjectCell( aHighlight, std::vector(aRanges) )); xOverlayManager->add(*pOverlay); mpSelectionOverlay.emplace(); diff --git a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx index 8a96feeb43c9..64e6ed7822fe 100644 --- a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx +++ b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx @@ -155,8 +155,8 @@ StylesPreviewToolBoxControl::createItemWindow(const css::uno::Reference<css::awt { SolarMutexGuard aSolarMutexGuard; - m_xVclBox = VclPtr<StylesPreviewWindow_Impl>::Create(pParent, m_aDefaultStyles, - m_xDispatchProvider); + m_xVclBox = VclPtr<StylesPreviewWindow_Impl>::Create( + pParent, std::vector(m_aDefaultStyles), m_xDispatchProvider); xItemWindow = VCLUnoHelper::GetInterface(m_xVclBox); } } diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index fc31ea9444b8..d1a43c135848 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -353,11 +353,11 @@ void StyleItemController::DrawText(vcl::RenderContext& rRenderContext) } StylesPreviewWindow_Base::StylesPreviewWindow_Base( - weld::Builder& xBuilder, const std::vector<std::pair<OUString, OUString>>& aDefaultStyles, + weld::Builder& xBuilder, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles, const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider) : m_xDispatchProvider(xDispatchProvider) , m_xStylesView(xBuilder.weld_icon_view("stylesview")) - , m_aDefaultStyles(aDefaultStyles) + , m_aDefaultStyles(std::move(aDefaultStyles)) { m_xStylesView->connect_selection_changed(LINK(this, StylesPreviewWindow_Base, Selected)); m_xStylesView->connect_item_activated(LINK(this, StylesPreviewWindow_Base, DoubleClick)); @@ -477,11 +477,11 @@ void StylesPreviewWindow_Base::UpdateStylesList() } StylesPreviewWindow_Impl::StylesPreviewWindow_Impl( - vcl::Window* pParent, const std::vector<std::pair<OUString, OUString>>& aDefaultStyles, + vcl::Window* pParent, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles, const css::uno::Reference<css::frame::XDispatchProvider>& xDispatchProvider) : InterimItemWindow(pParent, "svx/ui/stylespreview.ui", "ApplyStyleBox", true, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())) - , StylesPreviewWindow_Base(*m_xBuilder, aDefaultStyles, xDispatchProvider) + , StylesPreviewWindow_Base(*m_xBuilder, std::move(aDefaultStyles), xDispatchProvider) { SetOptimalSize(); } diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index e5861ffb5060..843bca3967b5 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -940,7 +940,7 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr { // more effective way to paint a vector of SdrObjects. Hand over the processed page // to have it in the - sdr::contact::ObjectContactOfObjListPainter aMultiObjectPainter(*aOut, aShapes, mpCurrentPage); + sdr::contact::ObjectContactOfObjListPainter aMultiObjectPainter(*aOut, std::move(aShapes), mpCurrentPage); ImplExportCheckVisisbilityRedirector aCheckVisibilityRedirector(mpCurrentPage); aMultiObjectPainter.SetViewObjectContactRedirector(&aCheckVisibilityRedirector); diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index c430c228def5..5dd731471828 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -434,7 +434,7 @@ void SwSelPaintRects::Show(std::vector<OString>* pSelectionRectangles) m_pCursorOverlay.reset( new sdr::overlay::OverlaySelection( sdr::overlay::OverlayType::Transparent, aHighlight, - aNewRanges, + std::move(aNewRanges), true) ); xTargetOverlay->add(*m_pCursorOverlay); |