diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-08-22 19:20:19 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-08-22 19:25:08 +0900 |
commit | 407509c058c44182859e90a89a6ddb2b28edc053 (patch) | |
tree | 6e6108f4195eb28bf7ebad4db16e67ef5efd1b6a /basic | |
parent | 0c89907c8310db8c66a16efac05f0d749a4d1d15 (diff) |
sal_Bool to bool
Change-Id: I75dd089b34c94831bfdfd0e02585af7609013a08
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/dim.cxx | 4 | ||||
-rw-r--r-- | basic/source/comp/parser.cxx | 2 | ||||
-rw-r--r-- | basic/source/comp/symtbl.cxx | 8 | ||||
-rw-r--r-- | basic/source/comp/token.cxx | 20 | ||||
-rw-r--r-- | basic/source/inc/symtbl.hxx | 22 | ||||
-rw-r--r-- | basic/source/inc/token.hxx | 28 | ||||
-rw-r--r-- | basic/source/runtime/basrdll.cxx | 6 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 12 | ||||
-rw-r--r-- | basic/source/sbx/sbxvar.cxx | 2 |
9 files changed, 52 insertions, 52 deletions
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index 5ca13e5c9734..70d441e8003a 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -845,7 +845,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl ) Error( SbERR_UNEXPECTED, ALIAS ); if( pDef->IsCdecl() ) Error( SbERR_UNEXPECTED, _CDECL_ ); - pDef->SetCdecl( sal_False ); + pDef->SetCdecl( false ); pDef->GetLib().Erase(); pDef->GetAlias().Erase(); } @@ -856,7 +856,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl ) Error( SbERR_UNEXPECTED, ALIAS ); if( pDef->IsCdecl() ) Error( SbERR_UNEXPECTED, _CDECL_ ); - pDef->SetCdecl( sal_False ); + pDef->SetCdecl( false ); pDef->GetAlias().Erase(); } // Brackets? diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index f6421823287f..c1f175206a23 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -342,7 +342,7 @@ bool SbiParser::Parse() Next(); return true; } - if( !bSingleLineIf && MayBeLabel( sal_True ) ) + if( !bSingleLineIf && MayBeLabel( true ) ) { // is a label if( !pProc ) diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index fe47cbc3b910..395f19aa24ca 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -51,7 +51,7 @@ const rtl::OUString& SbiStringPool::Find( sal_uInt32 n ) const return aData[n - 1]; } -short SbiStringPool::Add( const rtl::OUString& rVal, sal_Bool bNoCase ) +short SbiStringPool::Add( const rtl::OUString& rVal, bool bNoCase ) { sal_uInt32 n = aData.size(); for( sal_uInt32 i = 0; i < n; ++i ) @@ -372,7 +372,7 @@ SbiSymScope SbiSymDef::GetScope() const // 3) aLabels: labels SbiProcDef::SbiProcDef( SbiParser* pParser, const String& rName, - sal_Bool bProcDecl ) + bool bProcDecl ) : SbiSymDef( rName ) , aParams( pParser->aGblStrings, SbPARAM ) // is dumped , aLabels( pParser->aLclStrings, SbLOCAL ) // is not dumped @@ -385,8 +385,8 @@ SbiProcDef::SbiProcDef( SbiParser* pParser, const String& rName, nLine2 = 0; mePropMode = PROPERTY_MODE_NONE; bPublic = true; - bCdecl = sal_False; - bStatic = sal_False; + bCdecl = false; + bStatic = false; // For return values the first element of the parameter // list is always defined with name and type of the proc aParams.AddSym( aName ); diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index b6b5989764ee..0de57e6356b0 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -213,10 +213,10 @@ SbiTokenizer::SbiTokenizer( const ::rtl::OUString& rSrc, StarBASIC* pb ) { pTokTable = aTokTable_Basic; TokenTable *tp; - bEof = bAs = sal_False; + bEof = bAs = false; eCurTok = NIL; ePush = NIL; - bEos = bKeywords = bErrorIsSymbol = sal_True; + bEos = bKeywords = bErrorIsSymbol = true; if( !nToken ) for( nToken = 0, tp = pTokTable; tp->t; nToken++, tp++ ) {} } @@ -329,15 +329,15 @@ SbiToken SbiTokenizer::Next() if( !NextSym() ) { - bEof = bEos = sal_True; + bEof = bEos = true; return eCurTok = EOLN; } if( aSym[0] == '\n' ) { - bEos = sal_True; return eCurTok = EOLN; + bEos = true; return eCurTok = EOLN; } - bEos = sal_False; + bEos = false; if( bNumber ) return eCurTok = NUMBER; @@ -447,11 +447,11 @@ special: eCurTok = tp->t; // AS: data types are keywords if( tp->t == AS ) - bAs = sal_True; + bAs = true; else { if( bAs ) - bAs = sal_False; + bAs = false; else if( eCurTok >= DATATYPE1 && eCurTok <= DATATYPE2 && (bErrorIsSymbol || eCurTok != _ERROR_) ) eCurTok = SYMBOL; } @@ -490,12 +490,12 @@ special: #endif -sal_Bool SbiTokenizer::MayBeLabel( sal_Bool bNeedsColon ) +bool SbiTokenizer::MayBeLabel( bool bNeedsColon ) { if( eCurTok == SYMBOL || m_aTokenLabelInfo.canTokenBeLabel( eCurTok ) ) - return bNeedsColon ? DoesColonFollow() : sal_True; + return bNeedsColon ? DoesColonFollow() : true; else - return sal_Bool( eCurTok == NUMBER + return ( eCurTok == NUMBER && eScanType == SbxINTEGER && nVal >= 0 ); } diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx index 9c474fd90e65..87d329c99809 100644 --- a/basic/source/inc/symtbl.hxx +++ b/basic/source/inc/symtbl.hxx @@ -41,9 +41,9 @@ public: SbiStringPool( SbiParser* ); ~SbiStringPool(); sal_uInt32 GetSize() const { return aData.size(); } - // From 8.4.1999: default changed to sal_True because of #64236 - - // change it back to sal_False when the bug is cleanly removed. - short Add( const rtl::OUString&, sal_Bool=sal_True ); + // From 8.4.1999: default changed to true because of #64236 - + // change it back to false when the bug is cleanly removed. + short Add( const rtl::OUString&, bool=true ); short Add( double, SbxDataType ); const rtl::OUString& Find( sal_uInt32 ) const; SbiParser* GetParser() { return pParser; } @@ -146,8 +146,8 @@ public: void SetByVal( bool bByVal_ = true ) { bByVal = bByVal_; } void SetStatic( bool bAsStatic = true ) { bStatic = bAsStatic; } - void SetNew() { bNew = sal_True; } - void SetDefinedAs() { bAs = sal_True; } + void SetNew() { bNew = true; } + void SetDefinedAs() { bAs = true; } void SetGlobal(bool b){ bGlobal = b; } void SetDefaultId( sal_uInt16 n ) { nDefaultId = n; } sal_uInt16 GetDefaultId( void ) { return nDefaultId; } @@ -180,11 +180,11 @@ class SbiProcDef : public SbiSymDef { // procedure definition (from basic): sal_uInt16 nLine1, nLine2; // line area PropertyMode mePropMode; // Marks if this is a property procedure and which String maPropName; // Property name if property procedure (!= proc name) - sal_Bool bCdecl : 1; // sal_True: CDECL given + bool bCdecl : 1; // true: CDECL given bool bPublic : 1; // true: proc is PUBLIC - sal_Bool mbProcDecl : 1; // sal_True: instanciated by SbiParser::ProcDecl + bool mbProcDecl : 1; // true: instanciated by SbiParser::ProcDecl public: - SbiProcDef( SbiParser*, const String&, sal_Bool bProcDecl=false ); + SbiProcDef( SbiParser*, const String&, bool bProcDecl=false ); virtual ~SbiProcDef(); virtual SbiProcDef* GetProcDef(); virtual void SetType( SbxDataType ); @@ -195,9 +195,9 @@ public: String& GetAlias() { return aAlias; } void SetPublic( bool b ) { bPublic = b; } bool IsPublic() const { return bPublic; } - void SetCdecl( sal_Bool b = sal_True) { bCdecl = b; } - sal_Bool IsCdecl() const { return bCdecl; } - sal_Bool IsUsedForProcDecl() const { return mbProcDecl; } + void SetCdecl( bool b = true) { bCdecl = b; } + bool IsCdecl() const { return bCdecl; } + bool IsUsedForProcDecl() const { return mbProcDecl; } void SetLine1( sal_uInt16 n ) { nLine1 = n; } sal_uInt16 GetLine1() const { return nLine1; } void SetLine2( sal_uInt16 n ) { nLine2 = n; } diff --git a/basic/source/inc/token.hxx b/basic/source/inc/token.hxx index b48e78428b8c..7890ef3d7fde 100644 --- a/basic/source/inc/token.hxx +++ b/basic/source/inc/token.hxx @@ -133,36 +133,36 @@ protected: SbiToken eCurTok; SbiToken ePush; sal_uInt16 nPLine, nPCol1, nPCol2; // pushback location - sal_Bool bEof; - sal_Bool bEos; - sal_Bool bKeywords; // sal_True, if keywords are parsed - sal_Bool bAs; // last keyword was AS - sal_Bool bErrorIsSymbol; // Handle Error token as Symbol, not keyword + bool bEof; + bool bEos; + bool bKeywords; // true, if keywords are parsed + bool bAs; // last keyword was AS + bool bErrorIsSymbol; // Handle Error token as Symbol, not keyword public: SbiTokenizer( const ::rtl::OUString&, StarBASIC* = NULL ); ~SbiTokenizer(); - inline sal_Bool IsEof() { return bEof; } - inline sal_Bool IsEos() { return bEos; } + inline bool IsEof() { return bEof; } + inline bool IsEos() { return bEos; } void Push( SbiToken ); const ::rtl::OUString& Symbol( SbiToken ); // reconversion SbiToken Peek(); // read the next token SbiToken Next(); // read a token - sal_Bool MayBeLabel( sal_Bool= sal_False ); + bool MayBeLabel( bool= false ); void Error( SbError c ) { GenError( c ); } void Error( SbError, SbiToken ); void Error( SbError, const char* ); void Error( SbError, const ::rtl::OUString &); - static sal_Bool IsEoln( SbiToken t ) - { return sal_Bool( t == EOS || t == EOLN || t == REM ); } - static sal_Bool IsKwd( SbiToken t ) - { return sal_Bool( t >= FIRSTKWD && t <= LASTKWD ); } - static sal_Bool IsExtra( SbiToken t ) - { return sal_Bool( t >= FIRSTEXTRA ); } + static bool IsEoln( SbiToken t ) + { return t == EOS || t == EOLN || t == REM; } + static bool IsKwd( SbiToken t ) + { return t >= FIRSTKWD && t <= LASTKWD; } + static bool IsExtra( SbiToken t ) + { return t >= FIRSTEXTRA; } }; diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index d5498a400d5b..a49b6f379d91 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -68,7 +68,7 @@ void BasicDLL::BasicBreak() { // bJustStopping: if there's someone pressing STOP like crazy umpteen times, // but the Basic doesn't stop early enough, the box might appear more often... - static sal_Bool bJustStopping = sal_False; + static bool bJustStopping = sal_False; BasicDLL* pThis = BASIC_DLL(); DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" ); @@ -76,10 +76,10 @@ void BasicDLL::BasicBreak() { if ( StarBASIC::IsRunning() && !bJustStopping && ( pThis->bBreakEnabled || pThis->bDebugMode ) ) { - bJustStopping = sal_True; + bJustStopping = true; StarBASIC::Stop(); InfoBox( 0, BasResId(IDS_SBERR_TERMINATED).toString() ).Execute(); - bJustStopping = sal_False; + bJustStopping = false; } } } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index c8d8c0fbdcd7..162e35d4a748 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -141,11 +141,11 @@ static long GetDayDiff( const Date& rDate ); static const CharClass& GetCharClass( void ) { - static sal_Bool bNeedsInit = sal_True; + static bool bNeedsInit = true; static ::com::sun::star::lang::Locale aLocale; if( bNeedsInit ) { - bNeedsInit = sal_False; + bNeedsInit = false; aLocale = Application::GetSettings().GetLocale(); } static CharClass aCharClass( aLocale ); @@ -2559,7 +2559,7 @@ RTLFUNC(Dir) if( pRTLData->aDirSeq.getLength() > 0 ) { - sal_Bool bFolderFlag = ((pRTLData->nDirFlags & Sb_ATTR_DIRECTORY) != 0); + bool bFolderFlag = ((pRTLData->nDirFlags & Sb_ATTR_DIRECTORY) != 0); SbiInstance* pInst = GetSbData()->pInst; bool bCompatibility = ( pInst && pInst->IsCompatibility() ); @@ -2669,7 +2669,7 @@ RTLFUNC(Dir) if( pRTLData->pDir ) { - sal_Bool bFolderFlag = ((pRTLData->nDirFlags & Sb_ATTR_DIRECTORY) != 0); + bool bFolderFlag = ((pRTLData->nDirFlags & Sb_ATTR_DIRECTORY) != 0); for( ;; ) { if( pRTLData->nCurDirPos < 0 ) @@ -2801,7 +2801,7 @@ RTLFUNC(GetAttr) FileStatus aFileStatus( osl_FileStatus_Mask_Attributes | osl_FileStatus_Mask_Type ); aItem.getFileStatus( aFileStatus ); sal_uInt64 nAttributes = aFileStatus.getAttributes(); - sal_Bool bReadOnly = (nAttributes & osl_File_Attribute_ReadOnly) != 0; + bool bReadOnly = (nAttributes & osl_File_Attribute_ReadOnly) != 0; FileStatus::Type aType = aFileStatus.getFileType(); sal_Bool bDirectory = isFolder( aType ); @@ -3439,7 +3439,7 @@ RTLFUNC(TypeName) else { SbxDataType eType = rPar.Get(1)->GetType(); - sal_Bool bIsArray = ( ( eType & SbxARRAY ) != 0 ); + bool bIsArray = ( ( eType & SbxARRAY ) != 0 ); String aRetStr; if ( SbiRuntime::isVBAEnabled() && eType == SbxOBJECT ) diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 72009368d19d..60e344840f42 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -369,7 +369,7 @@ void SbxVariable::SetParent( SbxObject* p ) if ( p && ISA(SbxObject) ) { // then this had to be a child of the new parent - sal_Bool bFound = sal_False; + bool bFound = false; SbxArray *pChildren = p->GetObjects(); if ( pChildren ) { |