cui/source/tabpages/numfmt.cxx                         |    2 +-
 editeng/inc/edtspell.hxx                               |    2 +-
 editeng/source/accessibility/AccessibleParaManager.cxx |    4 ++--
 editeng/source/editeng/edtspell.cxx                    |    4 ++--
 editeng/source/editeng/impedit4.cxx                    |    2 +-
 include/editeng/AccessibleParaManager.hxx              |    2 +-
 include/svx/AccessibleTextHelper.hxx                   |    2 +-
 include/svx/ClassificationDialog.hxx                   |    2 +-
 include/svx/numinf.hxx                                 |    2 +-
 include/svx/sdr/overlay/overlayselection.hxx           |    2 +-
 include/svx/svdmrkv.hxx                                |    2 +-
 sc/source/ui/Accessibility/AccessiblePreviewCell.cxx   |    2 +-
 sd/source/ui/view/Outliner.cxx                         |    4 ++--
 sd/source/ui/view/drviews2.cxx                         |    2 +-
 svx/source/accessibility/AccessibleTextHelper.cxx      |   10 +++++-----
 svx/source/dialog/ClassificationDialog.cxx             |    4 ++--
 svx/source/dialog/imapdlg.cxx                          |    6 ++----
 svx/source/dialog/imapwnd.cxx                          |    2 +-
 svx/source/dialog/imapwnd.hxx                          |    2 +-
 svx/source/form/filtnav.cxx                            |    2 +-
 svx/source/form/fmshell.cxx                            |    2 +-
 svx/source/form/fmshimp.cxx                            |    8 ++++----
 svx/source/form/navigatortree.cxx                      |    6 +++---
 svx/source/inc/filtnav.hxx                             |    2 +-
 svx/source/inc/fmshimp.hxx                             |    2 +-
 svx/source/items/numinf.cxx                            |    4 ++--
 svx/source/sdr/overlay/overlayselection.cxx            |    4 ++--
 svx/source/svdraw/svdedxv.cxx                          |    2 +-
 svx/source/svdraw/svdmrkv.cxx                          |    4 ++--
 svx/source/svdraw/svdobj.cxx                           |    2 +-
 sw/source/core/crsr/viscrs.cxx                         |    2 +-
 sw/source/uibase/app/docsh2.cxx                        |    4 ++--
 32 files changed, 50 insertions(+), 52 deletions(-)

New commits:
commit fa311ad62f935d6469b77936d477125d98dbee60
Author:     Noel Grandin <[email protected]>
AuthorDate: Sun Oct 10 14:13:55 2021 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sun Oct 10 19:45:34 2021 +0200

    loplugin:moveparam in svx
    
    Change-Id: I2e422235129f810feea5c17afa1332d8b7ac14ed
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123332
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 21f60f29e598..3eab0a4e6219 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -713,7 +713,7 @@ bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet* 
rCoreAttrs )
         if ( !aDelFormats.empty() )
         {
 
-            pNumItem->SetDelFormats( aDelFormats );
+            pNumItem->SetDelFormats( std::vector(aDelFormats) );
 
             if(bNumItemFlag)
             {
diff --git a/include/svx/ClassificationDialog.hxx 
b/include/svx/ClassificationDialog.hxx
index b83068ba1c1e..d018662b5366 100644
--- a/include/svx/ClassificationDialog.hxx
+++ b/include/svx/ClassificationDialog.hxx
@@ -87,7 +87,7 @@ public:
     ~ClassificationDialog() override;
 
     std::vector<ClassificationResult> getResult();
-    void setupValues(std::vector<ClassificationResult> const& rInput);
+    void setupValues(std::vector<ClassificationResult>&& rInput);
 };
 
 } // end svx namespace
diff --git a/include/svx/numinf.hxx b/include/svx/numinf.hxx
index 2002638d794d..ef1219988e04 100644
--- a/include/svx/numinf.hxx
+++ b/include/svx/numinf.hxx
@@ -56,7 +56,7 @@ public:
     double                  GetValueDouble() const  { return nDoubleVal; }
 
     const std::vector<sal_uInt32> & GetDelFormats() const { return 
mvDelFormats; }
-    void                    SetDelFormats( std::vector<sal_uInt32> const & );
+    void                    SetDelFormats( std::vector<sal_uInt32> && );
 
     SvxNumberValueType      GetValueType() const { return eValueType; }
 
