framework/source/services/desktop.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit ffde3ce764f58817fb9c5a8f91a646937e594fd7 Author: Tibor Nagy <tibor.nagy.ext...@allotropia.de> AuthorDate: Mon May 6 10:43:34 2024 +0200 Commit: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> CommitDate: Mon Dec 9 13:04:37 2024 +0100 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) diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 237d35afc6a5..721c8fa1bf96 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;