diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-04-17 17:33:10 +0200 |
---|---|---|
committer | Szymon Kłos <eszkadev@gmail.com> | 2020-05-27 16:22:33 +0200 |
commit | 14ef4875b3b4ccacd4846d564de08d368e9fabbd (patch) | |
tree | af0de3f36f82b1608900d7edbabc89ad497afe84 /chart2 | |
parent | 29264f05460e5e81e12a5eeb0121385b6661c656 (diff) |
Fix test UI_chart
Sync chart wizard code with master
Change-Id: I4ab2cbfa9efd3caca3c7951150b7daa3a133b634
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index cd6bbe0557e2..ff90a3442f17 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -167,7 +167,7 @@ void CreationWizardUnoDlg::createDialogOnDemand() m_xParentWindow = xFrame->getContainerWindow(); } } - uno::Reference< XComponent > xComp( this ); + uno::Reference< XComponent > xKeepAlive( this ); if( m_xChartModel.is() ) { m_xDialog = std::make_shared<CreationWizard>(Application::GetFrameWeld(m_xParentWindow), m_xChartModel, m_xCC); @@ -195,7 +195,8 @@ void SAL_CALL CreationWizardUnoDlg::startExecuteModal( const css::uno::Reference if( m_bUnlockControllersOnExecute && m_xChartModel.is() ) m_xChartModel->unlockControllers(); - weld::DialogController::runAsync(m_xDialog, [xListener](sal_Int32 nResult){ + CreationWizardUnoDlg* xThat = this; + weld::DialogController::runAsync(m_xDialog, [xListener, xThat](sal_Int32 nResult){ if( xListener.is() ) { ::css::uno::Reference< ::css::uno::XInterface > xSource; @@ -203,6 +204,7 @@ void SAL_CALL CreationWizardUnoDlg::startExecuteModal( const css::uno::Reference css::ui::dialogs::DialogClosedEvent aEvent( xSource, nResult ); xListener->dialogClosed( aEvent ); } + xThat->m_xDialog.reset(); }); } |