diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-09-19 17:05:36 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-10-10 10:36:02 +0000 |
commit | 6d9f07d53e9f89b5286637113198e61149a5c771 (patch) | |
tree | 88399883432d86cbd1067b6ba83bd1989c0e8fcb /framework/source | |
parent | 25767162edf38134c4412cce2a7d938f4657cc2d (diff) |
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@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/services/desktop.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index db0ffc24da83..e99bec83b99e 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(); |