[Libreoffice-commits] core.git: framework/source offapi/com
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Mon Oct 10 10:38:46 UTC 2016
framework/source/services/desktop.cxx | 13 +++++++------
offapi/com/sun/star/frame/TerminationVetoException.idl | 4 ++++
2 files changed, 11 insertions(+), 6 deletions(-)
New commits:
commit 6d9f07d53e9f89b5286637113198e61149a5c771
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Mon Sep 19 17:05:36 2016 +0200
tdf#102288 TerminationVetoException should only prevent termination
When using a TerminationVetoException, all windows should be closed,
but the process should be kept running.
Change-Id: I71b0b57b6035a36f0325c8dea3cd38309408f176
Reviewed-on: https://gerrit.libreoffice.org/29031
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index db0ffc2..e99bec8 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -224,9 +224,14 @@ sal_Bool SAL_CALL Desktop::terminate()
aReadLock.clear();
- // Ask normal terminate listener. They could stop terminate without closing any open document.
+ // try to close all open frames.
+ // Allow using of any UI ... because Desktop.terminate() was designed as UI functionality in the past.
+ bool bIsEventTestingMode = Application::IsEventTestingModeEnabled();
+ bool bFramesClosed = impl_closeFrames(!bIsEventTestingMode);
+
+ // Ask normal terminate listener. They could stop terminating the process.
Desktop::TTerminateListenerList lCalledTerminationListener;
- bool bVeto = false;
+ bool bVeto = false;
impl_sendQueryTerminationEvent(lCalledTerminationListener, bVeto);
if ( bVeto )
{
@@ -234,10 +239,6 @@ sal_Bool SAL_CALL Desktop::terminate()
return false;
}
- // try to close all open frames.
- // Allow using of any UI ... because Desktop.terminate() was designed as UI functionality in the past.
- bool bIsEventTestingMode = Application::IsEventTestingModeEnabled();
- bool bFramesClosed = impl_closeFrames(!bIsEventTestingMode);
if (bIsEventTestingMode)
{
Application::Quit();
diff --git a/offapi/com/sun/star/frame/TerminationVetoException.idl b/offapi/com/sun/star/frame/TerminationVetoException.idl
index 99f58d5..135c9c1 100644
--- a/offapi/com/sun/star/frame/TerminationVetoException.idl
+++ b/offapi/com/sun/star/frame/TerminationVetoException.idl
@@ -33,6 +33,10 @@
After his own operation will be finished, he MUST try to terminate the
office again. Any other veto listener can intercept that again or office
will die really.
+
+ Since LibreOffice 5.3:
+ Throwing this exception will only prevent *termination*.
+ Exiting LibreOffice will close all the windows, but the process will keep running.
</p>
@see XDesktop::terminate()
More information about the Libreoffice-commits
mailing list