Kaydet (Commit) a0659cc4 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Enable experimental gtk3 plugin only via SAL_USE_VCLPLUGIN

...and not also via experimental mode, to avoid trying to use the UNO service
manager before it has been initialized.

Change-Id: Idee8bdccf1193ebe5aa0c47c801f0e2209d57899
üst e128ec49
...@@ -26,10 +26,6 @@ ...@@ -26,10 +26,6 @@
* *
************************************************************************/ ************************************************************************/
#include "officecfg/Office/Common.hxx"
#include "comphelper/processfactory.hxx"
#include "osl/module.h" #include "osl/module.h"
#include "osl/process.h" #include "osl/process.h"
...@@ -55,16 +51,14 @@ static oslModule pCloseModule = NULL; ...@@ -55,16 +51,14 @@ static oslModule pCloseModule = NULL;
static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = false ) static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = false )
{ {
SalInstance* pInst = NULL; SalInstance* pInst = NULL;
#if !defined(ANDROID) // Disable gtk3 plugin for now unless explicitly requested via
// SAL_USE_VCLPLUGIN=gtk3 (would ideally depend on experimental mode, but
// reading the experimental mode setting requires the UNO service manager
// which has not yet been instantiated):
if (!bForce && rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gtk3"))) if (!bForce && rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gtk3")))
{ {
// Disable gtk3 plugin load except in experimental mode for now. return NULL;
using namespace com::sun::star;
uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
if (!xContext.is() || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
return NULL;
} }
#endif
OUStringBuffer aModName( 128 ); OUStringBuffer aModName( 128 );
aModName.appendAscii( SAL_DLLPREFIX"vclplug_" ); aModName.appendAscii( SAL_DLLPREFIX"vclplug_" );
aModName.append( rModuleBase ); aModName.append( rModuleBase );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment