diff options
author | Jan Holesovsky <kendy@collabora.com> | 2019-05-30 10:20:15 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2020-06-05 21:28:43 +0200 |
commit | fced46a2838d800a1eaa9328a7aa18b868bd6013 (patch) | |
tree | b5425f08bc283e4d42e363ed776444981ff7d8b3 /chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx | |
parent | 70bfb667663f962d11061fafc9eeb54483df8b15 (diff) |
chart lok: Assign a parent to the chart wizard if it has none.
Without this, the dialog was not routed, so only the chart has been
inserted, but wizard cancelled.
The pParent started to be nullptr after the recent "lok: Don't activate
chart on insert."
Change-Id: Ia04854599aa1387360048412f073e4eb903fb40e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95613
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx')
-rw-r--r-- | chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index ba08b5b7ed55..65bf64ea7b64 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -33,6 +33,7 @@ #include <comphelper/sequence.hxx> #include <tools/diagnose_ex.h> #include <comphelper/lok.hxx> +#include <sfx2/viewfrm.hxx> namespace chart { @@ -168,12 +169,18 @@ void CreationWizardUnoDlg::createDialogOnDemand() m_xParentWindow = xFrame->getContainerWindow(); } } + if( m_xParentWindow.is() ) { VCLXWindow* pImplementation = VCLXWindow::GetImplementation(m_xParentWindow); if (pImplementation) pParent = pImplementation->GetWindow().get(); } + else if (comphelper::LibreOfficeKit::isActive()) + { + pParent = &SfxViewFrame::Current()->GetWindow(); + } + uno::Reference< XComponent > xComp( this ); if( m_xChartModel.is() ) m_pDialog = VclPtr<CreationWizard>::Create( pParent, m_xChartModel, m_xCC ); |