diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-04-17 17:33:10 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-05-18 20:45:26 +0200 |
commit | 77445e201c45e5593761e8399c32f80eea2178a4 (patch) | |
tree | db0010bc4842b224382e6cdca5b18aa89185068b /vcl | |
parent | 835bced249e95ccbf0a88266f8c1ba166cf5efcb (diff) |
Make Chart Creation Wizard async
* FuInsertChart as a memeber in ScTabViewShell
stores instance is needed to react on the dialog's result
* CreationWizardUnoDlg converted to XAsynchronousExecutableDialog
added dialog close handler which notifies listeners
In the Online dialog become dead after closing, additional
PostUserEvent was needed to kill the dialog after real close
(without it user needed to select any cell to close dialog)
* Reuse in Writer
Change-Id: Ib09b5d83af9e1aa67218e093aa161419e8ddb922
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90380
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/wizardmachine.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx index a696749f2af7..6272e0073f75 100644 --- a/vcl/source/control/wizardmachine.cxx +++ b/vcl/source/control/wizardmachine.cxx @@ -1087,11 +1087,17 @@ namespace vcl { if ( isTravelingSuspended() ) return; - WizardTravelSuspension aTravelGuard( *this ); - if (!prepareLeaveCurrentState(WizardTypes::eFinish)) + + // prevent WizardTravelSuspension from using this instance + // after will be destructed due to onFinish and async response call { - return; + WizardTravelSuspension aTravelGuard( *this ); + if (!prepareLeaveCurrentState(WizardTypes::eFinish)) + { + return; + } } + onFinish(); } @@ -1386,6 +1392,9 @@ namespace vcl void WizardMachine::resumeTraveling( AccessGuard ) { + if (!m_pImpl) + return; + DBG_ASSERT( m_pImpl->m_bTravelingSuspended, "WizardMachine::resumeTraveling: nothing to resume!" ); m_pImpl->m_bTravelingSuspended = false; } |