summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-09-08 14:59:12 +0200
committerDavid Tardon <dtardon@redhat.com>2016-09-09 07:30:30 +0200
commitc6a65137436c87a6e9f85d46193c42ba35698446 (patch)
treeda103016e1f211ae8abbdae1ea74ee47939fee13 /xmloff/source
parent516992ec6e8d67552610928b91d7b0d9f7014600 (diff)
use std::unique_ptr
Change-Id: I352e542de656d22963eb872f79b40e20008d0a32
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/text/XMLTextColumnsContext.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index 475f9c916ce7..95440b0bd8bc 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <o3tl/make_unique.hxx>
#include <sax/tools/converter.hxx>
#include <xmloff/xmltkmap.hxx>
#include <xmloff/xmluconv.hxx>
@@ -275,7 +276,6 @@ XMLTextColumnsContext::XMLTextColumnsContext(
, sSeparatorLineVerticalAlignment("SeparatorLineVerticalAlignment")
, sAutomaticDistance("AutomaticDistance")
, sSeparatorLineStyle("SeparatorLineStyle")
-, pColumns( nullptr )
, pColumnAttrTokenMap( new SvXMLTokenMap(aColAttrTokenMap) )
, pColumnSepAttrTokenMap( new SvXMLTokenMap(aColSepAttrTokenMap) )
, nCount( 0 )
@@ -308,13 +308,6 @@ XMLTextColumnsContext::XMLTextColumnsContext(
}
}
-XMLTextColumnsContext::~XMLTextColumnsContext()
-{
- delete pColumns;
- delete pColumnAttrTokenMap;
- delete pColumnSepAttrTokenMap;
-}
-
SvXMLImportContext *XMLTextColumnsContext::CreateChildContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
@@ -331,7 +324,7 @@ SvXMLImportContext *XMLTextColumnsContext::CreateChildContext(
// add new tabstop to array of tabstops
if( !pColumns )
- pColumns = new XMLTextColumnsArray_Impl;
+ pColumns = o3tl::make_unique<XMLTextColumnsArray_Impl>();
pColumns->push_back( xColumn );