diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-05 15:05:41 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-05 15:41:49 +0200 |
commit | e340b88484905600d10ef553b4ee077278e5be0b (patch) | |
tree | f41290898aa77fd1eae7cb2c163349735dc57c22 /oox | |
parent | 03730253464f4cd18e6acb90ed981a691ba97e81 (diff) |
CID#1078784 and CID#1078785 fix memory leaks
Change-Id: I5a878bfb0a6947616b1d0bfaad2541bb46903676
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/shape/ShapeContextHandler.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 179c10acd4e3..3f601b328309 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -95,7 +95,7 @@ ShapeContextHandler::getGraphicShapeContext(::sal_Int32 Element ) { if (! mxGraphicShapeContext.is()) { - ContextHandler2Helper *rFragmentHandler + boost::shared_ptr<ContextHandler2Helper> pFragmentHandler (new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); ShapePtr pMasterShape; @@ -104,12 +104,12 @@ ShapeContextHandler::getGraphicShapeContext(::sal_Int32 Element ) case XML_graphic: mpShape.reset(new Shape("com.sun.star.drawing.GraphicObjectShape" )); mxGraphicShapeContext.set - (new GraphicalObjectFrameContext(*rFragmentHandler, pMasterShape, mpShape, true)); + (new GraphicalObjectFrameContext(*pFragmentHandler, pMasterShape, mpShape, true)); break; case XML_pic: mpShape.reset(new Shape("com.sun.star.drawing.GraphicObjectShape" )); mxGraphicShapeContext.set - (new GraphicShapeContext(*rFragmentHandler, pMasterShape, mpShape)); + (new GraphicShapeContext(*pFragmentHandler, pMasterShape, mpShape)); break; default: break; @@ -139,9 +139,9 @@ ShapeContextHandler::getDiagramShapeContext() { if (!mxDiagramShapeContext.is()) { - ContextHandler2Helper *rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); + boost::shared_ptr<ContextHandler2Helper> pFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); mpShape.reset(new Shape()); - mxDiagramShapeContext.set(new DiagramGraphicDataContext(*rFragmentHandler, mpShape)); + mxDiagramShapeContext.set(new DiagramGraphicDataContext(*pFragmentHandler, mpShape)); } return mxDiagramShapeContext; |