summaryrefslogtreecommitdiff
path: root/basic
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
parent065b591504096661ac9f421902e108fbb8624b23 (diff)
sal_Bool to bool
Change-Id: I784fb31bad1ff02987c24abbac04b38207a1f5cf
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/image.cxx22
-rw-r--r--basic/source/classes/sbxmod.cxx8
-rw-r--r--basic/source/inc/image.hxx10
3 files changed, 19 insertions, 21 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 );
diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx
index f62ac2569b23..96474ad78ca1 100644
--- a/basic/source/inc/image.hxx
+++ b/basic/source/inc/image.hxx
@@ -58,16 +58,16 @@ public:
String aName; // macro name
::rtl::OUString aOUSource; // source code
String aComment;
- sal_Bool bInit;
- sal_Bool bFirstInit;
+ bool bInit;
+ bool bFirstInit;
SbiImage();
~SbiImage();
void Clear();
- sal_Bool Load( SvStream&, sal_uInt32& nVer );
+ bool Load( SvStream&, sal_uInt32& nVer );
// nVer is set to version
// of image
- sal_Bool Save( SvStream&, sal_uInt32 = B_CURVERSION );
+ bool Save( SvStream&, sal_uInt32 = B_CURVERSION );
bool IsError() { return bError; }
const char* GetCode() const { return pCode; }
@@ -84,7 +84,7 @@ public:
sal_uInt16 CalcLegacyOffset( sal_Int32 nOffset );
sal_uInt32 CalcNewOffset( sal_Int16 nOffset );
void ReleaseLegacyBuffer();
- sal_Bool ExceedsLegacyLimits();
+ bool ExceedsLegacyLimits();
};