summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-19 20:46:52 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-31 18:47:30 +0100
commitf5fd26fda6e17ff5c4a59e544512b3970fdb8a3e (patch)
treee068b476150856aaef33280310fe1a35e0dcff93 /oox/source
parentb74233d410b1d25c7fab3bf360dc61bf1f2c769c (diff)
CID#1103719: fix memory leak
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 6cd8e82d8ace..6b992d986e86 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -27,6 +27,7 @@
#include "oox/vml/vmldrawingfragment.hxx"
#include "oox/vml/vmlshape.hxx"
#include "oox/drawingml/themefragmenthandler.hxx"
+#include <boost/scoped_ptr.hpp>
namespace oox { namespace shape {
@@ -103,10 +104,10 @@ uno::Reference<xml::sax::XFastContextHandler> ShapeContextHandler::getChartShape
{
case XML_chart:
{
- ContextHandler2Helper *rFragmentHandler
- (new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath));
+ boost::scoped_ptr<ContextHandler2Helper> pFragmentHandler(
+ new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath));
mpShape.reset(new Shape("com.sun.star.drawing.OLE2Shape" ));
- mxChartShapeContext.set(new ChartGraphicDataContext(*rFragmentHandler, mpShape, true));
+ mxChartShapeContext.set(new ChartGraphicDataContext(*pFragmentHandler, mpShape, true));
break;
}
default: