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 /sd | |
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 'sd')
-rw-r--r-- | sd/source/ui/accessibility/AccessibleSlideSorterView.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsListener.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellHint.cxx | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx index 2fc11d1a537a..ac5d06f9a1ee 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx @@ -833,8 +833,9 @@ void AccessibleSlideSorterView::Implementation::Notify ( break; } } - else if (auto pViewShellHint = dynamic_cast<const sd::ViewShellHint*>(&rHint)) + else if (rHint.GetId() == SfxHintId::SdViewShell) { + auto pViewShellHint = static_cast<const sd::ViewShellHint*>(&rHint); switch (pViewShellHint->GetHintId()) { case sd::ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_START: diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx index dd7ef94de5d5..22e6dda70200 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.cxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx @@ -279,8 +279,9 @@ void Listener::Notify ( mrController.CheckForMasterPageAssignment(); mrController.CheckForSlideTransitionAssignment(); } - else if (auto pViewShellHint = dynamic_cast<const ViewShellHint*>(&rHint)) + else if (rHint.GetId() == SfxHintId::SdViewShell) { + auto pViewShellHint = static_cast<const ViewShellHint*>(&rHint); switch (pViewShellHint->GetHintId()) { case ViewShellHint::HINT_PAGE_RESIZE_START: diff --git a/sd/source/ui/view/ViewShellHint.cxx b/sd/source/ui/view/ViewShellHint.cxx index b86cbaa325d7..209db9856d7d 100644 --- a/sd/source/ui/view/ViewShellHint.cxx +++ b/sd/source/ui/view/ViewShellHint.cxx @@ -22,7 +22,8 @@ namespace sd { ViewShellHint::ViewShellHint(HintId eHintId) - : meHintId(eHintId) + : SfxHint(SfxHintId::SdViewShell) + , meHintId(eHintId) { } |