diff --git a/include/svx/sdr/overlay/overlayselection.hxx 
b/include/svx/sdr/overlay/overlayselection.hxx
index f2402500b8d5..d456ac6bf11b 100644
--- a/include/svx/sdr/overlay/overlayselection.hxx
+++ b/include/svx/sdr/overlay/overlayselection.hxx
@@ -67,7 +67,7 @@ namespace sdr::overlay
             virtual drawinglayer::primitive2d::Primitive2DContainer 
getOverlayObjectPrimitive2DSequence() const override;
 
             // data write access
-            void setRanges(const std::vector< basegfx::B2DRange >& rNew);
+            void setRanges(std::vector< basegfx::B2DRange >&& rNew);
         };
 } // end of namespace sdr::overlay
 
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index 9b33b07c3a22..d4ece164bece 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -310,7 +310,7 @@ public:
     // Just objects are marked which are inclosed completely
     void MarkObj(const tools::Rectangle& rRect, bool bUnmark);
     void MarkObj(SdrObject* pObj, SdrPageView* pPV, bool bUnmark = false, bool 
bDoNoSetMarkHdl = false,
-                 std::vector<basegfx::B2DRectangle> const & rSubSelections = 
std::vector<basegfx::B2DRectangle>());
+                 std::vector<basegfx::B2DRectangle> && rSubSelections = 
std::vector<basegfx::B2DRectangle>());
     void MarkAllObj(SdrPageView* pPV=nullptr); // pPage=NULL => all displayed 
pages
     void UnmarkAllObj(SdrPageView const * pPV=nullptr); // pPage=NULL => all 
displayed pages
 
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 0ebe41c8e630..0f77f2070219 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -854,7 +854,7 @@ bool 
SdOutliner::SearchAndReplaceOnce(std::vector<sd::SearchSelection>* pSelecti
                     basegfx::B2DRectangle aSubSelection = 
getPDFSelection(rVectorGraphicSearchContext.mpVectorGraphicSearch, mpObj);
                     if (!aSubSelection.isEmpty())
                         aSubSelections.push_back(aSubSelection);
-                    mpView->MarkObj(mpObj, pPageView, false, false, 
aSubSelections);
+                    mpView->MarkObj(mpObj, pPageView, false, false, 
std::move(aSubSelections));
                 }
                 else
                 {
@@ -1276,7 +1276,7 @@ void SdOutliner::ProvideNextTextObject()
                         if (!aSubSelection.isEmpty())
                             aSubSelections.push_back(aSubSelection);
 
-                        mpView->MarkObj(mpObj, pPageView, false, false, 
aSubSelections);
+                        mpView->MarkObj(mpObj, pPageView, false, false, 
std::move(aSubSelections));
 
                         mpDrawDocument->GetDocSh()->SetWaitCursor( false );
                     }
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index d73f2aa6ae2c..b951231f2c5b 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1652,7 +1652,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             ClassificationCollector aCollector(*this);
             aCollector.collect();
 
-            xDialog->setupValues(aCollector.getResults());
+            xDialog->setupValues(std::vector(aCollector.getResults()));
 
             if (RET_OK == xDialog->run())
             {
diff --git a/svx/source/dialog/ClassificationDialog.cxx 
b/svx/source/dialog/ClassificationDialog.cxx
index 501e891d8d83..af72a7edf2a2 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -291,9 +291,9 @@ void ClassificationDialog::insertField(ClassificationType 
eType, OUString const
     m_xEditWindow->InsertField(SvxFieldItem(aField, EE_FEATURE_FIELD));
 }
 
-void ClassificationDialog::setupValues(std::vector<ClassificationResult> const 
& rInput)
+void ClassificationDialog::setupValues(std::vector<ClassificationResult> && 
rInput)
 {
-    m_aInitialValues = rInput;
+    m_aInitialValues = std::move(rInput);
     readIn(m_aInitialValues);
 }
 
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 22f9173dee1e..fb8252d76eba 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -231,13 +231,11 @@ const ImageMap& SvxIMapDlg::GetImageMap() const
 
 void SvxIMapDlg::SetTargetList( const TargetList& rTargetList )
 {
-    TargetList aNewList( rTargetList );
-
-    m_xIMapWnd->SetTargetList( aNewList );
+    m_xIMapWnd->SetTargetList( rTargetList );
 
     m_xCbbTarget->clear();
 
-    for (const OUString & s : aNewList)
+    for (const OUString & s : rTargetList)
         m_xCbbTarget->append_text(s);
 }
 
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index bd987d99b735..a4ed0e6090a9 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -161,7 +161,7 @@ const ImageMap& IMapWindow::GetImageMap()
     return aIMap;
 }
 
