The previous behavior of using the TerminationVetoException has changed
"Since LibreOffice 5.3: Throwing this exception will only prevent termination. Exiting LibreOffice will close all the windows but the process will keep running." Currently, the behavior is different, because not only is LibreOffice prevented from terminating, but the last document cannot be closed either. The expected behavior is all windows should be closed, but the process should be kept running when using a TerminationVetoException. Change-Id: I8764aefccc4c9feec3ee0e45a54bf0aebcf16c5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167194 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Tested-by: Jenkins
This commit is contained in:
parent
e5e9ed7b87
commit
64a50c65ee
1 changed files with 3 additions and 2 deletions
|
@ -201,6 +201,8 @@ sal_Bool SAL_CALL Desktop::terminate()
|
|||
aGuard.clear();
|
||||
|
||||
// Allow using of any UI ... because Desktop.terminate() was designed as UI functionality in the past.
|
||||
// try to close all open frames
|
||||
bool bFramesClosed = impl_closeFrames(!bRestartableMainLoop);
|
||||
|
||||
// Ask normal terminate listener. They could veto terminating the process.
|
||||
Desktop::TTerminateListenerList lCalledTerminationListener;
|
||||
|
@ -210,8 +212,7 @@ sal_Bool SAL_CALL Desktop::terminate()
|
|||
return false;
|
||||
}
|
||||
|
||||
// try to close all open frames
|
||||
if (!impl_closeFrames(!bRestartableMainLoop))
|
||||
if (!bFramesClosed)
|
||||
{
|
||||
impl_sendCancelTerminationEvent(lCalledTerminationListener);
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue