summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx3
-rw-r--r--sd/source/ui/app/sdmod.cxx3
-rw-r--r--sd/source/ui/app/sdxfer.cxx3
-rw-r--r--sd/source/ui/dlg/docprev.cxx3
-rw-r--r--sd/source/ui/dlg/unchss.cxx10
-rw-r--r--sd/source/ui/docshell/docshell.cxx4
-rw-r--r--sd/source/ui/framework/tools/FrameworkHelper.cxx3
-rw-r--r--sd/source/ui/func/fupage.cxx4
-rw-r--r--sd/source/ui/func/fuprlout.cxx1
-rw-r--r--sd/source/ui/func/fuprobjs.cxx4
-rw-r--r--sd/source/ui/func/futempl.cxx8
-rw-r--r--sd/source/ui/slidesorter/controller/SlsListener.cxx5
-rw-r--r--sd/source/ui/slidesorter/controller/SlsTransferableData.cxx5
-rw-r--r--sd/source/ui/tools/EventMultiplexer.cxx5
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx3
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx4
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx3
-rw-r--r--sd/source/ui/view/FormShellManager.cxx3
-rw-r--r--sd/source/ui/view/WindowUpdater.cxx1
-rw-r--r--sd/source/ui/view/drawview.cxx10
-rw-r--r--sd/source/ui/view/drviewsa.cxx3
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx8
22 files changed, 38 insertions, 58 deletions
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index a586545cb2f2..d4c517726379 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -175,8 +175,7 @@ namespace accessibility
if( &rBroadcaster == mpOutliner )
{
- const SfxSimpleHint* pHint = dynamic_cast< const SfxSimpleHint * >( &rHint );
- if( pHint && (pHint->GetId() == SFX_HINT_DYING) )
+ if( rHint.GetId() == SFX_HINT_DYING )
{
bDispose = true;
mpOutliner = nullptr;
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 3da56e0ece1d..5ecdd8dfa36c 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -117,8 +117,7 @@ SdModule::~SdModule()
/// get notifications
void SdModule::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DEINITIALIZING )
+ if( rHint.GetId() == SFX_HINT_DEINITIALIZING )
{
delete pImpressOptions;
pImpressOptions = nullptr;
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index cdf627953bfe..27b8aab55a38 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -809,8 +809,7 @@ void SdTransferable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast< const SfxSimpleHint * >(&rHint);
- if(pSimpleHint && (pSimpleHint->GetId() == SFX_HINT_DYING) )
+ if( rHint.GetId() == SFX_HINT_DYING )
{
if( &rBC == mpSourceDoc )
mpSourceDoc = nullptr;
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index e90752452106..e141119de251 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -268,8 +268,7 @@ void SdDocPreviewWin::updateViewSettings()
void SdDocPreviewWin::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_COLORS_CHANGED )
+ if( rHint.GetId() == SFX_HINT_COLORS_CHANGED )
{
updateViewSettings();
}
diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx
index 397af1cc1f8c..f568d9513b8e 100644
--- a/sd/source/ui/dlg/unchss.cxx
+++ b/sd/source/ui/dlg/unchss.cxx
@@ -21,7 +21,7 @@
#include <svl/itemset.hxx>
#include <svl/style.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdpool.hxx>
@@ -101,9 +101,9 @@ void StyleSheetUndoAction::Undo()
mpStyleSheet->GetItemSet().Set(aNewSet);
if( mpStyleSheet->GetFamily() == SD_STYLE_FAMILY_PSEUDO )
- static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
else
- mpStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ mpStyleSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
}
void StyleSheetUndoAction::Redo()
@@ -113,9 +113,9 @@ void StyleSheetUndoAction::Redo()
mpStyleSheet->GetItemSet().Set(aNewSet);
if( mpStyleSheet->GetFamily() == SD_STYLE_FAMILY_PSEUDO )
- static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ static_cast<SdStyleSheet*>(mpStyleSheet)->GetRealStyleSheet()->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
else
- mpStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ mpStyleSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
}
OUString StyleSheetUndoAction::GetComment() const
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 2cd6107d1b26..843235c4b018 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -172,7 +172,7 @@ DrawDocShell::~DrawDocShell()
// destroyed. This has been introduced for the PreviewRenderer to
// free its view (that uses the item poll of the doc shell) but
// may be useful in other places as well.
- Broadcast(SfxSimpleHint(SFX_HINT_DYING));
+ Broadcast(SfxHint(SFX_HINT_DYING));
mbInDestruction = true;
@@ -426,7 +426,7 @@ void DrawDocShell::SetModified( bool bSet /* = true */ )
if ( mpDoc )
mpDoc->NbcSetChanged( bSet );
- Broadcast( SfxSimpleHint( SFX_HINT_DOCCHANGED ) );
+ Broadcast( SfxHint( SFX_HINT_DOCCHANGED ) );
}
}
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index 8a9728ffd227..7c9efb6af117 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -980,8 +980,7 @@ void SAL_CALL LifetimeController::disposing (const lang::EventObject& rEvent)
void LifetimeController::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint)
{
(void)rBroadcaster;
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint != nullptr && pSimpleHint->GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SFX_HINT_DYING)
{
mbListeningToViewShellBase = false;
Update();
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index b4c6095b64c1..5b669d32646c 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -412,7 +412,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pStyleSheet->GetItemSet().Put( *(pTempSet.get()) );
sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() );
- pStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ pStyleSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
}
else if( bSetToAllPages )
{
@@ -434,7 +434,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
pUndoGroup->AddAction(pAction);
pStyle->GetItemSet().Put( *(pTempSet.get()) );
sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() );
- pStyle->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ pStyle->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
}
//Remove background from all pages to reset to the master bg
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx
index de294488ba78..b480102ca97a 100644
--- a/sd/source/ui/func/fuprlout.cxx
+++ b/sd/source/ui/func/fuprlout.cxx
@@ -20,7 +20,6 @@
#include "fuprlout.hxx"
#include <vcl/wrkwin.hxx>
#include <sfx2/dispatch.hxx>
-#include <svl/smplhint.hxx>
#include <svl/itempool.hxx>
#include <sot/storage.hxx>
#include <vcl/msgbox.hxx>
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index b19b68fa98a6..daa979bf1fc5 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -22,7 +22,7 @@
#include <vcl/msgbox.hxx>
#include <svl/style.hxx>
#include <editeng/outliner.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include "app.hrc"
#include "res_bmp.hrc"
@@ -149,7 +149,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pStyleSheet->GetItemSet().Put( *pOutSet );
- static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
}
}
}
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 29b23f1d5694..a7a657239064 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -420,7 +420,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
pFirstStyleSheet->GetItemSet().Put( SvxNumBulletItem( aRule, EE_PARA_NUMBULLET ));
SdStyleSheet* pRealSheet = static_cast<SdStyleSheet*>(pFirstStyleSheet)->GetRealStyleSheet();
- pRealSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ pRealSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
}
aTempSet.ClearItem( EE_PARA_NUMBULLET );
@@ -507,7 +507,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
}
}
- static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >( mpViewShell );
if( pDrawViewShell )
@@ -596,7 +596,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
mpView->SetStyleSheet( static_cast<SfxStyleSheet*>(pStyleSheet));
}
- static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
mpDoc->SetChanged();
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
@@ -623,7 +623,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
mpView->SetStyleSheet( static_cast<SfxStyleSheet*>(pStyleSheet));
- static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SFX_HINT_DATACHANGED ) );
mpDoc->SetChanged();
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
}
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index a775b80e6a97..c85ea076aa60 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -332,10 +332,9 @@ void Listener::Notify (
break;
}
}
- else if (dynamic_cast<const SfxSimpleHint*>(&rHint))
+ else
{
- const SfxSimpleHint& rSfxSimpleHint = static_cast<const SfxSimpleHint&>(rHint);
- switch (rSfxSimpleHint.GetId())
+ switch (rHint.GetId())
{
case SFX_HINT_DOCCHANGED:
mrController.CheckForMasterPageAssignment();
diff --git a/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx b/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
index 8d0aa3ab17ba..34b85638bd31 100644
--- a/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
@@ -70,10 +70,9 @@ TransferableData::~TransferableData()
void TransferableData::Notify (SfxBroadcaster&, const SfxHint& rHint)
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint && mpViewShell)
+ if (mpViewShell)
{
- if (pSimpleHint->GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SFX_HINT_DYING)
{
// This hint may come either from the ViewShell or from the
// document (registered by SdTransferable). We do not know
diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx
index 8d0522c1e5f6..a208144a93ee 100644
--- a/sd/source/ui/tools/EventMultiplexer.cxx
+++ b/sd/source/ui/tools/EventMultiplexer.cxx
@@ -667,10 +667,9 @@ void EventMultiplexer::Implementation::Notify (
break;
}
}
- else if (dynamic_cast<const SfxSimpleHint*>(&rHint))
+ else
{
- const SfxSimpleHint& rSimpleHint = static_cast<const SfxSimpleHint&>(rHint);
- if (rSimpleHint.GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SFX_HINT_DYING)
mpDocument = nullptr;
}
}
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 3113e5069653..d4b8aca487cf 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -482,8 +482,7 @@ void PreviewRenderer::Notify(SfxBroadcaster&, const SfxHint& rHint)
if (!mpDocShellOfView)
return;
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SFX_HINT_DYING)
{
// The doc shell is dying. Our view uses its item pool and
// has to be destroyed as well. The next call to
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 34b9d7021073..72d53f7375e5 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -427,10 +427,8 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else
{
- const SfxSimpleHint* pSfxHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
-
// did our SdDrawDocument just died?
- if(pSfxHint && pSfxHint->GetId() == SFX_HINT_DYING)
+ if(rHint.GetId() == SFX_HINT_DYING)
{
// yes, so we ask for a new one
if( mpDocShell )
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 86aa5e15cf19..5361f5abc725 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1180,8 +1180,7 @@ public:
if (&rBroadcaster != &static_cast<SfxBroadcaster&>(mrBase))
return;
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint != nullptr && pSimpleHint->GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SFX_HINT_DYING)
{
Dispose();
}
diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx
index 373e72a1c3cd..62c69b622095 100644
--- a/sd/source/ui/view/FormShellManager.cxx
+++ b/sd/source/ui/view/FormShellManager.cxx
@@ -261,8 +261,7 @@ IMPL_LINK_TYPED(FormShellManager, WindowEventHandler, VclWindowEvent&, rEvent, v
void FormShellManager::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint!=nullptr && pSimpleHint->GetId()==SFX_HINT_DYING)
+ if (rHint.GetId()==SFX_HINT_DYING)
{
// If all goes well this listener is called after the
// FormShellManager was notified about the dying form shell by the
diff --git a/sd/source/ui/view/WindowUpdater.cxx b/sd/source/ui/view/WindowUpdater.cxx
index 1eb5e524d501..4ed9b9fa93d6 100644
--- a/sd/source/ui/view/WindowUpdater.cxx
+++ b/sd/source/ui/view/WindowUpdater.cxx
@@ -26,7 +26,6 @@
#include <vcl/split.hxx>
#include <sfx2/childwin.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svl/smplhint.hxx>
#include <algorithm>
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 2e9e42cd92d0..81a0e0f39e46 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -167,7 +167,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pSheet->GetItemSet().Put(aTempSet);
- pSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ pSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
bOk = true;
}
else if (eObjKind == OBJ_OUTLINETEXT)
@@ -218,7 +218,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pSheet->GetItemSet().Put(aTempSet);
- pSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ pSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
// now also broadcast any child sheets
sal_Int16 nChild;
@@ -229,7 +229,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
SfxStyleSheet* pOutlSheet = static_cast< SfxStyleSheet* >(pStShPool->Find(aSheetName, SD_STYLE_FAMILY_MASTERPAGE));
if( pOutlSheet )
- pOutlSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ pOutlSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
}
}
@@ -294,7 +294,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pSheet->GetItemSet().Put(aTempSet,false);
- pSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ pSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
bOk = true;
}
else if (eObjKind == OBJ_OUTLINETEXT)
@@ -337,7 +337,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
mpDocSh->GetUndoManager()->AddUndoAction(pAction);
pSheet->GetItemSet().Set(aTempSet,false);
- pSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+ pSheet->Broadcast(SfxHint(SFX_HINT_DATACHANGED));
}
// remove all hard set items from shape that are now set in style
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 623392411dd2..1d7c6d895142 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -729,8 +729,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
void DrawViewShell::Notify (SfxBroadcaster&, const SfxHint& rHint)
{
- const SfxSimpleHint* pSimple = dynamic_cast< const SfxSimpleHint* >(&rHint);
- if (pSimple!=nullptr && pSimple->GetId()==SFX_HINT_MODECHANGED)
+ if (rHint.GetId()==SFX_HINT_MODECHANGED)
{
// Change to selection when turning on read-only mode.
if(GetDocSh()->IsReadOnly() && dynamic_cast< FuSelection* >( GetCurrentFunction().get() ) )
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index e38765c55f28..86f87872af04 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -424,13 +424,9 @@ ViewOverlayManager::~ViewOverlayManager()
void ViewOverlayManager::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint != nullptr)
+ if (rHint.GetId() == SFX_HINT_DOCCHANGED)
{
- if (pSimpleHint->GetId() == SFX_HINT_DOCCHANGED)
- {
- UpdateTags();
- }
+ UpdateTags();
}
}