[Libreoffice-commits] core.git: vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 22 15:44:36 UTC 2018


 vcl/source/opengl/OpenGLHelper.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 1947012abc29cc3a6a58bdfcb3bd248e2c95c23d
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 22 12:51:45 2018 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Nov 22 16:44:06 2018 +0100

    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 at fbihome.de>
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

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;
 


More information about the Libreoffice-commits mailing list