From 361774e9107aac3f412ce546892a4b0e55c10dfb Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 15 Feb 2014 15:24:27 +0100 Subject: idlc: sal_Bool -> bool Change-Id: Ibeed903d73eb8b3fce7b8c6021c9107437a8c813 --- idlc/source/astconstant.cxx | 6 +++--- idlc/source/astdeclaration.cxx | 22 +++++++++++----------- idlc/source/astdump.cxx | 22 +++++++++++----------- idlc/source/astenum.cxx | 8 ++++---- idlc/source/astexpression.cxx | 10 +++++----- idlc/source/astinterface.cxx | 12 ++++++------ idlc/source/astoperation.cxx | 4 ++-- idlc/source/astscope.cxx | 4 ++-- idlc/source/aststruct.cxx | 8 ++++---- idlc/source/fehelper.cxx | 6 +++--- idlc/source/idlc.cxx | 8 ++++---- idlc/source/idlccompile.cxx | 18 +++++++++--------- idlc/source/idlcproduce.cxx | 14 +++++++------- idlc/source/scanner.l | 2 +- 14 files changed, 72 insertions(+), 72 deletions(-) (limited to 'idlc/source') diff --git a/idlc/source/astconstant.cxx b/idlc/source/astconstant.cxx index dae0e2d414c3..e72a28f7b27e 100644 --- a/idlc/source/astconstant.cxx +++ b/idlc/source/astconstant.cxx @@ -50,7 +50,7 @@ AstConstant::~AstConstant() } -sal_Bool AstConstant::dumpBlob( +bool AstConstant::dumpBlob( typereg::Writer & rBlob, sal_uInt16 index, bool published) { RTConstValue aConst; @@ -102,7 +102,7 @@ sal_Bool AstConstant::dumpBlob( { fprintf(stderr, "%s: exprtype to const type: cannot convert ExprType\n", idlc()->getOptions()->getProgramName().getStr()); - return sal_False; + return false; } } @@ -119,7 +119,7 @@ sal_Bool AstConstant::dumpBlob( RT_ACCESS_CONST | (published ? RT_ACCESS_PUBLISHED : 0), OStringToOUString(name, RTL_TEXTENCODING_UTF8), type, aConst); - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/idlc/source/astdeclaration.cxx b/idlc/source/astdeclaration.cxx index e8df3a6d5550..60f862639d8c 100644 --- a/idlc/source/astdeclaration.cxx +++ b/idlc/source/astdeclaration.cxx @@ -45,9 +45,9 @@ AstDeclaration::AstDeclaration(NodeType type, const OString& name, AstScope* pSc : m_localName(name) , m_pScope(pScope) , m_nodeType(type) - , m_bImported(sal_False) - , m_bIsAdded(sal_False) - , m_bInMainFile(sal_False) + , m_bImported(false) + , m_bIsAdded(false) + , m_bInMainFile(false) , m_bPredefined(false) { if ( m_pScope ) @@ -69,11 +69,11 @@ AstDeclaration::AstDeclaration(NodeType type, const OString& name, AstScope* pSc if ( idlc()->getFileName() == idlc()->getRealFileName() ) { m_fileName = idlc()->getMainFileName(); - m_bInMainFile = sal_True; + m_bInMainFile = true; } else { m_fileName = idlc()->getFileName(); - m_bImported = sal_True; + m_bImported = true; } m_documentation = idlc()->processDocumentation(); @@ -93,7 +93,7 @@ void AstDeclaration::setPredefined(bool bPredefined) if ( m_bPredefined ) { m_fileName = OString(); - m_bInMainFile = sal_False; + m_bInMainFile = false; } } @@ -147,19 +147,19 @@ bool AstDeclaration::isType() const { } } -sal_Bool AstDeclaration::hasAncestor(AstDeclaration* pDecl) +bool AstDeclaration::hasAncestor(AstDeclaration* pDecl) { if (this == pDecl) - return sal_True; + return true; if ( !m_pScope ) - return sal_False; + return false; return scopeAsDecl(m_pScope)->hasAncestor(pDecl); } -sal_Bool AstDeclaration::dump(RegistryKey& rKey) +bool AstDeclaration::dump(RegistryKey& rKey) { AstScope* pScope = declAsScope(this); - sal_Bool bRet = sal_True; + bool bRet = true; if ( pScope ) { diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx index 492714c2231e..56136eafb22b 100644 --- a/idlc/source/astdump.cxx +++ b/idlc/source/astdump.cxx @@ -34,7 +34,7 @@ using namespace ::rtl; -sal_Bool AstModule::dump(RegistryKey& rKey) +bool AstModule::dump(RegistryKey& rKey) { OUString emptyStr; RegistryKey localKey; @@ -48,7 +48,7 @@ sal_Bool AstModule::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(rKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } } @@ -93,7 +93,7 @@ sal_Bool AstModule::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(localKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } } else { @@ -118,7 +118,7 @@ sal_Bool AstModule::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(localKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } } } @@ -129,7 +129,7 @@ sal_Bool AstModule::dump(RegistryKey& rKey) return AstDeclaration::dump(rKey); } -sal_Bool AstTypeDef::dump(RegistryKey& rKey) +bool AstTypeDef::dump(RegistryKey& rKey) { OUString emptyStr; RegistryKey localKey; @@ -138,7 +138,7 @@ sal_Bool AstTypeDef::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(rKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } typereg::Writer aBlob( @@ -158,13 +158,13 @@ sal_Bool AstTypeDef::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(localKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool AstService::dump(RegistryKey& rKey) +bool AstService::dump(RegistryKey& rKey) { OUString emptyStr; typereg_Version version = m_bPublished @@ -324,7 +324,7 @@ sal_Bool AstService::dump(RegistryKey& rKey) return true; } -sal_Bool AstAttribute::dumpBlob( +bool AstAttribute::dumpBlob( typereg::Writer & rBlob, sal_uInt16 index, sal_uInt16 * methodIndex) { RTFieldAccess accessMode = RT_ACCESS_INVALID; @@ -381,7 +381,7 @@ sal_Bool AstAttribute::dumpBlob( rBlob, m_setDocumentation, m_setExceptions, RT_MODE_ATTRIBUTE_SET, methodIndex); - return sal_True; + return true; } void AstAttribute::dumpExceptions( diff --git a/idlc/source/astenum.cxx b/idlc/source/astenum.cxx index 2edfb7cb9c49..8b95dc2e9c82 100644 --- a/idlc/source/astenum.cxx +++ b/idlc/source/astenum.cxx @@ -59,7 +59,7 @@ AstConstant* AstEnum::checkValue(AstExpression* pExpr) return NULL; } -sal_Bool AstEnum::dump(RegistryKey& rKey) +bool AstEnum::dump(RegistryKey& rKey) { RegistryKey localKey; if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey)) @@ -67,7 +67,7 @@ sal_Bool AstEnum::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(rKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } OUString emptyStr; @@ -102,11 +102,11 @@ sal_Bool AstEnum::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(localKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } } - return sal_True; + return true; } AstDeclaration* AstEnum::addDeclaration(AstDeclaration* pDecl) diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx index 8839e4c3b961..1f22e9ce9473 100644 --- a/idlc/source/astexpression.cxx +++ b/idlc/source/astexpression.cxx @@ -707,7 +707,7 @@ eval_kind(AstExprValue *ev, EvalKind ek) return NULL; } -AstExprValue* AstExpression::coerce(ExprType t, sal_Bool bAssign) +AstExprValue* AstExpression::coerce(ExprType t, bool bAssign) { AstExprValue *copy; @@ -785,9 +785,9 @@ void AstExpression::evaluate(EvalKind ek) m_exprValue = eval_kind(m_exprValue, ek); } -sal_Bool AstExpression::operator==(AstExpression *pExpr) +bool AstExpression::operator==(AstExpression *pExpr) { - sal_Bool bRet = sal_False; + bool bRet = false; if (m_combOperator != pExpr->getCombOperator()) return bRet; evaluate(EK_const); @@ -830,14 +830,14 @@ sal_Bool AstExpression::operator==(AstExpression *pExpr) break; default: OSL_ASSERT(false); - bRet = sal_False; + bRet = false; break; } return bRet; } -sal_Bool AstExpression::compare(AstExpression *pExpr) +bool AstExpression::compare(AstExpression *pExpr) { bool bRet = false; if (m_combOperator != pExpr->getCombOperator()) diff --git a/idlc/source/astinterface.cxx b/idlc/source/astinterface.cxx index 7d9f0dc1d515..20349ae22d65 100644 --- a/idlc/source/astinterface.cxx +++ b/idlc/source/astinterface.cxx @@ -34,8 +34,8 @@ AstInterface::AstInterface(const OString& name, , AstScope(NT_interface) , m_mandatoryInterfaces(0) , m_bIsDefined(false) - , m_bForwarded(sal_False) - , m_bForwardedInSameFile(sal_False) + , m_bForwarded(false) + , m_bForwardedInSameFile(false) , m_bSingleInheritance(pInherits != 0) { if (pInherits != 0) { @@ -99,10 +99,10 @@ void AstInterface::forwardDefined(AstInterface const & def) m_bIsDefined = true; } -sal_Bool AstInterface::dump(RegistryKey& rKey) +bool AstInterface::dump(RegistryKey& rKey) { if ( !isDefined() ) - return sal_True; + return true; RegistryKey localKey; if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey)) @@ -110,7 +110,7 @@ sal_Bool AstInterface::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(rKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } if (m_mandatoryInterfaces > SAL_MAX_UINT16 @@ -250,7 +250,7 @@ sal_Bool AstInterface::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(localKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } return true; diff --git a/idlc/source/astoperation.cxx b/idlc/source/astoperation.cxx index 7a80f42b0cb6..3ee0bb973e49 100644 --- a/idlc/source/astoperation.cxx +++ b/idlc/source/astoperation.cxx @@ -40,7 +40,7 @@ bool AstOperation::isVariadic() const { && static_cast< AstParameter const * >(*(--i))->isRest(); } -sal_Bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index) +bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index) { sal_uInt16 nParam = getNodeCount(NT_parameter); sal_uInt16 nExcep = nExceptions(); @@ -118,7 +118,7 @@ sal_Bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index) } } - return sal_True; + return true; } AstDeclaration* AstOperation::addDeclaration(AstDeclaration* pDecl) diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx index b127cf936c06..cc0812664181 100644 --- a/idlc/source/astscope.cxx +++ b/idlc/source/astscope.cxx @@ -134,11 +134,11 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName) // Look up in the local scope and start with the first scope sal_Int32 nIndex = scopedName.indexOf(':'); OString firstScope = nIndex > 0 ? scopedName.copy(0, nIndex) : scopedName; - sal_Bool bFindFirstScope = sal_True; + bool bFindFirstScope = true; pDecl = lookupByNameLocal(firstScope); if ( !pDecl ) { - bFindFirstScope = sal_False; + bFindFirstScope = false; // OK, not found. Go down parent scope chain pDecl = scopeAsDecl(this); diff --git a/idlc/source/aststruct.cxx b/idlc/source/aststruct.cxx index d60026a22b24..3938d4de0036 100644 --- a/idlc/source/aststruct.cxx +++ b/idlc/source/aststruct.cxx @@ -77,7 +77,7 @@ bool AstStruct::isType() const { ? getTypeParameterCount() == 0 : AstDeclaration::isType(); } -sal_Bool AstStruct::dump(RegistryKey& rKey) +bool AstStruct::dump(RegistryKey& rKey) { RegistryKey localKey; if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey)) @@ -85,7 +85,7 @@ sal_Bool AstStruct::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(rKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } if (m_typeParameters.size() > SAL_MAX_UINT16) { @@ -170,10 +170,10 @@ sal_Bool AstStruct::dump(RegistryKey& rKey) fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n", idlc()->getOptions()->getProgramName().getStr(), getFullName().getStr(), OUStringToOString(localKey.getRegistryName(), RTL_TEXTENCODING_UTF8).getStr()); - return sal_False; + return false; } - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/idlc/source/fehelper.cxx b/idlc/source/fehelper.cxx index 053473a2deb4..12636e1ef6a6 100644 --- a/idlc/source/fehelper.cxx +++ b/idlc/source/fehelper.cxx @@ -34,7 +34,7 @@ FeDeclarator::~FeDeclarator() { } -sal_Bool FeDeclarator::checkType(AstDeclaration const * type) +bool FeDeclarator::checkType(AstDeclaration const * type) { OString tmp(m_name); sal_Int32 count = m_name.lastIndexOf( ':' ); @@ -42,9 +42,9 @@ sal_Bool FeDeclarator::checkType(AstDeclaration const * type) tmp = m_name.copy( count+1 ); if (tmp == type->getLocalName()) - return sal_False; + return false; else - return sal_True; + return true; } AstType const * FeDeclarator::compose(AstDeclaration const * pDecl) diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx index 363815709e6a..bf7594eee467 100644 --- a/idlc/source/idlc.cxx +++ b/idlc/source/idlc.cxx @@ -199,8 +199,8 @@ static void SAL_CALL initializePredefinedTypes(AstModule* pRoot) Idlc::Idlc(Options* pOptions) : m_pOptions(pOptions) - , m_bIsDocValid(sal_False) - , m_bIsInMainfile(sal_True) + , m_bIsDocValid(false) + , m_bIsInMainfile(true) , m_published(false) , m_errorCount(0) , m_warningCount(0) @@ -241,8 +241,8 @@ void Idlc::init() void Idlc::reset() { - m_bIsDocValid = sal_False; - m_bIsInMainfile = sal_True; + m_bIsDocValid = false; + m_bIsInMainfile = true; m_published = false; m_errorCount = 0; diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx index 2bd544d2fe25..bbd080f550ca 100644 --- a/idlc/source/idlccompile.cxx +++ b/idlc/source/idlccompile.cxx @@ -58,11 +58,11 @@ static OUString TMP("TMP"); static OUString TEMP("TEMP"); static sal_Char tmpFilePattern[512]; -sal_Bool isFileUrl(const OString& fileName) +bool isFileUrl(const OString& fileName) { if (fileName.startsWith("file://") ) - return sal_True; - return sal_False; + return true; + return false; } OString convertToAbsoluteSystemPath(const OString& fileName) @@ -174,19 +174,19 @@ OString makeTempName(const OString& prefix) return OString(tmpFilePattern); } -sal_Bool copyFile(const OString* source, const OString& target) +bool copyFile(const OString* source, const OString& target) { - sal_Bool bRet = sal_True; + bool bRet = true; FILE* pSource = source == 0 ? stdin : fopen(source->getStr(), "rb"); if ( !pSource ) - return sal_False; + return false; FILE* pTarget = fopen(target.getStr(), "wb"); if ( !pTarget ) { fclose(pSource); - return sal_False; + return false; } size_t totalSize = 512; @@ -203,7 +203,7 @@ sal_Bool copyFile(const OString* source, const OString& target) fclose(pSource); } fclose(pTarget); - return sal_False; + return false; } } } @@ -212,7 +212,7 @@ sal_Bool copyFile(const OString* source, const OString& target) fclose(pSource); } if ( fflush(pTarget) ) - bRet = sal_False; + bRet = false; fclose(pTarget); return bRet; diff --git a/idlc/source/idlcproduce.cxx b/idlc/source/idlcproduce.cxx index 5eaacbe0c6b1..cfc093c4227f 100644 --- a/idlc/source/idlcproduce.cxx +++ b/idlc/source/idlcproduce.cxx @@ -42,13 +42,13 @@ using namespace ::osl; StringList* pCreatedDirectories = NULL; -static sal_Bool checkOutputPath(const OString& completeName) +static bool checkOutputPath(const OString& completeName) { OString sysPathName = convertToAbsoluteSystemPath(completeName); OStringBuffer buffer(sysPathName.getLength()); if ( sysPathName.indexOf( SEPARATOR ) == -1 ) - return sal_True; + return true; sal_Int32 nIndex = 0; OString token(sysPathName.getToken(0, SEPARATOR, nIndex)); @@ -79,7 +79,7 @@ static sal_Bool checkOutputPath(const OString& completeName) { fprintf(stderr, "%s: cannot create directory '%s'\n", idlc()->getOptions()->getProgramName().getStr(), buffer.getStr()); - return sal_False; + return false; } } else { @@ -90,10 +90,10 @@ static sal_Bool checkOutputPath(const OString& completeName) } buffer.append(SEPARATOR); } while( nIndex != -1 ); - return sal_True; + return true; } -static sal_Bool cleanPath() +static bool cleanPath() { if ( pCreatedDirectories ) { @@ -109,13 +109,13 @@ static sal_Bool cleanPath() { fprintf(stderr, "%s: cannot remove directory '%s'\n", idlc()->getOptions()->getProgramName().getStr(), (*iter).getStr()); - return sal_False; + return false; } ++iter; } delete pCreatedDirectories; } - return sal_True; + return true; } void removeIfExists(const OString& pathname) diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l index f904fb66b839..aca443f4ccdb 100644 --- a/idlc/source/scanner.l +++ b/idlc/source/scanner.l @@ -205,7 +205,7 @@ static void parseLineAndFile(sal_Char* pBuf) { sal_Char *r = pBuf; sal_Char *h; - sal_Bool bIsInMain = sal_False; + bool bIsInMain = sal_False; /* Skip initial '#' */ if (*r != '#') -- cgit