include/svl/ilstitem.hxx | 2 +- sc/source/ui/view/tabvwsh3.cxx | 2 +- sc/source/ui/view/tabvwsha.cxx | 5 ++--- svl/source/items/ilstitem.cxx | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-)
New commits: commit 2ad7e095078e09bc27608d5b1fedb8809656abbe Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Oct 6 20:32:58 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Oct 8 07:28:43 2021 +0200 loplugin:moveparam in svl Change-Id: I58c1ef97fd6cba281c90cc7ed9917e04b7f265ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/svl/ilstitem.hxx b/include/svl/ilstitem.hxx index af4932999dbd..bb49d18c9dbb 100644 --- a/include/svl/ilstitem.hxx +++ b/include/svl/ilstitem.hxx @@ -33,7 +33,7 @@ class SVL_DLLPUBLIC SfxIntegerListItem final : public SfxPoolItem public: static SfxPoolItem* CreateDefault(); SfxIntegerListItem(); - SfxIntegerListItem( sal_uInt16 nWhich, const ::std::vector < sal_Int32 >& rList ); + SfxIntegerListItem( sal_uInt16 nWhich, std::vector < sal_Int32 >&& rList ); SfxIntegerListItem( sal_uInt16 nWhich, const css::uno::Sequence < sal_Int32 >& rList ); virtual ~SfxIntegerListItem() override; diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 4ad0eb9de120..03e8dd4f9593 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -915,7 +915,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { aIndexList = pDlg->GetSelectedRows(); pDlg.disposeAndClear(); - rReq.AppendItem( SfxIntegerListItem( SID_SELECT_TABLES, aIndexList ) ); + rReq.AppendItem( SfxIntegerListItem( SID_SELECT_TABLES, std::vector(aIndexList) ) ); } else rReq.Ignore(); diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 8a47fc8ff94b..31c087e00d41 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -517,7 +517,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName pOldSet->MergeRange(SID_ATTR_BORDER_STYLES, SID_ATTR_BORDER_DEFAULT_WIDTH); // We only allow these border line types. - const std::vector<sal_Int32> aBorderStyles{ + std::vector<sal_Int32> aBorderStyles{ table::BorderLineStyle::SOLID, table::BorderLineStyle::DOTTED, table::BorderLineStyle::DASHED, @@ -526,8 +526,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName table::BorderLineStyle::DASH_DOT_DOT, table::BorderLineStyle::DOUBLE_THIN }; - SfxIntegerListItem aBorderStylesItem(SID_ATTR_BORDER_STYLES, aBorderStyles); - pOldSet->Put(aBorderStylesItem); + pOldSet->Put(SfxIntegerListItem(SID_ATTR_BORDER_STYLES, std::move(aBorderStyles))); // Set the default border width to 0.75 points. SfxInt64Item aBorderWidthItem(SID_ATTR_BORDER_DEFAULT_WIDTH, 75); diff --git a/svl/source/items/ilstitem.cxx b/svl/source/items/ilstitem.cxx index d9ddeae2182e..0cb9ea8e6c49 100644 --- a/svl/source/items/ilstitem.cxx +++ b/svl/source/items/ilstitem.cxx @@ -31,9 +31,9 @@ SfxIntegerListItem::SfxIntegerListItem() { } -SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, const ::std::vector < sal_Int32 >& rList ) +SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, ::std::vector < sal_Int32 >&& rList ) : SfxPoolItem( which ) - , m_aList( rList ) + , m_aList( std::move(rList) ) { }