diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-01-06 14:15:44 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-01-09 15:43:39 +0100 |
commit | 9ba45189c76373d0464cc06902270914888162a3 (patch) | |
tree | 6598e37b8127749b42b37e978f4f1b5518b1fa65 /include/svx | |
parent | 74a37dce322d56251edfa49e7b98a2195f8c8e45 (diff) |
make SdrCustomShapeGeometryItem sortable and fast (bsc#1183308)
The document contains a complex graphic consisting of many shapes,
and SfxItemPool tries to avoid duplicates by checking for equality.
And SdrCustomShapeGeometryItem contains a UNO sequence as data,
and comparing those is non-trivial. Make the item sortable, which
should make things faster, and use anyLess() for the ordering.
Additionally first check the size of the list of property names
the class keeps for an easy fast return.
Change-Id: I49220e589b6510c6f1f40d584301be83367fb5a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128047
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/sdasitm.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx index 620e805b5813..ebd022980e6e 100644 --- a/include/svx/sdasitm.hxx +++ b/include/svx/sdasitm.hxx @@ -62,6 +62,9 @@ private: SdrCustomShapeGeometryItem & operator =(SdrCustomShapeGeometryItem &&) = delete; // due to SfxPoolItem virtual bool operator==( const SfxPoolItem& ) const override; + virtual bool operator<( const SfxPoolItem& ) const override; + virtual bool IsSortable() const override { return true; } + virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper&) const override; |