[Libreoffice-commits] core.git: include/svx svx/inc svx/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 8 08:54:22 UTC 2021


 include/svx/sdr/properties/defaultproperties.hxx    |    2 -
 include/svx/sdr/properties/properties.hxx           |    5 ++
 svx/inc/sdr/properties/attributeproperties.hxx      |    2 -
 svx/inc/sdr/properties/captionproperties.hxx        |    2 -
 svx/inc/sdr/properties/circleproperties.hxx         |    2 -
 svx/inc/sdr/properties/connectorproperties.hxx      |    2 -
 svx/inc/sdr/properties/customshapeproperties.hxx    |    2 -
 svx/inc/sdr/properties/e3dproperties.hxx            |    2 -
 svx/inc/sdr/properties/emptyproperties.hxx          |    2 -
 svx/inc/sdr/properties/graphicproperties.hxx        |    2 -
 svx/inc/sdr/properties/groupproperties.hxx          |    2 -
 svx/inc/sdr/properties/measureproperties.hxx        |    2 -
 svx/inc/sdr/properties/rectangleproperties.hxx      |    2 -
 svx/inc/sdr/properties/textproperties.hxx           |    3 +
 svx/source/sdr/properties/attributeproperties.cxx   |    2 -
 svx/source/sdr/properties/captionproperties.cxx     |    4 +-
 svx/source/sdr/properties/circleproperties.cxx      |    4 +-
 svx/source/sdr/properties/connectorproperties.cxx   |    4 +-
 svx/source/sdr/properties/customshapeproperties.cxx |    6 +--
 svx/source/sdr/properties/defaultproperties.cxx     |   34 ++++++++++++++------
 svx/source/sdr/properties/e3dproperties.cxx         |    4 +-
 svx/source/sdr/properties/emptyproperties.cxx       |    2 -
 svx/source/sdr/properties/graphicproperties.cxx     |    4 +-
 svx/source/sdr/properties/groupproperties.cxx       |    2 -
 svx/source/sdr/properties/measureproperties.cxx     |    4 +-
 svx/source/sdr/properties/rectangleproperties.cxx   |    4 +-
 svx/source/sdr/properties/textproperties.cxx        |   10 ++---
 svx/source/table/cell.cxx                           |   10 ++---
 28 files changed, 73 insertions(+), 53 deletions(-)

