summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-12-15 20:45:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-12-16 20:17:17 +0000
commitf1b7a69b280aefe2f1b3b0f32193494fd765f2bd (patch)
tree431f5ca3f31439b56bbac7b53b2d69f2ee6a218c /chart2
parent32ba2102526a663440957a16e0ebee89bea9f603 (diff)
loplugin:unocast (SvxLineStyleToolBoxControl)
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: I13f71f717a8661e0889ab7acf6fe7c7ebbe3dbe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144332 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/sidebar/ChartLinePanel.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index d9da9a2985ef..bc905c9d9900 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/chart2/XDiagram.hpp>
#include <comphelper/lok.hxx>
+#include <comphelper/servicehelper.hxx>
#include <sfx2/viewsh.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
@@ -35,7 +36,7 @@ namespace {
SvxLineStyleToolBoxControl* getLineStyleToolBoxControl(const ToolbarUnoDispatcher& rToolBoxColor)
{
css::uno::Reference<css::frame::XToolbarController> xController = rToolBoxColor.GetControllerForCommand(".uno:XLineStyle");
- SvxLineStyleToolBoxControl* pToolBoxLineStyleControl = dynamic_cast<SvxLineStyleToolBoxControl*>(xController.get());
+ SvxLineStyleToolBoxControl* pToolBoxLineStyleControl = comphelper::getFromUnoTunnel<SvxLineStyleToolBoxControl>(xController);
return pToolBoxLineStyleControl;
}