-void IMapWindow::SetTargetList( TargetList& rTargetList )
+void IMapWindow::SetTargetList( const TargetList& rTargetList )
 {
     // Delete old List
     aTargetList.clear();
diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx
index e7e3a1263da3..4ef2c9277a86 100644
--- a/svx/source/dialog/imapwnd.hxx
+++ b/svx/source/dialog/imapwnd.hxx
@@ -130,7 +130,7 @@ public:
 
     void                SetInfoLink( const Link<IMapWindow&,void>& rLink ) { 
aInfoLink = rLink; }
 
-    void                SetTargetList( TargetList& rTargetList );
+    void                SetTargetList( const TargetList& rTargetList );
 
     const NotifyInfo&   GetInfo() const { return aInfo; }
 };
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index a4d7283ab23c..22426ad7dbeb 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1430,7 +1430,7 @@ IMPL_LINK(FmFilterNavigator, DragBeginHdl, bool&, 
rUnsetDragIcon, bool)
     ::std::vector<FmFilterItem*> aItemList;
     if (FmFormItem* pFirstItem = getSelectedFilterItems(aItemList))
     {
-        m_aControlExchange->setDraggedEntries(aItemList);
+        m_aControlExchange->setDraggedEntries(std::move(aItemList));
         m_aControlExchange->setFormItem(pFirstItem);
 
         OFilterItemExchange& rExchange = *m_aControlExchange;
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 6ef4d39549df..280912284c86 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -575,7 +575,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
 
             InterfaceBag aOnlyTheForm;
             
aOnlyTheForm.insert(Reference<XInterface>(GetImpl()->getCurrentForm_Lock(), 
UNO_QUERY));
-            GetImpl()->setCurrentSelection_Lock(aOnlyTheForm);
+            GetImpl()->setCurrentSelection_Lock(std::move(aOnlyTheForm));
 
             GetImpl()->ShowSelectionProperties_Lock(bShow);
 
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 248a2651e23a..ff42f94a770d 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1908,17 +1908,17 @@ bool 
FmXFormShell::setCurrentSelectionFromMark_Lock(const SdrMarkList& _rMarkLis
     if ( ( _rMarkList.GetMarkCount() > 0 ) && isControlList( _rMarkList ) )
         collectInterfacesFromMarkList( _rMarkList, m_aLastKnownMarkedControls 
);
 
-    return setCurrentSelection_Lock(m_aLastKnownMarkedControls);
+    return 
setCurrentSelection_Lock(o3tl::sorted_vector(m_aLastKnownMarkedControls));
 }
 
 
 bool FmXFormShell::selectLastMarkedControls_Lock()
 {
-    return setCurrentSelection_Lock(m_aLastKnownMarkedControls);
+    return 
setCurrentSelection_Lock(o3tl::sorted_vector(m_aLastKnownMarkedControls));
 }
 
 
-bool FmXFormShell::setCurrentSelection_Lock( const InterfaceBag& _rSelection )
+bool FmXFormShell::setCurrentSelection_Lock( InterfaceBag&& _rSelection )
 {
     if (impl_checkDisposed_Lock())
         return false;
@@ -2627,7 +2627,7 @@ void SAL_CALL FmXFormShell::selectionChanged(const 
lang::EventObject& rEvent)
     InterfaceBag aNewSelection;
     aNewSelection.insert( Reference<XInterface>( xSelObj, UNO_QUERY ) );
 
-    if (setCurrentSelection_Lock(aNewSelection) && IsPropBrwOpen_Lock())
+    if (setCurrentSelection_Lock(std::move(aNewSelection)) && 
IsPropBrwOpen_Lock())
         ShowSelectionProperties_Lock(true);
 
     EnableTrackProperties_Lock(true);
diff --git a/svx/source/form/navigatortree.cxx 
b/svx/source/form/navigatortree.cxx
index 436b1d604355..84a3839af30f 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -1312,7 +1312,7 @@ namespace svxform
         {
             InterfaceBag aSelection;
             aSelection.insert( Reference<XInterface>( xNewForm, UNO_QUERY ) );
-            pFormShell->GetImpl()->setCurrentSelection_Lock(aSelection);
+            
pFormShell->GetImpl()->setCurrentSelection_Lock(std::move(aSelection));
 
             
pFormShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_PROPERTIES,
 true, true);
         }
@@ -1540,7 +1540,7 @@ namespace svxform
         if ( bSetSelectionAsMarkList )
             
pFormShell->GetImpl()->setCurrentSelectionFromMark_Lock(pFormShell->GetFormView()->GetMarkedObjectList());
         else
-            pFormShell->GetImpl()->setCurrentSelection_Lock(aSelection);
+            
pFormShell->GetImpl()->setCurrentSelection_Lock(std::move(aSelection));
 
         if (pFormShell->GetImpl()->IsPropBrwOpen_Lock() || bForce)
         {
@@ -1898,7 +1898,7 @@ namespace svxform
         {
             InterfaceBag aSelection;
             aSelection.insert( Reference< XInterface >( 
pSingleSelectionData->GetFormIface(), UNO_QUERY ) );
-            pFormShell->GetImpl()->setCurrentSelection_Lock(aSelection);
+            
pFormShell->GetImpl()->setCurrentSelection_Lock(std::move(aSelection));
         }
     }
 
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index 59af45acbd86..34343d9c0af4 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -186,7 +186,7 @@ public:
     inline static bool  hasFormat( const DataFlavorExVector& _rFormats );
 
     const ::std::vector<FmFilterItem*>& getDraggedEntries() const { return 
m_aDraggedEntries; }
-    void setDraggedEntries(const ::std::vector<FmFilterItem*>& _rList) { 
m_aDraggedEntries = _rList; }
+    void setDraggedEntries(::std::vector<FmFilterItem*>&& _rList) { 
m_aDraggedEntries = std::move(_rList); }
     FmFormItem* getFormItem() const { return m_pFormItem; }
 
     void setFormItem( FmFormItem* _pItem ) { m_pFormItem = _pItem; }
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index a60e03d2e4ed..4d3c55bc8aa1 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -356,7 +356,7 @@ public:
         @return
             <TRUE/> if and only if the to-bet-set selection was different from 
the previous selection
     */
-    SAL_DLLPRIVATE bool setCurrentSelection_Lock(const InterfaceBag& 
rSelection);
+    SAL_DLLPRIVATE bool setCurrentSelection_Lock(InterfaceBag&& rSelection);
 
     /** sets the new selection to the last known marked controls
     */
diff --git a/svx/source/items/numinf.cxx b/svx/source/items/numinf.cxx
index 1bb149e868c5..5df9470ce4b1 100644
--- a/svx/source/items/numinf.cxx
+++ b/svx/source/items/numinf.cxx
@@ -122,9 +122,9 @@ SvxNumberInfoItem* SvxNumberInfoItem::Clone( SfxItemPool * 
) const
     return new SvxNumberInfoItem( *this );
 }
 
