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 /reportdesign | |
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 'reportdesign')
-rw-r--r-- | reportdesign/source/core/sdr/RptObjectListener.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/reportdesign/source/core/sdr/RptObjectListener.cxx b/reportdesign/source/core/sdr/RptObjectListener.cxx index 0cc6a42b2f35..2ed128093bc6 100644 --- a/reportdesign/source/core/sdr/RptObjectListener.cxx +++ b/reportdesign/source/core/sdr/RptObjectListener.cxx @@ -55,7 +55,7 @@ void SAL_CALL OObjectListener::propertyChange( const css::beans::PropertyChange DlgEdHint::DlgEdHint(DlgEdHintKind eHint) - : eHintKind(eHint) + : SfxHint(SfxHintId::ReportDesignDlgEd), eHintKind(eHint) { } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index e616cd859eab..d21e40262464 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2550,8 +2550,10 @@ sal_Int32 OReportController::getGroupPosition(const uno::Reference< report::XGro void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHint) { - const DlgEdHint* pDlgEdHint = dynamic_cast<const DlgEdHint*>(&_rHint); - if (!(pDlgEdHint && pDlgEdHint->GetKind() == RPTUI_HINT_SELECTIONCHANGED)) + if (_rHint.GetId() != SfxHintId::ReportDesignDlgEd) + return; + const DlgEdHint* pDlgEdHint = static_cast<const DlgEdHint*>(&_rHint); + if (pDlgEdHint->GetKind() != RPTUI_HINT_SELECTIONCHANGED) return; const sal_Int32 nSelectionCount = getDesignView()->getMarkedObjectCount(); |