summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-10 14:13:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-10 19:45:34 +0200
commitfa311ad62f935d6469b77936d477125d98dbee60 (patch)
treed712ee8e0e16065923fefba70f433e760a6627b6 /svx
parent6af0da482d8d387f181cb9c2cf9301859c9683cb (diff)
loplugin:moveparam in svx
Change-Id: I2e422235129f810feea5c17afa1332d8b7ac14ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/ClassificationDialog.cxx4
-rw-r--r--svx/source/dialog/imapdlg.cxx6
-rw-r--r--svx/source/dialog/imapwnd.cxx2
-rw-r--r--svx/source/dialog/imapwnd.hxx2
-rw-r--r--svx/source/form/filtnav.cxx2
-rw-r--r--svx/source/form/fmshell.cxx2
-rw-r--r--svx/source/form/fmshimp.cxx8
-rw-r--r--svx/source/form/navigatortree.cxx6
-rw-r--r--svx/source/inc/filtnav.hxx2
-rw-r--r--svx/source/inc/fmshimp.hxx2
-rw-r--r--svx/source/items/numinf.cxx4
-rw-r--r--svx/source/sdr/overlay/overlayselection.cxx4
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--svx/source/svdraw/svdmrkv.cxx4
-rw-r--r--svx/source/svdraw/svdobj.cxx2
15 files changed, 25 insertions, 27 deletions
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));
}
}