diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 4 | ||||
-rw-r--r-- | chart2/source/controller/sidebar/Chart2PanelFactory.cxx | 3 | ||||
-rw-r--r-- | chart2/source/controller/sidebar/ChartLinePanel.cxx | 3 |
3 files changed, 4 insertions, 6 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 2ba57aa45d33..1a59bb161ec3 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -377,7 +377,7 @@ void SAL_CALL ChartController::attachFrame( uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getChartModel()); if (xSidebar.is()) { - auto pSidebar = comphelper::getFromUnoTunnel<sfx2::sidebar::SidebarController>(xSidebar); + auto pSidebar = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get()); assert(pSidebar); pSidebar->registerSidebarForFrame(this); pSidebar->updateModel(getChartModel()); @@ -761,7 +761,7 @@ void SAL_CALL ChartController::dispose() if (getModel().is()) { uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getChartModel()); - if (sfx2::sidebar::SidebarController* pSidebar = comphelper::getFromUnoTunnel<sfx2::sidebar::SidebarController>(xSidebar)) + if (sfx2::sidebar::SidebarController* pSidebar = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get())) { pSidebar->unregisterSidebarForFrame(this); } diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx index 4d0208fbc450..081322b09408 100644 --- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx +++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx @@ -23,7 +23,6 @@ #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <cppuhelper/exc_hlp.hxx> #include <comphelper/namedvaluecollection.hxx> -#include <comphelper/servicehelper.hxx> #include <cppuhelper/supportsservice.hxx> #include <vcl/weldutils.hxx> @@ -62,7 +61,7 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement ( Reference<css::frame::XController> xController (aArguments.getOrDefault("Controller", Reference<css::frame::XController>())); weld::Widget* pParent(nullptr); - if (weld::TransportAsXWindow* pTunnel = comphelper::getFromUnoTunnel<weld::TransportAsXWindow>(xParentWindow)) + if (weld::TransportAsXWindow* pTunnel = dynamic_cast<weld::TransportAsXWindow*>(xParentWindow.get())) pParent = pTunnel->getWidget(); if (!pParent) diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx index bc905c9d9900..d9da9a2985ef 100644 --- a/chart2/source/controller/sidebar/ChartLinePanel.cxx +++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx @@ -25,7 +25,6 @@ #include <com/sun/star/chart2/XDiagram.hpp> #include <comphelper/lok.hxx> -#include <comphelper/servicehelper.hxx> #include <sfx2/viewsh.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> @@ -36,7 +35,7 @@ namespace { SvxLineStyleToolBoxControl* getLineStyleToolBoxControl(const ToolbarUnoDispatcher& rToolBoxColor) { css::uno::Reference<css::frame::XToolbarController> xController = rToolBoxColor.GetControllerForCommand(".uno:XLineStyle"); - SvxLineStyleToolBoxControl* pToolBoxLineStyleControl = comphelper::getFromUnoTunnel<SvxLineStyleToolBoxControl>(xController); + SvxLineStyleToolBoxControl* pToolBoxLineStyleControl = dynamic_cast<SvxLineStyleToolBoxControl*>(xController.get()); return pToolBoxLineStyleControl; } |