-void SvxNumberInfoItem::SetDelFormats( std::vector<sal_uInt32> const & aData )
+void SvxNumberInfoItem::SetDelFormats( std::vector<sal_uInt32> && aData )
 {
-    mvDelFormats = aData;
+    mvDelFormats = std::move(aData);
 }
 
 
diff --git a/svx/source/sdr/overlay/overlayselection.cxx 
b/svx/source/sdr/overlay/overlayselection.cxx
index f0c40344edaa..0463567c593c 100644
--- a/svx/source/sdr/overlay/overlayselection.cxx
+++ b/svx/source/sdr/overlay/overlayselection.cxx
@@ -205,11 +205,11 @@ namespace sdr::overlay
             return OverlayObject::getOverlayObjectPrimitive2DSequence();
         }
 
-        void OverlaySelection::setRanges(const std::vector< basegfx::B2DRange 
>& rNew)
+        void OverlaySelection::setRanges(std::vector< basegfx::B2DRange >&& 
rNew)
         {
             if(rNew != maRanges)
             {
-                maRanges = rNew;
+                maRanges = std::move(rNew);
                 objectChange();
             }
         }
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 6e2247153b53..db0ccf6ea486 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -607,7 +607,7 @@ void TextEditOverlayObject::checkSelectionChange()
             aRect.Right() + aLogicPixel.Width(), aRect.Bottom() + 
aLogicPixel.Height());
     }
 
