summaryrefslogtreecommitdiff
path: root/svx/source/sidebar
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sidebar')
-rw-r--r--svx/source/sidebar/PanelFactory.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx
index f55575d1ab97..468dd998a32a 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -42,6 +42,7 @@
#include <vcl/weldutils.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/compbase.hxx>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ui/XSidebar.hpp>
@@ -102,7 +103,7 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue);
weld::Widget* pParent(nullptr);
- if (weld::TransportAsXWindow* pTunnel = dynamic_cast<weld::TransportAsXWindow*>(xParentWindow.get()))
+ if (weld::TransportAsXWindow* pTunnel = comphelper::getFromUnoTunnel<weld::TransportAsXWindow>(xParentWindow))
pParent = pTunnel->getWidget();
if (!pParent)