diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-01-06 14:40:41 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-01-11 15:23:29 +0100 |
commit | 4c3384dd6c4a92404d170f9011c569de045dfbf7 (patch) | |
tree | 9457b51aecbbe073462f45b54d5870a695850b8c /svx/inc/sdr/properties/circleproperties.hxx | |
parent | 5b7a32ac6e39d2c5991ee2fbdcf7d40556747578 (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/properties/circleproperties.hxx')
-rw-r--r-- | svx/inc/sdr/properties/circleproperties.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
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 |