summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-18 09:48:47 +0200
committerAndrzej Hunt <andrzej@ahunt.org>2014-08-19 14:03:55 +0200
commitbb7d7e28e74bc6493600b1a3a9fd011e29907717 (patch)
tree348c074535793b17b8409294affa719f9336f1db
parent7bdcaaf81ff41d661b913341e1154aaaa75dcb14 (diff)
Add OfficeIPCThread::WaitForReady.
For LibreOfficeKit we need to start up the event loop, and can't continue initialisation until all the related (VCL etc.) setup is complete -- the OfficeIPCThread is also enabled as one of the last items, and can be used to indicate whether or not we can start actually working with VCL. Change-Id: I0450b65584ddf6e8d02ce0c6e66e06f47841d1b7
-rw-r--r--desktop/source/app/officeipcthread.cxx12
-rw-r--r--desktop/source/app/officeipcthread.hxx3
2 files changed, 15 insertions, 0 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index d636adf92a28..79b8f92f6ccd 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -669,6 +669,18 @@ void OfficeIPCThread::SetReady(
}
}
+void OfficeIPCThread::WaitForReady(
+ rtl::Reference< OfficeIPCThread > const & pThread)
+
+{
+ rtl::Reference< OfficeIPCThread > const & t(
+ pThread.is() ? pThread : pGlobalOfficeIPCThread);
+ if (t.is())
+ {
+ t->cReady.wait();
+ }
+}
+
void OfficeIPCThread::execute()
{
#if HAVE_FEATURE_DESKTOP
diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx
index 921da49a8522..9b3f1fd705da 100644
--- a/desktop/source/app/officeipcthread.hxx
+++ b/desktop/source/app/officeipcthread.hxx
@@ -126,6 +126,9 @@ class OfficeIPCThread : public salhelper::Thread
static void SetReady(
rtl::Reference< OfficeIPCThread > const & pThread =
rtl::Reference< OfficeIPCThread >());
+ static void WaitForReady(
+ rtl::Reference< OfficeIPCThread > const & pThread =
+ rtl::Reference< OfficeIPCThread >());
bool AreRequestsEnabled() const { return mbRequestsEnabled && ! mbDowning; }
};