summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/oox/drawingml/drawingmltypes.hxx1
-rw-r--r--oox/source/drawingml/diagram/diagram.hxx4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/oox/drawingml/drawingmltypes.hxx b/include/oox/drawingml/drawingmltypes.hxx
index 7f7aab4ef7d1..5fe86d56439e 100644
--- a/include/oox/drawingml/drawingmltypes.hxx
+++ b/include/oox/drawingml/drawingmltypes.hxx
@@ -76,6 +76,7 @@ typedef std::shared_ptr< TextListStyle > TextListStylePtr;
class Shape;
typedef std::shared_ptr< Shape > ShapePtr;
+typedef std::weak_ptr< Shape > WeakShapePtr;
class Theme;
typedef std::shared_ptr< Theme > ThemePtr;
diff --git a/oox/source/drawingml/diagram/diagram.hxx b/oox/source/drawingml/diagram/diagram.hxx
index 6aad2705f264..f9f2b7d8a05a 100644
--- a/oox/source/drawingml/diagram/diagram.hxx
+++ b/oox/source/drawingml/diagram/diagram.hxx
@@ -149,10 +149,10 @@ public:
void addTo( const ShapePtr & pShape );
css::uno::Sequence<css::beans::PropertyValue> getDomsAsPropertyValues() const;
- const ShapePtr & getShape() const { return mpShape; }
+ ShapePtr getShape() const { return mpShape.lock(); }
private:
- ShapePtr mpShape;
+ WeakShapePtr mpShape;
DiagramDataPtr mpData;
DiagramLayoutPtr mpLayout;
DiagramQStyleMap maStyles;