-    mxOverlaySelection->setRanges(aLogicRanges);
+    mxOverlaySelection->setRanges(std::move(aLogicRanges));
 }
 } // end of anonymous namespace
 
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index a8fa52eb7d05..ff76ce6bf485 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -2124,7 +2124,7 @@ void collectUIInformation(const SdrObject* pObj)
 }
 
  void SdrMarkView::MarkObj(SdrObject* pObj, SdrPageView* pPV, bool bUnmark, 
bool bDoNoSetMarkHdl,
-                          std::vector<basegfx::B2DRectangle> const & 
rSubSelections)
+                          std::vector<basegfx::B2DRectangle> && rSubSelections)
 {
     if (!(pObj!=nullptr && pPV!=nullptr && IsObjMarkable(pObj, pPV)))
         return;
@@ -2144,7 +2144,7 @@ void collectUIInformation(const SdrObject* pObj)
         }
     }
 
-    maSubSelectionList = rSubSelections;
+    maSubSelectionList = std::move(rSubSelections);
 
     if (!bDoNoSetMarkHdl) {
         MarkListHasChanged();
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 2ec5ba2d2a95..1191a8784e08 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2408,7 +2408,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(bool 
bForceLineDash)
             if (!aExtractedLineFills.empty() && 
!utl::ConfigManager::IsFuzzing())
             {
                 // merge to a single tools::PolyPolygon (OR)
-                aMergedLineFillPolyPolygon = 
basegfx::utils::mergeToSinglePolyPolygon(aExtractedLineFills);
+                aMergedLineFillPolyPolygon = 
basegfx::utils::mergeToSinglePolyPolygon(std::move(aExtractedLineFills));
             }
         }
 
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index a1fe74191499..5d076c8264d4 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -412,7 +412,7 @@ void SwSelPaintRects::Show(std::vector<OString>* 
pSelectionRectangles)
     {
         if(!aNewRanges.empty())
         {
-            
static_cast<sdr::overlay::OverlaySelection*>(m_pCursorOverlay.get())->setRanges(aNewRanges);
+            
static_cast<sdr::overlay::OverlaySelection*>(m_pCursorOverlay.get())->setRanges(std::move(aNewRanges));
         }
         else
         {
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index e434bbf6c178..c783cfacb59c 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1215,7 +1215,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
 
             SwWrtShell* pShell = GetWrtShell();
             std::vector<svx::ClassificationResult> aInput = 
pShell->CollectAdvancedClassification();
-            xDialog->setupValues(aInput);
+            xDialog->setupValues(std::move(aInput));
 
             weld::DialogController::runAsync(xDialog, [xDialog, 
pShell](sal_Int32 nResult){
                 if (RET_OK == nResult)
@@ -1232,7 +1232,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
             });
 
             std::vector<svx::ClassificationResult> aInput = 
pShell->CollectParagraphClassification();
-            xDialog->setupValues(aInput);
+            xDialog->setupValues(std::move(aInput));
 
             weld::DialogController::runAsync(xDialog, [xDialog, 
pShell](sal_Int32 nResult){
                 if (RET_OK == nResult)
commit 6af0da482d8d387f181cb9c2cf9301859c9683cb
Author:     Noel Grandin <[email protected]>
AuthorDate: Sun Oct 10 17:31:04 2021 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sun Oct 10 19:45:23 2021 +0200

    loplugin:moveparam in editeng
    
    Change-Id: I08aed09b0acd283d700bdf75f650e93dba7c7b85
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123341
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/editeng/inc/edtspell.hxx b/editeng/inc/edtspell.hxx
index 3332fce4e1e6..a63c395690c0 100644
--- a/editeng/inc/edtspell.hxx
+++ b/editeng/inc/edtspell.hxx
@@ -68,7 +68,7 @@ public:
     WrongList();
 
     const std::vector<editeng::MisspellRange>& GetRanges() const { return 
maRanges;}
-    void SetRanges( const std::vector<editeng::MisspellRange>& rRanges );
+    void SetRanges( std::vector<editeng::MisspellRange>&& rRanges );
 
     bool IsValid() const;
     void SetValid();
diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx 
b/editeng/source/accessibility/AccessibleParaManager.cxx
index 12aff3e2df63..f597bba6adce 100644
--- a/editeng/source/accessibility/AccessibleParaManager.cxx
+++ b/editeng/source/accessibility/AccessibleParaManager.cxx
@@ -56,9 +56,9 @@ namespace accessibility
         // owner is responsible for possible child death
     }
 
-    void AccessibleParaManager::SetAdditionalChildStates( const 
VectorOfStates& rChildStates )
+    void AccessibleParaManager::SetAdditionalChildStates( VectorOfStates&& 
rChildStates )
     {
-        maChildStates = rChildStates;
+        maChildStates = std::move(rChildStates);
     }
 
     void AccessibleParaManager::SetNum( sal_Int32 nNumParas )
diff --git a/editeng/source/editeng/edtspell.cxx 
b/editeng/source/editeng/edtspell.cxx
index fdd0593418cc..5ff6beb29b8f 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -150,9 +150,9 @@ void EditSpellWrapper::CheckSpellTo()
 
 WrongList::WrongList() : mnInvalidStart(0), mnInvalidEnd(Valid) {}
 
-void WrongList::SetRanges( const std::vector<editeng::MisspellRange>& rRanges )
+void WrongList::SetRanges( std::vector<editeng::MisspellRange>&&rRanges )
 {
-    maRanges = rRanges;
+    maRanges = std::move(rRanges);
 }
 
 bool WrongList::IsValid() const
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index d6071f2a355a..dd3f13cf0f47 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1376,7 +1376,7 @@ void ImpEditEngine::SetAllMisspellRanges( const 
std::vector<editeng::MisspellRan
 
         pNode->CreateWrongList();
         WrongList* pWrongList = pNode->GetWrongList();
-        pWrongList->SetRanges(rParaRanges.maRanges);
+        pWrongList->SetRanges(std::vector(rParaRanges.maRanges));
     }
 }
 
diff --git a/include/editeng/AccessibleParaManager.hxx 
b/include/editeng/AccessibleParaManager.hxx
index 5330e1100893..0eceac19ce43 100644
--- a/include/editeng/AccessibleParaManager.hxx
+++ b/include/editeng/AccessibleParaManager.hxx
@@ -105,7 +105,7 @@ namespace accessibility
             (text paragraph). The state values are defined in
             css::accessibility::AccessibleStateType.
          */
-        void SetAdditionalChildStates( const VectorOfStates& rChildStates );
+        void SetAdditionalChildStates( VectorOfStates&& rChildStates );
 
         /** Set the number of paragraphs
 
diff --git a/include/svx/AccessibleTextHelper.hxx 
b/include/svx/AccessibleTextHelper.hxx
index d57736e14f26..45592748f5ed 100644
--- a/include/svx/AccessibleTextHelper.hxx
+++ b/include/svx/AccessibleTextHelper.hxx
@@ -258,7 +258,7 @@ public:
         This function has to be called before querying for
         any children (e.g. with GetChild()).
     */
-    void SetAdditionalChildStates(const VectorOfStates& rChildStates);
+    void SetAdditionalChildStates(VectorOfStates&& rChildStates);
 
     /** Update the visible children
 
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx 
b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index c420bbbfa0cd..f3bc3e717805 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -271,7 +271,7 @@ void ScAccessiblePreviewCell::CreateTextHelper()
     // paragraphs in preview are transient
     ::accessibility::AccessibleTextHelper::VectorOfStates aChildStates;
     aChildStates.push_back( AccessibleStateType::TRANSIENT );
-    mpTextHelper->SetAdditionalChildStates( aChildStates );
+    mpTextHelper->SetAdditionalChildStates( std::move(aChildStates) );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx 
b/svx/source/accessibility/AccessibleTextHelper.cxx
index 5a6a5397ca00..046fec99224b 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -122,7 +122,7 @@ namespace accessibility
             return mnStartIndex;
         }
 
-        void SetAdditionalChildStates( const VectorOfStates& rChildStates );
+        void SetAdditionalChildStates( VectorOfStates&& rChildStates );
 
         void Dispose();
 
@@ -350,9 +350,9 @@ namespace accessibility
         }
     }
 
-    void AccessibleTextHelper_Impl::SetAdditionalChildStates( const 
VectorOfStates& rChildStates )
+    void AccessibleTextHelper_Impl::SetAdditionalChildStates( VectorOfStates&& 
rChildStates )
     {
-        maParaManager.SetAdditionalChildStates( rChildStates );
+        maParaManager.SetAdditionalChildStates( std::move(rChildStates) );
     }
 
     void AccessibleTextHelper_Impl::SetChildFocus( sal_Int32 nChild, bool 
bHaveFocus )
@@ -1644,9 +1644,9 @@ namespace accessibility
 #endif
     }
 
-    void AccessibleTextHelper::SetAdditionalChildStates( const VectorOfStates& 
rChildStates )
+    void AccessibleTextHelper::SetAdditionalChildStates( VectorOfStates&& 
rChildStates )
     {
-        mpImpl->SetAdditionalChildStates( rChildStates );
+        mpImpl->SetAdditionalChildStates( std::move(rChildStates) );
     }
 
     void AccessibleTextHelper::UpdateChildren()

Reply via email to