diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-04-19 17:07:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-19 21:48:06 +0200 |
commit | cd073a4a945a527cec3080523a0d7ec42bc49b26 (patch) | |
tree | 982b997ddc759a5c062ea5d87ed20cc17b1b09c6 /svx/inc | |
parent | 35dac3d5d51cf58c3f49e039b8a67b129055f267 (diff) |
svx properties: pass SfxItemSet around by value
so we avoid heap allocation costs when loading lots of shapes
Change-Id: I0de5819acc7f845973a284e68ab709989f27d402
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114297
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/inc')
-rw-r--r-- | svx/inc/sdr/properties/attributeproperties.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/properties/captionproperties.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/properties/circleproperties.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/properties/connectorproperties.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/properties/customshapeproperties.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/properties/e3dproperties.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/properties/emptyproperties.hxx | 6 | ||||
-rw-r--r-- | svx/inc/sdr/properties/graphicproperties.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/properties/groupproperties.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/properties/measureproperties.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/properties/pageproperties.hxx | 2 | ||||
-rw-r--r-- | svx/inc/sdr/properties/textproperties.hxx | 2 |
12 files changed, 14 insertions, 14 deletions
diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx index f425983d8fb4..9633257c5a63 100644 --- a/svx/inc/sdr/properties/attributeproperties.hxx +++ b/svx/inc/sdr/properties/attributeproperties.hxx @@ -43,7 +43,7 @@ namespace sdr::properties SfxStyleSheet* mpStyleSheet; // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& pPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) override; // Do the ItemChange, may do special handling virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; diff --git a/svx/inc/sdr/properties/captionproperties.hxx b/svx/inc/sdr/properties/captionproperties.hxx index 6a4a2d91b635..c6f71529e181 100644 --- a/svx/inc/sdr/properties/captionproperties.hxx +++ b/svx/inc/sdr/properties/captionproperties.hxx @@ -28,7 +28,7 @@ namespace sdr::properties class CaptionProperties final : public RectangleProperties { // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/circleproperties.hxx b/svx/inc/sdr/properties/circleproperties.hxx index fc06fe82a5f0..2227817d1b49 100644 --- a/svx/inc/sdr/properties/circleproperties.hxx +++ b/svx/inc/sdr/properties/circleproperties.hxx @@ -28,7 +28,7 @@ namespace sdr::properties class CircleProperties final : public RectangleProperties { // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/connectorproperties.hxx b/svx/inc/sdr/properties/connectorproperties.hxx index 5afce0b33b70..8d6e14ffb64b 100644 --- a/svx/inc/sdr/properties/connectorproperties.hxx +++ b/svx/inc/sdr/properties/connectorproperties.hxx @@ -28,7 +28,7 @@ namespace sdr::properties class ConnectorProperties final : public TextProperties { // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx b/svx/inc/sdr/properties/customshapeproperties.hxx index 1c7ced978997..8fa29e117bd7 100644 --- a/svx/inc/sdr/properties/customshapeproperties.hxx +++ b/svx/inc/sdr/properties/customshapeproperties.hxx @@ -31,7 +31,7 @@ namespace sdr::properties void UpdateTextFrameStatus(bool bInvalidateRenderGeometry); // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // test changeability for a single item virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; diff --git a/svx/inc/sdr/properties/e3dproperties.hxx b/svx/inc/sdr/properties/e3dproperties.hxx index 360a6f998427..cce69e8f9eb1 100644 --- a/svx/inc/sdr/properties/e3dproperties.hxx +++ b/svx/inc/sdr/properties/e3dproperties.hxx @@ -29,7 +29,7 @@ namespace sdr::properties { protected: // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx index f482d5f94481..250c23deac0e 100644 --- a/svx/inc/sdr/properties/emptyproperties.hxx +++ b/svx/inc/sdr/properties/emptyproperties.hxx @@ -22,7 +22,7 @@ #include <sal/config.h> -#include <memory> +#include <optional> #include <svx/sdr/properties/properties.hxx> #include <svl/itemset.hxx> @@ -34,10 +34,10 @@ namespace sdr::properties { protected: // the to be used ItemSet - std::unique_ptr<SfxItemSet> mpEmptyItemSet; + mutable std::optional<SfxItemSet> mxEmptyItemSet; // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // test changeability for a single item virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; diff --git a/svx/inc/sdr/properties/graphicproperties.hxx b/svx/inc/sdr/properties/graphicproperties.hxx index 8587a862a103..3a424f7e921d 100644 --- a/svx/inc/sdr/properties/graphicproperties.hxx +++ b/svx/inc/sdr/properties/graphicproperties.hxx @@ -31,7 +31,7 @@ namespace sdr::properties virtual void applyDefaultStyleSheetFromSdrModel() override; // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx index 2e05027c7192..32fe503d1dd2 100644 --- a/svx/inc/sdr/properties/groupproperties.hxx +++ b/svx/inc/sdr/properties/groupproperties.hxx @@ -28,7 +28,7 @@ namespace sdr::properties class GroupProperties final : public DefaultProperties { // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // test changeability for a single item virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; diff --git a/svx/inc/sdr/properties/measureproperties.hxx b/svx/inc/sdr/properties/measureproperties.hxx index 301661f5a119..77cb253be45a 100644 --- a/svx/inc/sdr/properties/measureproperties.hxx +++ b/svx/inc/sdr/properties/measureproperties.hxx @@ -28,7 +28,7 @@ namespace sdr::properties class MeasureProperties final : public TextProperties { // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/pageproperties.hxx b/svx/inc/sdr/properties/pageproperties.hxx index cc4d21a641e7..7bd5c213fbc4 100644 --- a/svx/inc/sdr/properties/pageproperties.hxx +++ b/svx/inc/sdr/properties/pageproperties.hxx @@ -28,7 +28,7 @@ namespace sdr::properties class PageProperties final : public EmptyProperties { // create a new object specific itemset with object specific ranges. - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& pPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) override; // Do the ItemChange, may do special handling virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; diff --git a/svx/inc/sdr/properties/textproperties.hxx b/svx/inc/sdr/properties/textproperties.hxx index 26cc52c96ba6..ea587a8996fb 100644 --- a/svx/inc/sdr/properties/textproperties.hxx +++ b/svx/inc/sdr/properties/textproperties.hxx @@ -34,7 +34,7 @@ namespace sdr::properties protected: // create a new itemset - virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // Do the ItemChange, may do special handling virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; |