diff options
author | Tino Rachui <tra@openoffice.org> | 2002-12-06 14:39:20 +0000 |
---|---|---|
committer | Tino Rachui <tra@openoffice.org> | 2002-12-06 14:39:20 +0000 |
commit | 63a5b081e2aa6c25455b27d62c0ec70e6eb85c1b (patch) | |
tree | 5f183ec9317414bcc15a66fd6e163b2bd3dbd3be /shell | |
parent | 2398627a6a22fff7bcf3037292f8ac495d86b5b8 (diff) |
#105062#now using cwd as base directory
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/tools/lngconvex/lngconvex.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index c816d6668c5c..a49f8df114dc 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -21,6 +21,10 @@ #include <osl/thread.h> #endif +#ifndef _OSL_PROCESS_H_ +#include <osl/process.h> +#endif + #ifndef _TOOLS_CONFIG_HXX_ #include <tools/config.hxx> #endif @@ -91,21 +95,14 @@ void ShowUsage() is located as system directory, the returned directory has a trailing '\' */ + rtl::OUString GetModuleDirectory() { - rtl_uString* url = 0; + rtl::OUString cwd_url; rtl::OUString module_dir; - bool bSuccess = osl_getModuleURLFromAddress(ShowUsage, &url); - - if (bSuccess) - { - module_dir = rtl::OUString(url); - rtl_uString_release(url); - - osl::FileBase::getSystemPathFromFileURL(module_dir, module_dir); - module_dir = rtl::OUString(module_dir.getStr(), module_dir.lastIndexOf(L'\\') + 1); - } + if (osl_Process_E_None == osl_getProcessWorkingDir(&cwd_url.pData)) + osl::FileBase::getSystemPathFromFileURL(cwd_url, module_dir); return module_dir; } |