summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/basedlgs.cxx10
-rw-r--r--sfx2/source/dialog/templdlg.cxx13
2 files changed, 13 insertions, 10 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 59ea7c2ceab6..9bb8497cb81d 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -58,9 +58,10 @@ public:
void SfxModelessDialog_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.IsA(TYPE(SfxSimpleHint)) )
+ const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+ if ( pSimpleHint )
{
- switch( ( (SfxSimpleHint&) rHint ).GetId() )
+ switch( pSimpleHint->GetId() )
{
case SFX_HINT_DYING:
pMgr->Destroy();
@@ -82,9 +83,10 @@ public:
void SfxFloatingWindow_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- if ( rHint.IsA(TYPE(SfxSimpleHint)) )
+ const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+ if ( pSimpleHint )
{
- switch( ( (SfxSimpleHint&) rHint ).GetId() )
+ switch( pSimpleHint->GetId() )
{
case SFX_HINT_DYING:
pMgr->Destroy();
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)
{