diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-06-09 12:12:33 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-06-09 12:12:33 +0000 |
commit | b074a161c4b069c7938393f7181a88094169f9f7 (patch) | |
tree | 4fce65426afbbb40cef2cf12ca3999b521cbcfdf /tools | |
parent | 9ad39473a5629b5bcb51f740f8daa16d3ec999f7 (diff) |
INTEGRATION: CWS sb87 (1.3.8); FILE MERGED
2008/04/24 13:15:20 sb 1.3.8.4: RESYNC: (1.3-1.4); FILE MERGED
2008/04/21 09:42:00 sb 1.3.8.3: #i88211# use new rtl_bootstrap_encode
2008/04/11 13:24:56 sb 1.3.8.2: #i87730# ${.verb:...} not needed after all, fixed now with individual backslash escapes instead
2008/04/09 13:48:57 sb 1.3.8.1: #i87730# use ${.verb:...} when setting URE_BOOTSTRAP (the URL might contain verbatim $)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/misc/extendapplicationenvironment.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/source/misc/extendapplicationenvironment.cxx b/tools/source/misc/extendapplicationenvironment.cxx index 653f438f2fab..af52e362c284 100644 --- a/tools/source/misc/extendapplicationenvironment.cxx +++ b/tools/source/misc/extendapplicationenvironment.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: extendapplicationenvironment.cxx,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -46,6 +46,7 @@ #include "rtl/bootstrap.hxx" #include "rtl/string.hxx" #include "rtl/textcvt.h" +#include "rtl/ustrbuf.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -64,12 +65,13 @@ void extendApplicationEnvironment() { #endif // Make sure URE_BOOTSTRAP environment variable is set (failure is fatal): - rtl::OUString env(RTL_CONSTASCII_USTRINGPARAM("URE_BOOTSTRAP=")); + rtl::OUStringBuffer env; + env.appendAscii(RTL_CONSTASCII_STRINGPARAM("URE_BOOTSTRAP=")); rtl::OUString uri; if (rtl::Bootstrap::get( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URE_BOOTSTRAP")), uri)) { - env += uri; + env.append(rtl::Bootstrap::encode(uri)); } else { if (osl_getExecutableFile(&uri.pData) != osl_Process_E_None) { abort(); @@ -78,12 +80,12 @@ void extendApplicationEnvironment() { if (i >= 0) { uri = uri.copy(0, i + 1); } - env += uri; - env += rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(SAL_CONFIGFILE("fundamental"))); + env.append(rtl::Bootstrap::encode(uri)); + env.appendAscii( + RTL_CONSTASCII_STRINGPARAM(SAL_CONFIGFILE("fundamental"))); } rtl::OString s; - if (!env.convertToString( + if (!env.makeStringAndClear().convertToString( &s, osl_getThreadTextEncoding(), RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)) |