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/pageproperties.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/pageproperties.hxx')
-rw-r--r-- | svx/inc/sdr/properties/pageproperties.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
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; |