From 5389b44827393c80df27e429ba446971a0d7a696 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 13 Jun 2017 10:46:16 +0200 Subject: Let SfxSetItem ctor take SfxItemSet by unique_ptr Change-Id: I219dd03477862169cd50eecc14822f6a023f879a --- include/svl/poolitem.hxx | 2 +- include/svx/pageitem.hxx | 6 +++++- include/svx/xflasit.hxx | 6 +++++- include/svx/xlnasit.hxx | 5 ++++- 4 files changed, 15 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index 2eefbf1f66cf..b2a05b993f4a 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -272,7 +272,7 @@ class SVL_DLLPUBLIC SfxSetItem: public SfxPoolItem SfxSetItem & operator=( const SfxSetItem& ) = delete; public: - SfxSetItem( sal_uInt16 nWhich, SfxItemSet *pSet ); + SfxSetItem( sal_uInt16 nWhich, std::unique_ptr &&pSet ); SfxSetItem( sal_uInt16 nWhich, const SfxItemSet &rSet ); SfxSetItem( const SfxSetItem&, SfxItemPool *pPool = nullptr ); virtual ~SfxSetItem() override; diff --git a/include/svx/pageitem.hxx b/include/svx/pageitem.hxx index 0a322a6a08d0..80277b7d3d3f 100644 --- a/include/svx/pageitem.hxx +++ b/include/svx/pageitem.hxx @@ -19,6 +19,10 @@ #ifndef INCLUDED_SVX_PAGEITEM_HXX #define INCLUDED_SVX_PAGEITEM_HXX +#include + +#include + #include #include #include @@ -99,7 +103,7 @@ class SVX_DLLPUBLIC SvxSetItem: public SfxSetItem public: SvxSetItem( const sal_uInt16 nId, const SfxItemSet& rSet ); SvxSetItem( const SvxSetItem& rItem ); - SvxSetItem( const sal_uInt16 nId, SfxItemSet* pSet ); + SvxSetItem( const sal_uInt16 nId, std::unique_ptr&& pSet ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/include/svx/xflasit.hxx b/include/svx/xflasit.hxx index 73ceb0c3f1ab..62419e2cb462 100644 --- a/include/svx/xflasit.hxx +++ b/include/svx/xflasit.hxx @@ -20,6 +20,10 @@ #ifndef INCLUDED_SVX_XFLASIT_HXX #define INCLUDED_SVX_XFLASIT_HXX +#include + +#include + #include #include @@ -27,7 +31,7 @@ class SVX_DLLPUBLIC XFillAttrSetItem : public SfxSetItem { public: - XFillAttrSetItem(SfxItemSet* pItemSet ); + XFillAttrSetItem(std::unique_ptr&& pItemSet ); XFillAttrSetItem(SfxItemPool* pItemPool); XFillAttrSetItem(const XFillAttrSetItem& rAttr); XFillAttrSetItem(const XFillAttrSetItem& rAttr, diff --git a/include/svx/xlnasit.hxx b/include/svx/xlnasit.hxx index 9b82ddef18e4..1643c223e23d 100644 --- a/include/svx/xlnasit.hxx +++ b/include/svx/xlnasit.hxx @@ -20,6 +20,9 @@ #ifndef INCLUDED_SVX_XLNASIT_HXX #define INCLUDED_SVX_XLNASIT_HXX +#include + +#include #include #include @@ -28,7 +31,7 @@ class SVX_DLLPUBLIC XLineAttrSetItem : public SfxSetItem { public: - XLineAttrSetItem(SfxItemSet* pItemSet ); + XLineAttrSetItem(std::unique_ptr&& pItemSet ); XLineAttrSetItem(SfxItemPool* pItemPool); XLineAttrSetItem(const XLineAttrSetItem& rAttr); XLineAttrSetItem(const XLineAttrSetItem& rAttr, -- cgit