summaryrefslogtreecommitdiff
path: root/basic/source/classes
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-08-15 09:44:54 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-08-15 09:45:49 +0900
commitdfe544c87b55cb6b7db4efe8a992868ad6e11339 (patch)
treeec7c3820f27740c90fba5fe0f4a1d03edfc2c75b /basic/source/classes
parent065b591504096661ac9f421902e108fbb8624b23 (diff)
sal_Bool to bool
Change-Id: I784fb31bad1ff02987c24abbac04b38207a1f5cf
Diffstat (limited to 'basic/source/classes')
-rw-r--r--basic/source/classes/image.cxx22
-rw-r--r--basic/source/classes/sbxmod.cxx8
2 files changed, 14 insertions, 16 deletions
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 7b31f6b923d4..81c0910b7df3 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -38,7 +38,7 @@ SbiImage::SbiImage()
nDimBase = 0;
bInit =
bError = false;
- bFirstInit = sal_True;
+ bFirstInit = true;
eCharSet = osl_getThreadTextEncoding();
}
@@ -72,9 +72,9 @@ void SbiImage::Clear()
*
**************************************************************************/
-sal_Bool SbiGood( SvStream& r )
+bool SbiGood( SvStream& r )
{
- return sal_Bool( !r.IsEof() && r.GetError() == SVSTREAM_OK );
+ return !r.IsEof() && r.GetError() == SVSTREAM_OK;
}
// Open Record
@@ -100,7 +100,7 @@ void SbiCloseRecord( SvStream& r, sal_uIntPtr nOff )
*
**************************************************************************/
-sal_Bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
+bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
{
sal_uInt16 nSign, nCount;
@@ -226,10 +226,10 @@ done:
r.Seek( nLast );
if( !SbiGood( r ) )
bError = true;
- return sal_Bool( !bError );
+ return !bError;
}
-sal_Bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
+bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
{
bool bLegacy = ( nVer < B_EXT_IMG_VERSION );
@@ -240,7 +240,7 @@ sal_Bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
SbiImage aEmptyImg;
aEmptyImg.aName = aName;
aEmptyImg.Save( r, B_LEGACYVERSION );
- return sal_True;
+ return true;
}
// First of all the header
sal_uIntPtr nStart = SbiOpenRecord( r, B_MODULE, 1 );
@@ -348,7 +348,7 @@ sal_Bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
SbiCloseRecord( r, nStart );
if( !SbiGood( r ) )
bError = true;
- return sal_Bool( !bError );
+ return !bError;
}
/**************************************************************************
@@ -498,11 +498,9 @@ void SbiImage::ReleaseLegacyBuffer()
nLegacyCodeSize = 0;
}
-sal_Bool SbiImage::ExceedsLegacyLimits()
+bool SbiImage::ExceedsLegacyLimits()
{
- if ( ( nStringSize > 0xFF00L ) || ( CalcLegacyOffset( nCodeSize ) > 0xFF00L ) )
- return sal_True;
- return sal_False;
+ return ( nStringSize > 0xFF00L ) || ( CalcLegacyOffset( nCodeSize ) > 0xFF00L );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index a7b401b00026..61b7f0da6404 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1314,8 +1314,8 @@ void SbModule::RunInit()
GetSbData()->pInst->pRun = pRt->pNext;
delete pRt;
GetSbData()->pMod = pOldMod;
- pImage->bInit = sal_True;
- pImage->bFirstInit = sal_False;
+ pImage->bInit = true;
+ pImage->bFirstInit = false;
// RunInit is not activ anymore
GetSbData()->bRunInit = sal_False;
@@ -1714,7 +1714,7 @@ sal_Bool SbModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
sal_Bool SbModule::StoreData( SvStream& rStrm ) const
{
- sal_Bool bFixup = ( pImage && !pImage->ExceedsLegacyLimits() );
+ bool bFixup = ( pImage && !pImage->ExceedsLegacyLimits() );
if ( bFixup )
fixUpMethodStart( true );
sal_Bool bRet = SbxObject::StoreData( rStrm );
@@ -1815,7 +1815,7 @@ sal_Bool SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer )
sal_Bool bRet = Compile();
if( bRet )
{
- sal_Bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts
+ bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts
if ( bFixup ) // save in old image format, fix up method starts
fixUpMethodStart( true );