diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-11-22 12:51:45 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-11-22 16:44:06 +0100 |
commit | 1947012abc29cc3a6a58bdfcb3bd248e2c95c23d (patch) | |
tree | be0d395dbedca7e1bbe7b42390424248c805f00f /vcl/source/opengl | |
parent | 340ed84c84304297513225c179399f8f3fdd146a (diff) |
SAL_USE_VCLPLUGIN is a UNO bootstrap variable
...(which includes environment variables), so read it as one (as is already done
in e.g. CreateSalInstance in vcl/source/app/salplug.cxx), esp. so since
lo_initialize in desktop/source/lib/init.cxx doesn't set it as an environment
variable
Change-Id: I557ecf4fcc5daba1e748af789847c8bbb9f563d6
Reviewed-on: https://gerrit.libreoffice.org/63801
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index aa876ac60688..b2a70ed7064b 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -987,8 +987,11 @@ bool OpenGLHelper::isVCLOpenGLEnabled() else if (bSupportsVCLOpenGL) { static bool bEnableGLEnv = !!getenv("SAL_ENABLEGL"); - static bool bHeadlessPlugin = (getenv("SAL_USE_VCLPLUGIN") && - 0 == strcmp(getenv("SAL_USE_VCLPLUGIN"), "svp")); + static bool bHeadlessPlugin = []{ + OUString plugin; + rtl::Bootstrap::get("SAL_USE_VCLPLUGIN", plugin); + return plugin == "svp"; + }(); bEnable = bEnableGLEnv; |