diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-03-05 22:21:57 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-03-12 15:35:35 +0000 |
commit | ddaf31f183fe3f2fbf76c1b87eb5a943dc6d833f (patch) | |
tree | b01578b77ea9725ad409aac76dacb54a01dba3c2 /vcl/unx/generic | |
parent | 08b6643eda69c1d4fc8a0b1277ffdd65834d5f46 (diff) |
liblibo: install test library by itself and install it.
Also fix debugging with threads, find fundamentalrc correctly,
make it headless, finally loads a document then exits.
Change-Id: I2017075bf3b3c7198bde53b9fe85585089e5ab6c
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r-- | vcl/unx/generic/plugadapt/salplug.cxx | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index 3d87977d3a58..2dbd37f3c93d 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -21,6 +21,7 @@ #include "osl/process.h" #include "rtl/ustrbuf.hxx" +#include "rtl/bootstrap.hxx" #include "salinst.hxx" #include "generic/gensys.h" @@ -198,31 +199,22 @@ static SalInstance* autodetect_plugin() return pInst; } -static SalInstance* check_headless_plugin() -{ - int nParams = osl_getCommandArgCount(); - OUString aParam; - for( int i = 0; i < nParams; i++ ) - { - osl_getCommandArg( i, &aParam.pData ); - if( aParam == "-headless" || aParam == "--headless" ) - { - return tryInstance("svp"); - } - } - return NULL; -} - SalInstance *CreateSalInstance() { - SalInstance* pInst = NULL; + SalInstance *pInst = NULL; + OUString aUsePlugin; static const char* pUsePlugin = getenv( "SAL_USE_VCLPLUGIN" ); + if( pUsePlugin ) + aUsePlugin = OUString::createFromAscii( pUsePlugin ); + else + rtl::Bootstrap::get( "SAL_USE_VCLPLUGIN", aUsePlugin ); - pInst = check_headless_plugin(); + if( Application::IsHeadlessModeRequested() ) + aUsePlugin = "svp"; - if( !pInst && pUsePlugin && *pUsePlugin ) - pInst = tryInstance( OUString::createFromAscii( pUsePlugin ), true ); + if( !aUsePlugin.isEmpty() ) + pInst = tryInstance( aUsePlugin ); if( ! pInst ) pInst = autodetect_plugin(); |