summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-08-03 10:28:32 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-08-03 10:29:31 +0900
commit621145a777ec6ac918bd822bfc4ece1f75900bb1 (patch)
tree6e45ab4e31167f8b1f3bd851c56fddcad1eb99a4 /basic
parentad99d4eeb60d4d18a93fcc78973b5f5dd20c0fbb (diff)
sal_Bool -> bool
Change-Id: I49749f327d6a9c3661ef9bd684647e0a45b9203a
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/buffer.cxx50
-rw-r--r--basic/source/comp/codegen.cxx6
-rw-r--r--basic/source/inc/buffer.hxx16
-rw-r--r--basic/source/inc/codegen.hxx2
4 files changed, 37 insertions, 37 deletions
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index 5360ded53ed2..6eb01f59a2f4 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -58,13 +58,13 @@ char* SbiBuffer::GetBuffer()
// Test, if the buffer can contain n Bytes.
// In case of doubt it will be enlarged
-sal_Bool SbiBuffer::Check( sal_uInt16 n )
+bool SbiBuffer::Check( sal_uInt16 n )
{
- if( !n ) return sal_True;
+ if( !n ) return true;
if( ( static_cast<sal_uInt32>( nOff )+ n ) > static_cast<sal_uInt32>( nSize ) )
{
if( nInc == 0 )
- return sal_False;
+ return false;
sal_uInt16 nn = 0;
while( nn < n ) nn = nn + nInc;
char* p;
@@ -75,7 +75,7 @@ sal_Bool SbiBuffer::Check( sal_uInt16 n )
pParser->Error( SbERR_PROG_TOO_LARGE );
nInc = 0;
delete[] pBuf; pBuf = NULL;
- return sal_False;
+ return false;
}
else
{
@@ -86,7 +86,7 @@ sal_Bool SbiBuffer::Check( sal_uInt16 n )
nSize = nSize + nn;
}
}
- return sal_True;
+ return true;
}
// Patch of a Location
@@ -136,62 +136,62 @@ void SbiBuffer::Chain( sal_uInt32 off )
}
}
-sal_Bool SbiBuffer::operator +=( sal_Int8 n )
+bool SbiBuffer::operator +=( sal_Int8 n )
{
if( Check( 1 ) )
{
- *pCur++ = (char) n; nOff++; return sal_True;
- } else return sal_False;
+ *pCur++ = (char) n; nOff++; return true;
+ } else return false;
}
-sal_Bool SbiBuffer::operator +=( sal_uInt8 n )
+bool SbiBuffer::operator +=( sal_uInt8 n )
{
if( Check( 1 ) )
{
- *pCur++ = (char) n; nOff++; return sal_True;
- } else return sal_False;
+ *pCur++ = (char) n; nOff++; return true;
+ } else return false;
}
-sal_Bool SbiBuffer::operator +=( sal_Int16 n )
+bool SbiBuffer::operator +=( sal_Int16 n )
{
if( Check( 2 ) )
{
*pCur++ = (char) ( n & 0xFF );
*pCur++ = (char) ( n >> 8 );
- nOff += 2; return sal_True;
- } else return sal_False;
+ nOff += 2; return true;
+ } else return false;
}
-sal_Bool SbiBuffer::operator +=( sal_uInt16 n )
+bool SbiBuffer::operator +=( sal_uInt16 n )
{
if( Check( 2 ) )
{
*pCur++ = (char) ( n & 0xFF );
*pCur++ = (char) ( n >> 8 );
- nOff += 2; return sal_True;
- } else return sal_False;
+ nOff += 2; return true;
+ } else return false;
}
-sal_Bool SbiBuffer::operator +=( sal_uInt32 n )
+bool SbiBuffer::operator +=( sal_uInt32 n )
{
if( Check( 4 ) )
{
sal_uInt16 n1 = static_cast<sal_uInt16>( n & 0xFFFF );
sal_uInt16 n2 = static_cast<sal_uInt16>( n >> 16 );
if ( operator +=( n1 ) && operator +=( n2 ) )
- return sal_True;
- return sal_True;
+ return true;
+ return true;
}
- return sal_False;
+ return false;
}
-sal_Bool SbiBuffer::operator +=( sal_Int32 n )
+bool SbiBuffer::operator +=( sal_Int32 n )
{
return operator +=( (sal_uInt32) n );
}
-sal_Bool SbiBuffer::operator +=( const String& n )
+bool SbiBuffer::operator +=( const String& n )
{
sal_uInt16 l = n.Len() + 1;
if( Check( l ) )
@@ -200,9 +200,9 @@ sal_Bool SbiBuffer::operator +=( const String& n )
memcpy( pCur, aByteStr.getStr(), l );
pCur += l;
nOff = nOff + l;
- return sal_True;
+ return true;
}
- else return sal_False;
+ else return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index 354ffb51b722..6642cb13f6f1 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -31,7 +31,7 @@ SbiCodeGen::SbiCodeGen( SbModule& r, SbiParser* p, short nInc )
: rMod( r ), aCode( p, nInc )
{
pParser = p;
- bStmnt = sal_False;
+ bStmnt = false;
nLine = 0;
nCol = 0;
nForLevel = 0;
@@ -46,7 +46,7 @@ sal_uInt32 SbiCodeGen::GetPC()
void SbiCodeGen::Statement()
{
- bStmnt = sal_True;
+ bStmnt = true;
nLine = pParser->GetLine();
nCol = pParser->GetCol1();
@@ -62,7 +62,7 @@ void SbiCodeGen::GenStmnt()
{
if( bStmnt )
{
- bStmnt = sal_False;
+ bStmnt = false;
Gen( _STMNT, nLine, nCol );
}
}
diff --git a/basic/source/inc/buffer.hxx b/basic/source/inc/buffer.hxx
index 62a92acf0c62..08a1f2f5f2df 100644
--- a/basic/source/inc/buffer.hxx
+++ b/basic/source/inc/buffer.hxx
@@ -32,19 +32,19 @@ class SbiBuffer {
sal_uInt32 nOff;
sal_uInt32 nSize;
short nInc;
- sal_Bool Check( sal_uInt16 );
+ bool Check( sal_uInt16 );
public:
SbiBuffer( SbiParser*, short ); // increment
~SbiBuffer();
void Patch( sal_uInt32, sal_uInt32 );
void Chain( sal_uInt32 );
- sal_Bool operator += (const String&); // save basic-string
- sal_Bool operator += (sal_Int8); // save character
- sal_Bool operator += (sal_Int16); // save integer
- sal_Bool operator += (sal_uInt8); // save character
- sal_Bool operator += (sal_uInt16); // save integer
- sal_Bool operator += (sal_uInt32); // save integer
- sal_Bool operator += (sal_Int32); // save integer
+ bool operator += (const String&); // save basic-string
+ bool operator += (sal_Int8); // save character
+ bool operator += (sal_Int16); // save integer
+ bool operator += (sal_uInt8); // save character
+ bool operator += (sal_uInt16); // save integer
+ bool operator += (sal_uInt32); // save integer
+ bool operator += (sal_Int32); // save integer
char* GetBuffer(); // give out buffer (delete yourself!)
char* GetBufferPtr(){ return pBuf; }
sal_uInt32 GetSize() { return nOff; }
diff --git a/basic/source/inc/codegen.hxx b/basic/source/inc/codegen.hxx
index f1ef5a7d62c2..246ff167ce79 100644
--- a/basic/source/inc/codegen.hxx
+++ b/basic/source/inc/codegen.hxx
@@ -31,7 +31,7 @@ class SbiCodeGen {
SbiBuffer aCode;
short nLine, nCol; // for stmnt command
short nForLevel; // #29955
- sal_Bool bStmnt; // sal_True: statement-opcode is pending
+ bool bStmnt; // true: statement-opcode is pending
public:
SbiCodeGen( SbModule&, SbiParser*, short );
SbiParser* GetParser() { return pParser; }