From d7f3eed145fa8220bb34de1f21403d80b2b3f5ae Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 22 Oct 2015 11:49:09 +0100 Subject: afl-eventtesting: improve event testing exit don't "Quit" twice and skip tearing down office ipc etc for the pseudo-quit AFL_PERSISTENT=1 case Change-Id: I26f0e798b95bc9376890381d4e5bd87fe8f12622 --- framework/source/services/desktop.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'framework/source/services') 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); -- cgit