diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-28 15:26:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-28 21:14:12 +0200 |
commit | f701edb6f72e50fae5857a81081d3503e5363b8f (patch) | |
tree | cbdbd6dcaa45d397b79db40734002c4b4812d82e /sw/source/core/access/accmap.cxx | |
parent | 4ab38a26bf4a6d37da6c03f7fdb999d0cacf2e63 (diff) |
fix type checks of raw SdrObject's in writer
Which are no longer possible since SdrObject is abstract now.
I assume the original code was gunning for the kind of objects that
were being created before
commit 24a374ebc9da56cc6721e8feaa1e15ba850bf41d
tdf#154040 use a SdrObjKind::NewFrame for frame creation in writer
Instead of (ab)using SdrObjKind::NONE for the temporary, empty
Since that is only explanation that makes sense
Change-Id: I0c3a26cc303ab7d54193beacb285c69aaf98a63e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151170
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/access/accmap.cxx')
-rw-r--r-- | sw/source/core/access/accmap.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 6dc1feaa8dd5..f52542eda72a 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -197,10 +197,11 @@ void SwDrawModellListener_Impl::Notify( SfxBroadcaster& /*rBC*/, 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 || - isType<SdrObject>(pSdrHint->GetObject()) ) ) + const SdrObject* pObj = pSdrHint->GetObject(); + if (pObj && + ( dynamic_cast< const SwFlyDrawObj* >(pObj) || + dynamic_cast< const SwVirtFlyDrawObj* >(pObj) || + pObj->GetObjIdentifier() == SdrObjKind::NewFrame ) ) { return; } |