summaryrefslogtreecommitdiff
path: root/svx/source/sdr/properties/oleproperties.cxx
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/source/sdr/properties/oleproperties.cxx
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/source/sdr/properties/oleproperties.cxx')
-rw-r--r--svx/source/sdr/properties/oleproperties.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/sdr/properties/oleproperties.cxx b/svx/source/sdr/properties/oleproperties.cxx
index 2cdb55b70dde..587ff1d3f880 100644
--- a/svx/source/sdr/properties/oleproperties.cxx
+++ b/svx/source/sdr/properties/oleproperties.cxx
@@ -32,7 +32,7 @@ namespace sdr::properties
if(pStyleSheet)
{
// do not delete hard attributes when setting dsefault Style
- SetStyleSheet(pStyleSheet, true);
+ SetStyleSheet(pStyleSheet, true, true);
}
else
{