use VCLUnoHelper::GetWindow
instead of directly using VCLXWindow Change-Id: I80c70c9773b1963ec4d58c833ff2fdba9cfc4b92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112353 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
#include <com/sun/star/util/VetoException.hpp>
|
#include <com/sun/star/util/VetoException.hpp>
|
||||||
#include <tools/debug.hxx>
|
#include <tools/debug.hxx>
|
||||||
#include <tools/diagnose_ex.h>
|
#include <tools/diagnose_ex.h>
|
||||||
#include <toolkit/awt/vclxwindow.hxx>
|
#include <toolkit/helper/vclunohelper.hxx>
|
||||||
#include <vcl/svapp.hxx>
|
#include <vcl/svapp.hxx>
|
||||||
#include <vcl/weld.hxx>
|
#include <vcl/weld.hxx>
|
||||||
#include <vcl/weldutils.hxx>
|
#include <vcl/weldutils.hxx>
|
||||||
@@ -344,8 +344,7 @@ namespace pcr
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
VCLXWindow* pContainerWindow = comphelper::getUnoTunnelImplementation<VCLXWindow>(xContainerWindow);
|
VclPtr<vcl::Window> pParentWin = VCLUnoHelper::GetWindow(xContainerWindow);
|
||||||
VclPtr<vcl::Window> pParentWin = pContainerWindow ? pContainerWindow->GetWindow() : nullptr;
|
|
||||||
if (!pParentWin)
|
if (!pParentWin)
|
||||||
throw RuntimeException("The frame is invalid. Unable to extract the container window.",*this);
|
throw RuntimeException("The frame is invalid. Unable to extract the container window.",*this);
|
||||||
xBuilder.reset(Application::CreateInterimBuilder(pParentWin, sUIFile, true));
|
xBuilder.reset(Application::CreateInterimBuilder(pParentWin, sUIFile, true));
|
||||||
|
Reference in New Issue
Block a user