diff options
author | David Tardon <dtardon@redhat.com> | 2016-09-09 10:25:31 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-09-09 12:14:04 +0200 |
commit | 109ea4752b734683483aef5154d8debca2d300a3 (patch) | |
tree | 452f493e0355a7d19aed0df29be59f8807d4f4db /xmloff/source/draw/animationimport.cxx | |
parent | b42af6cee1d2c8a2bdb37d1a6e7e53704b839ee2 (diff) |
use std::shared_ptr
Change-Id: Ib285d2445077a0263a09b36bf1a6fa1fe7f59496
Diffstat (limited to 'xmloff/source/draw/animationimport.cxx')
-rw-r--r-- | xmloff/source/draw/animationimport.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index a9dd0f778a35..85e635f41a7d 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -625,16 +625,16 @@ AnimationNodeContext::AnimationNodeContext( const Reference< XAnimationNode >& xParentNode, SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, - AnimationsImportHelperImpl* pHelper /* = NULL */ ) + std::shared_ptr<AnimationsImportHelperImpl> pHelper ) : SvXMLImportContext(rImport, nPrfx, rLocalName), mpHelper( pHelper ), - mbRootContext( pHelper == nullptr ) + mbRootContext( !pHelper ) { try { if( mbRootContext ) { - mpHelper = new AnimationsImportHelperImpl( rImport ); + mpHelper = std::make_shared<AnimationsImportHelperImpl>( rImport ); mxNode = xParentNode; } else @@ -720,12 +720,6 @@ AnimationNodeContext::AnimationNodeContext( } } -AnimationNodeContext::~AnimationNodeContext() -{ - if( mbRootContext ) - delete mpHelper; -} - void AnimationNodeContext::StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& ) { // code of StartElement is moved to init_node that is now called |