chart2/source/controller/main/ChartController.cxx |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 2b808bad616a557fabb080b49c5b925d2481b9b5
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Mar 11 15:26:21 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Mar 11 21:29:04 2021 +0100

    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 <caol...@redhat.com>

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 );
     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to