[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - desktop/source
Henry Castro
hcastro at collabora.com
Wed Feb 17 01:27:42 UTC 2016
desktop/source/lib/init.cxx | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 4fff20024952c19b141f3c34c79ff9d116442fbc
Author: Henry Castro <hcastro at collabora.com>
Date: Tue Feb 16 21:21:24 2016 -0400
lok: add desktop terminate
When lokit is destroyed, the Desktop service
is still alive. So in order to avoid debug
assertion "Desktop disposed before terminating it",
terminate to quit application.
Change-Id: Id1391cde516915d915e5321799436e92b444e935
Reviewed-on: https://gerrit.libreoffice.org/22359
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 16d0c13..520b8ad 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2010,14 +2010,26 @@ LibreOfficeKit *libreofficekit_hook(const char* install_path)
static void lo_destroy(LibreOfficeKit* pThis)
{
+ bool bSuccess = false;
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
gImpl = NULL;
SAL_INFO("lok", "LO Destroy");
comphelper::LibreOfficeKit::setStatusIndicatorCallback(0, 0);
+ uno::Reference <frame::XDesktop2> xDesktop = frame::Desktop::create ( ::comphelper::getProcessComponentContext() );
+ bSuccess = xDesktop.is() && xDesktop->terminate();
+
+ if (!bSuccess)
+ {
+ bSuccess = GetpApp() && GetpApp()->QueryExit();
+ }
+
+ if (!bSuccess)
+ {
+ Application::Quit();
+ }
- Application::Quit();
osl_joinWithThread(pLib->maThread);
osl_destroyThread(pLib->maThread);
More information about the Libreoffice-commits
mailing list