summaryrefslogtreecommitdiff
path: root/svx/inc/sdr
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-01-06 14:40:41 +0100
committerLuboš Luňák <l.lunak@collabora.com>2022-01-11 15:23:29 +0100
commit4c3384dd6c4a92404d170f9011c569de045dfbf7 (patch)
tree9457b51aecbbe073462f45b54d5870a695850b8c /svx/inc/sdr
parent5b7a32ac6e39d2c5991ee2fbdcf7d40556747578 (diff)
do not call broadcast SetStyleSheet from a non-broadcast one
In the document from bsc#1183308, which contains a large number of custom shapes, I get a noticeable time spent in the callchain EnhancedCustomShapeEngine::render() -> SdrObject::NbcSetStyleSheet() -> sdr::properties::GroupProperties::SetStyleSheet() -> SdrObject::SetStyleSheet(), which means that a non-broadcast call ends up in a broadcast one, and the time is spent in SvxShape::Notify(). And it even seems that nobody actually cares about the broadcasts, possibly because the SfxStyleSheet* value is actually the same. I originally tried to make SdrObject::SetStyleSheet() return if the SfxStyleSheet* is the same, but that fails the test from 717dc8e3575a18e1e. I don't quite understand the reasoning for that, but solve it then by changing the code to call the Nbc variant if that's enough. Change-Id: I096a6799a0dc51c31ec3b0ba070c7f99ec96ac5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128048 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'svx/inc/sdr')
-rw-r--r--svx/inc/sdr/properties/attributeproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/captionproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/circleproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/connectorproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/customshapeproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/e3dsceneproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/emptyproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/graphicproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/groupproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/measureproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/pageproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/rectangleproperties.hxx3
-rw-r--r--svx/inc/sdr/properties/textproperties.hxx3
13 files changed, 26 insertions, 13 deletions
diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx
index f542f75e9fc2..72b864bb749a 100644
--- a/svx/inc/sdr/properties/attributeproperties.hxx
+++ b/svx/inc/sdr/properties/attributeproperties.hxx
@@ -72,7 +72,8 @@ namespace sdr::properties
virtual ~AttributeProperties() override;
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// get the installed StyleSheet
virtual SfxStyleSheet* GetStyleSheet() const override;
diff --git a/svx/inc/sdr/properties/captionproperties.hxx b/svx/inc/sdr/properties/captionproperties.hxx
index 54057fa3a102..b9c21bf42aa3 100644
--- a/svx/inc/sdr/properties/captionproperties.hxx
+++ b/svx/inc/sdr/properties/captionproperties.hxx
@@ -47,7 +47,8 @@ namespace sdr::properties
virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// force default attributes for a specific object type, called from
// DefaultProperties::GetObjectItemSet() if a new ItemSet is created
diff --git a/svx/inc/sdr/properties/circleproperties.hxx b/svx/inc/sdr/properties/circleproperties.hxx
index 273df7a334be..c21269c50aa5 100644
--- a/svx/inc/sdr/properties/circleproperties.hxx
+++ b/svx/inc/sdr/properties/circleproperties.hxx
@@ -47,7 +47,8 @@ namespace sdr::properties
virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// force default attributes for a specific object type, called from
// DefaultProperties::GetObjectItemSet() if a new ItemSet is created
diff --git a/svx/inc/sdr/properties/connectorproperties.hxx b/svx/inc/sdr/properties/connectorproperties.hxx
index cb69b64b7591..ba5379854594 100644
--- a/svx/inc/sdr/properties/connectorproperties.hxx
+++ b/svx/inc/sdr/properties/connectorproperties.hxx
@@ -47,7 +47,8 @@ namespace sdr::properties
virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
};
} // end of namespace sdr::properties
diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx b/svx/inc/sdr/properties/customshapeproperties.hxx
index f0af2d5d6599..9bfdb47ebdb7 100644
--- a/svx/inc/sdr/properties/customshapeproperties.hxx
+++ b/svx/inc/sdr/properties/customshapeproperties.hxx
@@ -56,7 +56,8 @@ namespace sdr::properties
public:
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// force default attributes for a specific object type, called from
// DefaultProperties::GetObjectItemSet() if a new ItemSet is created
diff --git a/svx/inc/sdr/properties/e3dsceneproperties.hxx b/svx/inc/sdr/properties/e3dsceneproperties.hxx
index e1192d022756..4606499bdffe 100644
--- a/svx/inc/sdr/properties/e3dsceneproperties.hxx
+++ b/svx/inc/sdr/properties/e3dsceneproperties.hxx
@@ -60,7 +60,8 @@ namespace sdr::properties
virtual void ClearMergedItem(const sal_uInt16 nWhich) override;
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// get the installed StyleSheet
virtual SfxStyleSheet* GetStyleSheet() const override;
diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx
index 89deec42f3bd..5c61176d9abd 100644
--- a/svx/inc/sdr/properties/emptyproperties.hxx
+++ b/svx/inc/sdr/properties/emptyproperties.hxx
@@ -62,7 +62,8 @@ namespace sdr::properties
virtual void SetObjectItemSet(const SfxItemSet& rSet) override;
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// get the installed StyleSheet
virtual SfxStyleSheet* GetStyleSheet() const override;
diff --git a/svx/inc/sdr/properties/graphicproperties.hxx b/svx/inc/sdr/properties/graphicproperties.hxx
index d8419a53ae6d..19f76e438ad7 100644
--- a/svx/inc/sdr/properties/graphicproperties.hxx
+++ b/svx/inc/sdr/properties/graphicproperties.hxx
@@ -50,7 +50,8 @@ namespace sdr::properties
virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// force default attributes for a specific object type, called from
// DefaultProperties::GetObjectItemSet() if a new ItemSet is created
diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx
index bfb2a8374129..cc658a89a8b0 100644
--- a/svx/inc/sdr/properties/groupproperties.hxx
+++ b/svx/inc/sdr/properties/groupproperties.hxx
@@ -79,7 +79,8 @@ namespace sdr::properties
virtual void SetObjectItemSet(const SfxItemSet& rSet) override;
// set a new StyleSheet
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// get the local StyleSheet
virtual SfxStyleSheet* GetStyleSheet() const override;
diff --git a/svx/inc/sdr/properties/measureproperties.hxx b/svx/inc/sdr/properties/measureproperties.hxx
index 0bc4f1daf5ed..7e861c6f45cf 100644
--- a/svx/inc/sdr/properties/measureproperties.hxx
+++ b/svx/inc/sdr/properties/measureproperties.hxx
@@ -47,7 +47,8 @@ namespace sdr::properties
virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// force default attributes for a specific object type, called from
// DefaultProperties::GetObjectItemSet() if a new ItemSet is created
diff --git a/svx/inc/sdr/properties/pageproperties.hxx b/svx/inc/sdr/properties/pageproperties.hxx
index 5473c692812d..d0f633a80e16 100644
--- a/svx/inc/sdr/properties/pageproperties.hxx
+++ b/svx/inc/sdr/properties/pageproperties.hxx
@@ -50,7 +50,8 @@ namespace sdr::properties
virtual SfxStyleSheet* GetStyleSheet() const override;
// set the installed StyleSheet
- virtual void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// clear single item
virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override;
diff --git a/svx/inc/sdr/properties/rectangleproperties.hxx b/svx/inc/sdr/properties/rectangleproperties.hxx
index 823c2a0f5f35..887550397b83 100644
--- a/svx/inc/sdr/properties/rectangleproperties.hxx
+++ b/svx/inc/sdr/properties/rectangleproperties.hxx
@@ -45,7 +45,8 @@ namespace sdr::properties
virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
};
} // end of namespace sdr::properties
diff --git a/svx/inc/sdr/properties/textproperties.hxx b/svx/inc/sdr/properties/textproperties.hxx
index 719cf838ed89..c5edb206a532 100644
--- a/svx/inc/sdr/properties/textproperties.hxx
+++ b/svx/inc/sdr/properties/textproperties.hxx
@@ -60,7 +60,8 @@ namespace sdr::properties
virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
- virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
+ virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
+ bool bBroadcast) override;
// force default attributes for a specific object type, called from
// DefaultProperties::GetObjectItemSet() if a new ItemSet is created