diff options
author | David Tardon <dtardon@redhat.com> | 2016-09-08 14:34:42 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-09-09 07:30:30 +0200 |
commit | a66933a890a70f5ff2ac43ccc03c26540ef2ccb3 (patch) | |
tree | eeb47ddbfd93c2dbf616b425984003ebed53386c /xmloff | |
parent | 91c8bec906cd3c39b9da5629391b151d1bad9a03 (diff) |
use std::unique_ptr
Change-Id: I5128b3e950657f3fe6fc71a8de56c9dd87ac2324
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnumi.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 5feafabda5d5..b087fedf49f2 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/io/XOutputStream.hpp> #include <o3tl/any.hxx> +#include <o3tl/make_unique.hxx> #include <rtl/ustrbuf.hxx> #include <osl/diagnose.h> @@ -1026,7 +1027,6 @@ SvxXMLListStyleContext::SvxXMLListStyleContext( SvXMLImport& rImport, , sIsPhysical( "IsPhysical" ) , sNumberingRules( "NumberingRules" ) , sIsContinuousNumbering( "IsContinuousNumbering" ) -, pLevelStyles( nullptr ) , nLevels( 0 ) , bConsecutive( false ) , bOutline( bOutl ) @@ -1044,8 +1044,6 @@ SvxXMLListStyleContext::~SvxXMLListStyleContext() pStyle->ReleaseRef(); } } - - delete pLevelStyles; } @@ -1067,7 +1065,7 @@ SvXMLImportContext *SvxXMLListStyleContext::CreateChildContext( new SvxXMLListLevelStyleContext_Impl( GetImport(), nPrefix, rLocalName, xAttrList ); if( !pLevelStyles ) - pLevelStyles = new SvxXMLListStyle_Impl; + pLevelStyles = o3tl::make_unique<SvxXMLListStyle_Impl>(); pLevelStyles->push_back( pLevelStyle ); pLevelStyle->AddFirstRef(); |