summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins/sunmajor
diff options
context:
space:
mode:
Diffstat (limited to 'jvmfwk/plugins/sunmajor')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx8
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx30
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx18
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx8
4 files changed, 32 insertions, 32 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
index 53ac6932e5dc..628461c406ef 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
@@ -164,7 +164,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
}
else if (!bAccess && sAccessProperty.equals(i->first))
{
- if (i->second.getLength() > 0)
+ if (!i->second.isEmpty())
{
m_bAccessibility = true;
bAccess = true;
@@ -177,11 +177,11 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
if (!bVersion || !bVendor || !bHome)
return false;
- if (!m_sJavaHome.getLength())
+ if (m_sJavaHome.isEmpty())
m_sJavaHome = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///usr/lib"));
// init m_sRuntimeLibrary
- OSL_ASSERT(m_sHome.getLength());
+ OSL_ASSERT(!m_sHome.isEmpty());
//call virtual function to get the possible paths to the runtime library.
int size = 0;
@@ -266,7 +266,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
return false;
// init m_sLD_LIBRARY_PATH
- OSL_ASSERT(m_sHome.getLength());
+ OSL_ASSERT(!m_sHome.isEmpty());
size = 0;
char const * const * arLDPaths = getLibraryPaths( & size);
vector<OUString> ld_paths = getVectorFromCharArray(arLDPaths, size);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index d70338fe5615..08577c0647db 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -116,7 +116,7 @@ OString getPluginJarPath(
//but this does not harm. 1.5.0-beta < 1.5.0
sName = sName2;
}
- if (sName.getLength())
+ if (!sName.isEmpty())
{
sName = sLocation + OUSTR("/lib/") + sName;
OSL_VERIFY(
@@ -140,7 +140,7 @@ OString getPluginJarPath(
sPath = sPath1 + OUString::createFromAscii(sep) + sPath2;
}
}
- OSL_ASSERT(sPath.getLength());
+ OSL_ASSERT(!sPath.isEmpty());
}
ret = rtl::OUStringToOString(sPath, osl_getThreadTextEncoding());
@@ -167,7 +167,7 @@ JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info)
pInfo->nRequirements = info->needsRestart() ? JFW_REQUIRE_NEEDRESTART : 0;
rtl::OUStringBuffer buf(1024);
buf.append(info->getRuntimeLibrary());
- if (info->getLibraryPaths().getLength() > 0)
+ if (!info->getLibraryPaths().isEmpty())
{
buf.appendAscii("\n");
buf.append(info->getLibraryPaths());
@@ -239,8 +239,8 @@ javaPluginError jfw_plugin_getAllJavaInfos(
OUString ouMinVer(sMinVersion);
OUString ouMaxVer(sMaxVersion);
- OSL_ASSERT(ouVendor.getLength() > 0);
- if (ouVendor.getLength() == 0)
+ OSL_ASSERT(!ouVendor.isEmpty());
+ if (ouVendor.isEmpty())
return JFW_PLUGIN_E_INVALID_ARG;
JavaInfo** arInfo = NULL;
@@ -258,7 +258,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
if (ouVendor.equals(cur->getVendor()) == sal_False)
continue;
- if (ouMinVer.getLength() > 0)
+ if (!ouMinVer.isEmpty())
{
try
{
@@ -276,7 +276,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
}
}
- if (ouMaxVer.getLength() > 0)
+ if (!ouMaxVer.isEmpty())
{
try
{
@@ -358,8 +358,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
if (!path || !sVendor || !sMinVersion || !sMaxVersion || !ppInfo)
return JFW_PLUGIN_E_INVALID_ARG;
OUString ouPath(path);
- OSL_ASSERT(ouPath.getLength() > 0);
- if (ouPath.getLength() == 0)
+ OSL_ASSERT(!ouPath.isEmpty());
+ if (ouPath.isEmpty())
return JFW_PLUGIN_E_INVALID_ARG;
//nLenlist contains the number of element in arExcludeList.
@@ -372,8 +372,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
OUString ouMinVer(sMinVersion);
OUString ouMaxVer(sMaxVersion);
- OSL_ASSERT(ouVendor.getLength() > 0);
- if (ouVendor.getLength() == 0)
+ OSL_ASSERT(!ouVendor.isEmpty());
+ if (ouVendor.isEmpty())
return JFW_PLUGIN_E_INVALID_ARG;
rtl::Reference<VendorBase> aVendorInfo = getJREInfoByPath(ouPath);
@@ -384,7 +384,7 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
if (ouVendor.equals(aVendorInfo->getVendor()) == sal_False)
return JFW_PLUGIN_E_NO_JRE;
- if (ouMinVer.getLength() > 0)
+ if (!ouMinVer.isEmpty())
{
int nRes = 0;
try
@@ -404,7 +404,7 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
return JFW_PLUGIN_E_FAILED_VERSION;
}
- if (ouMaxVer.getLength() > 0)
+ if (!ouMaxVer.isEmpty())
{
int nRes = 0;
try
@@ -676,7 +676,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
{
char sep[] = {SAL_PATHSEPARATOR, 0};
OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion);
- if (sAddPath.getLength())
+ if (!sAddPath.isEmpty())
sClassPathOption = sClassPath + rtl::OString(sep) + sAddPath;
else
sClassPathOption = sClassPath;
@@ -776,7 +776,7 @@ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
return JFW_PLUGIN_E_INVALID_ARG;
::rtl::OUString sLocation(pInfo->sLocation);
- if (sLocation.getLength() == 0)
+ if (sLocation.isEmpty())
return JFW_PLUGIN_E_INVALID_ARG;
::osl::DirectoryItem item;
::osl::File::RC rc_item = ::osl::DirectoryItem::get(sLocation, item);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 947022f04aea..d541bea22816 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -378,7 +378,7 @@ bool getJavaProps(const OUString & exePath,
{
bool ret = false;
- OSL_ASSERT( exePath.getLength() > 0);
+ OSL_ASSERT(!exePath.isEmpty());
OUString usStartDir;
//We need to set the CLASSPATH in case the office is started from
//a different directory. The JREProperties.class is expected to reside
@@ -465,7 +465,7 @@ bool getJavaProps(const OUString & exePath,
continue;
JFW_TRACE2("[Java framework]:\" " << sLine << " \".\n");
sLine = sLine.trim();
- if (sLine.getLength() == 0)
+ if (sLine.isEmpty())
continue;
//The JREProperties class writes key value pairs, separated by '='
sal_Int32 index = sLine.indexOf('=', 0);
@@ -512,7 +512,7 @@ bool decodeOutput(const rtl::OString& s, rtl::OUString* out)
do
{
OString aToken = s.getToken( 0, ' ', nIndex );
- if (aToken.getLength())
+ if (!aToken.isEmpty())
{
for (sal_Int32 i = 0; i < aToken.getLength(); ++i)
{
@@ -742,7 +742,7 @@ bool getJREInfoFromBinPath(
sHome = OUString(sBinPath.getStr(), index - 1);
}
}
- if (sHome.getLength() > 0)
+ if (!sHome.isEmpty())
{
ret = getJREInfoByPath(sHome, vecInfos);
if (ret)
@@ -870,7 +870,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
OUString sResolvedDir = resolveDirPath(path);
// If this path is invalid then there is no chance to find a JRE here
- if (sResolvedDir.getLength() == 0)
+ if (sResolvedDir.isEmpty())
return 0;
//check if the directory path is good, that is a JRE was already recognized.
@@ -917,7 +917,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
sFilePath = resolveFilePath(sFullPath);
- if (sFilePath.getLength() == 0)
+ if (sFilePath.isEmpty())
{
//The file path (to java exe) is not valid
cit_path ifull = find(vecBadPaths.begin(), vecBadPaths.end(), sFullPath);
@@ -1010,7 +1010,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
}
}
- if (sVendorName.getLength() > 0)
+ if (!sVendorName.isEmpty())
{
//find the creator func for the respective vendor name
for ( sal_Int32 c = 0;
@@ -1075,7 +1075,7 @@ void createJavaInfoFromPath(vector<rtl::Reference<VendorBase> >& vecInfos)
OUString usTokenUrl;
if(File::getFileURLFromSystemPath(usToken, usTokenUrl) == File::E_None)
{
- if(usTokenUrl.getLength())
+ if(!usTokenUrl.isEmpty())
{
OUString usBin;
// "."
@@ -1096,7 +1096,7 @@ void createJavaInfoFromPath(vector<rtl::Reference<VendorBase> >& vecInfos)
{
usBin = usTokenUrl;
}
- if(usBin.getLength())
+ if(!usBin.isEmpty())
{
getJREInfoFromBinPath(usBin, vecInfos);
}
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index 1c3503244480..a63bfcf2dc57 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -150,7 +150,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
}
else if (!bAccess && sAccessProperty.equals(i->first))
{
- if (i->second.getLength() > 0)
+ if (!i->second.isEmpty())
{
m_bAccessibility = true;
bAccess = true;
@@ -164,7 +164,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
return false;
// init m_sRuntimeLibrary
- OSL_ASSERT(m_sHome.getLength());
+ OSL_ASSERT(!m_sHome.isEmpty());
//call virtual function to get the possible paths to the runtime library.
int size = 0;
@@ -190,7 +190,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
return false;
// init m_sLD_LIBRARY_PATH
- OSL_ASSERT(m_sHome.getLength());
+ OSL_ASSERT(!m_sHome.isEmpty());
size = 0;
char const * const * arLDPaths = getLibraryPaths( & size);
vector<OUString> ld_paths = getVectorFromCharArray(arLDPaths, size);
@@ -263,7 +263,7 @@ bool VendorBase::supportsAccessibility() const
bool VendorBase::needsRestart() const
{
- if (getLibraryPaths().getLength() > 0)
+ if (!getLibraryPaths().isEmpty())
return true;
return false;
}