summaryrefslogtreecommitdiff
path: root/svx/source/accessibility/GraphCtlAccessibleContext.cxx
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 /svx/source/accessibility/GraphCtlAccessibleContext.cxx
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 'svx/source/accessibility/GraphCtlAccessibleContext.cxx')
-rw-r--r--svx/source/accessibility/GraphCtlAccessibleContext.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 7dad181c7d87..23584422480f 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -694,10 +694,9 @@ tools::Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox()
void SvxGraphCtrlAccessibleContext::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
- const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>( &rHint );
-
- if( pSdrHint )
+ if (rHint.GetId() == SfxHintId::ThisIsAnSdrHint)
{
+ const SdrHint* pSdrHint = static_cast<const SdrHint*>( &rHint );
switch( pSdrHint->GetKind() )
{
case SdrHintKind::ObjectChange: