include/oox/drawingml/drawingmltypes.hxx | 1 + oox/source/drawingml/diagram/diagram.hxx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit 76e11015a877da0eee21bb97b84a0f17bce41760 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 23 09:57:59 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Feb 24 10:12:59 2022 +0100 tdf#147609 and ofz#44965 Indirect-leak Change-Id: I2fb89bf68d8df2da1b97942d70c386f62f61c64f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130413 Tested-by: Jenkins Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> 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;