diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-18 09:48:47 +0200 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-07-26 16:06:29 +0200 |
commit | a3f17741188eeac728d14f564c8d64e00a48041d (patch) | |
tree | b3e5e3a50ffc9309c4e3c7a4508e4f83ac75f00f | |
parent | ec721f5cd397b0e2ad8f69ce27844e9177ecf96e (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.cxx | 12 | ||||
-rw-r--r-- | desktop/source/app/officeipcthread.hxx | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index aed17b9c587e..93cd3393e105 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 4628ecab0062..9c1d7518869b 100644 --- a/desktop/source/app/officeipcthread.hxx +++ b/desktop/source/app/officeipcthread.hxx @@ -125,6 +125,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; } }; |