New commits:
commit 18d6373d3ae767d3f06d53acd3b1f88f008c4bf4
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Sep 8 09:37:45 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Sep 8 10:53:46 2021 +0200

    reduce cost of creating large charts (tdf#144052)
    
    creating a temporary SfxItemSet for each geometry object adds up fast,
    so only create the temporary for those SdrTextObj subclasses that need
    it.
    
    Change-Id: I0c03a630057718f09c12a4a2d07ad23fca46fd2d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121800
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx
index e901278d3b3e..b7e5d706aff1 100644
--- a/include/svx/sdr/properties/defaultproperties.hxx
+++ b/include/svx/sdr/properties/defaultproperties.hxx
@@ -52,7 +52,7 @@ namespace sdr::properties
             virtual void PostItemChange(const sal_uInt16 nWhich) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
             // check if SfxItemSet exists
             bool HasSfxItemSet() const { return bool(mxItemSet); }
diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx
index 600522981dc0..f27aa5d39d3e 100644
--- a/include/svx/sdr/properties/properties.hxx
+++ b/include/svx/sdr/properties/properties.hxx
@@ -104,7 +104,10 @@ namespace sdr::properties
             virtual void PostItemChange(const sal_uInt16 nWhich) = 0;
 
             // Internally react on ItemSet changes. The given ItemSet contains all changed items, the new ones.
-            virtual void ItemSetChanged(const SfxItemSet& rSet) = 0;
+            virtual void ItemSetChanged(const SfxItemSet*) = 0;
+            // Subclasses need to return true if they want the ItemSetChanged() callback to actually have a non-zero pointer.
+            // We do this because creating the temporary item set is expensive and seldom used.
+            virtual bool WantItemSetInItemSetChanged() const { return false; }
 
         public:
             // basic constructor, used from SdrObject.
diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx
index 9633257c5a63..1aa45721436c 100644
--- a/svx/inc/sdr/properties/attributeproperties.hxx
+++ b/svx/inc/sdr/properties/attributeproperties.hxx
@@ -49,7 +49,7 @@ namespace sdr::properties
             virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
         public:
             // basic constructor
diff --git a/svx/inc/sdr/properties/captionproperties.hxx b/svx/inc/sdr/properties/captionproperties.hxx
index c6f71529e181..54057fa3a102 100644
--- a/svx/inc/sdr/properties/captionproperties.hxx
+++ b/svx/inc/sdr/properties/captionproperties.hxx
@@ -31,7 +31,7 @@ namespace sdr::properties
             virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
         public:
             // basic constructor
diff --git a/svx/inc/sdr/properties/circleproperties.hxx b/svx/inc/sdr/properties/circleproperties.hxx
index 2227817d1b49..273df7a334be 100644
--- a/svx/inc/sdr/properties/circleproperties.hxx
+++ b/svx/inc/sdr/properties/circleproperties.hxx
@@ -31,7 +31,7 @@ namespace sdr::properties
             virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
         public:
             // basic constructor
diff --git a/svx/inc/sdr/properties/connectorproperties.hxx b/svx/inc/sdr/properties/connectorproperties.hxx
index 8d6e14ffb64b..cb69b64b7591 100644
--- a/svx/inc/sdr/properties/connectorproperties.hxx
+++ b/svx/inc/sdr/properties/connectorproperties.hxx
@@ -31,7 +31,7 @@ namespace sdr::properties
             virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
         public:
             // basic constructor
diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx b/svx/inc/sdr/properties/customshapeproperties.hxx
index 8fa29e117bd7..f0af2d5d6599 100644
--- a/svx/inc/sdr/properties/customshapeproperties.hxx
+++ b/svx/inc/sdr/properties/customshapeproperties.hxx
@@ -37,7 +37,7 @@ namespace sdr::properties
             virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
             // react on Item change
             virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override;
diff --git a/svx/inc/sdr/properties/e3dproperties.hxx b/svx/inc/sdr/properties/e3dproperties.hxx
index cce69e8f9eb1..533751660fb7 100644
--- a/svx/inc/sdr/properties/e3dproperties.hxx
+++ b/svx/inc/sdr/properties/e3dproperties.hxx
@@ -32,7 +32,7 @@ namespace sdr::properties
             virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
         public:
             // basic constructor
diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx
index 250c23deac0e..af3b393456eb 100644
--- a/svx/inc/sdr/properties/emptyproperties.hxx
+++ b/svx/inc/sdr/properties/emptyproperties.hxx
@@ -49,7 +49,7 @@ namespace sdr::properties
             virtual void PostItemChange(const sal_uInt16 nWhich) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
         public:
             // basic constructor
diff --git a/svx/inc/sdr/properties/graphicproperties.hxx b/svx/inc/sdr/properties/graphicproperties.hxx
index 3a424f7e921d..d8419a53ae6d 100644
--- a/svx/inc/sdr/properties/graphicproperties.hxx
+++ b/svx/inc/sdr/properties/graphicproperties.hxx
@@ -34,7 +34,7 @@ namespace sdr::properties
             virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
         public:
             // basic constructor
diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx
index 32fe503d1dd2..1496a24c3eab 100644
--- a/svx/inc/sdr/properties/groupproperties.hxx
+++ b/svx/inc/sdr/properties/groupproperties.hxx
@@ -40,7 +40,7 @@ namespace sdr::properties
             virtual void PostItemChange(const sal_uInt16 nWhich) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
         public:
             // basic constructor
diff --git a/svx/inc/sdr/properties/measureproperties.hxx b/svx/inc/sdr/properties/measureproperties.hxx
index 77cb253be45a..0bc4f1daf5ed 100644
--- a/svx/inc/sdr/properties/measureproperties.hxx
+++ b/svx/inc/sdr/properties/measureproperties.hxx
@@ -31,7 +31,7 @@ namespace sdr::properties
             virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
         public:
             // basic constructor
diff --git a/svx/inc/sdr/properties/rectangleproperties.hxx b/svx/inc/sdr/properties/rectangleproperties.hxx
index 1af85d786d9b..823c2a0f5f35 100644
--- a/svx/inc/sdr/properties/rectangleproperties.hxx
+++ b/svx/inc/sdr/properties/rectangleproperties.hxx
@@ -29,7 +29,7 @@ namespace sdr::properties
         {
         protected:
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
 
         public:
             // basic constructor
diff --git a/svx/inc/sdr/properties/textproperties.hxx b/svx/inc/sdr/properties/textproperties.hxx
index ea587a8996fb..4a6d59f61972 100644
--- a/svx/inc/sdr/properties/textproperties.hxx
+++ b/svx/inc/sdr/properties/textproperties.hxx
@@ -40,7 +40,8 @@ namespace sdr::properties
             virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override;
 
             // react on ItemSet changes
-            virtual void ItemSetChanged(const SfxItemSet& rSet) override;
+            virtual void ItemSetChanged(const SfxItemSet*) override;
+            virtual bool WantItemSetInItemSetChanged() const override final { return true; }
 
             /// Get the TextProvider related to our SdrObject
             virtual const svx::ITextProvider& getTextProvider() const;
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index f24a4b03ab40..b4624937be09 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -276,7 +276,7 @@ namespace sdr::properties
             return *mxItemSet;
         }
 
-        void AttributeProperties::ItemSetChanged(const SfxItemSet& /*rSet*/)
+        void AttributeProperties::ItemSetChanged(const SfxItemSet* /*pSet*/)
         {
             // own modifications
             SdrObject& rObj = GetSdrObject();
diff --git a/svx/source/sdr/properties/captionproperties.cxx b/svx/source/sdr/properties/captionproperties.cxx
index 8a579a0509e7..ab9b352511e7 100644
--- a/svx/source/sdr/properties/captionproperties.cxx
+++ b/svx/source/sdr/properties/captionproperties.cxx
@@ -62,7 +62,7 @@ namespace sdr::properties
             return std::unique_ptr<BaseProperties>(new CaptionProperties(*this, rObj));
         }
 
-        void CaptionProperties::ItemSetChanged(const SfxItemSet& rSet)
+        void CaptionProperties::ItemSetChanged(const SfxItemSet* pSet)
         {
             SdrCaptionObj& rObj = static_cast<SdrCaptionObj&>(GetSdrObject());
 
@@ -70,7 +70,7 @@ namespace sdr::properties
             rObj.ImpRecalcTail();
 
             // call parent
-            RectangleProperties::ItemSetChanged(rSet);
+            RectangleProperties::ItemSetChanged(pSet);
         }
 
         void CaptionProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr)
