diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-10-17 17:33:10 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-17 17:39:21 +0200 |
commit | 63691a62c8695889144841abf8a32d52535ae671 (patch) | |
tree | fe83dd07e55de5076a78a3f4e58e7585f44d7ce1 /vcl | |
parent | 76a9ae801bcc252947da991e9bf6dc3ebfde5ebf (diff) |
Consistently use SAL_USE_VCLPLUGIN as a bootstrap variable
...and neither exclusively nor additionally as an environment variable (where
bootstrap variables include environment variables, see the @file comment in
include/rtl/bootstrap.h). Note that LibLibreOffice_Impl::initialize
(desktop/source/lib/init.cxx) sets it as a bootstrap, not as an environment
variable. (Though desktop/unx/source/start.c still only reads it as an
environment variable; could potentially check argv for
-env:SAL_USE_VCLPLUGIN=...)
Change-Id: I9315f585cdb4f0783181359e030686167c4e4625
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/desktopdetect/desktopdetector.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/generic/plugadapt/salplug.cxx | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx index 6edf8d1891cf..f18bf0a73108 100644 --- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -24,6 +24,7 @@ #include <unx/desktops.hxx> +#include "rtl/bootstrap.hxx" #include "rtl/process.h" #include "rtl/ustrbuf.hxx" #include "osl/module.h" @@ -303,10 +304,10 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment() // get display to connect to const char* pDisplayStr = getenv( "DISPLAY" ); - const char* pUsePlugin = getenv( "SAL_USE_VCLPLUGIN" ); + OUString plugin; + rtl::Bootstrap::get("SAL_USE_VCLPLUGIN", plugin); - if ((pUsePlugin && (strcmp(pUsePlugin, "svp") == 0)) - || Application::IsHeadlessModeRequested()) + if (plugin == "svp" || Application::IsHeadlessModeRequested()) pDisplayStr = NULL; else { diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index 1e0b0db2f231..ddd04222ed66 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -220,11 +220,7 @@ SalInstance *CreateSalInstance() aUsePlugin = "svp"; else { - static const char* pUsePlugin = getenv( "SAL_USE_VCLPLUGIN" ); - if( pUsePlugin ) - aUsePlugin = OUString::createFromAscii( pUsePlugin ); - else - rtl::Bootstrap::get( "SAL_USE_VCLPLUGIN", aUsePlugin ); + rtl::Bootstrap::get( "SAL_USE_VCLPLUGIN", aUsePlugin ); } if( !aUsePlugin.isEmpty() ) |