svx/source/unodraw/unoshape.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit 4dd4b8c6535340eec1e94bca9d9635243cdf51d8 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Aug 25 14:23:59 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Aug 25 15:45:44 2022 +0200 regression in SvxShape::Notify from commit 526f0fce45fb014b09057403ae37c125e5a18655 Author: Noel Grandin <noelgran...@gmail.com> Date: Fri Apr 9 12:05:16 2021 +0200 tdf#130326 speed up opening XLSX which resulted in things staying alive too long, affecting an upcoming patch of mine Change-Id: I52a0b35c9be55a554885a39d9e0710379304766b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 14762e1443a9..cb27ab065886 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -972,14 +972,13 @@ void SvxShape::Notify( SfxBroadcaster&, const SfxHint& rHint ) noexcept // do cheap checks first, this method is hot if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint) return; - const SdrHint* pSdrHint = static_cast<const SdrHint*>(&rHint); - if (pSdrHint->GetKind() != SdrHintKind::ModelCleared && - pSdrHint->GetKind() != SdrHintKind::ObjectChange) + SdrObject* pSdrObject(mpSdrObjectWeakReference.get()); + if( !pSdrObject ) return; - + const SdrHint* pSdrHint = static_cast<const SdrHint*>(&rHint); // #i55919# SdrHintKind::ObjectChange is only interesting if it's for this object - SdrObject* pSdrObject(GetSdrObject()); - if ( !pSdrObject || pSdrHint->GetObject() != pSdrObject ) + if ((pSdrHint->GetKind() != SdrHintKind::ModelCleared) && + (pSdrHint->GetKind() != SdrHintKind::ObjectChange || pSdrHint->GetObject() != pSdrObject )) return; uno::Reference< uno::XInterface > xSelf( pSdrObject->getWeakUnoShape() );