summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-09-09 13:36:58 +0200
committerDavid Tardon <dtardon@redhat.com>2016-09-09 16:16:45 +0200
commit7469d7556919a4ebb54e71fbdf3be9c7f88afa13 (patch)
treecf79036a210d932bfdc507cbae0082a910f14c89
parentbbb017f95ec70c8d10dc6e1473f14eeda9ff6144 (diff)
use std::unique_ptr
Change-Id: I39475538ed838e4210e256d85c6dd46232f8dc50
-rw-r--r--include/xmloff/XMLTextListAutoStylePool.hxx3
-rw-r--r--xmloff/source/text/XMLTextListAutoStylePool.cxx1
2 files changed, 2 insertions, 2 deletions
diff --git a/include/xmloff/XMLTextListAutoStylePool.hxx b/include/xmloff/XMLTextListAutoStylePool.hxx
index cb0b90c0c0fc..3b6ba2906c13 100644
--- a/include/xmloff/XMLTextListAutoStylePool.hxx
+++ b/include/xmloff/XMLTextListAutoStylePool.hxx
@@ -25,6 +25,7 @@
#include <sal/types.h>
#include <rtl/ustring.hxx>
#include <com/sun/star/ucb/XAnyCompare.hpp>
+#include <memory>
#include <set>
namespace com { namespace sun { namespace star { namespace container {
@@ -42,7 +43,7 @@ class XMLOFF_DLLPUBLIC XMLTextListAutoStylePool
OUString sPrefix;
- XMLTextListAutoStylePool_Impl *pPool;
+ std::unique_ptr<XMLTextListAutoStylePool_Impl> pPool;
XMLTextListAutoStylePoolNames_Impl m_aNames;
sal_uInt32 nName;
diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx
index 10f5e6d17339..bbdf2f77faae 100644
--- a/xmloff/source/text/XMLTextListAutoStylePool.cxx
+++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx
@@ -157,7 +157,6 @@ XMLTextListAutoStylePool::~XMLTextListAutoStylePool()
{
// The XMLTextListAutoStylePoolEntry_Impl object in the pool need delete explicitly in dtor.
pPool->DeleteAndDestroyAll();
- delete pPool;
}
void XMLTextListAutoStylePool::RegisterName( const OUString& rName )