diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-16 17:29:29 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-16 17:29:29 +0100 |
commit | f582ad2c696dfd2fc7f43b70d9afab7877974b7b (patch) | |
tree | dc2043fac305a17e87971ad0c9db7194f04e6cd1 /jvmfwk | |
parent | 43e889da0229ee62774f9d359f48046682295402 (diff) |
jvmfwk: Use appropriate OUString functions on string constants
Change-Id: I3e0b70c61c4e92f2cbd27ce7c45e67ae04dfe14c
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 11 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.hxx | 2 | ||||
-rw-r--r-- | jvmfwk/source/fwkbase.cxx | 5 |
3 files changed, 6 insertions, 12 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 7ea4d1b68565..d79ed47d3884 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -946,8 +946,7 @@ rtl::Reference<VendorBase> getJREInfoByPath( if (path.getLength() == sizeof("file:///") - 1) sFullPath = sResolvedDir + (*i); else - sFullPath = sResolvedDir + - OUString("/") + (*i); + sFullPath = sResolvedDir + "/" + (*i); sFilePath = resolveFilePath(sFullPath); @@ -1103,8 +1102,6 @@ void addJavaInfosFromPath( { #if !defined JVM_ONE_PATH_CHECK // Get Java from PATH environment variable - static const char sCurDir[] = "."; - static const char sParentDir[] = ".."; char *szPath= getenv("PATH"); if(szPath) { @@ -1119,15 +1116,13 @@ void addJavaInfosFromPath( if(!usTokenUrl.isEmpty()) { OUString usBin; - // "." - if(usTokenUrl.equals(sCurDir)) + if(usTokenUrl == ".") { OUString usWorkDirUrl; if(osl_Process_E_None == osl_getProcessWorkingDir(&usWorkDirUrl.pData)) usBin= usWorkDirUrl; } - // ".." - else if(usTokenUrl.equals(sParentDir)) + else if(usTokenUrl == "..") { OUString usWorkDir; if(osl_Process_E_None == osl_getProcessWorkingDir(&usWorkDir.pData)) diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx index ffe07c21abfa..456cfd754adc 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx @@ -84,7 +84,7 @@ struct SameOrSubDirJREMap if (s1 == s2.first) return true; OUString sSub; - sSub = s2.first + OUString("/"); + sSub = s2.first + "/"; if (s1.match(sSub)) return true; return false; diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx index 95d7f3fd1d08..548bed4e63cf 100644 --- a/jvmfwk/source/fwkbase.cxx +++ b/jvmfwk/source/fwkbase.cxx @@ -232,7 +232,7 @@ std::vector<OUString> VendorSettings::getSupportedVendors() for (sal_Int32 i = 1; ; i++) { - OUString sName = OUString(UNO_JAVA_JFW_PARAMETER) + OUString::number(i); + OUString sName = UNO_JAVA_JFW_PARAMETER + OUString::number(i); OUString sValue; if (Bootstrap::get()->getFrom(sName, sValue)) { @@ -436,8 +436,7 @@ JFW_MODE getMode() OUString sEnvClasspath(UNO_JAVA_JFW_ENV_CLASSPATH); if (!aBoot->getFrom(sEnvClasspath, sValue)) { - OUString sParams = OUString( - UNO_JAVA_JFW_PARAMETER) + + OUString sParams = UNO_JAVA_JFW_PARAMETER + OUString::number(1); if (!aBoot->getFrom(sParams, sValue)) { |