From a17fb882569046cd9f6940cf2e87435200bb666b Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Mon, 26 Dec 2011 17:19:24 -0200 Subject: Fix for fdo43460 Part XXI getLength() to isEmpty() Part XXI Modules i18npool, idl, idlc, io, javaunohelper, jvmaccess --- idlc/source/astdeclaration.cxx | 4 ++-- idlc/source/astdump.cxx | 8 ++++---- idlc/source/astscope.cxx | 4 ++-- idlc/source/errorhandler.cxx | 2 +- idlc/source/idlccompile.cxx | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'idlc/source') diff --git a/idlc/source/astdeclaration.cxx b/idlc/source/astdeclaration.cxx index 5e4dcdd6382d..87eda045a9e2 100644 --- a/idlc/source/astdeclaration.cxx +++ b/idlc/source/astdeclaration.cxx @@ -41,7 +41,7 @@ static OString convertName(const OString& name) do { OString token( name.getToken( 0, ':', nIndex ) ); - if( token.getLength() ) + if( !token.isEmpty() ) { nameBuffer.append('/'); nameBuffer.append( token ); @@ -65,7 +65,7 @@ AstDeclaration::AstDeclaration(NodeType type, const OString& name, AstScope* pSc if (pDecl) { m_scopedName = pDecl->getScopedName(); - if (m_scopedName.getLength() > 0) + if (!m_scopedName.isEmpty()) m_scopedName += sGlobal; m_scopedName += m_localName; } diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx index 5f1c738278f5..a1c2154f2e40 100644 --- a/idlc/source/astdump.cxx +++ b/idlc/source/astdump.cxx @@ -189,7 +189,7 @@ sal_Bool AstService::dump(RegistryKey& rKey) case NT_interface: case NT_typedef: version = TYPEREG_VERSION_1; - OSL_ASSERT(superName.getLength() == 0); + OSL_ASSERT(superName.isEmpty()); superName = (*i)->getRelativName(); break; @@ -205,7 +205,7 @@ sal_Bool AstService::dump(RegistryKey& rKey) case NT_service_member: if (getNodeType() == NT_singleton) { - OSL_ASSERT(superName.getLength() == 0); + OSL_ASSERT(superName.isEmpty()); superName = ((AstServiceMember *)(*i))-> getRealService()->getRelativName(); break; @@ -243,9 +243,9 @@ sal_Bool AstService::dump(RegistryKey& rKey) getNodeType() == NT_singleton ? RT_TYPE_SINGLETON : RT_TYPE_SERVICE, m_bPublished, rtl::OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), - superName.getLength() == 0 ? 0 : 1, properties, constructors, + superName.isEmpty() ? 0 : 1, properties, constructors, references); - if (superName.getLength() != 0) { + if (!superName.isEmpty()) { writer.setSuperTypeName( 0, rtl::OStringToOUString(superName, RTL_TEXTENCODING_UTF8)); } diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx index 49bd39a43637..a6b2ccb903ef 100644 --- a/idlc/source/astscope.cxx +++ b/idlc/source/astscope.cxx @@ -36,7 +36,7 @@ using namespace ::rtl; sal_Bool isGlobal(const OString& scopedName) { - if ((scopedName.getLength() == 0) || (scopedName.indexOf(':') == 0)) + if (scopedName.isEmpty() || (scopedName.indexOf(':') == 0)) { return sal_True; } @@ -124,7 +124,7 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName) { AstDeclaration* pDecl = NULL; AstScope* pScope = NULL; - if (scopedName.getLength() == 0) + if (scopedName.isEmpty()) return NULL; // If name starts with "::" start look up in global scope diff --git a/idlc/source/errorhandler.cxx b/idlc/source/errorhandler.cxx index 4f5dcfcc37d8..a5ee0eb5de2e 100644 --- a/idlc/source/errorhandler.cxx +++ b/idlc/source/errorhandler.cxx @@ -481,7 +481,7 @@ static OString flagToString(sal_uInt32 flag) flagStr += "'attribute'"; if ( (flag & AF_PROPERTY) == AF_PROPERTY ) flagStr += "'property'"; - if ( !flagStr.getLength() ) + if ( flagStr.isEmpty() ) flagStr += "'unknown'"; return flagStr; diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx index b8ceb3332040..72806d9fb104 100644 --- a/idlc/source/idlccompile.cxx +++ b/idlc/source/idlccompile.cxx @@ -145,7 +145,7 @@ OString makeTempName(const OString& prefix) } } - if ( uTmpPath.getLength() ) + if ( !uTmpPath.isEmpty() ) tmpPath = OUStringToOString(uTmpPath, RTL_TEXTENCODING_UTF8); #if defined(SAL_W32) || defined(SAL_UNX) @@ -262,7 +262,7 @@ sal_Int32 compileFile(const OString * pathname) { filePath = fileName.copy(0, index); - if ( filePath.getLength() ) + if ( !filePath.isEmpty() ) { cppArgs.append(" -I\""); cppArgs.append(filePath); -- cgit