framework/source/services/desktop.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit cddfc67bfaa5f580d952ccc3005f7cae11a9c933 Author: Tibor Nagy <tibor.nagy.ext...@allotropia.de> AuthorDate: Mon May 6 10:43:34 2024 +0200 Commit: Nagy Tibor <tibor.nagy.ext...@allotropia.de> CommitDate: Tue May 7 17:16:14 2024 +0200 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.mehrbr...@allotropia.de> Tested-by: Jenkins (cherry picked from commit 64a50c65ee15c03f58ccf25308a70dfd24e791fe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167224 Reviewed-by: Nagy Tibor <tibor.nagy.ext...@allotropia.de> Tested-by: Nagy Tibor <tibor.nagy.ext...@allotropia.de> diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 35dfcd2e21eb..e0388f75b985 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -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;