From 2ac0db5fdd203e5aab1a67ecce244d1d9ccb98d3 Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Fri, 18 Jul 2014 13:10:14 +0200 Subject: Add OfficeIPCThread::IsEnabled. This lets us easily check whether Desktop::Main has shut down, i.e. which happens on the first restart-requiring initialisation. Change-Id: I7fe5699a4bf59e2c3b891ac73abd9b147773d22e --- desktop/source/app/officeipcthread.cxx | 5 +++++ desktop/source/app/officeipcthread.hxx | 1 + 2 files changed, 6 insertions(+) diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 93cd3393e105..eaacf81466aa 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -681,6 +681,11 @@ void OfficeIPCThread::WaitForReady( } } +bool OfficeIPCThread::IsEnabled() +{ + return pGlobalOfficeIPCThread.is(); +} + void OfficeIPCThread::execute() { #if HAVE_FEATURE_DESKTOP diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx index 9c1d7518869b..8ed40fdcfcde 100644 --- a/desktop/source/app/officeipcthread.hxx +++ b/desktop/source/app/officeipcthread.hxx @@ -128,6 +128,7 @@ class OfficeIPCThread : public salhelper::Thread static void WaitForReady( rtl::Reference< OfficeIPCThread > const & pThread = rtl::Reference< OfficeIPCThread >()); + static bool IsEnabled(); bool AreRequestsEnabled() const { return mbRequestsEnabled && ! mbDowning; } }; -- cgit v1.2.3