diff options
author | David Tardon <dtardon@redhat.com> | 2016-09-09 14:55:12 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-09-09 16:16:45 +0200 |
commit | 8e11d353665242fc90ef485ff8f67a44206b6393 (patch) | |
tree | 1da502d977387bc53eeb538fcb1579c7ca16cd30 /include/xmloff/unoatrcn.hxx | |
parent | use std::unique_ptr (diff) | |
download | core-8e11d353665242fc90ef485ff8f67a44206b6393.tar.gz core-8e11d353665242fc90ef485ff8f67a44206b6393.zip |
use std::unique_ptr
Change-Id: I8ba37267e8a7058ade54783ea0e117a8f8816c45
Diffstat (limited to 'include/xmloff/unoatrcn.hxx')
-rw-r--r-- | include/xmloff/unoatrcn.hxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/xmloff/unoatrcn.hxx b/include/xmloff/unoatrcn.hxx index 1f81e9171321..7ba70ad7ae25 100644 --- a/include/xmloff/unoatrcn.hxx +++ b/include/xmloff/unoatrcn.hxx @@ -21,6 +21,9 @@ #define INCLUDED_XMLOFF_UNOATRCN_HXX #include <sal/config.h> + +#include <memory> + #include <xmloff/dllapi.h> #include <sal/types.h> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -41,16 +44,14 @@ class XMLOFF_DLLPUBLIC SvUnoAttributeContainer: css::container::XNameContainer > { private: - SvXMLAttrContainerData* mpContainer; + std::unique_ptr<SvXMLAttrContainerData> mpContainer; SAL_DLLPRIVATE sal_uInt16 getIndexByName(const OUString& aName ) const; public: - SvUnoAttributeContainer( SvXMLAttrContainerData* pContainer = nullptr ); - virtual ~SvUnoAttributeContainer(); - - SvXMLAttrContainerData* GetContainerImpl() const { return mpContainer; } + SvUnoAttributeContainer( std::unique_ptr<SvXMLAttrContainerData> pContainer = nullptr ); + SvXMLAttrContainerData* GetContainerImpl() const { return mpContainer.get(); } static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override; |