vcl/unx/generic/plugadapt/salplug.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
New commits: commit adf7d6e17334391459343d1f96c152872ce6e704 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 26 09:55:29 2012 +0100 configuration checked before component context exists in simple applications, e.g. spadmin, which don't have a custom main, then this configuration check happens too early before Application::Main gets run to have a chance to set the ProcessComponentContext. diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index 6bc7d89..b92c8c7 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -28,6 +28,8 @@ #include "officecfg/Office/Common.hxx" +#include "comphelper/processfactory.hxx" + #include "osl/module.h" #include "osl/process.h" @@ -54,11 +56,14 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals { SalInstance* pInst = NULL; #if !defined(ANDROID) - // Disable gtk3 plugin load except in experimental mode for now. - if( !bForce && - rModuleBase.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "gtk3" ) ) && - !officecfg::Office::Common::Misc::ExperimentalMode::get() ) - return NULL; + if (!bForce && rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gtk3"))) + { + // Disable gtk3 plugin load except in experimental mode for now. + 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 ); aModName.appendAscii( SAL_DLLPREFIX"vclplug_" );
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits