summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/main/ChartController.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 1a59bb161ec3..2ba57aa45d33 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 = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get());
+ auto pSidebar = comphelper::getFromUnoTunnel<sfx2::sidebar::SidebarController>(xSidebar);
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 = dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get()))
+ if (sfx2::sidebar::SidebarController* pSidebar = comphelper::getFromUnoTunnel<sfx2::sidebar::SidebarController>(xSidebar))
{
pSidebar->unregisterSidebarForFrame(this);
}