summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-23 09:26:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-23 14:10:38 +0200
commit10c934147d469965dba6abc78efd02759a010b8e (patch)
tree54fe37d01913d48abf93bd087c59f95fdcfa5a46 /chart2
parenta08401155a0b4b49878e8e50d39b2fd3e5278779 (diff)
tdf#113266 slow opening XLS with 45 MB drawing
Some hot-spots around dynamic_cast of SdrHint, so avoid that by creating special SfxHintId::ThisIsAnSdrHint The most common CPU hot-spot was in SvxShape::Notify, the other changes are just for consistency. Also remove some dead code in ScShapeChildren, the Notify method was doing nothing useful. Change-Id: I696db1fcafc09bb10bf23ac673de292746141491 Reviewed-on: https://gerrit.libreoffice.org/71108 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/main/ChartView.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 872406f9f16b..8b0548f909ee 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2610,9 +2610,9 @@ void ChartView::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
}
- const SdrHint* pSdrHint = dynamic_cast< const SdrHint* >(&rHint);
- if( !pSdrHint )
+ if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint)
return;
+ const SdrHint* pSdrHint = static_cast< const SdrHint* >(&rHint);
bool bShapeChanged = false;
switch( pSdrHint->GetKind() )