diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-11-27 11:48:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-27 11:48:34 +0100 |
commit | 41565560250294e22fc1c21bc4bab8286255d4cc (patch) | |
tree | 7c0009ee853c1de18ecb556e0412ab5df0bdde16 /sal/rtl | |
parent | c56d96fc39de897b5e8213eb5e5af295759dccbf (diff) |
Make osl_getExecutableFile work even without a prior osl_setCommandArgs
After 2ad716f406e0fdb9b9294876c64ae92fecbf5e27 "Revert 'pyuno: set up fake
command line in getComponentContext(),'" e.g. PythonTest_sw_python would fail on
Windows, where WinSalGraphics::GetDevFontList (vcl/win/source/gdi/salgdi3.cxx)
calls osl_getExecutableFile and is itself called in a python process where
osl_setCommandArgs has not been set up.
This patch makes osl_getExecutableFile on all platforms if osl_setCommandArgs
has not (yet) been set fall back to the code that was
osl_bootstrap_getExecutableFile_Impl (which was called from
sal/rtl/bootstrap.cxx, which can now call osl_getExecutableFile).
Change-Id: I6c1bb59205041b3208c830a8b8406e28128b4566
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/bootstrap.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx index f24881953770..39b7665a0be4 100644 --- a/sal/rtl/bootstrap.cxx +++ b/sal/rtl/bootstrap.cxx @@ -42,8 +42,6 @@ #include <boost/unordered_map.hpp> #include <list> -#include "getexecutablefile.hxx" - #ifdef ANDROID #include <osl/detail/android-bootstrap.h> #endif @@ -216,7 +214,7 @@ static bool getFromCommandLineArgs( static void getExecutableDirectory_Impl (rtl_uString ** ppDirURL) { OUString fileName; - osl_bootstrap_getExecutableFile_Impl (&(fileName.pData)); + osl_getExecutableFile(&(fileName.pData)); sal_Int32 nDirEnd = fileName.lastIndexOf('/'); OSL_ENSURE(nDirEnd >= 0, "Cannot locate executable directory"); @@ -254,7 +252,7 @@ static OUString & getIniFileName_Impl() } else { - osl_bootstrap_getExecutableFile_Impl (&(fileName.pData)); + osl_getExecutableFile(&(fileName.pData)); // get rid of a potential executable extension OUString progExt = ".bin"; |