summaryrefslogtreecommitdiff
path: root/sw/source
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 /sw/source
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 'sw/source')
-rw-r--r--sw/source/core/access/accmap.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 24769f8bc837..6b49f1ca5c55 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -168,12 +168,13 @@ void SwDrawModellListener_Impl::Notify( SfxBroadcaster& /*rBC*/,
{
// do not broadcast notifications for writer fly frames, because there
// are no shapes that need to know about them.
- const SdrHint *pSdrHint = dynamic_cast<const SdrHint*>( &rHint );
- if ( !pSdrHint ||
- ( pSdrHint->GetObject() &&
+ if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint)
+ return;
+ const SdrHint *pSdrHint = static_cast<const SdrHint*>( &rHint );
+ if (pSdrHint->GetObject() &&
( dynamic_cast< const SwFlyDrawObj* >(pSdrHint->GetObject()) != nullptr ||
dynamic_cast< const SwVirtFlyDrawObj* >(pSdrHint->GetObject()) != nullptr ||
- typeid(SdrObject) == typeid(pSdrHint->GetObject()) ) ) )
+ typeid(SdrObject) == typeid(pSdrHint->GetObject()) ) )
{
return;
}