Kaydet (Commit) dfe544c8 authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool to bool

Change-Id: I784fb31bad1ff02987c24abbac04b38207a1f5cf
üst 065b5915
......@@ -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: */
......@@ -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 );
......
......@@ -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();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment