summaryrefslogtreecommitdiff
path: root/sw/inc/swevent.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc/swevent.hxx')
-rw-r--r--sw/inc/swevent.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
index e18020320544..b25246cb2e12 100644
--- a/sw/inc/swevent.hxx
+++ b/sw/inc/swevent.hxx
@@ -118,9 +118,9 @@ struct SwCallMouseEvent final
virtual void SwClientNotify(const SwModify& rMod, const SfxHint& rHint) override
{
- auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint);
- if(!pLegacy)
+ if (rHint.GetId() != SfxHintId::SwLegacyModify)
return;
+ auto pLegacy = static_cast<const sw::LegacyModifyHint*>(&rHint);
assert(EVENT_OBJECT_IMAGE == eType || EVENT_OBJECT_URLITEM == eType || EVENT_OBJECT_IMAGEMAP == eType);
SwClient::SwClientNotify(rMod, rHint);
bool bClear = !GetRegisteredIn();