summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unoshape.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-25 14:23:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-25 15:45:44 +0200
commit4dd4b8c6535340eec1e94bca9d9635243cdf51d8 (patch)
treee8d9be7ca0d0366b85ab70dedd6dba5d4d2f8fde /svx/source/unodraw/unoshape.cxx
parentb6f0fd6a2f459ead2268e07bfd86db7e303b323f (diff)
regression in SvxShape::Notify
from commit 526f0fce45fb014b09057403ae37c125e5a18655 Author: Noel Grandin <noelgrandin@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.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/unodraw/unoshape.cxx')
-rw-r--r--svx/source/unodraw/unoshape.cxx11
1 files changed, 5 insertions, 6 deletions
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() );