summaryrefslogtreecommitdiff
path: root/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-12-13 11:28:31 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-12-14 08:55:19 +0000
commita98acca8fbc38d3fd5600ae5056a8e42b6d8a40d (patch)
treee5472e33a1eeb79b4bb2c844b62186feedda79b2 /sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
parent276e3ccbdd3259ec3daf8a1a98fa7f406b14e21c (diff)
loplugin:unocast (SelectionChangeHandler)
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: Ibc2511c8521923c854e4b450649ea616581af2fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144141 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2/source/devtools/DevelopmentToolDockingWindow.cxx')
-rw-r--r--sfx2/source/devtools/DevelopmentToolDockingWindow.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
index de0950a7edaf..736343310bd5 100644
--- a/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
+++ b/sfx2/source/devtools/DevelopmentToolDockingWindow.cxx
@@ -14,6 +14,7 @@
#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <comphelper/servicehelper.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewfrm.hxx>
@@ -87,7 +88,7 @@ void DevelopmentToolDockingWindow::dispose()
{
// Stop and remove the listener
auto* pSelectionChangeHandler
- = dynamic_cast<SelectionChangeHandler*>(mxSelectionListener.get());
+ = comphelper::getFromUnoTunnel<SelectionChangeHandler>(mxSelectionListener);
if (pSelectionChangeHandler)
pSelectionChangeHandler->stopListening();