summaryrefslogtreecommitdiff
path: root/framework/source/services
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/services')
-rw-r--r--framework/source/services/desktop.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index d6c427ed6b84..2f02a4ce5e23 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -231,8 +231,13 @@ sal_Bool SAL_CALL Desktop::terminate()
// try to close all open frames.
// Allow using of any UI ... because Desktop.terminate() was designed as UI functionality in the past.
- bool bAllowUI = !Application::IsEventTestingModeEnabled();
- bool bFramesClosed = impl_closeFrames(bAllowUI);
+ bool bIsEventTestingMode = Application::IsEventTestingModeEnabled();
+ bool bFramesClosed = impl_closeFrames(!bIsEventTestingMode);
+ if (bIsEventTestingMode)
+ {
+ Application::Quit();
+ return true;
+ }
if ( ! bFramesClosed )
{
impl_sendCancelTerminationEvent(lCalledTerminationListener);