diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-08 09:37:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-08 10:53:46 +0200 |
commit | 18d6373d3ae767d3f06d53acd3b1f88f008c4bf4 (patch) | |
tree | 5f9684222a7e649e6913892721c52f271ccc2c96 /include/svx | |
parent | 9b73d3e8926d5f9b10464d19b539eef3eb088f50 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/sdr/properties/defaultproperties.hxx | 2 | ||||
-rw-r--r-- | include/svx/sdr/properties/properties.hxx | 5 |
2 files changed, 5 insertions, 2 deletions
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. |