summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-08-20 09:44:32 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-08-20 09:47:25 +0900
commita8647dd0301c179b25aa819d3479e04ea672fd8f (patch)
treebc67eeae5da8eee489e8ebf046d8e765d746472c /basic
parent32dafb7494ec3b7023c5f71ec1d921c1c7e074c2 (diff)
sal_Bool to bool
Change-Id: I427e9bb30cab4698a2495de7445a4a4982abd7b4
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/dim.cxx26
-rw-r--r--basic/source/comp/io.cxx14
-rw-r--r--basic/source/comp/parser.cxx42
-rw-r--r--basic/source/comp/symtbl.cxx2
-rw-r--r--basic/source/inc/namecont.hxx2
-rw-r--r--basic/source/inc/parser.hxx26
-rw-r--r--basic/source/inc/symtbl.hxx6
-rw-r--r--basic/source/uno/namecont.cxx30
8 files changed, 74 insertions, 74 deletions
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index ea27e63cbfb5..5ca13e5c9734 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -68,7 +68,7 @@ SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, bool bStatic, bool bConst )
// Resolving of a AS-Type-Declaration
// The data type were inserted into the handed over variable
-void SbiParser::TypeDecl( SbiSymDef& rDef, sal_Bool bAsNewAlreadyParsed )
+void SbiParser::TypeDecl( SbiSymDef& rDef, bool bAsNewAlreadyParsed )
{
SbxDataType eType = rDef.GetType();
if( bAsNewAlreadyParsed || Peek() == AS )
@@ -239,7 +239,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
bNewGblDefs = false;
}
Next();
- DefProc( sal_False, bPrivate );
+ DefProc( false, bPrivate );
return;
}
else if( eCurTok == ENUM )
@@ -547,10 +547,10 @@ void SbiParser::Erase()
void SbiParser::Type()
{
- DefType( sal_False );
+ DefType( false );
}
-void SbiParser::DefType( sal_Bool bPrivate )
+void SbiParser::DefType( bool bPrivate )
{
// TODO: Use bPrivate
(void)bPrivate;
@@ -671,10 +671,10 @@ void SbiParser::DefType( sal_Bool bPrivate )
void SbiParser::Enum()
{
- DefEnum( sal_False );
+ DefEnum( false );
}
-void SbiParser::DefEnum( sal_Bool bPrivate )
+void SbiParser::DefEnum( bool bPrivate )
{
// Read a the new Token. It had to be a symbol
if (!TestSymbol())
@@ -937,10 +937,10 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
void SbiParser::Declare()
{
- DefDeclare( sal_False );
+ DefDeclare( false );
}
-void SbiParser::DefDeclare( sal_Bool bPrivate )
+void SbiParser::DefDeclare( bool bPrivate )
{
Next();
if( eCurTok != SUB && eCurTok != FUNCTION )
@@ -1071,12 +1071,12 @@ void SbiParser::Call()
void SbiParser::SubFunc()
{
- DefProc( sal_False, sal_False );
+ DefProc( false, false );
}
// Read in of a procedure
-void SbiParser::DefProc( sal_Bool bStatic, sal_Bool bPrivate )
+void SbiParser::DefProc( bool bStatic, bool bPrivate )
{
sal_uInt16 l1 = nLine, l2 = nLine;
bool bSub = ( eCurTok == SUB );
@@ -1181,10 +1181,10 @@ void SbiParser::DefProc( sal_Bool bStatic, sal_Bool bPrivate )
void SbiParser::Static()
{
- DefStatic( sal_False );
+ DefStatic( false );
}
-void SbiParser::DefStatic( sal_Bool bPrivate )
+void SbiParser::DefStatic( bool bPrivate )
{
switch( Peek() )
{
@@ -1199,7 +1199,7 @@ void SbiParser::DefStatic( sal_Bool bPrivate )
bNewGblDefs = false;
}
Next();
- DefProc( sal_True, bPrivate );
+ DefProc( true, bPrivate );
break;
default: {
if( !pProc )
diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx
index 2d503da77979..2fb50913cea3 100644
--- a/basic/source/comp/io.cxx
+++ b/basic/source/comp/io.cxx
@@ -22,9 +22,9 @@
// test if there's an I/O channel
-sal_Bool SbiParser::Channel( sal_Bool bAlways )
+bool SbiParser::Channel( bool bAlways )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
Peek();
if( IsHash() )
{
@@ -33,7 +33,7 @@ sal_Bool SbiParser::Channel( sal_Bool bAlways )
Next();
aExpr.Gen();
aGen.Gen( _CHANNEL );
- bRes = sal_True;
+ bRes = true;
}
else if( bAlways )
Error( SbERR_EXPECTED, "#" );
@@ -45,7 +45,7 @@ sal_Bool SbiParser::Channel( sal_Bool bAlways )
void SbiParser::Print()
{
- sal_Bool bChan = Channel();
+ bool bChan = Channel();
while( !bAbort )
{
@@ -76,7 +76,7 @@ void SbiParser::Print()
void SbiParser::Write()
{
- sal_Bool bChan = Channel();
+ bool bChan = Channel();
while( !bAbort )
{
@@ -128,7 +128,7 @@ void SbiParser::Line()
void SbiParser::LineInput()
{
- Channel( sal_True );
+ Channel( true );
SbiExpression* pExpr = new SbiExpression( this, SbOPERAND );
if( !pExpr->IsVariable() )
Error( SbERR_VAR_EXPECTED );
@@ -145,7 +145,7 @@ void SbiParser::LineInput()
void SbiParser::Input()
{
aGen.Gen( _RESTART );
- Channel( sal_True );
+ Channel( true );
SbiExpression* pExpr = new SbiExpression( this, SbOPERAND );
while( !bAbort )
{
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 470f239be5f7..f6421823287f 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -242,49 +242,49 @@ void SbiParser::Exit()
Error( SbERR_BAD_EXIT );
}
-sal_Bool SbiParser::TestSymbol( sal_Bool bKwdOk )
+bool SbiParser::TestSymbol( bool bKwdOk )
{
Peek();
if( eCurTok == SYMBOL || ( bKwdOk && IsKwd( eCurTok ) ) )
{
- Next(); return sal_True;
+ Next(); return true;
}
Error( SbERR_SYMBOL_EXPECTED );
- return sal_False;
+ return false;
}
-sal_Bool SbiParser::TestToken( SbiToken t )
+bool SbiParser::TestToken( SbiToken t )
{
if( Peek() == t )
{
- Next(); return sal_True;
+ Next(); return true;
}
else
{
Error( SbERR_EXPECTED, t );
- return sal_False;
+ return false;
}
}
-sal_Bool SbiParser::TestComma()
+bool SbiParser::TestComma()
{
SbiToken eTok = Peek();
if( IsEoln( eTok ) )
{
Next();
- return sal_False;
+ return false;
}
else if( eTok != COMMA )
{
Error( SbERR_EXPECTED, COMMA );
- return sal_False;
+ return false;
}
Next();
- return sal_True;
+ return true;
}
@@ -315,9 +315,9 @@ void SbiParser::StmntBlock( SbiToken eEnd )
-sal_Bool SbiParser::Parse()
+bool SbiParser::Parse()
{
- if( bAbort ) return sal_False;
+ if( bAbort ) return false;
EnableErrors();
@@ -333,13 +333,13 @@ sal_Bool SbiParser::Parse()
// can be another nGblChain, so ask for it before.
if( bNewGblDefs && nGblChain == 0 )
nGblChain = aGen.Gen( _JUMP, 0 );
- return sal_False;
+ return false;
}
if( IsEoln( eCurTok ) )
{
- Next(); return sal_True;
+ Next(); return true;
}
if( !bSingleLineIf && MayBeLabel( sal_True ) )
@@ -353,7 +353,7 @@ sal_Bool SbiParser::Parse()
if( IsEoln( eCurTok ) )
{
- Next(); return sal_True;
+ Next(); return true;
}
}
@@ -366,13 +366,13 @@ sal_Bool SbiParser::Parse()
Next();
if( eCurTok != NIL )
aGen.Statement();
- return sal_False;
+ return false;
}
// comment?
if( eCurTok == REM )
{
- Next(); return sal_True;
+ Next(); return true;
}
// In vba it's possible to do Error.foobar ( even if it results in
@@ -458,7 +458,7 @@ sal_Bool SbiParser::Parse()
}
// The parser aborts at the end, the
// next token has not been fetched yet!
- return sal_True;
+ return true;
}
@@ -772,9 +772,9 @@ void SbiParser::Option()
{
SbiToken eTok = Next();
if( eTok == BINARY )
- bText = sal_False;
+ bText = false;
else if( eTok == SYMBOL && GetSym().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("text")) )
- bText = sal_True;
+ bText = true;
else
Error( SbERR_EXPECTED, "Text/Binary" );
break;
@@ -784,7 +784,7 @@ void SbiParser::Option()
break;
case CLASSMODULE:
- bClassModule = sal_True;
+ bClassModule = true;
aGen.GetModule().SetModuleType( com::sun::star::script::ModuleType::CLASS );
break;
case VBASUPPORT: // Option VBASupport used to override the module mode ( in fact this must reset the mode
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index 08f938238976..fe47cbc3b910 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -384,7 +384,7 @@ SbiProcDef::SbiProcDef( SbiParser* pParser, const String& rName,
nLine1 =
nLine2 = 0;
mePropMode = PROPERTY_MODE_NONE;
- bPublic = sal_True;
+ bPublic = true;
bCdecl = sal_False;
bStatic = sal_False;
// For return values the first element of the parameter
diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx
index cc5f67d271c3..bfb867d3b360 100644
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@ -272,7 +272,7 @@ protected:
const ::rtl::OUString& aTargetURL,
const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > xToUseSFI );
- sal_Bool implLoadLibraryIndexFile( SfxLibrary* pLib,
+ bool implLoadLibraryIndexFile( SfxLibrary* pLib,
::xmlscript::LibDescriptor& rLib,
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
const ::rtl::OUString& aIndexFileName );
diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx
index 7649cc261b0d..68dd9f18f39a 100644
--- a/basic/source/inc/parser.hxx
+++ b/basic/source/inc/parser.hxx
@@ -45,17 +45,17 @@ class SbiParser : public SbiTokenizer
SbiSymDef* VarDecl( SbiDimList**, bool, bool );
SbiProcDef* ProcDecl(bool bDecl);
- void DefStatic( sal_Bool bPrivate );
- void DefProc( sal_Bool bStatic, sal_Bool bPrivate ); // read in procedure
+ void DefStatic( bool bPrivate );
+ void DefProc( bool bStatic, bool bPrivate ); // read in procedure
void DefVar( SbiOpcode eOp, bool bStatic ); // read in DIM/REDIM
- void TypeDecl( SbiSymDef&, sal_Bool bAsNewAlreadyParsed=sal_False ); // AS-declaration
+ void TypeDecl( SbiSymDef&, bool bAsNewAlreadyParsed=false ); // AS-declaration
void OpenBlock( SbiToken, SbiExprNode* = NULL );
void CloseBlock();
- sal_Bool Channel( sal_Bool=sal_False ); // parse channel number
+ bool Channel( bool bAlways=false ); // parse channel number
void StmntBlock( SbiToken );
- void DefType( sal_Bool bPrivate ); // Parse type declaration
- void DefEnum( sal_Bool bPrivate ); // Parse enum declaration
- void DefDeclare( sal_Bool bPrivate );
+ void DefType( bool bPrivate ); // Parse type declaration
+ void DefEnum( bool bPrivate ); // Parse enum declaration
+ void DefDeclare( bool bPrivate );
void EnableCompatibility();
public:
SbxArrayRef rTypeArray;
@@ -70,15 +70,15 @@ public:
SbiSymPool* pPool;
SbiExprType eCurExpr;
short nBase; // OPTION BASE-value
- sal_Bool bText; // OPTION COMPARE TEXT
+ bool bText; // OPTION COMPARE TEXT
bool bExplicit; // true: OPTION EXPLICIT
- sal_Bool bClassModule; // sal_True: OPTION ClassModule
+ bool bClassModule; // true: OPTION ClassModule
StringVector aIfaceVector; // Holds all interfaces implemented by a class module
StringVector aRequiredTypes; // Types used in Dim As New <type> outside subs
SbxDataType eDefTypes[26]; // DEFxxx data types
SbiParser( StarBASIC*, SbModule* );
- sal_Bool Parse();
+ bool Parse();
SbiExprNode* GetWithVar();
// from 31.3.1996, search symbol in the runtime-library
@@ -87,9 +87,9 @@ public:
bool HasGlobalCode();
- sal_Bool TestToken( SbiToken );
- sal_Bool TestSymbol( sal_Bool=sal_False );
- sal_Bool TestComma();
+ bool TestToken( SbiToken );
+ bool TestSymbol( bool bKwdOk=false );
+ bool TestComma();
void TestEoln();
void Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo = NULL ); // let or call
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index 43a1fc2e8a74..9c474fd90e65 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -181,7 +181,7 @@ class SbiProcDef : public SbiSymDef { // procedure definition (from basic):
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
- sal_Bool bPublic : 1; // sal_True: proc is PUBLIC
+ bool bPublic : 1; // true: proc is PUBLIC
sal_Bool mbProcDecl : 1; // sal_True: instanciated by SbiParser::ProcDecl
public:
SbiProcDef( SbiParser*, const String&, sal_Bool bProcDecl=false );
@@ -193,8 +193,8 @@ public:
SbiSymPool& GetLocals() { return GetPool();}
String& GetLib() { return aLibName; }
String& GetAlias() { return aAlias; }
- void SetPublic( sal_Bool b ) { bPublic = b; }
- sal_Bool IsPublic() const { return bPublic; }
+ 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; }
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 8af7fb1b40e5..6a40dfeb35b6 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -662,7 +662,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
uno::Reference< io::XInputStream > xInput;
mxStorage = xStorage;
- sal_Bool bStorage = mxStorage.is();
+ bool bStorage = mxStorage.is();
// #110009: Scope to force the StorageRefs to be destructed and
@@ -904,7 +904,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
if( !pImplLib->mbInitialised && (!bStorage || xLibraryStor.is()) )
{
OUString aIndexFileName;
- sal_Bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, aIndexFileName );
+ bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, aIndexFileName );
SAL_WARN_IF(
bLoaded && aLibName != rLib.aName, "basic",
("Different library names in library container and"
@@ -1150,7 +1150,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
uno::Reference< embed::XStorage > xDummyStor;
::xmlscript::LibDescriptor aLibDesc;
- /*sal_Bool bReadIndexFile =*/ implLoadLibraryIndexFile
+ implLoadLibraryIndexFile
( pNewLib, aLibDesc, xDummyStor, pNewLib->maLibInfoFileURL );
implImportLibDescriptor( pNewLib, aLibDesc );
}
@@ -1356,7 +1356,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
const Reference< XInteractionHandler >& xHandler )
{
sal_Bool bLink = pLib->mbLink;
- sal_Bool bStorage = xStorage.is() && !bLink;
+ bool bStorage = xStorage.is() && !bLink;
Sequence< OUString > aElementNames = pLib->getElementNames();
sal_Int32 nNameCount = aElementNames.getLength();
@@ -1512,7 +1512,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
}
sal_Bool bLink = pLib->mbLink;
- sal_Bool bStorage = xStorage.is() && !bLink;
+ bool bStorage = xStorage.is() && !bLink;
// Write info file
uno::Reference< io::XOutputStream > xOut;
@@ -1601,7 +1601,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
}
-sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
+bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
::xmlscript::LibDescriptor& rLib, const uno::Reference< embed::XStorage >& xStorage, const OUString& aIndexFileName )
{
Reference< XParser > xParser( mxMSF->createInstance(
@@ -1609,11 +1609,11 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
if( !xParser.is() )
{
SAL_WARN("basic", "couldn't create sax parser component");
- return sal_False;
+ return false;
}
sal_Bool bLink = sal_False;
- sal_Bool bStorage = sal_False;
+ bool bStorage = false;
if( pLib )
{
bLink = pLib->mbLink;
@@ -1666,7 +1666,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
}
if( !xInput.is() )
{
- return sal_False;
+ return false;
}
InputSource source;
@@ -1684,7 +1684,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aLibInfoPath );
sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL;
ErrorHandler::HandleError( nErrorCode );
- return sal_False;
+ return false;
}
if( !pLib )
@@ -1699,7 +1699,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
implImportLibDescriptor( pLib, rLib );
}
- return sal_True;
+ return true;
}
void SfxLibraryContainer::implImportLibDescriptor
@@ -1746,7 +1746,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
boost::scoped_ptr< ::xmlscript::LibDescriptorArray > pLibArray(new ::xmlscript::LibDescriptorArray(nLibsToSave));
// Write to storage?
- sal_Bool bStorage = i_rStorage.is();
+ bool bStorage = i_rStorage.is();
uno::Reference< embed::XStorage > xSourceLibrariesStor;
uno::Reference< embed::XStorage > xTargetLibrariesStor;
::rtl::OUString sTempTargetStorName;
@@ -2153,7 +2153,7 @@ Reference< XNameAccess > SAL_CALL SfxLibraryContainer::createLibraryLink
OUString aInitFileName;
uno::Reference< embed::XStorage > xDummyStor;
::xmlscript::LibDescriptor aLibDesc;
- /*sal_Bool bReadIndexFile = */implLoadLibraryIndexFile( pNewLib, aLibDesc, xDummyStor, aInitFileName );
+ implLoadLibraryIndexFile( pNewLib, aLibDesc, xDummyStor, aInitFileName );
implImportLibDescriptor( pNewLib, aLibDesc );
Reference< XNameAccess > xRet = static_cast< XNameAccess* >( pNewLib );
@@ -2272,7 +2272,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
}
sal_Bool bLink = pImplLib->mbLink;
- sal_Bool bStorage = mxStorage.is() && !bLink;
+ bool bStorage = mxStorage.is() && !bLink;
uno::Reference< embed::XStorage > xLibrariesStor;
uno::Reference< embed::XStorage > xLibraryStor;
@@ -2464,7 +2464,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
bool bMovedSuccessful = true;
// Rename files
- sal_Bool bStorage = mxStorage.is();
+ bool bStorage = mxStorage.is();
if( !bStorage && !pImplLib->mbLink )
{
bMovedSuccessful = false;