diff options
author | Olivier Hallot <olivier.hallot@documentfoundation.org> | 2012-01-02 15:58:10 -0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-01-02 19:17:17 +0100 |
commit | 85d1ce27ad9ce7a3740bd8bbbaf1d3abe643ba10 (patch) | |
tree | 9c27a22d1d2ccb1bd78658ee4152c30ea4a70137 /sal | |
parent | 829db12d7e3e93b4a44f79b39a0a9f0630439109 (diff) |
Fix for fdo43460 Part XXVII getLength() to isEmpty()
Please find attached a partial fix for Easy Hack FDO43460
Part XXVII
Modules
padmin, pyuno, rdbmaker, regexp, registry, rsc, sal
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/file_path_helper.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/file_stat.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/file_url.cxx | 4 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/security/osl_Security.cxx | 2 | ||||
-rw-r--r-- | sal/qa/rtl/doublelock/rtl_doublelocking.cxx | 2 | ||||
-rw-r--r-- | sal/rtl/source/bootstrap.cxx | 10 |
7 files changed, 13 insertions, 13 deletions
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx index d0b79a91493e..1aaf0e48be67 100644 --- a/sal/osl/unx/file_path_helper.cxx +++ b/sal/osl/unx/file_path_helper.cxx @@ -135,7 +135,7 @@ rtl::OUString base(rtl_uString_getStr(const_cast<rtl_uString*>(pustrBasePath))); rtl::OUString rel(const_cast<rtl_uString*>(pustrRelPath)); - if (base.getLength() > 0) + if (!base.isEmpty()) osl_systemPathEnsureSeparator(&base.pData); base += rel; diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx index 949121f3e8aa..ffeb885c37a3 100644 --- a/sal/osl/unx/file_stat.cxx +++ b/sal/osl/unx/file_stat.cxx @@ -199,8 +199,8 @@ namespace /* private */ return osl_File_E_INVAL; file_path = rtl::OUString(pImpl->m_ustrFilePath); - OSL_ASSERT(file_path.getLength() > 0); - if (file_path.getLength() <= 0) + OSL_ASSERT(!file_path.isEmpty()); + if (file_path.isEmpty()) return osl_File_E_INVAL; pStat->uValidFields = 0; diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx index 6be4eb1a0471..7addb8e00d24 100644 --- a/sal/osl/unx/file_url.cxx +++ b/sal/osl/unx/file_url.cxx @@ -151,7 +151,7 @@ namespace { oslFileError getSystemPathFromFileUrl( rtl::OUString const & url, rtl::OUString * path, bool homeAbbreviation) { - OSL_ASSERT(path != 0 && path->getLength() == 0); + OSL_ASSERT(path != 0 && path->isEmpty()); sal_Unicode const * p = url.getStr(); sal_Unicode const * end = p + url.getLength(); @@ -677,7 +677,7 @@ oslFileError osl_getAbsoluteFileURL(rtl_uString* ustrBaseDirURL, rtl_uString* u rc = (FileBase::RC) osl_getAbsoluteFileURL_impl_(unresolved_path, resolved_path); - if (base.getLength() > 0) + if (!base.isEmpty()) { resolved_path += rtl::OUString( UNICHAR_SLASH ); resolved_path += base; diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index bb1939c2bb42..02ca76f165c7 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -953,7 +953,7 @@ namespace osl_FileBase // sStr = rtl::OUStringToOString(suStr, RTL_TEXTENCODING_UTF8); // printf("UTF8: %s\n", sStr.getStr() ); - if (_sAssumeResultStr.getLength() > 0) + if (!_sAssumeResultStr.isEmpty()) { sal_Bool bStrAreEqual = _sAssumeResultStr.equals(sStr); CPPUNIT_ASSERT_MESSAGE( "Assumption is wrong", diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index 38f813022166..fd04ae5b17b8 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -193,7 +193,7 @@ namespace osl_Security bRes = aSec.getUserName( strGetName ); sal_Int32 nPos = -1; - if (strName.getLength() > 0) + if (!strName.isEmpty()) { nPos = strGetName.indexOf(strName); } diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx index a5b5ae305b72..646a22211639 100644 --- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx +++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx @@ -181,7 +181,7 @@ namespace rtl_DoubleLocking CPPUNIT_ASSERT_MESSAGE( "Gregorian::get() failed, wrong value expected.", - aStr.getLength() != 0 + !aStr.isEmpty() ); } diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx index 9792bfb5c0af..4c3034c0655a 100644 --- a/sal/rtl/source/bootstrap.cxx +++ b/sal/rtl/source/bootstrap.cxx @@ -275,7 +275,7 @@ Bootstrap_Impl::Bootstrap_Impl( OUString const & rIniName ) #endif /* OSL_DEBUG_LEVEL > 1 */ oslFileHandle handle; - if (_iniName.getLength() && + if (!_iniName.isEmpty() && osl_File_E_None == osl_openFile(_iniName.pData, &handle, osl_File_OpenFlag_Read)) { rtl::ByteSequence seq; @@ -379,9 +379,9 @@ Bootstrap_Impl * BootstrapMap::getIni( } void BootstrapMap::setBaseIniUri(rtl::OUString const & uri) { - OSL_ASSERT(uri.getLength() != 0); + OSL_ASSERT(!uri.isEmpty()); osl::MutexGuard g(mutex_); - OSL_ASSERT(baseIniUri_.getLength() == 0 && baseIni_ == 0); + OSL_ASSERT(baseIniUri_.isEmpty() && baseIni_ == 0); baseIniUri_ = uri; } @@ -389,7 +389,7 @@ Bootstrap_Impl * BootstrapMap::getBaseIni() { osl::MutexGuard g(mutex_); if (baseIni_ == 0) { rtl::OUString uri; - if (baseIniUri_.getLength() == 0) { + if (baseIniUri_.isEmpty()) { if (CommandLineParameters::get().get( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INIFILENAME")), &uri)) @@ -779,7 +779,7 @@ rtl::OUString expandMacros( for (int j = 0; j < n; ++j) { seg[j] = expandMacros(file, seg[j], mode, requestStack); } - if (n == 3 && seg[1].getLength() == 0) { + if (n == 3 && seg[1].isEmpty()) { // For backward compatibility, treat ${file::key} the same // as just ${file:key}: seg[1] = seg[2]; |