diff options
Diffstat (limited to 'sw/source/uibase/app/docstyle.cxx')
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 0fa8e68f412c..3da6a018c318 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -3039,10 +3039,11 @@ void SwStyleSheetIterator::InvalidateIterator() void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint ) { // search and remove from View-List!! - if( rHint.ISA( SfxStyleSheetHint ) && - SFX_STYLESHEET_ERASED == ((SfxStyleSheetHint&) rHint).GetHint() ) + const SfxStyleSheetHint* pStyleSheetHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint); + if( pStyleSheetHint && + SFX_STYLESHEET_ERASED == pStyleSheetHint->GetHint() ) { - SfxStyleSheetBase* pStyle = ((SfxStyleSheetHint&)rHint).GetStyleSheet(); + SfxStyleSheetBase* pStyle = pStyleSheetHint->GetStyleSheet(); if (pStyle) aLst.RemoveName(pStyle->GetFamily(), pStyle->GetName()); |