summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl/unopback.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/unoidl/unopback.cxx')
-rw-r--r--sd/source/ui/unoidl/unopback.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index e60b495b2855..88c2c6fb5554 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -75,19 +75,17 @@ SdUnoPageBackground::~SdUnoPageBackground() throw()
void SdUnoPageBackground::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>( &rHint );
+ if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint)
+ return;
+ const SdrHint* pSdrHint = static_cast<const SdrHint*>( &rHint );
- if( pSdrHint )
+ // delete item set if document is dying because then the pool
+ // will also die
+ if( pSdrHint->GetKind() == SdrHintKind::ModelCleared )
{
- // delete item set if document is dying because then the pool
- // will also die
- if( pSdrHint->GetKind() == SdrHintKind::ModelCleared )
- {
- mpSet.reset();
- mpDoc = nullptr;
- }
+ mpSet.reset();
+ mpDoc = nullptr;
}
-
}
void SdUnoPageBackground::fillItemSet( SdDrawDocument* pDoc, SfxItemSet& rSet ) throw()