summaryrefslogtreecommitdiff
path: root/framework/source/services/desktop.cxx
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 /framework/source/services/desktop.cxx
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 'framework/source/services/desktop.cxx')
-rw-r--r--framework/source/services/desktop.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index d3ebf627b86c..8f9f3f0bac85 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -1040,7 +1040,7 @@ void SAL_CALL Desktop::disposing()
// But if you just ignore the assertion (which happens in unit
// tests for instance in sc/qa/unit) nothing bad happens.
- SAL_WARN_IF(!m_bIsShutdown, "fwk.desktop", "Desktop disposed before terminating it");
+ assert(m_bIsShutdown && "Desktop disposed before terminating it");
{
SolarMutexGuard aWriteLock;