summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-27 02:46:19 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-27 06:26:06 +0100
commit7b627e465ce018b3a27346c541d77667a5130628 (patch)
tree9c90254213f9e64d81e7d15f82ab0700525610d7 /sd
parent9c77890a165a1a00441245fd6f8703d8911bc075 (diff)
coverity#704165: fix memory leak
Change-Id: Ia62ab987bc7f4f25e22385194ca2df8d6e74376f
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/undoanim.hxx7
-rw-r--r--sd/source/core/undoanim.cxx2
2 files changed, 4 insertions, 5 deletions
diff --git a/sd/inc/undoanim.hxx b/sd/inc/undoanim.hxx
index 0fb1784b15d4..3fe7855b17e3 100644
--- a/sd/inc/undoanim.hxx
+++ b/sd/inc/undoanim.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/animations/XAnimationNode.hpp>
#include <svx/svdundo.hxx>
+#include <boost/scoped_ptr.hpp>
#include "sdundo.hxx"
@@ -45,7 +46,7 @@ public:
virtual rtl::OUString GetComment() const;
private:
- UndoAnimationImpl* mpImpl;
+ boost::scoped_ptr<UndoAnimationImpl> mpImpl;
};
struct UndoAnimationPathImpl;
@@ -61,7 +62,7 @@ public:
virtual rtl::OUString GetComment() const;
private:
- UndoAnimationPathImpl* mpImpl;
+ boost::scoped_ptr<UndoAnimationPathImpl> mpImpl;
};
struct UndoTransitionImpl;
@@ -78,7 +79,7 @@ public:
virtual rtl::OUString GetComment() const;
private:
- UndoTransitionImpl* mpImpl;
+ boost::scoped_ptr<UndoTransitionImpl> mpImpl;
};
}
diff --git a/sd/source/core/undoanim.cxx b/sd/source/core/undoanim.cxx
index 49752d974535..27ca99fca39e 100644
--- a/sd/source/core/undoanim.cxx
+++ b/sd/source/core/undoanim.cxx
@@ -65,7 +65,6 @@ UndoAnimation::UndoAnimation( SdDrawDocument* pDoc, SdPage* pThePage )
UndoAnimation::~UndoAnimation()
{
- delete mpImpl;
}
void UndoAnimation::Undo()
@@ -233,7 +232,6 @@ UndoTransition::UndoTransition( SdDrawDocument* _pDoc, SdPage* pThePage )
UndoTransition::~UndoTransition()
{
- delete mpImpl;
}
void UndoTransition::Undo()