summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ucb/source/ucp/gio/gio_provider.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx
index d68a3bc59984..5b94d9a5374c 100644
--- a/ucb/source/ucp/gio/gio_provider.cxx
+++ b/ucb/source/ucp/gio/gio_provider.cxx
@@ -120,11 +120,25 @@ ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider );
}
+// gio creates threads we don't want in online's forkit
+static bool isDisabled()
+{
+ const char *pDisable = getenv("UNODISABLELIBRARY");
+ if (!pDisable)
+ return false;
+ OString aDisable(pDisable, strlen(pDisable));
+ return aDisable.indexOf("ucpgio1") >= 0;
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT void * ucpgio1_component_getFactory( const sal_Char *pImplName,
void *pServiceManager, void * )
{
void * pRet = nullptr;
+ static bool bDisabled = isDisabled();
+ if (bDisabled)
+ return nullptr;
+
uno::Reference< lang::XMultiServiceFactory > xSMgr
(static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
uno::Reference< lang::XSingleServiceFactory > xFactory;