diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-24 16:03:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-24 16:06:52 +0200 |
commit | 4e820251892917a92996f1aa6978ad609112001c (patch) | |
tree | 8459a52aec67f0950aa9c12cd12b98b9eb02c89f /include | |
parent | 8bf8c9ba4f031fa8c838321b0cf4c7bb8dd44753 (diff) |
Replace some std::auto_ptr function parameters with std::unique_ptr
Change-Id: Ic66d325fd9559c6dde9556c26e5b2a7e60376c49
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/AccessibleStaticTextBase.hxx | 11 | ||||
-rw-r--r-- | include/editeng/unoedprx.hxx | 9 | ||||
-rw-r--r-- | include/svx/AccessibleTextHelper.hxx | 11 |
3 files changed, 11 insertions, 20 deletions
diff --git a/include/editeng/AccessibleStaticTextBase.hxx b/include/editeng/AccessibleStaticTextBase.hxx index 9d74ad13a992..e061f841019c 100644 --- a/include/editeng/AccessibleStaticTextBase.hxx +++ b/include/editeng/AccessibleStaticTextBase.hxx @@ -101,9 +101,8 @@ namespace accessibility model) contained in the given SvxEditSource. */ - SAL_WNODEPRECATED_DECLARATIONS_PUSH - explicit AccessibleStaticTextBase( ::std::auto_ptr< SvxEditSource > pEditSource ); - SAL_WNODEPRECATED_DECLARATIONS_POP + explicit AccessibleStaticTextBase( ::std::unique_ptr< SvxEditSource > && pEditSource ); + virtual ~AccessibleStaticTextBase(); private: @@ -144,16 +143,14 @@ namespace accessibility This class does not have a dispose method, since it is not a UNO component. Nevertheless, it holds C++ references to several core objects, so you should issue a - SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in + SetEditSource(::std::unique_ptr<SvxEditSource>()) in your dispose() method. @param pEditSource The new edit source to set. Object ownership is transferred from the caller to the callee. */ - SAL_WNODEPRECATED_DECLARATIONS_PUSH - virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ); - SAL_WNODEPRECATED_DECLARATIONS_POP + virtual void SetEditSource( ::std::unique_ptr< SvxEditSource > && pEditSource ); /** Set the event source diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx index bbe67ff1feac..091adcc9b96a 100644 --- a/include/editeng/unoedprx.hxx +++ b/include/editeng/unoedprx.hxx @@ -151,9 +151,8 @@ public: virtual void UpdateData() SAL_OVERRIDE; virtual SfxBroadcaster& GetBroadcaster() const SAL_OVERRIDE; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - void SetEditSource( ::std::auto_ptr< SvxEditSource > pAdaptee ); - SAL_WNODEPRECATED_DECLARATIONS_POP + void SetEditSource( ::std::unique_ptr< SvxEditSource > && pAdaptee ); + bool IsValid() const { return mbEditSourceValid;} private: @@ -161,9 +160,7 @@ private: SvxEditSourceAdapter( const SvxEditSourceAdapter& ); SvxEditSourceAdapter& operator= ( const SvxEditSourceAdapter& ); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< SvxEditSource > mpAdaptee; - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< SvxEditSource > mpAdaptee; SvxAccessibleTextAdapter maTextAdapter; SvxAccessibleTextEditViewAdapter maEditViewAdapter; diff --git a/include/svx/AccessibleTextHelper.hxx b/include/svx/AccessibleTextHelper.hxx index d369c0d18b20..8d13e9d6236d 100644 --- a/include/svx/AccessibleTextHelper.hxx +++ b/include/svx/AccessibleTextHelper.hxx @@ -124,9 +124,8 @@ namespace accessibility model) contained in the given SvxEditSource. */ - SAL_WNODEPRECATED_DECLARATIONS_PUSH - explicit AccessibleTextHelper( ::std::auto_ptr< SvxEditSource > pEditSource ); - SAL_WNODEPRECATED_DECLARATIONS_POP + explicit AccessibleTextHelper( ::std::unique_ptr< SvxEditSource > && pEditSource ); + virtual ~AccessibleTextHelper(); protected: @@ -180,16 +179,14 @@ namespace accessibility This class does not have a dispose method, since it is not a UNO component. Nevertheless, it holds C++ references to several core objects, so you should issue a - SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in + SetEditSource(::std::unique_ptr<SvxEditSource>()) in your dispose() method. @param pEditSource The new edit source to set. Object ownership is transferred from the caller to the callee. */ - SAL_WNODEPRECATED_DECLARATIONS_PUSH - virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ); - SAL_WNODEPRECATED_DECLARATIONS_POP + virtual void SetEditSource( ::std::unique_ptr< SvxEditSource > && pEditSource ); /** Set the event source |