diff options
Diffstat (limited to 'sfx2/source/dialog/templdlg.cxx')
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 6c428468373d..5cf9fa7e3065 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1572,9 +1572,10 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim ) void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) { // tap update - if(rHint.Type() == TYPE(SfxSimpleHint)) + const SfxSimpleHint* pSfxSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint); + if(pSfxSimpleHint) { - switch(((SfxSimpleHint&) rHint ).GetId()) + switch(pSfxSimpleHint->GetId()) { case SFX_HINT_UPDATEDONE: { @@ -1644,12 +1645,12 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint // possible that a new one is registered after the timer is up - // works bad in UpdateStyles_Impl ()! - sal_uIntPtr nId = rHint.ISA(SfxSimpleHint) ? ( (SfxSimpleHint&)rHint ).GetId() : 0; + sal_uIntPtr nId = pSfxSimpleHint ? pSfxSimpleHint->GetId() : 0; if(!bDontUpdate && nId != SFX_HINT_DYING && - (rHint.Type() == TYPE(SfxStyleSheetPoolHint)|| - rHint.Type() == TYPE(SfxStyleSheetHint) || - rHint.Type() == TYPE( SfxStyleSheetHintExtended ))) + (dynamic_cast<const SfxStyleSheetPoolHint*>(&rHint) || + dynamic_cast<const SfxStyleSheetHint*>(&rHint) || + dynamic_cast<const SfxStyleSheetHintExtended*>(&rHint))) { if(!pTimer) { |