diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-23 09:26:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-23 14:10:38 +0200 |
commit | 10c934147d469965dba6abc78efd02759a010b8e (patch) | |
tree | 54fe37d01913d48abf93bd087c59f95fdcfa5a46 /reportdesign/source | |
parent | a08401155a0b4b49878e8e50d39b2fd3e5278779 (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 'reportdesign/source')
-rw-r--r-- | reportdesign/source/ui/report/SectionView.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx index 1181581737cb..9a23632da48a 100644 --- a/reportdesign/source/ui/report/SectionView.cxx +++ b/reportdesign/source/ui/report/SectionView.cxx @@ -128,17 +128,16 @@ void OSectionView::MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin void OSectionView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { SdrView::Notify(rBC,rHint); - const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint); - if ( pSdrHint ) - { - const SdrObject* pObj = pSdrHint->GetObject(); - const SdrHintKind eKind = pSdrHint->GetKind(); - // check for change of selected object - if(SdrHintKind::ObjectChange == eKind && pObj && IsObjMarked(pObj)) - AdjustMarkHdl(); - else if ( eKind == SdrHintKind::ObjectRemoved ) - ObjectRemovedInAliveMode(pObj); - } + if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint) + return; + const SdrHint* pSdrHint = static_cast<const SdrHint*>(&rHint); + const SdrObject* pObj = pSdrHint->GetObject(); + const SdrHintKind eKind = pSdrHint->GetKind(); + // check for change of selected object + if(SdrHintKind::ObjectChange == eKind && pObj && IsObjMarked(pObj)) + AdjustMarkHdl(); + else if ( eKind == SdrHintKind::ObjectRemoved ) + ObjectRemovedInAliveMode(pObj); } |