diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-11 15:26:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-11 21:29:04 +0100 |
commit | 2b808bad616a557fabb080b49c5b925d2481b9b5 (patch) | |
tree | 9476ea7f9f9b633604279e70e9c9b71e8616fb20 /chart2/source | |
parent | 204a70f568cef3d9c685112d1c32f053a91469ca (diff) |
awt::XWindow has setVisible so don't need to fetch VCLXWindow to do that
Change-Id: I3da36a5e54276dad483abb263fc15fd9d045ec59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112350
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 3d310d8d8bea..08b8c65c31f7 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -48,7 +48,9 @@ #include <ViewElementListProvider.hxx> #include <cppuhelper/supportsservice.hxx> +#include <comphelper/servicehelper.hxx> +#include <com/sun/star/awt/XWindowPeer.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/data/XDataReceiver.hpp> #include <com/sun/star/frame/XController2.hpp> @@ -66,7 +68,6 @@ #include <sal/log.hxx> #include <tools/debug.hxx> #include <svx/sidebar/SelectionChangeHandler.hxx> -#include <toolkit/awt/vclxwindow.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -424,12 +425,9 @@ void SAL_CALL ChartController::attachFrame( //get the window parent from the frame to use as parent for our new window if(xFrame.is()) { - uno::Reference< awt::XWindow > xContainerWindow = xFrame->getContainerWindow(); - VCLXWindow* pParentComponent = comphelper::getUnoTunnelImplementation<VCLXWindow>(xContainerWindow); - assert(pParentComponent); - if (pParentComponent) - pParentComponent->setVisible(true); - + uno::Reference<awt::XWindow> xContainerWindow = xFrame->getContainerWindow(); + if (xContainerWindow) + xContainerWindow->setVisible(true); pParent = VCLUnoHelper::GetWindow( xContainerWindow ); } |