summaryrefslogtreecommitdiff
path: root/include/xmloff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-09-09 14:55:12 +0200
committerDavid Tardon <dtardon@redhat.com>2016-09-09 16:16:45 +0200
commit8e11d353665242fc90ef485ff8f67a44206b6393 (patch)
tree1da502d977387bc53eeb538fcb1579c7ca16cd30 /include/xmloff
parent8d458a24f79ed9ba321daa3db283eb22dbd7c27f (diff)
use std::unique_ptr
Change-Id: I8ba37267e8a7058ade54783ea0e117a8f8816c45
Diffstat (limited to 'include/xmloff')
-rw-r--r--include/xmloff/unoatrcn.hxx11
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;