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 /registry/source | |
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 'registry/source')
-rw-r--r-- | registry/source/keyimpl.cxx | 14 | ||||
-rw-r--r-- | registry/source/reflwrit.cxx | 28 | ||||
-rw-r--r-- | registry/source/regimpl.cxx | 18 |
3 files changed, 30 insertions, 30 deletions
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx index 6657cb3f5fb7..c48ae9c8680a 100644 --- a/registry/source/keyimpl.cxx +++ b/registry/source/keyimpl.cxx @@ -105,7 +105,7 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK *pnSubKeys = 0; ORegKey* pKey = this; - if ( keyName.getLength() ) + if ( !keyName.isEmpty() ) { _ret = openKey(keyName, (RegKeyHandle*)&pKey); if (_ret != REG_NO_ERROR) @@ -148,7 +148,7 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK } *phOpenSubKeys = (RegKeyHandle*)pSubKeys; - if (keyName.getLength()) + if (!keyName.isEmpty()) { (void) releaseKey(pKey); } @@ -169,7 +169,7 @@ RegError ORegKey::getKeyNames(const OUString& keyName, *pnSubKeys = 0; ORegKey* pKey = this; - if (keyName.getLength()) + if (!keyName.isEmpty()) { _ret = openKey(keyName, (RegKeyHandle*)&pKey); if (_ret != REG_NO_ERROR) @@ -208,7 +208,7 @@ RegError ORegKey::getKeyNames(const OUString& keyName, } *pSubKeyNames = pSubKeys; - if (keyName.getLength()) + if (!keyName.isEmpty()) { releaseKey(pKey); } @@ -982,7 +982,7 @@ RegError ORegKey::getKeyType(const OUString& name, RegKeyType* pKeyType) const REG_GUARD(m_pRegistry->m_mutex); - if ( name.getLength() ) + if ( !name.isEmpty() ) { ORegKey* pThis = const_cast< ORegKey* >(this); @@ -999,7 +999,7 @@ RegError ORegKey::getKeyType(const OUString& name, RegKeyType* pKeyType) const RegError ORegKey::getResolvedKeyName(const OUString& keyName, OUString& resolvedName) { - if (keyName.getLength() == 0) + if (keyName.isEmpty()) return REG_INVALID_KEYNAME; resolvedName = getFullPath(keyName); @@ -1059,7 +1059,7 @@ OStoreDirectory ORegKey::getStoreDir() } OUString ORegKey::getFullPath(OUString const & path) const { - OSL_ASSERT(m_name.getLength() != 0 && path.getLength() != 0); + OSL_ASSERT(!m_name.isEmpty() && !path.isEmpty()); OUStringBuffer b(m_name); if (b.getLength() > 0 && b[b.getLength() - 1] == '/') { if (path[0] == '/') { diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx index 3f19d00c349e..9fb415aa2277 100644 --- a/registry/source/reflwrit.cxx +++ b/registry/source/reflwrit.cxx @@ -838,7 +838,7 @@ void TypeWriter::createBlop() } // create CP entry for doku - if (m_doku.getLength()) + if (!m_doku.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_doku.getStr(); @@ -846,7 +846,7 @@ void TypeWriter::createBlop() } // create CP entry for idl source filename - if (m_fileName.getLength()) + if (!m_fileName.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_fileName.getStr(); @@ -884,7 +884,7 @@ void TypeWriter::createBlop() pBuffer += writeUINT16(pBuffer, m_fields[i].m_access); - if (m_fields[i].m_name.getLength()) + if (!m_fields[i].m_name.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_fields[i].m_name.getStr(); @@ -892,7 +892,7 @@ void TypeWriter::createBlop() } pBuffer += writeUINT16(pBuffer, cpIndexName); - if (m_fields[i].m_typeName.getLength()) + if (!m_fields[i].m_typeName.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_fields[i].m_typeName.getStr(); @@ -908,7 +908,7 @@ void TypeWriter::createBlop() } pBuffer += writeUINT16(pBuffer, cpIndexValue); - if (m_fields[i].m_doku.getLength()) + if (!m_fields[i].m_doku.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_fields[i].m_doku.getStr(); @@ -916,7 +916,7 @@ void TypeWriter::createBlop() } pBuffer += writeUINT16(pBuffer, cpIndexDoku2); - if (m_fields[i].m_fileName.getLength()) + if (!m_fields[i].m_fileName.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_fields[i].m_fileName.getStr(); @@ -970,7 +970,7 @@ void TypeWriter::createBlop() pBuffer, sal::static_int_cast< sal_uInt16 >(m_methods[i].m_mode)); - if (m_methods[i].m_name.getLength()) + if (!m_methods[i].m_name.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_methods[i].m_name.getStr(); @@ -979,7 +979,7 @@ void TypeWriter::createBlop() pBuffer += writeUINT16(pBuffer, cpIndexName); cpIndexName = 0; - if (m_methods[i].m_returnTypeName.getLength()) + if (!m_methods[i].m_returnTypeName.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_methods[i].m_returnTypeName.getStr(); @@ -987,7 +987,7 @@ void TypeWriter::createBlop() } pBuffer += writeUINT16(pBuffer, cpIndexReturn); - if (m_methods[i].m_doku.getLength()) + if (!m_methods[i].m_doku.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_methods[i].m_doku.getStr(); @@ -1001,7 +1001,7 @@ void TypeWriter::createBlop() for (j = 0; j < m_methods[i].m_paramCount; j++) { - if (m_methods[i].m_params[j].m_typeName.getLength()) + if (!m_methods[i].m_params[j].m_typeName.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_methods[i].m_params[j].m_typeName.getStr(); @@ -1015,7 +1015,7 @@ void TypeWriter::createBlop() sal::static_int_cast< sal_uInt16 >( m_methods[i].m_params[j].m_mode)); - if (m_methods[i].m_params[j].m_name.getLength()) + if (!m_methods[i].m_params[j].m_name.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_methods[i].m_params[j].m_name.getStr(); @@ -1029,7 +1029,7 @@ void TypeWriter::createBlop() for (j = 0; j < m_methods[i].m_excCount; j++) { - if (m_methods[i].m_excNames[j].getLength()) + if (!m_methods[i].m_excNames[j].isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_methods[i].m_excNames[j].getStr(); @@ -1070,7 +1070,7 @@ void TypeWriter::createBlop() cpIndexName = 0; cpIndexDoku2 = 0; - if (m_references[i].m_name.getLength()) + if (!m_references[i].m_name.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_references[i].m_name.getStr(); @@ -1078,7 +1078,7 @@ void TypeWriter::createBlop() } pBuffer += writeUINT16(pBuffer, cpIndexName); - if (m_references[i].m_doku.getLength()) + if (!m_references[i].m_doku.isEmpty()) { pInfo = new CPInfo(CP_TAG_UTF8_NAME, pInfo); pInfo->m_value.aUtf8 = m_references[i].m_doku.getStr(); diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index 027f6c2a7612..5eb88c7c36d8 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -481,7 +481,7 @@ RegError ORegistry::initRegistry(const OUString& regName, RegAccessMode accessMo m_readOnly = sal_True; } - if (0 == regName.getLength() && + if (regName.isEmpty() && store_AccessCreate == sAccessMode) { errCode = rRegFile.createInMemory(); @@ -555,7 +555,7 @@ RegError ORegistry::destroyRegistry(const OUString& regName) { REG_GUARD(m_mutex); - if (regName.getLength()) + if (!regName.isEmpty()) { ORegistry* pReg = new ORegistry(); @@ -589,7 +589,7 @@ RegError ORegistry::destroyRegistry(const OUString& regName) m_file.close(); m_isOpen = sal_False; - if (m_name.getLength()) + if (!m_name.isEmpty()) { OUString systemName; if ( FileBase::getSystemPathFromFileURL(m_name, systemName) != FileBase::E_None ) @@ -653,7 +653,7 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const OUString& keyName, *phNewKey = NULL; - if ( !keyName.getLength() ) + if ( keyName.isEmpty() ) return REG_INVALID_KEYNAME; REG_GUARD(m_mutex); @@ -683,7 +683,7 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const OUString& keyName, do { token = sFullKeyName.getToken( 0, '/', nIndex ); - if (token.getLength()) + if (!token.isEmpty()) { if (rStoreDir.create(pKey->getStoreFile(), sFullPath.getStr(), token, KEY_MODE_CREATE)) { @@ -714,7 +714,7 @@ RegError ORegistry::openKey(RegKeyHandle hKey, const OUString& keyName, *phOpenKey = NULL; - if ( !keyName.getLength() ) + if ( keyName.isEmpty() ) { return REG_INVALID_KEYNAME; } @@ -795,7 +795,7 @@ RegError ORegistry::closeKey(RegKeyHandle hKey) RegError ORegistry::deleteKey(RegKeyHandle hKey, const OUString& keyName) { ORegKey* pKey = static_cast< ORegKey* >(hKey); - if ( !keyName.getLength() ) + if ( keyName.isEmpty() ) return REG_INVALID_KEYNAME; REG_GUARD(m_mutex); @@ -811,7 +811,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& keyName) { RegError _ret = REG_NO_ERROR; - if ( !keyName.getLength() ) + if ( keyName.isEmpty() ) { return REG_INVALID_KEYNAME; } @@ -1361,7 +1361,7 @@ RegError ORegistry::loadAndSaveKeys(ORegKey* pTargetKey, if(pTargetKey->getName().getLength() > 1) sFullPath += pTargetKey->getName(); sFullPath += sRelPath; - if (sRelPath.getLength() > 1 || sFullPath.getLength() == 0) + if (sRelPath.getLength() > 1 || sFullPath.isEmpty()) sFullPath += ROOT; OUString sFullKeyName = sFullPath; |