diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-06-17 09:12:42 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-06-17 09:12:42 +0000 |
commit | f6a65692907791354abe9e70e6fddce035c2e080 (patch) | |
tree | 72f260b6820eb85097a7b088b00b9b1e380a6c7c /jvmfwk/source/fwkutil.cxx | |
parent | 379d13216b7f6594c4290d4ee12031fdb59c0327 (diff) |
INTEGRATION: CWS sb31 (1.21.12); FILE MERGED
2005/04/18 14:30:01 sb 1.21.12.1: #121392# Changed findPlugin to first search the plugin library relative to a base URL that is set to the location of the javavendors.xml file itself.
Diffstat (limited to 'jvmfwk/source/fwkutil.cxx')
-rw-r--r-- | jvmfwk/source/fwkutil.cxx | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index 302d3e9f8505..77044f9e5d46 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fwkutil.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: rt $ $Date: 2005-01-31 09:52:11 $ + * last change: $Author: obo $ $Date: 2005-06-17 10:12:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -264,11 +264,32 @@ rtl::OUString getExecutableDirectory() return getDirFromFile(ouExe); } -rtl::OUString findPlugin(const rtl::OUString & plugin) +rtl::OUString findPlugin( + const rtl::OUString & baseUrl, const rtl::OUString & plugin) { + rtl::OUString sUrl; + try + { + sUrl = rtl::Uri::convertRelToAbs(baseUrl, plugin); + } + catch (rtl::MalformedUriException & e) + { + throw FrameworkException( + JFW_E_ERROR, + (rtl::OString( + RTL_CONSTASCII_STRINGPARAM( + "[Java framework] rtl::MalformedUriException in" + " findPlugin: ")) + + rtl::OUStringToOString( + e.getMessage(), osl_getThreadTextEncoding()))); + } + if (checkFileURL(sUrl) == jfw::FILE_OK) + { + return sUrl; + } rtl::OUString retVal; rtl::OUString sProgDir = getExecutableDirectory(); - rtl::OUString sUrl = sProgDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + sUrl = sProgDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + plugin; jfw::FileStatus s = checkFileURL(sUrl); if (s == jfw::FILE_INVALID || s == jfw::FILE_DOES_NOT_EXIST) |