summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--jvmfwk/source/elements.cxx8
-rw-r--r--jvmfwk/source/framework.cxx4
-rw-r--r--jvmfwk/source/fwkbase.cxx28
-rw-r--r--l10ntools/source/directory.cxx2
-rw-r--r--l10ntools/source/export.cxx32
-rw-r--r--l10ntools/source/help/HelpCompiler.hxx2
-rw-r--r--l10ntools/source/helpmerge.cxx2
-rw-r--r--l10ntools/source/merge.cxx2
-rw-r--r--lingucomponent/source/lingutil/lingutil.cxx2
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx4
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx2
15 files changed, 76 insertions, 76 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;
}
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,
diff --git a/l10ntools/source/directory.cxx b/l10ntools/source/directory.cxx
index 836f80fefbc2..2bf56d4c12d5 100644
--- a/l10ntools/source/directory.cxx
+++ b/l10ntools/source/directory.cxx
@@ -183,7 +183,7 @@ void Directory::readDirectory( const rtl::OUString& sFullpath )
struct dirent *dirp;
DIR *dir;
- if( sFullpath.getLength() < 1 ) return;
+ if(sFullpath.isEmpty()) return;
rtl::OString sFullpathext = rtl::OUStringToOString( sFullpath , RTL_TEXTENCODING_UTF8 );
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 041b57d34b7a..dc07f414afeb 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -222,7 +222,7 @@ extern FILE *GetNextFile()
/*****************************************************************************/
{
// look for next valid filename in input file list
- if ( sTempFile.getLength())
+ if ( !sTempFile.isEmpty())
{
fclose( pTempFile );
String sTemp(rtl::OStringToOUString(sTempFile,
@@ -941,7 +941,7 @@ int Export::Execute( int nToken, const char * pToken )
}
else
{
- if (pResData->sText[ sLangIndex ].getLength())
+ if (!pResData->sText[ sLangIndex ].isEmpty())
{
rtl::OStringBuffer sError(RTL_CONSTASCII_STRINGPARAM("Language "));
sError.append(sLangIndex);
@@ -963,7 +963,7 @@ int Export::Execute( int nToken, const char * pToken )
PrepareTextToMerge( sOrig, STRING_TYP_HELPTEXT, sLangIndex, pResData );
else
{
- if (pResData->sHelpText[ sLangIndex ].getLength())
+ if (!pResData->sHelpText[ sLangIndex ].isEmpty())
{
rtl::OStringBuffer sError(RTL_CONSTASCII_STRINGPARAM("Language "));
sError.append(sLangIndex);
@@ -980,7 +980,7 @@ int Export::Execute( int nToken, const char * pToken )
PrepareTextToMerge( sOrig, STRING_TYP_QUICKHELPTEXT, sLangIndex, pResData );
else
{
- if (pResData->sQuickHelpText[ sLangIndex ].getLength())
+ if (!pResData->sQuickHelpText[ sLangIndex ].isEmpty())
{
rtl::OStringBuffer sError(RTL_CONSTASCII_STRINGPARAM("Language "));
sError.append(sLangIndex);
@@ -997,7 +997,7 @@ int Export::Execute( int nToken, const char * pToken )
PrepareTextToMerge( sOrig, STRING_TYP_TITLE, sLangIndex, pResData );
else
{
- if ( pResData->sTitle[ sLangIndex ].getLength())
+ if ( !pResData->sTitle[ sLangIndex ].isEmpty())
{
rtl::OStringBuffer sError(RTL_CONSTASCII_STRINGPARAM("Language "));
sError.append(sLangIndex);
@@ -1160,13 +1160,13 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
// mandatory to export: en-US
- if (( pResData->sText[ SOURCE_LANGUAGE ].getLength())
+ if (( !pResData->sText[ SOURCE_LANGUAGE ].isEmpty())
||
- ( pResData->sHelpText[ SOURCE_LANGUAGE ].getLength())
+ ( !pResData->sHelpText[ SOURCE_LANGUAGE ].isEmpty())
||
- ( pResData->sQuickHelpText[ SOURCE_LANGUAGE ].getLength())
+ ( !pResData->sQuickHelpText[ SOURCE_LANGUAGE ].isEmpty())
||
- ( pResData->sTitle[ SOURCE_LANGUAGE ].getLength()))
+ ( !pResData->sTitle[ SOURCE_LANGUAGE ].isEmpty()))
{
ByteString sGID = pResData->sGId;
@@ -1187,25 +1187,25 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
for( unsigned int n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
if ( !sCur.EqualsIgnoreCaseAscii("x-comment") ){
- if (pResData->sText[ sCur ].getLength())
+ if (!pResData->sText[ sCur ].isEmpty())
sXText = pResData->sText[ sCur ];
else {
sXText = pResData->sText[ SOURCE_LANGUAGE ];
}
- if (pResData->sHelpText[ sCur ].getLength())
+ if (!pResData->sHelpText[ sCur ].isEmpty())
sXHText = pResData->sHelpText[ sCur ];
else {
sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ];
}
- if (pResData->sQuickHelpText[ sCur ].getLength())
+ if (!pResData->sQuickHelpText[ sCur ].isEmpty())
sXQHText = pResData->sQuickHelpText[ sCur ];
else {
sXQHText = pResData->sQuickHelpText[ SOURCE_LANGUAGE ];
}
- if (pResData->sTitle[ sCur ].getLength())
+ if (!pResData->sTitle[ sCur ].isEmpty())
sXTitle = pResData->sTitle[ sCur ];
else
sXTitle = pResData->sTitle[ SOURCE_LANGUAGE ];
@@ -1215,7 +1215,7 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
if ( !sXHText.Len())
{
- if (pResData->sHelpText[ SOURCE_LANGUAGE ].getLength())
+ if (!pResData->sHelpText[ SOURCE_LANGUAGE ].isEmpty())
sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ];
}
}
@@ -1334,7 +1334,7 @@ sal_Bool Export::WriteExportList( ResData *pResData, ExportList *pExportList,
for (unsigned int n = 0; n < aLanguages.size(); ++n)
{
sCur = aLanguages[ n ];
- if ((*pEntry)[ SOURCE_LANGUAGE ].getLength())
+ if (!(*pEntry)[ SOURCE_LANGUAGE ].isEmpty())
{
if ( bEnableExport )
{
@@ -1344,7 +1344,7 @@ sal_Bool Export::WriteExportList( ResData *pResData, ExportList *pExportList,
if( rTyp.EqualsIgnoreCaseAscii("pairedlist") )
{
sLID = GetPairedListID( sText );
- if ((*pEntry)[ sCur ].getLength())
+ if (!(*pEntry)[ sCur ].isEmpty())
sText = (*pEntry)[ sCur ];
sText = GetPairedListString( sText );
}
diff --git a/l10ntools/source/help/HelpCompiler.hxx b/l10ntools/source/help/HelpCompiler.hxx
index b2e061cc3825..5e0ec8d032cb 100644
--- a/l10ntools/source/help/HelpCompiler.hxx
+++ b/l10ntools/source/help/HelpCompiler.hxx
@@ -115,7 +115,7 @@ namespace fs
rtl::OString tmp(rtl::OUStringToOString(data, RTL_TEXTENCODING_UTF8));
return std::string(tmp.getStr());
}
- bool empty() const { return data.getLength() == 0; }
+ bool empty() const { return data.isEmpty(); }
path operator/(const std::string &in) const
{
path ret(*this);
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 6ff89316772e..47d1ddf2b8ba 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -200,7 +200,7 @@ bool HelpParser::CreateSDF(
sBuffer.append( GSI_SEQUENCE4 ); //"\t\t\t\t";
sBuffer.append( sOUTimeStamp );
rtl::OString sOut(rtl::OUStringToOString(sBuffer.makeStringAndClear().getStr() , RTL_TEXTENCODING_UTF8));
- if( data.getLength() > 0 )
+ if( !data.isEmpty() )
aSDFStream.WriteLine( sOut );
pXMLElement=NULL;
}else fprintf(stdout,"\nDBG: NullPointer in HelpParser::CreateSDF , Language %s\n",sCur.GetBuffer() );
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index fb397582a9a7..db31f186abeb 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -190,7 +190,7 @@ MergeDataFile::MergeDataFile(
ByteString sLine;
const ByteString sHACK("HACK");
const ::rtl::OString sFileNormalized(lcl_NormalizeFilename(sFile));
- const bool isFileEmpty = sFileNormalized.getLength();
+ const bool isFileEmpty = !sFileNormalized.isEmpty();
if( !aInputStream.IsOpen() )
{
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index c893aaed81b1..8206cf399e48 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -145,7 +145,7 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
}
- if (aFormatName.getLength() == 0 || aDicExtension.Len() == 0)
+ if (aFormatName.isEmpty() || aDicExtension.Len() == 0)
return aRes;
// set of languages to remember the language where it is already
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 47b08bfa4ac0..b8f65536e2a7 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -367,7 +367,7 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
{
MutexGuard aGuard( GetLinguMutex() );
- if (rLocale == Locale() || !rWord.getLength())
+ if (rLocale == Locale() || rWord.isEmpty())
return sal_True;
if (!hasLocale( rLocale ))
@@ -488,7 +488,7 @@ Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell(
{
MutexGuard aGuard( GetLinguMutex() );
- if (rLocale == Locale() || !rWord.getLength())
+ if (rLocale == Locale() || rWord.isEmpty())
return NULL;
if (!hasLocale( rLocale ))
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 76b7a32b1edc..8e9bf582d0bb 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -327,7 +327,7 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
sal_Int16 nLanguage = LocaleToLanguage( rLocale );
- if (nLanguage == LANGUAGE_NONE || !rTerm.getLength())
+ if (nLanguage == LANGUAGE_NONE || rTerm.isEmpty())
return noMeanings;
if (!hasLocale( rLocale ))