diff --git a/svx/source/sdr/properties/circleproperties.cxx b/svx/source/sdr/properties/circleproperties.cxx
index 058a45e5249d..2d631d04387e 100644
--- a/svx/source/sdr/properties/circleproperties.cxx
+++ b/svx/source/sdr/properties/circleproperties.cxx
@@ -66,12 +66,12 @@ namespace sdr::properties
             return std::unique_ptr<BaseProperties>(new CircleProperties(*this, rObj));
         }
 
-        void CircleProperties::ItemSetChanged(const SfxItemSet& rSet)
+        void CircleProperties::ItemSetChanged(const SfxItemSet* pSet)
         {
             SdrCircObj& rObj = static_cast<SdrCircObj&>(GetSdrObject());
 
             // call parent
-            RectangleProperties::ItemSetChanged(rSet);
+            RectangleProperties::ItemSetChanged(pSet);
 
             // local changes
             rObj.ImpSetAttrToCircInfo();
diff --git a/svx/source/sdr/properties/connectorproperties.cxx b/svx/source/sdr/properties/connectorproperties.cxx
index 7da10e21f213..c8ef78308202 100644
--- a/svx/source/sdr/properties/connectorproperties.cxx
+++ b/svx/source/sdr/properties/connectorproperties.cxx
@@ -63,12 +63,12 @@ namespace sdr::properties
             return std::unique_ptr<BaseProperties>(new ConnectorProperties(*this, rObj));
         }
 
