diff options
author | Gustavo Buzzatti Pacheco <gbpacheco@gmail.com> | 2012-01-04 11:38:41 -0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-01-05 15:07:34 +0100 |
commit | c47f3523338b8e58c1ea18cc583064761f60df90 (patch) | |
tree | b4fa717b768e4445e66a9345119103689f4fdd57 /jvmfwk/source | |
parent | 77d05dfa5ba3f81844b093808246d60504cfabda (diff) |
Fix for fdo43460 Part XXII getLength() to isEmpty()
Part XXII
modules
jvmfwk, l10ntools, lingucomponent
Diffstat (limited to 'jvmfwk/source')
-rw-r--r-- | jvmfwk/source/elements.cxx | 8 | ||||
-rw-r--r-- | jvmfwk/source/framework.cxx | 4 | ||||
-rw-r--r-- | jvmfwk/source/fwkbase.cxx | 28 |
3 files changed, 20 insertions, 20 deletions
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index 5af3d02a49e2..e6273e0ce597 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -52,7 +52,7 @@ rtl::OString getElement(::rtl::OString const & docPath, xmlChar const * pathExpression, bool bThrowIfEmpty) { //Prepare the xml document and context - OSL_ASSERT(docPath.getLength() > 0); + OSL_ASSERT(!docPath.isEmpty()); jfw::CXmlDocPtr doc(xmlParseFile(docPath.getStr())); if (doc == NULL) throw FrameworkException( @@ -234,7 +234,7 @@ NodeJava::NodeJava(Layer layer): if (USER_OR_INSTALL == m_layer) { - if (BootParams::getInstallData().getLength() > 0) + if (!BootParams::getInstallData().isEmpty()) m_layer = INSTALL; else m_layer = USER; @@ -995,7 +995,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo) cur = cur->next; } - if (sVendor.getLength() == 0) + if (sVendor.isEmpty()) m_bEmptyNode = true; //Get the javainfo attributes CXmlCharPtr sVendorUpdate; @@ -1158,7 +1158,7 @@ MergedSettings::MergedSettings(): //shared data. const ::rtl::OUString sInstall = BootParams::getInstallData(); - if (sInstall.getLength() == 0) + if (sInstall.isEmpty()) { NodeJava sharedSettings(NodeJava::SHARED); sharedSettings.load(); diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 99f543f90b06..0fc3b5ae3697 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -510,7 +510,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo) JavaInfo* pJInfo = arInfos[ii]; //We remember the very first installation in aCurrentInfo - if (aCurrentInfo.getLocation().getLength() == 0) + if (aCurrentInfo.getLocation().isEmpty()) aCurrentInfo = pJInfo; // compare features // If the user does not require any features (nFeatureFlags = 0) @@ -588,7 +588,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo) if (aInfo) { //We remember the very first installation in aCurrentInfo - if (aCurrentInfo.getLocation().getLength() == 0) + if (aCurrentInfo.getLocation().isEmpty()) aCurrentInfo = aInfo; // compare features // If the user does not require any features (nFeatureFlags = 0) diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx index c318073aac1f..3b3bfcd8b5cd 100644 --- a/jvmfwk/source/fwkbase.cxx +++ b/jvmfwk/source/fwkbase.cxx @@ -72,7 +72,7 @@ namespace { rtl::OString getVendorSettingsPath(rtl::OUString const & sURL) { - if (sURL.getLength() == 0) + if (sURL.isEmpty()) return rtl::OString(); rtl::OUString sSystemPathSettings; if (osl_getSystemPathFromFileURL(sURL.pData, @@ -119,14 +119,14 @@ VendorSettings::VendorSettings(): "VendorSettings::VendorSettings() (fwkbase.cxx)"); //Prepare the xml document and context OString sSettingsPath = getVendorSettingsPath(m_xmlDocVendorSettingsFileUrl); - if (sSettingsPath.getLength() == 0) + if (sSettingsPath.isEmpty()) { OString sMsg("[Java framework] A vendor settings file was not specified." "Check the bootstrap parameter " UNO_JAVA_JFW_VENDOR_SETTINGS "."); OSL_FAIL(sMsg.getStr()); throw FrameworkException(JFW_E_CONFIGURATION, sMsg); } - if (sSettingsPath.getLength() > 0) + if (!sSettingsPath.isEmpty()) { m_xmlDocVendorSettings = xmlParseFile(sSettingsPath.getStr()); if (m_xmlDocVendorSettings == NULL) @@ -174,7 +174,7 @@ std::vector<PluginLibrary> VendorSettings::getPluginData() //create the file URL to the library OUString sUrl = findPlugin( m_xmlDocVendorSettingsFileUrl, sTextLibrary); - if (sUrl.getLength() == 0) + if (sUrl.isEmpty()) { OString sPlugin = OUStringToOString( sTextLibrary, osl_getThreadTextEncoding()); @@ -193,7 +193,7 @@ std::vector<PluginLibrary> VendorSettings::getPluginData() VersionInfo VendorSettings::getVersionInformation(const rtl::OUString & sVendor) { - OSL_ASSERT(sVendor.getLength() > 0); + OSL_ASSERT(!sVendor.isEmpty()); VersionInfo aVersionInfo; OString osVendor = OUStringToOString(sVendor, RTL_TEXTENCODING_UTF8); //Get minVersion @@ -303,7 +303,7 @@ std::vector<OUString> VendorSettings::getSupportedVendors() OUString VendorSettings::getPluginLibrary(const OUString& sVendor) { - OSL_ASSERT(sVendor.getLength() > 0); + OSL_ASSERT(!sVendor.isEmpty()); OString sExcMsg("[Java framework] Error in function getPluginLibrary (fwkbase.cxx)."); OString sVendorsPath = getVendorSettingsPath(m_xmlDocVendorSettingsFileUrl); @@ -327,7 +327,7 @@ OUString VendorSettings::getPluginLibrary(const OUString& sVendor) //make an absolute file url from the relative plugin URL OUString sUrl = findPlugin(m_xmlDocVendorSettingsFileUrl, xmlCharPlugin); - if (sUrl.getLength() == 0) + if (sUrl.isEmpty()) { OString sPlugin = OUStringToOString( xmlCharPlugin, osl_getThreadTextEncoding()); @@ -616,7 +616,7 @@ rtl::OUString getApplicationClassPath() OSL_ASSERT(getMode() == JFW_MODE_APPLICATION); rtl::OUString retVal; rtl::OUString sParams = BootParams::getClasspathUrls(); - if (sParams.getLength() == 0) + if (sParams.isEmpty()) return retVal; rtl::OUStringBuffer buf; @@ -625,13 +625,13 @@ rtl::OUString getApplicationClassPath() do { ::rtl::OUString token( sParams.getToken( 0, ' ', index ).trim() ); - if (token.getLength()) + if (!token.isEmpty()) { ::rtl::OUString systemPathElement; oslFileError rc = osl_getSystemPathFromFileURL( token.pData, &systemPathElement.pData ); OSL_ASSERT( rc == osl_File_E_None ); - if (rc == osl_File_E_None && systemPathElement.getLength() > 0) + if (rc == osl_File_E_None && !systemPathElement.isEmpty()) { if (buf.getLength() > 0) buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( @@ -652,14 +652,14 @@ rtl::OString makeClassPathOption(OUString const & sUserClassPath) char szSep[] = {SAL_PATHSEPARATOR,0}; // append all user selected jars to the class path - if (sUserClassPath.getLength() > 0) + if (!sUserClassPath.isEmpty()) sBufCP.append(sUserClassPath); //append all jar libraries and components to the class path OUString sAppCP = getApplicationClassPath(); - if (sAppCP.getLength()) + if (!sAppCP.isEmpty()) { - if (sUserClassPath.getLength()) + if (!sUserClassPath.isEmpty()) sBufCP.appendAscii(szSep); sBufCP.append(sAppCP); } @@ -689,7 +689,7 @@ rtl::OString getInstallSettingsPath() rtl::OString getSettingsPath( const rtl::OUString & sURL) { - if (sURL.getLength() == 0) + if (sURL.isEmpty()) return rtl::OString(); rtl::OUString sPath; if (osl_getSystemPathFromFileURL(sURL.pData, |