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

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
üst 76a9ae80
......@@ -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
{
......
......@@ -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() )
......
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