-        void ConnectorProperties::ItemSetChanged(const SfxItemSet& rSet)
+        void ConnectorProperties::ItemSetChanged(const SfxItemSet* pSet)
         {
             SdrEdgeObj& rObj = static_cast<SdrEdgeObj&>(GetSdrObject());
 
             // call parent
-            TextProperties::ItemSetChanged(rSet);
+            TextProperties::ItemSetChanged(pSet);
 
             // local changes
             rObj.ImpSetAttrToEdgeInfo();
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx
index 8b6466cfa995..96db5de9f90a 100644
--- a/svx/source/sdr/properties/customshapeproperties.cxx
+++ b/svx/source/sdr/properties/customshapeproperties.cxx
@@ -102,7 +102,7 @@ namespace sdr::properties
                     nWhich2 = aIter.NextWhich();
                 }
                 SfxItemSet aSet(GetSdrObject().GetObjectItemPool());
-                ItemSetChanged(aSet);
+                ItemSetChanged(&aSet);
             }
             else
                 TextProperties::ClearObjectItem( nWhich );
@@ -124,10 +124,10 @@ namespace sdr::properties
                 TextProperties::ClearObjectItemDirect( nWhich );
         }
 
-        void CustomShapeProperties::ItemSetChanged(const SfxItemSet& rSet)
+        void CustomShapeProperties::ItemSetChanged(const SfxItemSet* pSet)
         {
             // call parent
-            TextProperties::ItemSetChanged(rSet);
+            TextProperties::ItemSetChanged(pSet);
 
             // update bTextFrame and RenderGeometry
             UpdateTextFrameStatus(true);
diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx
index 186bebab6d7e..cd6a00a0981c 100644
--- a/svx/source/sdr/properties/defaultproperties.cxx
+++ b/svx/source/sdr/properties/defaultproperties.cxx
@@ -115,9 +115,14 @@ namespace sdr::properties
                 ItemChange(nWhichID, &rItem);
                 PostItemChange(nWhichID);
 
-                SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), nWhichID, nWhichID);
-                aSet.Put(rItem);
-                ItemSetChanged(aSet);
+                if (WantItemSetInItemSetChanged())
+                {
+                    SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), nWhichID, nWhichID);
+                    aSet.Put(rItem);
+                    ItemSetChanged(&aSet);
+                }
+                else
+                    ItemSetChanged(nullptr);
             }
         }
 
@@ -140,8 +145,13 @@ namespace sdr::properties
 
                 if(nWhich)
                 {
-                    SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), nWhich, nWhich);
-                    ItemSetChanged(aSet);
+                    if (WantItemSetInItemSetChanged())
+                    {
+                        SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), nWhich, nWhich);
+                        ItemSetChanged(&aSet);
+                    }
+                    else
+                        ItemSetChanged(nullptr);
                 }
             }
         }
@@ -176,7 +186,9 @@ namespace sdr::properties
             const SfxPoolItem *pPoolItem;
             std::vector< sal_uInt16 > aPostItemChangeList;
             bool bDidChange(false);
-            SfxItemSet aSet(GetSdrObject().GetObjectItemPool(), svl::Items<SDRATTR_START, EE_ITEMS_END>);
+            std::optional<SfxItemSet> aSet;
+            if (WantItemSetInItemSetChanged())
+                aSet.emplace(GetSdrObject().GetObjectItemPool(), svl::Items<SDRATTR_START, EE_ITEMS_END>);
 
             // give a hint to STL_Vector
             aPostItemChangeList.reserve(rSet.Count());
@@ -190,7 +202,8 @@ namespace sdr::properties
                         bDidChange = true;
                         ItemChange(nWhich, pPoolItem);
                         aPostItemChangeList.push_back( nWhich );
-                        aSet.Put(*pPoolItem);
+                        if (aSet)
+                            aSet->Put(*pPoolItem);
                     }
                 }
 
@@ -204,11 +217,14 @@ namespace sdr::properties
                     PostItemChange(rItem);
                 }
 
-                ItemSetChanged(aSet);
+                if (aSet)
+                    ItemSetChanged(&*aSet);
+                else
+                    ItemSetChanged(nullptr);
             }
         }
 
-        void DefaultProperties::ItemSetChanged(const SfxItemSet& /*rSet*/)
+        void DefaultProperties::ItemSetChanged(const SfxItemSet* /*pSet*/)
         {
         }
 
diff --git a/svx/source/sdr/properties/e3dproperties.cxx b/svx/source/sdr/properties/e3dproperties.cxx
index 9d291ddd3c1d..bb99c2dccc05 100644
--- a/svx/source/sdr/properties/e3dproperties.cxx
+++ b/svx/source/sdr/properties/e3dproperties.cxx
@@ -60,12 +60,12 @@ namespace sdr::properties
             return std::unique_ptr<BaseProperties>(new E3dProperties(*this, rObj));
         }
 
