summaryrefslogtreecommitdiff
path: root/svx/source/gengal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-07-27 11:06:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-07-30 10:49:27 +0200
commit6e35794cad555485955c3b43593497dcdbf29840 (patch)
tree430c0299f21fb62faf6d0ba5e04410fafdda14d2 /svx/source/gengal
parenta6e02f6337f038a445b858bb91bf14d1a14768e4 (diff)
terminate XDesktop properly in unit tests
So that the UNO constructor work can continue - where we need the desktop to be disposed properly so that all UNO constructors objects have their dispose() called, and they can clean up their global state. We detect this case by changing a SAL_WARN to an assert in Desktop::disposing() (*) in ~ScTabViewShell, don't call EnterHandler, because that tries to create EditEngine's and other stuff, which crashes (*) Need a fake singleton so that the servicemanager calls dispose() on the AnalysAddIn and we can clear the global variable there. Change-Id: Id13b51e17afc16fcbbc65d64281cdf847e4a58cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99640 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/gengal')
-rw-r--r--svx/source/gengal/gengal.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 572b9e081723..d57174ff8913 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -18,6 +18,7 @@
#include <cppuhelper/bootstrap.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <tools/urlobj.hxx>
#include <vcl/vclmain.hxx>
@@ -308,6 +309,8 @@ int GalApp::Main()
void GalApp::DeInit()
{
+ auto xDesktop = css::frame::Desktop::create(comphelper::getProcessComponentContext());
+ xDesktop->terminate();
uno::Reference< lang::XComponent >(
comphelper::getProcessComponentContext(),
uno::UNO_QUERY_THROW )-> dispose();