diff options
Diffstat (limited to 'sc/source/ui/unoobj/dispuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/dispuno.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx index c1c178ad8397..ff084b900688 100644 --- a/sc/source/ui/unoobj/dispuno.cxx +++ b/sc/source/ui/unoobj/dispuno.cxx @@ -83,8 +83,8 @@ ScDispatchProviderInterceptor::~ScDispatchProviderInterceptor() void ScDispatchProviderInterceptor::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - if ( rHint.ISA( SfxSimpleHint ) && - ((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING ) + const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); + if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING ) pViewShell = NULL; } @@ -210,8 +210,8 @@ ScDispatch::~ScDispatch() void ScDispatch::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - if ( rHint.ISA( SfxSimpleHint ) && - ((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING ) + const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); + if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING ) pViewShell = NULL; } |