summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-18 09:48:47 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-12-04 12:22:59 +0100
commitad2c68fbe853f585041133b86fb687203777503b (patch)
treebfa0afb7921524c1671c486a90e5c318852db2ed /desktop
parent13fced388e20278c8ebb8a12b88aad63c0fd6b9c (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
Diffstat (limited to 'desktop')
-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 2c4e9d1df365..1789fbdd1f7e 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -670,6 +670,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; }
};