-        void E3dProperties::ItemSetChanged(const SfxItemSet& rSet)
+        void E3dProperties::ItemSetChanged(const SfxItemSet* pSet)
         {
             E3dObject& rObj = static_cast<E3dObject&>(GetSdrObject());
 
             // call parent
-            AttributeProperties::ItemSetChanged(rSet);
+            AttributeProperties::ItemSetChanged(pSet);
 
             // local changes
             rObj.StructureChanged();
diff --git a/svx/source/sdr/properties/emptyproperties.cxx b/svx/source/sdr/properties/emptyproperties.cxx
index 3837b23bfeec..ac30ef4d89d2 100644
--- a/svx/source/sdr/properties/emptyproperties.cxx
+++ b/svx/source/sdr/properties/emptyproperties.cxx
@@ -82,7 +82,7 @@ namespace sdr::properties
             assert(!"EmptyProperties::SetObjectItemSet() should never be called");
         }
 
-        void EmptyProperties::ItemSetChanged(const SfxItemSet& /*rSet*/)
+        void EmptyProperties::ItemSetChanged(const SfxItemSet* /*pSet*/)
         {
             assert(!"EmptyProperties::ItemSetChanged() should never be called");
         }
diff --git a/svx/source/sdr/properties/graphicproperties.cxx b/svx/source/sdr/properties/graphicproperties.cxx
index dd59a41a1be7..b2be8a9865c9 100644
--- a/svx/source/sdr/properties/graphicproperties.cxx
+++ b/svx/source/sdr/properties/graphicproperties.cxx
@@ -93,7 +93,7 @@ namespace sdr::properties
             return std::unique_ptr<BaseProperties>(new GraphicProperties(*this, rObj));
         }
 
-        void GraphicProperties::ItemSetChanged(const SfxItemSet& rSet)
+        void GraphicProperties::ItemSetChanged(const SfxItemSet* pSet)
         {
             SdrGrafObj& rObj = static_cast<SdrGrafObj&>(GetSdrObject());
 
@@ -109,7 +109,7 @@ namespace sdr::properties
             rObj.ImpSetAttrToGrafInfo();
 
             // call parent
-            RectangleProperties::ItemSetChanged(rSet);
+            RectangleProperties::ItemSetChanged(pSet);
         }
 
         void GraphicProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr)
diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx
index 5f197c417688..dd66e8891d9c 100644
--- a/svx/source/sdr/properties/groupproperties.cxx
+++ b/svx/source/sdr/properties/groupproperties.cxx
@@ -193,7 +193,7 @@ namespace sdr::properties
             assert(!"GroupProperties::SetObjectItemSet() should never be called");
         }
 
-        void GroupProperties::ItemSetChanged(const SfxItemSet& /*rSet*/)
+        void GroupProperties::ItemSetChanged(const SfxItemSet* /*pSet*/)
         {
             assert(!"GroupProperties::ItemSetChanged() should never be called");
         }
diff --git a/svx/source/sdr/properties/measureproperties.cxx b/svx/source/sdr/properties/measureproperties.cxx
index 08e2009af0ae..64e4fe5d8b3a 100644
--- a/svx/source/sdr/properties/measureproperties.cxx
+++ b/svx/source/sdr/properties/measureproperties.cxx
@@ -72,12 +72,12 @@ namespace sdr::properties
             return std::unique_ptr<BaseProperties>(new MeasureProperties(*this, rObj));
         }
 
-        void MeasureProperties::ItemSetChanged(const SfxItemSet& rSet)
+        void MeasureProperties::ItemSetChanged(const SfxItemSet* pSet)
         {
             SdrMeasureObj& rObj = static_cast<SdrMeasureObj&>(GetSdrObject());
 
             // call parent
-            TextProperties::ItemSetChanged(rSet);
+            TextProperties::ItemSetChanged(pSet);
 
             // local changes
             rObj.SetTextDirty();
diff --git a/svx/source/sdr/properties/rectangleproperties.cxx b/svx/source/sdr/properties/rectangleproperties.cxx
index 84b4fc17e23e..894df2a2cc93 100644
--- a/svx/source/sdr/properties/rectangleproperties.cxx
+++ b/svx/source/sdr/properties/rectangleproperties.cxx
@@ -42,12 +42,12 @@ namespace sdr::properties
             return std::unique_ptr<BaseProperties>(new RectangleProperties(*this, rObj));
         }
 
