diff options
-rw-r--r-- | xmloff/inc/animimp.hxx | 5 | ||||
-rw-r--r-- | xmloff/source/draw/animimp.cxx | 13 |
2 files changed, 7 insertions, 11 deletions
diff --git a/xmloff/inc/animimp.hxx b/xmloff/inc/animimp.hxx index 19b9bbed303a..0a07b3fe0e28 100644 --- a/xmloff/inc/animimp.hxx +++ b/xmloff/inc/animimp.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_XMLOFF_INC_ANIMIMP_HXX #define INCLUDED_XMLOFF_INC_ANIMIMP_HXX +#include <memory> + #include <xmloff/xmlictxt.hxx> #include <com/sun/star/drawing/XShapes.hpp> @@ -29,7 +31,7 @@ class AnimImpImpl; class XMLAnimationsContext : public SvXMLImportContext { - AnimImpImpl* mpImpl; + std::shared_ptr<AnimImpImpl> mpImpl; public: @@ -37,7 +39,6 @@ public: sal_uInt16 nPrfx, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList); - virtual ~XMLAnimationsContext(); virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 03781227a748..6ba0a22b9e44 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -361,7 +361,7 @@ enum XMLActionKind class XMLAnimationsEffectContext : public SvXMLImportContext { public: - AnimImpImpl* mpImpl; + std::shared_ptr<AnimImpImpl> mpImpl; XMLActionKind meKind; bool mbTextEffect; @@ -383,7 +383,7 @@ public: sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, - AnimImpImpl* pImpl); + const std::shared_ptr<AnimImpImpl>& pImpl); virtual ~XMLAnimationsEffectContext(); virtual void EndElement() override; @@ -439,7 +439,7 @@ XMLAnimationsSoundContext::~XMLAnimationsSoundContext() } -XMLAnimationsEffectContext::XMLAnimationsEffectContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, AnimImpImpl* pImpl ) +XMLAnimationsEffectContext::XMLAnimationsEffectContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, const std::shared_ptr<AnimImpImpl>& pImpl ) : SvXMLImportContext(rImport, nPrfx, rLocalName), mpImpl( pImpl ), meKind( XMLE_SHOW ), mbTextEffect( false ), @@ -638,13 +638,8 @@ void XMLAnimationsEffectContext::EndElement() XMLAnimationsContext::XMLAnimationsContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& ) : SvXMLImportContext(rImport, nPrfx, rLocalName) +, mpImpl(std::make_shared<AnimImpImpl>()) { - mpImpl = new AnimImpImpl(); -} - -XMLAnimationsContext::~XMLAnimationsContext() -{ - delete mpImpl; } SvXMLImportContext * XMLAnimationsContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, |