summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/lib/init.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 442d88eaeecf..4fab9477f330 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3435,9 +3435,6 @@ static int lo_joinThreads(LibreOfficeKit* /* pThis */)
comphelper::ThreadPool &pool = comphelper::ThreadPool::getSharedOptimalPool();
pool.joinThreadsIfIdle();
-// if (comphelper::getWorkerCount() > 0)
-// return 0;
-
// Grammar checker thread
css::uno::Reference<css::linguistic2::XLinguServiceManager2> xLangSrv =
css::linguistic2::LinguServiceManager::create(xContext);
@@ -3452,6 +3449,12 @@ static int lo_joinThreads(LibreOfficeKit* /* pThis */)
if (joinable && !joinable->joinThreads())
return 0;
+ auto progressThread = xContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.task.StatusIndicatorFactory", xContext);
+ joinable = dynamic_cast<comphelper::LibreOfficeKit::ThreadJoinable *>(progressThread.get());
+ if (joinable && !joinable->joinThreads())
+ return 0;
+
// Ensure configmgr's write thread is down
css::uno::Reference< css::util::XFlushable >(
css::configuration::theDefaultProvider::get(
@@ -3468,6 +3471,12 @@ static void lo_startThreads(LibreOfficeKit* /* pThis */)
auto joinable = dynamic_cast<comphelper::LibreOfficeKit::ThreadJoinable *>(ucpWebdav.get());
if (joinable)
joinable->startThreads();
+
+ auto progressThread = xContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.task.StatusIndicatorFactory", xContext);
+ joinable = dynamic_cast<comphelper::LibreOfficeKit::ThreadJoinable *>(progressThread.get());
+ if (joinable)
+ joinable->startThreads();
}
static void lo_setForkedChild(LibreOfficeKit* /* pThis */, bool bIsChild)