svx/source/unodraw/unoshape.cxx |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 473ffb6532b507aba9d69d0b57319f752142b0d2
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Feb 10 20:52:11 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Feb 11 05:52:29 2022 +0100

    mrAntiImpl field in SvxShapeImpl is unnecessary
    
    Change-Id: I196c6cafaf0ccb6c2547ca56b0e7c48c9e0dd6ad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129798
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 66547561b020..3936af09616e 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -110,7 +110,6 @@ class GDIMetaFile;
 
 struct SvxShapeImpl
 {
-    SvxShape&       mrAntiImpl;
     std::optional<SfxItemSet> mxItemSet;
     SdrObjKind      mnObjId;
     SvxShapeMaster* mpMaster;
@@ -129,8 +128,7 @@ struct SvxShapeImpl
     svx::PropertyChangeNotifier       maPropertyNotifier;
 
     SvxShapeImpl( SvxShape& _rAntiImpl, ::osl::Mutex& _rMutex )
-        :mrAntiImpl( _rAntiImpl )
-        ,mnObjId( SdrObjKind::NONE )
+        :mnObjId( SdrObjKind::NONE )
         ,mpMaster( nullptr )
         ,mbHasSdrObjectOwnership( false )
         ,mbDisposing( false )
@@ -145,8 +143,8 @@ namespace {
 class ShapePositionProvider : public PropertyValueProvider
 {
 public:
-    explicit ShapePositionProvider( const SvxShapeImpl& _shapeImpl )
-        :PropertyValueProvider( _shapeImpl.mrAntiImpl, "Position" )
+    explicit ShapePositionProvider( SvxShape& _shape )
+        :PropertyValueProvider( _shape, "Position" )
     {
     }
 
@@ -161,8 +159,8 @@ protected:
 class ShapeSizeProvider : public PropertyValueProvider
 {
 public:
-    explicit ShapeSizeProvider( const SvxShapeImpl& _shapeImpl )
-        :PropertyValueProvider( _shapeImpl.mrAntiImpl, "Size" )
+    explicit ShapeSizeProvider( SvxShape& _shape )
+        :PropertyValueProvider( _shape, "Size" )
     {
     }
 
@@ -325,9 +323,9 @@ svx::PropertyChangeNotifier& 
SvxShape::getShapePropertyChangeNotifier()
 void SvxShape::impl_construct()
 {
     mpImpl->maPropertyNotifier.registerProvider( 
svx::ShapePropertyProviderId::Position,
-        std::make_unique<ShapePositionProvider>( *mpImpl ) );
+        std::make_unique<ShapePositionProvider>( *this ) );
     mpImpl->maPropertyNotifier.registerProvider( 
svx::ShapePropertyProviderId::Size,
-        std::make_unique<ShapeSizeProvider>( *mpImpl ) );
+        std::make_unique<ShapeSizeProvider>( *this ) );
 
     if ( HasSdrObject() )
     {

Reply via email to