diff options
-rw-r--r-- | framework/source/services/desktop.cxx | 9 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 1 |
2 files changed, 7 insertions, 3 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); diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 81ab92a34c0d..f4928aad469b 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -407,7 +407,6 @@ namespace Application::EndAllPopups(); Application::EndAllDialogs(); Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplPrepareExitMsg ) ); - Application::Quit(); } } |