diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-09-03 16:13:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-09-03 21:41:08 +0200 |
commit | b7a32682f650a2a0f59ce52c91b30640d07e0a6a (patch) | |
tree | 0e89b530c352a9bc381289c6df1d53812b9c9332 /basctl | |
parent | 6594b279a926e497261a4e802a5e74d2f3b97369 (diff) |
use less dynamic_cast when broadcasting SfxHint
Change-Id: I24c947c20afeffffebe5ac794108c4ccecb680f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172828
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/accessibility/accessibledialogwindow.cxx | 3 | ||||
-rw-r--r-- | basctl/source/dlged/dlged.cxx | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index def3a8fdede0..8f43fa4b2556 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -444,8 +444,9 @@ void AccessibleDialogWindow::Notify( SfxBroadcaster&, const SfxHint& rHint ) default: ; } } - else if (DlgEdHint const* pDlgEdHint = dynamic_cast<DlgEdHint const*>(&rHint)) + else if (rHint.GetId() == SfxHintId::BasCtlDlgEd) { + DlgEdHint const* pDlgEdHint = static_cast<DlgEdHint const*>(&rHint); switch (pDlgEdHint->GetKind()) { case DlgEdHint::WINDOWSCROLLED: diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index c1e9a28b2c61..7d5b34b2d344 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -66,13 +66,15 @@ constexpr OUString aDecorationPropName = u"Decoration"_ustr; DlgEdHint::DlgEdHint(Kind eHint) - : eKind(eHint) + : SfxHint(SfxHintId::BasCtlDlgEd) + , eKind(eHint) , pDlgEdObj(nullptr) { } DlgEdHint::DlgEdHint(Kind eHint, DlgEdObj* pObj) - : eKind(eHint) + : SfxHint(SfxHintId::BasCtlDlgEd) + , eKind(eHint) , pDlgEdObj(pObj) { } |