summaryrefslogtreecommitdiff
path: root/include/svx/sdr
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-02-15 21:02:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-02-16 14:55:51 +0100
commitf04ae7a8b7be6205f6cbc645cb15e7a48f1df960 (patch)
tree6f63fefb45a31c5353801fec68c067d27623359a /include/svx/sdr
parent741ae431ed680ae66e9b242626eef0d8f274486a (diff)
speed up DefaultProperties::SetObjectItem when loading large chart
The cost of creating a SfxItemSet to pass around changed item information is surprisingly high, so avoid that and just pass the vector of changed items down (which we are already building anyway). Change-Id: Ifa48e3ce07fb6c92ad05a119ae95ce002af76199 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129976 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx/sdr')
-rw-r--r--include/svx/sdr/properties/defaultproperties.hxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx
index ef490ff8f84a..09999c0ad66b 100644
--- a/include/svx/sdr/properties/defaultproperties.hxx
+++ b/include/svx/sdr/properties/defaultproperties.hxx
@@ -27,6 +27,7 @@
#include <svx/sdr/properties/properties.hxx>
#include <svx/svxdllapi.h>
#include <svl/itemset.hxx>
+#include <o3tl/span.hxx>
struct _xmlTextWriter;
typedef struct _xmlTextWriter* xmlTextWriterPtr;
@@ -54,12 +55,9 @@ namespace sdr::properties
// specific item changes
virtual void PostItemChange(const sal_uInt16 nWhich);
- // Internally react on ItemSet changes. The given ItemSet contains all changed items, the new ones.
- virtual void ItemSetChanged(const SfxItemSet*);
-
- // 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; }
+ // Internally react on ItemSet changes. The given span contains changed items.
+ // If nDeletedWhich is not 0, it indicates a deleted item.
+ virtual void ItemSetChanged(o3tl::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich);
// check if SfxItemSet exists
bool HasSfxItemSet() const { return bool(mxItemSet); }