-        void RectangleProperties::ItemSetChanged(const SfxItemSet& rSet)
+        void RectangleProperties::ItemSetChanged(const SfxItemSet* pSet)
         {
             SdrRectObj& rObj = static_cast<SdrRectObj&>(GetSdrObject());
 
             // call parent
-            TextProperties::ItemSetChanged(rSet);
+            TextProperties::ItemSetChanged(pSet);
 
             // local changes
             rObj.SetXPolyDirty();
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index 2ada7eb32198..77ed512a57bf 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -81,7 +81,7 @@ namespace sdr::properties
             return std::unique_ptr<BaseProperties>(new TextProperties(*this, rObj));
         }
 
-        void TextProperties::ItemSetChanged(const SfxItemSet& rSet)
+        void TextProperties::ItemSetChanged(const SfxItemSet* pSet)
         {
             SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
 
@@ -121,7 +121,7 @@ namespace sdr::properties
                     for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
                     {
                         SfxItemSet aSet(pOutliner->GetParaAttribs(nPara));
-                        aSet.Put(rSet);
+                        aSet.Put(*pSet);
                         pOutliner->SetParaAttribs(nPara, aSet);
                     }
 
@@ -145,7 +145,7 @@ namespace sdr::properties
             }
 
             // Extra-Repaint for radical layout changes (#43139#)
-            if(SfxItemState::SET == rSet.GetItemState(SDRATTR_TEXT_CONTOURFRAME))
+            if(SfxItemState::SET == pSet->GetItemState(SDRATTR_TEXT_CONTOURFRAME))
             {
                 // Here only repaint wanted
                 rObj.ActionChanged();
@@ -153,7 +153,7 @@ namespace sdr::properties
             }
 
             // call parent
-            AttributeProperties::ItemSetChanged(rSet);
+            AttributeProperties::ItemSetChanged(pSet);
         }
 
         void TextProperties::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
@@ -394,7 +394,7 @@ namespace sdr::properties
             // #i61284# push hard ObjectItemSet to OutlinerParaObject attributes
             // using existing functionality
             GetObjectItemSet(); // force ItemSet
-            ItemSetChanged(*mxItemSet);
+            ItemSetChanged(&*mxItemSet);
 
             // now the standard TextProperties stuff
             SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 1b1d74a52516..427977d591e6 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -166,7 +166,7 @@ namespace sdr::properties
 
             void ForceDefaultAttributes() override;
 
-            void ItemSetChanged(const SfxItemSet& rSet) override;
+            void ItemSetChanged(const SfxItemSet*) override;
 
             void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override;
 
@@ -222,7 +222,7 @@ namespace sdr::properties
         {
         }
 
-        void CellProperties::ItemSetChanged(const SfxItemSet& rSet )
+        void CellProperties::ItemSetChanged(const SfxItemSet* pSet )
         {
             SdrTextObj& rObj = static_cast<SdrTextObj&>(GetSdrObject());
 
@@ -253,12 +253,12 @@ namespace sdr::properties
                     // if the user sets character attributes to the complete
                     // cell we want to remove all hard set character attributes
                     // with same which ids from the text
-                    std::vector<sal_uInt16> aCharWhichIds(GetAllCharPropIds(rSet));
+                    std::vector<sal_uInt16> aCharWhichIds(GetAllCharPropIds(*pSet));
 
                     for(sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
                     {
                         SfxItemSet aSet(pOutliner->GetParaAttribs(nPara));
-                        aSet.Put(rSet);
+                        aSet.Put(*pSet);
 
                         for (const auto& rWhichId : aCharWhichIds)
                         {
@@ -288,7 +288,7 @@ namespace sdr::properties
             }
 
             // call parent
-            AttributeProperties::ItemSetChanged(rSet);
+            AttributeProperties::ItemSetChanged(pSet);
 
             if( mxCell.is() )
                 mxCell->notifyModified();


More information about the Libreoffice-commits mailing list