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 /starmath/source | |
parent | 8bf8c9ba4f031fa8c838321b0cf4c7bb8dd44753 (diff) |
Replace some std::auto_ptr function parameters with std::unique_ptr
Change-Id: Ic66d325fd9559c6dde9556c26e5b2a7e60376c49
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/accessibility.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 6388cc604dd1..5ef11689e616 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -17,6 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <memory> +#include <utility> + #include <com/sun/star/accessibility/AccessibleRole.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleTextType.hpp> @@ -1647,9 +1652,9 @@ void SmEditAccessible::Init() EditView *pEditView = pWin->GetEditView(); if (pEditEngine && pEditView) { - ::std::auto_ptr< SvxEditSource > pEditSource( + ::std::unique_ptr< SvxEditSource > pEditSource( new SmEditSource( pWin, *this ) ); - pTextHelper = new ::accessibility::AccessibleTextHelper( pEditSource ); + pTextHelper = new ::accessibility::AccessibleTextHelper( std::move(pEditSource) ); pTextHelper->SetEventSource( this ); } } @@ -1666,9 +1671,7 @@ void SmEditAccessible::ClearWin() pWin = 0; // implicitly results in AccessibleStateType::DEFUNC set //! make TextHelper implicitly release C++ references to some core objects - SAL_WNODEPRECATED_DECLARATIONS_PUSH - pTextHelper->SetEditSource( ::std::auto_ptr<SvxEditSource>(NULL) ); - SAL_WNODEPRECATED_DECLARATIONS_POP + pTextHelper->SetEditSource( ::std::unique_ptr<SvxEditSource>() ); //! make TextHelper release references //! (e.g. the one set by the 'SetEventSource' call) pTextHelper->Dispose(); |