summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-08 15:26:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-10 15:28:16 +0200
commita99707d2c4f65a6a5fe160ce2b614aca273f0d2d (patch)
tree48a40d28677bb70a185edf76f76b6d57f9350419 /framework
parent015578db97bec8926441a9440de6067937f63143 (diff)
Resolves: rhbz#144437 make gnome-documents not crash the whole time
accept that once initted that LibreOffice cannot be deinitted and reinited (without lots of work), but allow the main loop to quit and restart so LOKs thread can run and exit successfully, new LOK connections will restart the main loop. The buckets of global state continues to be valid the whole time this way Change-Id: Ide54c0df2ce4065f7c192ae8c2cedfaaa2b58d72 Reviewed-on: https://gerrit.libreoffice.org/37399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/desktop.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 477f166d3b41..ea0d610361ae 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -61,6 +61,7 @@
#include <com/sun/star/frame/XTerminateListener2.hpp>
#include <comphelper/sequence.hxx>
+#include <comphelper/lok.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/instance.hxx>
#include <vcl/svapp.hxx>
@@ -227,8 +228,9 @@ 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 bIsEventTestingMode = Application::IsEventTestingModeEnabled();
- bool bFramesClosed = impl_closeFrames(!bIsEventTestingMode);
+ bool bRestartableMainLoop = Application::IsEventTestingModeEnabled() ||
+ comphelper::LibreOfficeKit::isActive();
+ bool bFramesClosed = impl_closeFrames(!bRestartableMainLoop);
// Ask normal terminate listener. They could stop terminating the process.
Desktop::TTerminateListenerList lCalledTerminationListener;
@@ -240,7 +242,7 @@ sal_Bool SAL_CALL Desktop::terminate()
return false;
}
- if (bIsEventTestingMode)
+ if (bRestartableMainLoop)
{
Application::Quit();
return true;