summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-26 11:18:51 +0200
committerNoel Grandin <noel@peralex.com>2014-03-27 13:45:08 +0200
commitf288d7dcbd65e86e2c4f6519fac91eece8f01034 (patch)
treece706f8d0aca0501f7ca5976b4c3ff33486ece42 /basic
parentd7c5d9e3853af0261204fde6c14b349d9c3d9863 (diff)
basic: sal_Bool->bool
Change-Id: Id4952b6f97f9e8f917fea5651dee91499d109e48
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sb.cxx44
-rw-r--r--basic/source/classes/sbunoobj.cxx12
-rw-r--r--basic/source/classes/sbxmod.cxx108
-rw-r--r--basic/source/comp/sbcomp.cxx8
-rw-r--r--basic/source/inc/sbjsmod.hxx4
-rw-r--r--basic/source/inc/stdobj.hxx2
-rw-r--r--basic/source/runtime/props.cxx4
-rw-r--r--basic/source/runtime/runtime.cxx6
-rw-r--r--basic/source/runtime/stdobj.cxx2
-rw-r--r--basic/source/runtime/stdobj1.cxx2
-rw-r--r--basic/source/sbx/sbxarray.cxx41
-rw-r--r--basic/source/sbx/sbxbase.cxx48
-rw-r--r--basic/source/sbx/sbxbool.cxx2
-rw-r--r--basic/source/sbx/sbxcoll.cxx16
-rw-r--r--basic/source/sbx/sbxobj.cxx48
-rw-r--r--basic/source/sbx/sbxscan.cxx7
-rw-r--r--basic/source/sbx/sbxvalue.cxx201
-rw-r--r--basic/source/sbx/sbxvar.cxx34
-rw-r--r--basic/source/uno/scriptcont.cxx4
19 files changed, 301 insertions, 292 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 2620251f83a6..098fd3127aad 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -940,7 +940,7 @@ StarBASIC::StarBASIC( StarBASIC* p, bool bIsDocBasic )
// #51727 Override SetModified so that the modified state
// is not given to the parent
-void StarBASIC::SetModified( sal_Bool b )
+void StarBASIC::SetModified( bool b )
{
SbxBase::SetModified( b );
}
@@ -1081,7 +1081,7 @@ SbModule* StarBASIC::MakeModule32( const OUString& rName, const ModuleInfo& mInf
p->SetSource32( rSrc );
p->SetParent( this );
pModules->Insert( p, pModules->Count() );
- SetModified( sal_True );
+ SetModified( true );
return p;
}
@@ -1095,11 +1095,11 @@ void StarBASIC::Insert( SbxVariable* pVar )
}
else
{
- sal_Bool bWasModified = IsModified();
+ bool bWasModified = IsModified();
SbxObject::Insert( pVar );
if( !bWasModified && pVar->IsSet( SBX_DONTSTORE ) )
{
- SetModified( sal_False );
+ SetModified( false );
}
}
}
@@ -1120,9 +1120,9 @@ void StarBASIC::Remove( SbxVariable* pVar )
}
}
-sal_Bool StarBASIC::Compile( SbModule* pMod )
+bool StarBASIC::Compile( SbModule* pMod )
{
- return pMod ? pMod->Compile() : sal_False;
+ return pMod && pMod->Compile();
}
void StarBASIC::Clear()
@@ -1626,7 +1626,7 @@ struct BasicStringList_Impl : private Resource
~BasicStringList_Impl() { FreeResource(); }
OUString GetString(){ return aResId.toString(); }
- sal_Bool IsErrorTextAvailable( void )
+ bool IsErrorTextAvailable( void )
{ return IsAvailableRes(aResId.SetRT(RSC_STRING)); }
};
@@ -1667,7 +1667,7 @@ void StarBASIC::MakeErrorText( SbError nId, const OUString& aMsg )
}
}
-sal_Bool StarBASIC::CError( SbError code, const OUString& rMsg,
+bool StarBASIC::CError( SbError code, const OUString& rMsg,
sal_Int32 l, sal_Int32 c1, sal_Int32 c2 )
{
SolarMutexGuard aSolarGuard;
@@ -1679,7 +1679,7 @@ sal_Bool StarBASIC::CError( SbError code, const OUString& rMsg,
StarBASIC* pStartedBasic = GetSbData()->pInst->GetBasic();
if( pStartedBasic != this )
{
- return sal_False;
+ return false;
}
Stop();
}
@@ -1710,12 +1710,12 @@ sal_Bool StarBASIC::CError( SbError code, const OUString& rMsg,
return bRet;
}
-sal_Bool StarBASIC::RTError( SbError code, sal_Int32 l, sal_Int32 c1, sal_Int32 c2 )
+bool StarBASIC::RTError( SbError code, sal_Int32 l, sal_Int32 c1, sal_Int32 c2 )
{
return RTError( code, OUString(), l, c1, c2 );
}
-sal_Bool StarBASIC::RTError( SbError code, const OUString& rMsg, sal_Int32 l, sal_Int32 c1, sal_Int32 c2 )
+bool StarBASIC::RTError( SbError code, const OUString& rMsg, sal_Int32 l, sal_Int32 c1, sal_Int32 c2 )
{
SolarMutexGuard aSolarGuard;
@@ -1859,11 +1859,11 @@ SbxArrayRef StarBASIC::getUnoListeners( void )
*
**************************************************************************/
-sal_Bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
+bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
{
if( !SbxObject::LoadData( r, nVer ) )
{
- return sal_False;
+ return false;
}
// #95459 Delete dialogs, otherwise endless recursion
// in SbxVarable::GetType() if dialogs are accessed
@@ -1896,7 +1896,7 @@ sal_Bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
SbModule* pMod = dynamic_cast<SbModule*>(pBase);
if( !pMod )
{
- return sal_False;
+ return false;
}
else if( pMod->ISA(SbJScriptModule) )
{
@@ -1924,14 +1924,14 @@ sal_Bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
// Search via StarBASIC is at all times global
DBG_ASSERT( IsSet( SBX_GBLSEARCH ), "Basic loaded without GBLSEARCH" );
SetFlag( SBX_GBLSEARCH );
- return sal_True;
+ return true;
}
-sal_Bool StarBASIC::StoreData( SvStream& r ) const
+bool StarBASIC::StoreData( SvStream& r ) const
{
if( !SbxObject::StoreData( r ) )
{
- return sal_False;
+ return false;
}
r.WriteUInt16( (sal_uInt16) pModules->Count() );
for( sal_uInt16 i = 0; i < pModules->Count(); i++ )
@@ -1939,10 +1939,10 @@ sal_Bool StarBASIC::StoreData( SvStream& r ) const
SbModule* p = (SbModule*) pModules->Get( i );
if( !p->Store( r ) )
{
- return sal_False;
+ return false;
}
}
- return sal_True;
+ return true;
}
bool StarBASIC::GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut )
@@ -2090,9 +2090,9 @@ void BasicCollection::SFX_NOTIFY( SfxBroadcaster& rCst, const TypeId& rId1,
if( p )
{
sal_uIntPtr nId = p->GetId();
- sal_Bool bRead = sal_Bool( nId == SBX_HINT_DATAWANTED );
- sal_Bool bWrite = sal_Bool( nId == SBX_HINT_DATACHANGED );
- sal_Bool bRequestInfo = sal_Bool( nId == SBX_HINT_INFOWANTED );
+ bool bRead = nId == SBX_HINT_DATAWANTED;
+ bool bWrite = nId == SBX_HINT_DATACHANGED;
+ bool bRequestInfo = nId == SBX_HINT_INFOWANTED;
SbxVariable* pVar = p->GetVar();
SbxArray* pArg = pVar->GetParameters();
OUString aVarName( pVar->GetName() );
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 1602fb0e65ef..0d28425bbbcc 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3136,7 +3136,7 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite
// variable for the return value
SbxVariableRef refVar = rPar.Get(0);
- refVar->PutBool( sal_False );
+ refVar->PutBool( false );
// get the Uno-Object
SbxBaseRef pObj = (SbxBase*)rPar.Get( 1 )->GetObject();
@@ -3180,7 +3180,7 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite
}
// Every thing works; then return TRUE
- refVar->PutBool( sal_True );
+ refVar->PutBool( true );
}
void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
@@ -3197,7 +3197,7 @@ void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
// variable for the return value
SbxVariableRef refVar = rPar.Get(0);
- refVar->PutBool( sal_False );
+ refVar->PutBool( false );
// get the Uno-Object
SbxVariableRef xParam = rPar.Get( 1 );
@@ -3214,7 +3214,7 @@ void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
TypeClass eType = aAny.getValueType().getTypeClass();
if( eType == TypeClass_STRUCT )
{
- refVar->PutBool( sal_True );
+ refVar->PutBool( true );
}
}
@@ -3232,7 +3232,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit
// variable for the return value
SbxVariableRef refVar = rPar.Get(0);
- refVar->PutBool( sal_False );
+ refVar->PutBool( false );
// get the Uno-Objects
SbxVariableRef xParam1 = rPar.Get( 1 );
@@ -3275,7 +3275,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit
if( x1 == x2 )
{
- refVar->PutBool( sal_True );
+ refVar->PutBool( true );
}
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index ae393d755dc8..3c320074c42c 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -484,7 +484,7 @@ IMPL_LINK( AsyncQuitHandler, OnAsyncQuit, void*, /*pNull*/ )
// A Basic module has set EXTSEARCH, so that the elements, that the modul contains,
// could be found from other module.
-SbModule::SbModule( const OUString& rName, sal_Bool bVBACompat )
+SbModule::SbModule( const OUString& rName, bool bVBACompat )
: SbxObject( "StarBASICModule" ),
pImage( NULL ), pBreaks( NULL ), pClassData( NULL ), mbVBACompat( bVBACompat ), pDocObject( NULL ), bIsProxyModule( false )
{
@@ -519,9 +519,9 @@ SbModule::GetUnoModule()
return mxWrapper;
}
-sal_Bool SbModule::IsCompiled() const
+bool SbModule::IsCompiled() const
{
- return sal_Bool( pImage != 0 );
+ return pImage != 0;
}
const SbxObject* SbModule::FindType( const OUString& aTypeName ) const
@@ -545,7 +545,7 @@ void SbModule::StartDefinitions()
{
SbMethod* p = PTR_CAST(SbMethod,pMethods->Get( i ) );
if( p )
- p->bInvalid = sal_True;
+ p->bInvalid = true;
}
for( i = 0; i < pProps->Count(); )
{
@@ -577,7 +577,7 @@ SbMethod* SbModule::GetMethod( const OUString& rName, SbxDataType t )
}
// The method is per default valid, because it could be
// created from the compiler (code generator) as well.
- pMeth->bInvalid = sal_False;
+ pMeth->bInvalid = false;
pMeth->ResetFlag( SBX_FIXED );
pMeth->SetFlag( SBX_WRITE );
pMeth->SetType( t );
@@ -644,7 +644,7 @@ SbIfaceMapperMethod* SbModule::GetIfaceMapperMethod( const OUString& rName, SbMe
pMapperMethod->SetFlags( SBX_READ );
pMethods->Put( pMapperMethod, pMethods->Count() );
}
- pMapperMethod->bInvalid = sal_False;
+ pMapperMethod->bInvalid = false;
return pMapperMethod;
}
@@ -657,7 +657,7 @@ TYPEINIT1(SbIfaceMapperMethod,SbMethod)
// From the code generator: remove invalid entries
-void SbModule::EndDefinitions( sal_Bool bNewState )
+void SbModule::EndDefinitions( bool bNewState )
{
for( sal_uInt16 i = 0; i < pMethods->Count(); )
{
@@ -677,7 +677,7 @@ void SbModule::EndDefinitions( sal_Bool bNewState )
else
i++;
}
- SetModified( sal_True );
+ SetModified( true );
}
void SbModule::Clear()
@@ -925,7 +925,7 @@ void SbModule::SetSource32( const OUString& r )
}
else if ( ( eCurTok == VBASUPPORT ) && ( aTok.Next() == NUMBER ) )
{
- sal_Bool bIsVBA = ( aTok.GetDbl()== 1 );
+ bool bIsVBA = ( aTok.GetDbl()== 1 );
SetVBACompat( bIsVBA );
aTok.SetCompatible( bIsVBA );
}
@@ -949,7 +949,7 @@ void SbModule::SetSource32( const OUString& r )
pMeth = GetMethod( aName_, t );
pMeth->nLine1 = pMeth->nLine2 = nLine1;
// The method is for a start VALID
- pMeth->bInvalid = sal_False;
+ pMeth->bInvalid = false;
}
else
{
@@ -973,7 +973,7 @@ void SbModule::SetSource32( const OUString& r )
}
}
}
- EndDefinitions( sal_True );
+ EndDefinitions( true );
}
// Broadcast of a hint to all Basics
@@ -1514,11 +1514,11 @@ void SbModule::GlobalRunDeInit( void )
const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, sal_uInt16& nCol ) const
{
- return FindNextStmnt( p, nLine, nCol, sal_False );
+ return FindNextStmnt( p, nLine, nCol, false );
}
const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, sal_uInt16& nCol,
- sal_Bool bFollowJumps, const SbiImage* pImg ) const
+ bool bFollowJumps, const SbiImage* pImg ) const
{
sal_uInt32 nPC = (sal_uInt32) ( p - (const sal_uInt8*) pImage->GetCode() );
while( nPC < pImage->GetCodeSize() )
@@ -1557,19 +1557,19 @@ const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine,
// Test, if a line contains STMNT-Opcodes
-sal_Bool SbModule::IsBreakable( sal_uInt16 nLine ) const
+bool SbModule::IsBreakable( sal_uInt16 nLine ) const
{
if( !pImage )
- return sal_False;
+ return false;
const sal_uInt8* p = (const sal_uInt8* ) pImage->GetCode();
sal_uInt16 nl, nc;
while( ( p = FindNextStmnt( p, nl, nc ) ) != NULL )
if( nl == nLine )
- return sal_True;
- return sal_False;
+ return true;
+ return false;
}
-sal_Bool SbModule::IsBP( sal_uInt16 nLine ) const
+bool SbModule::IsBP( sal_uInt16 nLine ) const
{
if( pBreaks )
{
@@ -1577,18 +1577,18 @@ sal_Bool SbModule::IsBP( sal_uInt16 nLine ) const
{
sal_uInt16 b = pBreaks->operator[]( i );
if( b == nLine )
- return sal_True;
+ return true;
if( b < nLine )
break;
}
}
- return sal_False;
+ return false;
}
-sal_Bool SbModule::SetBP( sal_uInt16 nLine )
+bool SbModule::SetBP( sal_uInt16 nLine )
{
if( !IsBreakable( nLine ) )
- return sal_False;
+ return false;
if( !pBreaks )
pBreaks = new SbiBreakpoints;
size_t i;
@@ -1596,7 +1596,7 @@ sal_Bool SbModule::SetBP( sal_uInt16 nLine )
{
sal_uInt16 b = pBreaks->operator[]( i );
if( b == nLine )
- return sal_True;
+ return true;
if( b < nLine )
break;
}
@@ -1609,9 +1609,9 @@ sal_Bool SbModule::SetBP( sal_uInt16 nLine )
return IsBreakable( nLine );
}
-sal_Bool SbModule::ClearBP( sal_uInt16 nLine )
+bool SbModule::ClearBP( sal_uInt16 nLine )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
if( pBreaks )
{
for( size_t i = 0; i < pBreaks->size(); i++ )
@@ -1620,7 +1620,7 @@ sal_Bool SbModule::ClearBP( sal_uInt16 nLine )
if( b == nLine )
{
pBreaks->erase( pBreaks->begin() + i );
- bRes = sal_True;
+ bRes = true;
break;
}
if( b < nLine )
@@ -1658,11 +1658,11 @@ SbModule::fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg ) const
}
-sal_Bool SbModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
Clear();
if( !SbxObject::LoadData( rStrm, 1 ) )
- return sal_False;
+ return false;
// As a precaution...
SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH );
sal_uInt8 bImage;
@@ -1675,7 +1675,7 @@ sal_Bool SbModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
if( !p->Load( rStrm, nImgVer ) )
{
delete p;
- return sal_False;
+ return false;
}
// If the image is in old format, we fix up the method start offsets
if ( nImgVer < B_EXT_IMG_VERSION )
@@ -1703,17 +1703,17 @@ sal_Bool SbModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
delete p;
}
}
- return sal_True;
+ return true;
}
-sal_Bool SbModule::StoreData( SvStream& rStrm ) const
+bool SbModule::StoreData( SvStream& rStrm ) const
{
bool bFixup = ( pImage && !pImage->ExceedsLegacyLimits() );
if ( bFixup )
fixUpMethodStart( true );
- sal_Bool bRet = SbxObject::StoreData( rStrm );
+ bool bRet = SbxObject::StoreData( rStrm );
if ( !bRet )
- return sal_False;
+ return false;
if( pImage )
{
@@ -1742,7 +1742,7 @@ sal_Bool SbModule::StoreData( SvStream& rStrm ) const
}
}
-sal_Bool SbModule::ExceedsLegacyModuleSize()
+bool SbModule::ExceedsLegacyModuleSize()
{
if ( !IsCompiled() )
Compile();
@@ -1839,14 +1839,14 @@ bool SbModule::HasExeCode()
}
// Store only image, no source
-sal_Bool SbModule::StoreBinaryData( SvStream& rStrm )
+bool SbModule::StoreBinaryData( SvStream& rStrm )
{
return StoreBinaryData( rStrm, 0 );
}
-sal_Bool SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer )
{
- sal_Bool bRet = Compile();
+ bool bRet = Compile();
if( bRet )
{
bool bFixup = ( !nVer && !pImage->ExceedsLegacyLimits() );// save in old image format, fix up method starts
@@ -1876,7 +1876,7 @@ sal_Bool SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer )
// Called for >= OO 1.0 passwd protected libraries only
-sal_Bool SbModule::LoadBinaryData( SvStream& rStrm )
+bool SbModule::LoadBinaryData( SvStream& rStrm )
{
OUString aKeepSource = aOUSource;
bool bRet = LoadData( rStrm, 2 );
@@ -1885,7 +1885,7 @@ sal_Bool SbModule::LoadBinaryData( SvStream& rStrm )
return bRet;
}
-sal_Bool SbModule::LoadCompleted()
+bool SbModule::LoadCompleted()
{
SbxArray* p = GetMethods();
sal_uInt16 i;
@@ -1902,7 +1902,7 @@ sal_Bool SbModule::LoadCompleted()
if( q )
q->pMod = this;
}
- return sal_True;
+ return true;
}
void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint )
@@ -2000,28 +2000,28 @@ SbJScriptModule::SbJScriptModule( const OUString& rName )
{
}
-sal_Bool SbJScriptModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbJScriptModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
(void)nVer;
Clear();
if( !SbxObject::LoadData( rStrm, 1 ) )
- return sal_False;
+ return false;
// Get the source string
aOUSource = rStrm.ReadUniOrByteString( osl_getThreadTextEncoding() );
- return sal_True;
+ return true;
}
-sal_Bool SbJScriptModule::StoreData( SvStream& rStrm ) const
+bool SbJScriptModule::StoreData( SvStream& rStrm ) const
{
if( !SbxObject::StoreData( rStrm ) )
- return sal_False;
+ return false;
// Write the source string
OUString aTmp = aOUSource;
rStrm.WriteUniOrByteString( aTmp, osl_getThreadTextEncoding() );
- return sal_True;
+ return true;
}
@@ -2030,7 +2030,7 @@ sal_Bool SbJScriptModule::StoreData( SvStream& rStrm ) const
SbMethod::SbMethod( const OUString& r, SbxDataType t, SbModule* p )
: SbxMethod( r, t ), pMod( p )
{
- bInvalid = sal_True;
+ bInvalid = true;
nStart =
nDebugFlags =
nLine1 =
@@ -2069,31 +2069,31 @@ SbxArray* SbMethod::GetStatics()
return refStatics;
}
-sal_Bool SbMethod::LoadData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbMethod::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
if( !SbxMethod::LoadData( rStrm, 1 ) )
- return sal_False;
+ return false;
sal_Int16 n;
rStrm.ReadInt16( n );
sal_Int16 nTempStart = (sal_Int16)nStart;
if( nVer == 2 )
- rStrm.ReadUInt16( nLine1 ).ReadUInt16( nLine2 ).ReadInt16( nTempStart ).ReadUChar( bInvalid );
+ rStrm.ReadUInt16( nLine1 ).ReadUInt16( nLine2 ).ReadInt16( nTempStart ).ReadCharAsBool( bInvalid );
// HACK ue to 'Referenz could not be saved'
SetFlag( SBX_NO_MODIFY );
nStart = nTempStart;
- return sal_True;
+ return true;
}
-sal_Bool SbMethod::StoreData( SvStream& rStrm ) const
+bool SbMethod::StoreData( SvStream& rStrm ) const
{
if( !SbxMethod::StoreData( rStrm ) )
- return sal_False;
+ return false;
rStrm.WriteInt16( (sal_Int16) nDebugFlags )
.WriteInt16( (sal_Int16) nLine1 )
.WriteInt16( (sal_Int16) nLine2 )
.WriteInt16( (sal_Int16) nStart )
.WriteUChar( (sal_uInt8) bInvalid );
- return sal_True;
+ return true;
}
void SbMethod::GetLineRange( sal_uInt16& l1, sal_uInt16& l2 )
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index e5f0ada06eed..e3f49e74eebb 100644
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -942,13 +942,13 @@ void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
// This routine is defined here, so that the
// compiler can be loaded as a discrete segment.
-sal_Bool SbModule::Compile()
+bool SbModule::Compile()
{
if( pImage )
- return sal_True;
+ return true;
StarBASIC* pBasic = PTR_CAST(StarBASIC,GetParent());
if( !pBasic )
- return sal_False;
+ return false;
SbxBase::ResetError();
SbModule* pOld = GetSbData()->pCompMod;
@@ -967,7 +967,7 @@ sal_Bool SbModule::Compile()
// compiling a module, the module-global
// variables of all modules become invalid
- sal_Bool bRet = IsCompiled();
+ bool bRet = IsCompiled();
if( bRet )
{
if( !this->ISA(SbObjModule) )
diff --git a/basic/source/inc/sbjsmod.hxx b/basic/source/inc/sbjsmod.hxx
index fa6a9c7b4b50..35906bcb3c4c 100644
--- a/basic/source/inc/sbjsmod.hxx
+++ b/basic/source/inc/sbjsmod.hxx
@@ -28,8 +28,8 @@
class SbJScriptModule : public SbModule
{
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
- virtual sal_Bool StoreData( SvStream& ) const;
+ virtual bool LoadData( SvStream&, sal_uInt16 );
+ virtual bool StoreData( SvStream& ) const;
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_JSCRIPTMOD,1);
TYPEINFO_OVERRIDE();
diff --git a/basic/source/inc/stdobj.hxx b/basic/source/inc/stdobj.hxx
index e51a9a059c25..ba1e13389849 100644
--- a/basic/source/inc/stdobj.hxx
+++ b/basic/source/inc/stdobj.hxx
@@ -37,7 +37,7 @@ class SbiStdObject : public SbxObject
public:
SbiStdObject( const OUString&, StarBASIC* );
virtual SbxVariable* Find( const OUString&, SbxClassType );
- virtual void SetModified( sal_Bool );
+ virtual void SetModified( bool );
};
#endif
diff --git a/basic/source/runtime/props.cxx b/basic/source/runtime/props.cxx
index 14566f50aada..78bd326001c5 100644
--- a/basic/source/runtime/props.cxx
+++ b/basic/source/runtime/props.cxx
@@ -64,7 +64,7 @@ RTLFUNC(False)
(void)pBasic;
(void)bWrite;
- rPar.Get(0)->PutBool( sal_False );
+ rPar.Get(0)->PutBool( false );
}
RTLFUNC(Empty)
@@ -105,7 +105,7 @@ RTLFUNC(True)
(void)pBasic;
(void)bWrite;
- rPar.Get( 0 )->PutBool( sal_True );
+ rPar.Get( 0 )->PutBool( true );
}
RTLFUNC(ATTR_NORMAL)
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 66026e0deefc..312dd17ff590 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1421,7 +1421,7 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
if( !pTRUE )
{
pTRUE = new SbxVariable;
- pTRUE->PutBool( sal_True );
+ pTRUE->PutBool( true );
pTRUE->AddRef();
}
PushVar( pTRUE );
@@ -1431,7 +1431,7 @@ void SbiRuntime::StepCompare( SbxOperator eOp )
if( !pFALSE )
{
pFALSE = new SbxVariable;
- pFALSE->PutBool( sal_False );
+ pFALSE->PutBool( false );
pFALSE->AddRef();
}
PushVar( pFALSE );
@@ -3172,7 +3172,7 @@ void SbiRuntime::StepRESUME( sal_uInt32 nOp1 )
{
// set Code-pointer to the next statement
sal_uInt16 n1, n2;
- pCode = pMod->FindNextStmnt( pErrCode, n1, n2, sal_True, pImg );
+ pCode = pMod->FindNextStmnt( pErrCode, n1, n2, true, pImg );
}
else
pCode = pErrStmnt;
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index 43fd11cbfbd8..5e46c9b00e8f 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -814,7 +814,7 @@ SbxVariable* SbiStdObject::Find( const OUString& rName, SbxClassType t )
}
// SetModified must be pinched off at the RTL
-void SbiStdObject::SetModified( sal_Bool )
+void SbiStdObject::SetModified( bool )
{
}
diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx
index c0dc04f73b24..1d046983874e 100644
--- a/basic/source/runtime/stdobj1.cxx
+++ b/basic/source/runtime/stdobj1.cxx
@@ -347,7 +347,7 @@ void SbStdClipboard::MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, sal_Bool
return;
}
- pVar->PutBool( sal_False );
+ pVar->PutBool( false );
}
void SbStdClipboard::MethGetText( SbxVariable* pVar, SbxArray* pPar_, sal_Bool )
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index ab65a28b1a38..ece2d3c11623 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -475,7 +475,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
sal_uInt32 nCount = pData->size();
if( !nCount )
return NULL;
- sal_Bool bExtSearch = IsSet( SBX_EXTSEARCH );
+ bool bExtSearch = IsSet( SBX_EXTSEARCH );
sal_uInt16 nHash = SbxVariable::MakeHashCode( rName );
for( sal_uInt32 i = 0; i < nCount; i++ )
{
@@ -523,11 +523,11 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t )
return p;
}
-sal_Bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
sal_uInt16 nElem;
Clear();
- sal_Bool bRes = sal_True;
+ bool bRes = true;
sal_uInt16 f = nFlags;
nFlags |= SBX_WRITE;
rStrm.ReadUInt16( nElem );
@@ -544,7 +544,8 @@ sal_Bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
}
else
{
- bRes = sal_False; break;
+ bRes = false;
+ break;
}
}
if( bRes )
@@ -553,7 +554,7 @@ sal_Bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
return bRes;
}
-sal_Bool SbxArray::StoreData( SvStream& rStrm ) const
+bool SbxArray::StoreData( SvStream& rStrm ) const
{
sal_uInt32 nElem = 0;
sal_uInt32 n;
@@ -574,7 +575,7 @@ sal_Bool SbxArray::StoreData( SvStream& rStrm ) const
{
rStrm.WriteUInt16( (sal_uInt16) n );
if( !p->Store( rStrm ) )
- return sal_False;
+ return false;
}
}
return StorePrivateData( rStrm );
@@ -640,7 +641,7 @@ void SbxDimArray::Clear()
// Add a dimension
-void SbxDimArray::AddDimImpl32( sal_Int32 lb, sal_Int32 ub, sal_Bool bAllowSize0 )
+void SbxDimArray::AddDimImpl32( sal_Int32 lb, sal_Int32 ub, bool bAllowSize0 )
{
SbxError eRes = SbxERR_OK;
if( ub < lb && !bAllowSize0 )
@@ -669,51 +670,53 @@ short SbxDimArray::GetDims() const
void SbxDimArray::AddDim( short lb, short ub )
{
- AddDimImpl32( lb, ub, sal_False );
+ AddDimImpl32( lb, ub, false );
}
void SbxDimArray::unoAddDim( short lb, short ub )
{
- AddDimImpl32( lb, ub, sal_True );
+ AddDimImpl32( lb, ub, true );
}
void SbxDimArray::AddDim32( sal_Int32 lb, sal_Int32 ub )
{
- AddDimImpl32( lb, ub, sal_False );
+ AddDimImpl32( lb, ub, false );
}
void SbxDimArray::unoAddDim32( sal_Int32 lb, sal_Int32 ub )
{
- AddDimImpl32( lb, ub, sal_True );
+ AddDimImpl32( lb, ub, true );
}
// Readout dimension data
-sal_Bool SbxDimArray::GetDim32( sal_Int32 n, sal_Int32& rlb, sal_Int32& rub ) const
+bool SbxDimArray::GetDim32( sal_Int32 n, sal_Int32& rlb, sal_Int32& rub ) const
{
if( n < 1 || n > nDim )
{
- SetError( SbxERR_BOUNDS ); rub = rlb = 0; return sal_False;
+ SetError( SbxERR_BOUNDS );
+ rub = rlb = 0;
+ return false;
}
SbxDim* p = pFirst;
while( --n )
p = p->pNext;
rub = p->nUbound;
rlb = p->nLbound;
- return sal_True;
+ return true;
}
-sal_Bool SbxDimArray::GetDim( short n, short& rlb, short& rub ) const
+bool SbxDimArray::GetDim( short n, short& rlb, short& rub ) const
{
sal_Int32 rlb32, rub32;
- sal_Bool bRet = GetDim32( n, rlb32, rub32 );
+ bool bRet = GetDim32( n, rlb32, rub32 );
if( bRet )
{
if( rlb32 < -SBX_MAXINDEX || rub32 > SBX_MAXINDEX )
{
SetError( SbxERR_BOUNDS );
- return sal_False;
+ return false;
}
rub = (short)rub32;
rlb = (short)rlb32;
@@ -815,7 +818,7 @@ SbxVariable* SbxDimArray::Get( SbxArray* pPar )
return SbxArray::Get32( Offset32( pPar ) );
}
-sal_Bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
short nDimension;
rStrm.ReadInt16( nDimension );
@@ -828,7 +831,7 @@ sal_Bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
return SbxArray::LoadData( rStrm, nVer );
}
-sal_Bool SbxDimArray::StoreData( SvStream& rStrm ) const
+bool SbxDimArray::StoreData( SvStream& rStrm ) const
{
rStrm.WriteInt16( (sal_Int16) nDim );
for( short i = 0; i < nDim; i++ )
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index cd72554a3c0e..1d459691035f 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -94,13 +94,13 @@ void SbxBase::Clear()
DBG_CHKTHIS( SbxBase, 0 );
}
-sal_Bool SbxBase::IsFixed() const
+bool SbxBase::IsFixed() const
{
DBG_CHKTHIS( SbxBase, 0 );
return IsSet( SBX_FIXED );
}
-void SbxBase::SetModified( sal_Bool b )
+void SbxBase::SetModified( bool b )
{
DBG_CHKTHIS( SbxBase, 0 );
if( IsSet( SBX_NO_MODIFY ) )
@@ -123,9 +123,9 @@ void SbxBase::SetError( SbxError e )
r.eSbxError = e;
}
-sal_Bool SbxBase::IsError()
+bool SbxBase::IsError()
{
- return sal_Bool( GetSbxData_Impl().eSbxError != SbxERR_OK );
+ return GetSbxData_Impl().eSbxError != SbxERR_OK;
}
void SbxBase::ResetError()
@@ -268,7 +268,7 @@ void SbxBase::Skip( SvStream& rStrm )
rStrm.Seek( nStartPos + nSize );
}
-sal_Bool SbxBase::Store( SvStream& rStrm )
+bool SbxBase::Store( SvStream& rStrm )
{
DBG_CHKTHIS( SbxBase, 0 );
if( !( nFlags & SBX_DONTSTORE ) )
@@ -279,55 +279,55 @@ sal_Bool SbxBase::Store( SvStream& rStrm )
.WriteUInt16( (sal_uInt16) GetVersion() );
sal_Size nOldPos = rStrm.Tell();
rStrm.WriteUInt32( (sal_uInt32) 0L );
- sal_Bool bRes = StoreData( rStrm );
+ bool bRes = StoreData( rStrm );
sal_Size nNewPos = rStrm.Tell();
rStrm.Seek( nOldPos );
rStrm.WriteUInt32( (sal_uInt32) ( nNewPos - nOldPos ) );
rStrm.Seek( nNewPos );
if( rStrm.GetError() != SVSTREAM_OK )
- bRes = sal_False;
+ bRes = false;
if( bRes )
bRes = StoreCompleted();
return bRes;
}
else
- return sal_True;
+ return true;
}
-sal_Bool SbxBase::LoadData( SvStream&, sal_uInt16 )
+bool SbxBase::LoadData( SvStream&, sal_uInt16 )
{
DBG_CHKTHIS( SbxBase, 0 );
- return sal_False;
+ return false;
}
-sal_Bool SbxBase::StoreData( SvStream& ) const
+bool SbxBase::StoreData( SvStream& ) const
{
DBG_CHKTHIS( SbxBase, 0 );
- return sal_False;
+ return false;
}
-sal_Bool SbxBase::LoadPrivateData( SvStream&, sal_uInt16 )
+bool SbxBase::LoadPrivateData( SvStream&, sal_uInt16 )
{
DBG_CHKTHIS( SbxBase, 0 );
- return sal_True;
+ return true;
}
-sal_Bool SbxBase::StorePrivateData( SvStream& ) const
+bool SbxBase::StorePrivateData( SvStream& ) const
{
DBG_CHKTHIS( SbxBase, 0 );
- return sal_True;
+ return true;
}
-sal_Bool SbxBase::LoadCompleted()
+bool SbxBase::LoadCompleted()
{
DBG_CHKTHIS( SbxBase, 0 );
- return sal_True;
+ return true;
}
-sal_Bool SbxBase::StoreCompleted()
+bool SbxBase::StoreCompleted()
{
DBG_CHKTHIS( SbxBase, 0 );
- return sal_True;
+ return true;
}
//////////////////////////////// SbxFactory
@@ -364,7 +364,7 @@ const SbxParamInfo* SbxInfo::GetParam( sal_uInt16 n ) const
return &(aParams[n - 1]);
}
-sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
aParams.clear();
sal_uInt16 nParam;
@@ -386,10 +386,10 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
SbxParamInfo& p(aParams.back());
p.nUserData = nUserData;
}
- return sal_True;
+ return true;
}
-sal_Bool SbxInfo::StoreData( SvStream& rStrm ) const
+bool SbxInfo::StoreData( SvStream& rStrm ) const
{
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aComment,
RTL_TEXTENCODING_ASCII_US );
@@ -404,7 +404,7 @@ sal_Bool SbxInfo::StoreData( SvStream& rStrm ) const
.WriteUInt16( (sal_uInt16) i->nFlags )
.WriteUInt32( (sal_uInt32) i->nUserData );
}
- return sal_True;
+ return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx
index 4ff018fd1e18..666bb5364d74 100644
--- a/basic/source/sbx/sbxbool.cxx
+++ b/basic/source/sbx/sbxbool.cxx
@@ -183,7 +183,7 @@ void ImpPutBool( SbxValues* p, sal_Int16 n )
{
SbxValue* pVal = PTR_CAST(SbxValue,p->pObj);
if( pVal )
- pVal->PutBool( sal_Bool( n != 0 ) );
+ pVal->PutBool( n != 0 );
else
SbxBase::SetError( SbxERR_NO_OBJECT );
break;
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 13cd64652cef..a474919f5e0b 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -232,16 +232,16 @@ void SbxCollection::CollRemove( SbxArray* pPar_ )
}
}
-sal_Bool SbxCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbxCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
- sal_Bool bRes = SbxObject::LoadData( rStrm, nVer );
+ bool bRes = SbxObject::LoadData( rStrm, nVer );
Initialize();
return bRes;
}
SbxStdCollection::SbxStdCollection
- ( const OUString& rClass, const OUString& rElem, sal_Bool b )
+ ( const OUString& rClass, const OUString& rElem, bool b )
: SbxCollection( rClass ), aElemClass( rElem ),
bAddRemoveOk( b )
{}
@@ -297,21 +297,21 @@ void SbxStdCollection::CollRemove( SbxArray* pPar_ )
SbxCollection::CollRemove( pPar_ );
}
-sal_Bool SbxStdCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbxStdCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
- sal_Bool bRes = SbxCollection::LoadData( rStrm, nVer );
+ bool bRes = SbxCollection::LoadData( rStrm, nVer );
if( bRes )
{
aElemClass = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm,
RTL_TEXTENCODING_ASCII_US);
- rStrm.ReadUChar( bAddRemoveOk );
+ rStrm.ReadCharAsBool( bAddRemoveOk );
}
return bRes;
}
-sal_Bool SbxStdCollection::StoreData( SvStream& rStrm ) const
+bool SbxStdCollection::StoreData( SvStream& rStrm ) const
{
- sal_Bool bRes = SbxCollection::StoreData( rStrm );
+ bool bRes = SbxCollection::StoreData( rStrm );
if( bRes )
{
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aElemClass,
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 0d80064153fd..e1894a29f13e 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -76,7 +76,7 @@ SbxObject& SbxObject::operator=( const SbxObject& r )
pDfltProp = r.pDfltProp;
SetName( r.GetName() );
SetFlags( r.GetFlags() );
- SetModified( sal_True );
+ SetModified( true );
}
return *this;
}
@@ -131,7 +131,7 @@ void SbxObject::Clear()
p->ResetFlag( SBX_WRITE );
p->SetFlag( SBX_DONTSTORE );
pDfltProp = NULL;
- SetModified( sal_False );
+ SetModified( false );
}
void SbxObject::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
@@ -334,7 +334,7 @@ void SbxObject::SetDfltProperty( const OUString& rName )
pDfltProp = NULL;
}
aDfltPropName = rName;
- SetModified( sal_True );
+ SetModified( true );
}
// Search of an already available variable. If it was located,
@@ -419,7 +419,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
}
pVar->SetParent( this );
pArray->Put( pVar, pArray->Count() );
- SetModified( sal_True );
+ SetModified( true );
// The object listen always
StartListening( pVar->GetBroadcaster(), true );
Broadcast( SBX_HINT_OBJECTCHANGED );
@@ -443,7 +443,7 @@ SbxObject* SbxObject::MakeObject( const OUString& rName, const OUString& rClass
pVar->SetName( rName );
pVar->SetParent( this );
pObjs->Put( pVar, pObjs->Count() );
- SetModified( sal_True );
+ SetModified( true );
// The object listen always
StartListening( pVar->GetBroadcaster(), true );
Broadcast( SBX_HINT_OBJECTCHANGED );
@@ -490,7 +490,7 @@ void SbxObject::Insert( SbxVariable* pVar )
{
pVar->SetParent( this );
}
- SetModified( sal_True );
+ SetModified( true );
Broadcast( SBX_HINT_OBJECTCHANGED );
#ifdef DBG_UTIL
static const char* pCls[] =
@@ -535,7 +535,7 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
{
pVar->SetParent( this );
}
- SetModified( sal_True );
+ SetModified( true );
#ifdef DBG_UTIL
static const char* pCls[] =
{ "DontCare","Array","Value","Variable","Method","Property","Object" };
@@ -590,7 +590,7 @@ void SbxObject::Remove( SbxVariable* pVar )
{
pVar_->SetParent( NULL );
}
- SetModified( sal_True );
+ SetModified( true );
Broadcast( SBX_HINT_OBJECTCHANGED );
}
}
@@ -618,18 +618,18 @@ static bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray )
// The load of an object is additive!
-sal_Bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
// Help for the read in of old objects: just return TRUE,
// LoadPrivateData() has to set the default status up
if( !nVer )
{
- return sal_True;
+ return true;
}
pDfltProp = NULL;
if( !SbxVariable::LoadData( rStrm, nVer ) )
{
- return sal_False;
+ return false;
}
// If it contains no alien object, insert ourselves
if( aData.eType == SbxOBJECT && !aData.pObj )
@@ -644,7 +644,7 @@ sal_Bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
rStrm.ReadUInt32( nSize );
if( !LoadPrivateData( rStrm, nVer ) )
{
- return sal_False;
+ return false;
}
sal_Size nNewPos = rStrm.Tell();
nPos += nSize;
@@ -657,22 +657,22 @@ sal_Bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
!LoadArray( rStrm, this, pProps ) ||
!LoadArray( rStrm, this, pObjs ) )
{
- return sal_False;
+ return false;
}
// Set properties
if( !aDfltProp.isEmpty() )
{
pDfltProp = (SbxProperty*) pProps->Find( aDfltProp, SbxCLASS_PROPERTY );
}
- SetModified( sal_False );
- return sal_True;
+ SetModified( false );
+ return true;
}
-sal_Bool SbxObject::StoreData( SvStream& rStrm ) const
+bool SbxObject::StoreData( SvStream& rStrm ) const
{
if( !SbxVariable::StoreData( rStrm ) )
{
- return sal_False;
+ return false;
}
OUString aDfltProp;
if( pDfltProp )
@@ -685,7 +685,7 @@ sal_Bool SbxObject::StoreData( SvStream& rStrm ) const
rStrm.WriteUInt32( (sal_uInt32) 0L );
if( !StorePrivateData( rStrm ) )
{
- return sal_False;
+ return false;
}
sal_Size nNew = rStrm.Tell();
rStrm.Seek( nPos );
@@ -693,18 +693,18 @@ sal_Bool SbxObject::StoreData( SvStream& rStrm ) const
rStrm.Seek( nNew );
if( !pMethods->Store( rStrm ) )
{
- return sal_False;
+ return false;
}
if( !pProps->Store( rStrm ) )
{
- return sal_False;
+ return false;
}
if( !pObjs->Store( rStrm ) )
{
- return sal_False;
+ return false;
}
- ((SbxObject*) this)->SetModified( sal_False );
- return sal_True;
+ ((SbxObject*) this)->SetModified( false );
+ return true;
}
OUString SbxObject::GenerateSource( const OUString &rLinePrefix,
@@ -806,7 +806,7 @@ static bool CollectAttrs( const SbxBase* p, OUString& rRes )
}
}
-void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
+void SbxObject::Dump( SvStream& rStrm, bool bFill )
{
// Shifting
static sal_uInt16 nLevel = 0;
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 7ec18a7dce6f..dafcfc4dc007 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -619,7 +619,7 @@ static sal_uInt16 printfmtstr( const OUString& rStr, OUString& rRes, const OUStr
}
-sal_Bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen )
+bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen )
{
SbxError eRes = SbxERR_OK;
if( !CanWrite() )
@@ -642,11 +642,12 @@ sal_Bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen )
}
if( eRes )
{
- SetError( eRes ); return sal_False;
+ SetError( eRes );
+ return false;
}
else
{
- return sal_True;
+ return true;
}
}
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index ac8ed662130e..8b222e9e086f 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -229,13 +229,13 @@ void SbxValue::Broadcast( sal_uIntPtr )
SbxValue* SbxValue::TheRealValue() const
{
- return TheRealValue( sal_True );
+ return TheRealValue( true );
}
// #55226 ship additional information
bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal ); // sbunoobj.cxx
-SbxValue* SbxValue::TheRealValue( sal_Bool bObjInObjError ) const
+SbxValue* SbxValue::TheRealValue( bool bObjInObjError ) const
{
SbxValue* p = (SbxValue*) this;
for( ;; )
@@ -308,9 +308,9 @@ SbxValue* SbxValue::TheRealValue( sal_Bool bObjInObjError ) const
return p;
}
-sal_Bool SbxValue::Get( SbxValues& rRes ) const
+bool SbxValue::Get( SbxValues& rRes ) const
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
SbxError eOld = GetError();
if( eOld != SbxERR_OK )
ResetError();
@@ -399,7 +399,7 @@ sal_Bool SbxValue::Get( SbxValues& rRes ) const
}
if( !IsError() )
{
- bRes = sal_True;
+ bRes = true;
if( eOld != SbxERR_OK )
SetError( eOld );
}
@@ -433,12 +433,12 @@ OUString SbxValue::GetOUString() const
return aResult;
}
-sal_Bool SbxValue::GetBool() const
+bool SbxValue::GetBool() const
{
SbxValues aRes;
aRes.eType = SbxBOOL;
Get( aRes );
- return sal_Bool( aRes.nUShort != 0 );
+ return aRes.nUShort != 0;
}
#define GET( g, e, t, m ) \
@@ -462,9 +462,9 @@ GET( GetDecimal, SbxDECIMAL, SbxDecimal*, pDecimal )
//////////////////////////// Write data
-sal_Bool SbxValue::Put( const SbxValues& rVal )
+bool SbxValue::Put( const SbxValues& rVal )
{
- sal_Bool bRes = sal_False;
+ bool bRes = false;
SbxError eOld = GetError();
if( eOld != SbxERR_OK )
ResetError();
@@ -477,7 +477,7 @@ sal_Bool SbxValue::Put( const SbxValues& rVal )
// If an object is requested, don't search the real values
SbxValue* p = this;
if( rVal.eType != SbxOBJECT )
- p = TheRealValue( sal_False ); // Don't allow an error here
+ p = TheRealValue( false ); // Don't allow an error here
if( p )
{
if( !p->CanWrite() )
@@ -561,11 +561,11 @@ sal_Bool SbxValue::Put( const SbxValues& rVal )
}
if( !IsError() )
{
- p->SetModified( sal_True );
+ p->SetModified( true );
p->Broadcast( SBX_HINT_DATACHANGED );
if( eOld != SbxERR_OK )
SetError( eOld );
- bRes = sal_True;
+ bRes = true;
}
}
}
@@ -579,7 +579,7 @@ sal_Bool SbxValue::Put( const SbxValues& rVal )
// if Float were declared with ',' as the decimal separator or BOOl
// explicit with "TRUE" or "FALSE".
// Implementation in ImpConvStringExt (SBXSCAN.CXX)
-sal_Bool SbxValue::PutStringExt( const OUString& r )
+bool SbxValue::PutStringExt( const OUString& r )
{
// Copy; if it is Unicode convert it immediately
OUString aStr( r );
@@ -594,7 +594,7 @@ sal_Bool SbxValue::PutStringExt( const OUString& r )
// Only if really something was converted, take the copy,
// otherwise take the original (Unicode remains)
- sal_Bool bRet;
+ bool bRet;
if( ImpConvStringExt( aStr, eTargetType ) )
aRes.pOUString = (OUString*)&aStr;
else
@@ -614,7 +614,7 @@ sal_Bool SbxValue::PutStringExt( const OUString& r )
}
Put( aRes );
- bRet = sal_Bool( !IsError() );
+ bRet = bool( !IsError() );
// If FIXED resulted in an error, set it back
// (UI-Action should not result in an error, but simply fail)
@@ -625,67 +625,67 @@ sal_Bool SbxValue::PutStringExt( const OUString& r )
return bRet;
}
-sal_Bool SbxValue::PutBool( sal_Bool b )
+bool SbxValue::PutBool( bool b )
{
SbxValues aRes;
aRes.eType = SbxBOOL;
aRes.nUShort = sal::static_int_cast< sal_uInt16 >(b ? SbxTRUE : SbxFALSE);
Put( aRes );
- return sal_Bool( !IsError() );
+ return !IsError();
}
-sal_Bool SbxValue::PutEmpty()
+bool SbxValue::PutEmpty()
{
- sal_Bool bRet = SetType( SbxEMPTY );
- SetModified( sal_True );
+ bool bRet = SetType( SbxEMPTY );
+ SetModified( true );
return bRet;
}
-sal_Bool SbxValue::PutNull()
+bool SbxValue::PutNull()
{
- sal_Bool bRet = SetType( SbxNULL );
+ bool bRet = SetType( SbxNULL );
if( bRet )
- SetModified( sal_True );
+ SetModified( true );
return bRet;
}
// Special decimal methods
-sal_Bool SbxValue::PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec )
+bool SbxValue::PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec )
{
SbxValue::Clear();
aData.pDecimal = new SbxDecimal( rAutomationDec );
aData.pDecimal->addRef();
aData.eType = SbxDECIMAL;
- return sal_True;
+ return true;
}
-sal_Bool SbxValue::fillAutomationDecimal
+bool SbxValue::fillAutomationDecimal
( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ) const
{
SbxDecimal* pDecimal = GetDecimal();
if( pDecimal != NULL )
{
pDecimal->fillAutomationDecimal( rAutomationDec );
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
-sal_Bool SbxValue::PutString( const OUString& r )
+bool SbxValue::PutString( const OUString& r )
{
SbxValues aRes;
aRes.eType = SbxSTRING;
aRes.pOUString = (OUString*) &r;
Put( aRes );
- return sal_Bool( !IsError() );
+ return !IsError();
}
#define PUT( p, e, t, m ) \
-sal_Bool SbxValue::p( t n ) \
-{ SbxValues aRes(e); aRes.m = n; Put( aRes ); return sal_Bool( !IsError() ); }
+bool SbxValue::p( t n ) \
+{ SbxValues aRes(e); aRes.m = n; Put( aRes ); return !IsError(); }
PUT( PutByte, SbxBYTE, sal_uInt8, nByte )
PUT( PutChar, SbxCHAR, sal_Unicode, nChar )
@@ -705,7 +705,7 @@ PUT( PutDecimal, SbxDECIMAL, SbxDecimal*, pDecimal )
////////////////////////// Setting of the data type
-sal_Bool SbxValue::IsFixed() const
+bool SbxValue::IsFixed() const
{
return ( (GetFlags() & SBX_FIXED) | (aData.eType & SbxBYREF) ) != 0;
}
@@ -714,22 +714,23 @@ sal_Bool SbxValue::IsFixed() const
// or if it contains a complete convertible String
// #41692, implement it for RTL and Basic-Core separately
-sal_Bool SbxValue::IsNumeric() const
+bool SbxValue::IsNumeric() const
{
return ImpIsNumeric( /*bOnlyIntntl*/false );
}
-sal_Bool SbxValue::IsNumericRTL() const
+bool SbxValue::IsNumericRTL() const
{
return ImpIsNumeric( /*bOnlyIntntl*/true );
}
-sal_Bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
+bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
{
if( !CanRead() )
{
- SetError( SbxERR_PROP_WRITEONLY ); return sal_False;
+ SetError( SbxERR_PROP_WRITEONLY );
+ return false;
}
// Test downcast!!!
if( this->ISA(SbxVariable) )
@@ -744,14 +745,14 @@ sal_Bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
SbxDataType t2;
sal_uInt16 nLen = 0;
if( ImpScan( s, n, t2, &nLen, /*bAllowIntntl*/false, bOnlyIntntl ) == SbxERR_OK )
- return sal_Bool( nLen == s.getLength() );
+ return nLen == s.getLength();
}
- return sal_False;
+ return false;
}
else
- return sal_Bool( t == SbxEMPTY
+ return t == SbxEMPTY
|| ( t >= SbxINTEGER && t <= SbxCURRENCY )
- || ( t >= SbxCHAR && t <= SbxUINT ) );
+ || ( t >= SbxCHAR && t <= SbxUINT );
}
SbxClassType SbxValue::GetClass() const
@@ -769,19 +770,20 @@ SbxDataType SbxValue::GetFullType() const
return aData.eType;
}
-sal_Bool SbxValue::SetType( SbxDataType t )
+bool SbxValue::SetType( SbxDataType t )
{
DBG_ASSERT( !( t & 0xF000 ), "SetType of BYREF|ARRAY is forbidden!" );
if( ( t == SbxEMPTY && aData.eType == SbxVOID )
|| ( aData.eType == SbxEMPTY && t == SbxVOID ) )
- return sal_True;
+ return true;
if( ( t & 0x0FFF ) == SbxVARIANT )
{
// Try to set the data type to Variant
ResetFlag( SBX_FIXED );
if( IsFixed() )
{
- SetError( SbxERR_CONVERSION ); return sal_False;
+ SetError( SbxERR_CONVERSION );
+ return false;
}
t = SbxEMPTY;
}
@@ -789,7 +791,8 @@ sal_Bool SbxValue::SetType( SbxDataType t )
{
if( !CanWrite() || IsFixed() )
{
- SetError( SbxERR_CONVERSION ); return sal_False;
+ SetError( SbxERR_CONVERSION );
+ return false;
}
else
{
@@ -821,31 +824,33 @@ sal_Bool SbxValue::SetType( SbxDataType t )
aData.eType = t;
}
}
- return sal_True;
+ return true;
}
-sal_Bool SbxValue::Convert( SbxDataType eTo )
+bool SbxValue::Convert( SbxDataType eTo )
{
eTo = SbxDataType( eTo & 0x0FFF );
if( ( aData.eType & 0x0FFF ) == eTo )
- return sal_True;
+ return true;
if( !CanWrite() )
- return sal_False;
+ return false;
if( eTo == SbxVARIANT )
{
// Trial to set the data type to Variant
ResetFlag( SBX_FIXED );
if( IsFixed() )
{
- SetError( SbxERR_CONVERSION ); return sal_False;
+ SetError( SbxERR_CONVERSION );
+ return false;
}
else
- return sal_True;
+ return true;
}
// Converting from null doesn't work. Once null, always null!
if( aData.eType == SbxNULL )
{
- SetError( SbxERR_CONVERSION ); return sal_False;
+ SetError( SbxERR_CONVERSION );
+ return false;
}
// Conversion of the data:
@@ -859,17 +864,17 @@ sal_Bool SbxValue::Convert( SbxDataType eTo )
{
SetType( eTo );
Put( aNew );
- SetModified( sal_True );
+ SetModified( true );
}
Broadcast( SBX_HINT_CONVERTED );
- return sal_True;
+ return true;
}
else
- return sal_False;
+ return false;
}
////////////////////////////////// Calculating
-sal_Bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
+bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
{
#ifdef DISABLE_SCRIPTING
bool bVBAInterop = false;
@@ -1233,7 +1238,7 @@ Lbl_OpIsDouble:
}
Lbl_OpIsEmpty:
- sal_Bool bRes = sal_Bool( !IsError() );
+ bool bRes = !IsError();
if( bRes && eOld != SbxERR_OK )
SetError( eOld );
return bRes;
@@ -1241,7 +1246,7 @@ Lbl_OpIsEmpty:
// The comparison routine deliver TRUE or FALSE.
-sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
+bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
{
#ifdef DISABLE_SCRIPTING
bool bVBAInterop = false;
@@ -1249,7 +1254,7 @@ sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
bool bVBAInterop = SbiRuntime::isVBAEnabled();
#endif
- sal_Bool bRes = sal_False;
+ bool bRes = false;
SbxError eOld = GetError();
if( eOld != SbxERR_OK )
ResetError();
@@ -1257,24 +1262,24 @@ sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
SetError( SbxERR_PROP_WRITEONLY );
else if( GetType() == SbxNULL && rOp.GetType() == SbxNULL && !bVBAInterop )
{
- bRes = sal_True;
+ bRes = true;
}
else if( GetType() == SbxEMPTY && rOp.GetType() == SbxEMPTY )
- bRes = !bVBAInterop ? sal_True : ( eOp == SbxEQ ? sal_True : sal_False );
+ bRes = !bVBAInterop || ( eOp == SbxEQ );
// Special rule 1: If an operand is null, the result is FALSE
else if( GetType() == SbxNULL || rOp.GetType() == SbxNULL )
- bRes = sal_False;
+ bRes = false;
// Special rule 2: If both are variant and one is numeric
// and the other is a String, num is < str
else if( !IsFixed() && !rOp.IsFixed()
&& ( rOp.GetType() == SbxSTRING && GetType() != SbxSTRING && IsNumeric() ) && !bVBAInterop
)
- bRes = sal_Bool( eOp == SbxLT || eOp == SbxLE || eOp == SbxNE );
+ bRes = eOp == SbxLT || eOp == SbxLE || eOp == SbxNE;
else if( !IsFixed() && !rOp.IsFixed()
&& ( GetType() == SbxSTRING && rOp.GetType() != SbxSTRING && rOp.IsNumeric() )
&& !bVBAInterop
)
- bRes = sal_Bool( eOp == SbxGT || eOp == SbxGE || eOp == SbxNE );
+ bRes = eOp == SbxGT || eOp == SbxGE || eOp == SbxNE;
else
{
SbxValues aL, aR;
@@ -1286,17 +1291,17 @@ sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
if( Get( aL ) && rOp.Get( aR ) ) switch( eOp )
{
case SbxEQ:
- bRes = sal_Bool( *aL.pOUString == *aR.pOUString ); break;
+ bRes = ( *aL.pOUString == *aR.pOUString ); break;
case SbxNE:
- bRes = sal_Bool( *aL.pOUString != *aR.pOUString ); break;
+ bRes = ( *aL.pOUString != *aR.pOUString ); break;
case SbxLT:
- bRes = sal_Bool( *aL.pOUString < *aR.pOUString ); break;
+ bRes = ( *aL.pOUString < *aR.pOUString ); break;
case SbxGT:
- bRes = sal_Bool( *aL.pOUString > *aR.pOUString ); break;
+ bRes = ( *aL.pOUString > *aR.pOUString ); break;
case SbxLE:
- bRes = sal_Bool( *aL.pOUString <= *aR.pOUString ); break;
+ bRes = ( *aL.pOUString <= *aR.pOUString ); break;
case SbxGE:
- bRes = sal_Bool( *aL.pOUString >= *aR.pOUString ); break;
+ bRes = ( *aL.pOUString >= *aR.pOUString ); break;
default:
SetError( SbxERR_NOTIMP );
}
@@ -1310,17 +1315,17 @@ sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
switch( eOp )
{
case SbxEQ:
- bRes = sal_Bool( aL.nSingle == aR.nSingle ); break;
+ bRes = ( aL.nSingle == aR.nSingle ); break;
case SbxNE:
- bRes = sal_Bool( aL.nSingle != aR.nSingle ); break;
+ bRes = ( aL.nSingle != aR.nSingle ); break;
case SbxLT:
- bRes = sal_Bool( aL.nSingle < aR.nSingle ); break;
+ bRes = ( aL.nSingle < aR.nSingle ); break;
case SbxGT:
- bRes = sal_Bool( aL.nSingle > aR.nSingle ); break;
+ bRes = ( aL.nSingle > aR.nSingle ); break;
case SbxLE:
- bRes = sal_Bool( aL.nSingle <= aR.nSingle ); break;
+ bRes = ( aL.nSingle <= aR.nSingle ); break;
case SbxGE:
- bRes = sal_Bool( aL.nSingle >= aR.nSingle ); break;
+ bRes = ( aL.nSingle >= aR.nSingle ); break;
default:
SetError( SbxERR_NOTIMP );
}
@@ -1336,17 +1341,17 @@ sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
switch( eOp )
{
case SbxEQ:
- bRes = sal_Bool( eRes == SbxDecimal::EQ ); break;
+ bRes = ( eRes == SbxDecimal::EQ ); break;
case SbxNE:
- bRes = sal_Bool( eRes != SbxDecimal::EQ ); break;
+ bRes = ( eRes != SbxDecimal::EQ ); break;
case SbxLT:
- bRes = sal_Bool( eRes == SbxDecimal::LT ); break;
+ bRes = ( eRes == SbxDecimal::LT ); break;
case SbxGT:
- bRes = sal_Bool( eRes == SbxDecimal::GT ); break;
+ bRes = ( eRes == SbxDecimal::GT ); break;
case SbxLE:
- bRes = sal_Bool( eRes != SbxDecimal::GT ); break;
+ bRes = ( eRes != SbxDecimal::GT ); break;
case SbxGE:
- bRes = sal_Bool( eRes != SbxDecimal::LT ); break;
+ bRes = ( eRes != SbxDecimal::LT ); break;
default:
SetError( SbxERR_NOTIMP );
}
@@ -1368,17 +1373,17 @@ sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
switch( eOp )
{
case SbxEQ:
- bRes = sal_Bool( aL.nDouble == aR.nDouble ); break;
+ bRes = ( aL.nDouble == aR.nDouble ); break;
case SbxNE:
- bRes = sal_Bool( aL.nDouble != aR.nDouble ); break;
+ bRes = ( aL.nDouble != aR.nDouble ); break;
case SbxLT:
- bRes = sal_Bool( aL.nDouble < aR.nDouble ); break;
+ bRes = ( aL.nDouble < aR.nDouble ); break;
case SbxGT:
- bRes = sal_Bool( aL.nDouble > aR.nDouble ); break;
+ bRes = ( aL.nDouble > aR.nDouble ); break;
case SbxLE:
- bRes = sal_Bool( aL.nDouble <= aR.nDouble ); break;
+ bRes = ( aL.nDouble <= aR.nDouble ); break;
case SbxGE:
- bRes = sal_Bool( aL.nDouble >= aR.nDouble ); break;
+ bRes = ( aL.nDouble >= aR.nDouble ); break;
default:
SetError( SbxERR_NOTIMP );
}
@@ -1390,7 +1395,7 @@ sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
if ( bVBAInterop && eOp == SbxEQ && GetError() == SbxERR_CONVERSION )
{
ResetError();
- bRes = sal_False;
+ bRes = false;
}
}
}
@@ -1402,7 +1407,7 @@ sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
///////////////////////////// Reading/Writing
-sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
+bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
{
// #TODO see if these types are really dumped to any stream
// more than likely this is functionality used in the binfilter alone
@@ -1427,7 +1432,7 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
if( ImpScan( aVal, d, t, NULL ) != SbxERR_OK || t == SbxDOUBLE )
{
aData.nSingle = 0.0F;
- return sal_False;
+ return false;
}
aData.nSingle = (float) d;
break;
@@ -1442,7 +1447,7 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
if( ImpScan( aVal, aData.nDouble, t, NULL ) != SbxERR_OK )
{
aData.nDouble = 0.0;
- return sal_False;
+ return false;
}
break;
}
@@ -1486,7 +1491,7 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
break;
case 1:
aData.pObj = SbxBase::Load( r );
- return sal_Bool( aData.pObj != NULL );
+ return ( aData.pObj != NULL );
case 2:
aData.pObj = this;
break;
@@ -1549,12 +1554,12 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
aData.eType = SbxNULL;
DBG_ASSERT( !this, "Loaded a non-supported data type" );
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
- sal_Bool SbxValue::StoreData( SvStream& r ) const
+ bool SbxValue::StoreData( SvStream& r ) const
{
sal_uInt16 nType = sal::static_int_cast< sal_uInt16 >(aData.eType);
r.WriteUInt16( nType );
@@ -1650,9 +1655,9 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
break;
default:
DBG_ASSERT( !this, "Saving a non-supported data type" );
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 4c8f98084e67..c49ad3914abb 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -192,7 +192,7 @@ SbxInfo* SbxVariable::GetInfo()
Broadcast( SBX_HINT_INFOWANTED );
if( pInfo.Is() )
{
- SetModified( sal_True );
+ SetModified( true );
}
}
return pInfo;
@@ -390,7 +390,7 @@ SbxClassType SbxVariable::GetClass() const
return SbxCLASS_VARIABLE;
}
-void SbxVariable::SetModified( sal_Bool b )
+void SbxVariable::SetModified( bool b )
{
if( IsSet( SBX_NO_MODIFY ) )
{
@@ -470,7 +470,7 @@ void SbxVariable::ClearComListener( void )
////////////////////////////// Loading/Saving
-sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
+bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
sal_uInt16 nType;
sal_uInt8 cMark;
@@ -479,7 +479,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
if( !SbxValue::LoadData( rStrm, nVer ) )
{
- return sal_False;
+ return false;
}
maName = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm,
RTL_TEXTENCODING_ASCII_US);
@@ -524,7 +524,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
if( ImpScan( aTmpString, d, t, NULL ) != SbxERR_OK || t == SbxDOUBLE )
{
aTmp.nSingle = 0;
- return sal_False;
+ return false;
}
aTmp.nSingle = (float) d;
break;
@@ -539,7 +539,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
if( ImpScan( aTmpString, aTmp.nDouble, t, NULL ) != SbxERR_OK )
{
aTmp.nDouble = 0;
- return sal_False;
+ return false;
}
break;
}
@@ -553,12 +553,12 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
default:
aData.eType = SbxNULL;
DBG_ASSERT( !this, "Loaded a non-supported data type" );
- return sal_False;
+ return false;
}
// putt value
if( nType != SbxNULL && nType != SbxEMPTY && !Put( aTmp ) )
{
- return sal_False;
+ return false;
}
}
rStrm.ReadUChar( cMark );
@@ -569,7 +569,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
if( cMark > 2 )
{
- return sal_False;
+ return false;
}
pInfo = new SbxInfo;
pInfo->LoadData( rStrm, (sal_uInt16) cMark );
@@ -577,18 +577,18 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
// Load private data only, if it is a SbxVariable
if( GetClass() == SbxCLASS_VARIABLE && !LoadPrivateData( rStrm, nVer ) )
{
- return sal_False;
+ return false;
}
((SbxVariable*) this)->Broadcast( SBX_HINT_DATACHANGED );
nHash = MakeHashCode( maName );
- SetModified( sal_True );
- return sal_True;
+ SetModified( true );
+ return true;
}
-sal_Bool SbxVariable::StoreData( SvStream& rStrm ) const
+bool SbxVariable::StoreData( SvStream& rStrm ) const
{
rStrm.WriteUChar( (sal_uInt8) 0xFF ); // Marker
- sal_Bool bValStore;
+ bool bValStore;
if( this->IsA( TYPE(SbxMethod) ) )
{
// #50200 Avoid that objects , which during the runtime
@@ -611,7 +611,7 @@ sal_Bool SbxVariable::StoreData( SvStream& rStrm ) const
}
if( !bValStore )
{
- return sal_False;
+ return false;
}
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, maName,
RTL_TEXTENCODING_ASCII_US);
@@ -632,7 +632,7 @@ sal_Bool SbxVariable::StoreData( SvStream& rStrm ) const
}
else
{
- return sal_True;
+ return true;
}
}
@@ -702,7 +702,7 @@ void SbxAlias::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
}
}
-void SbxVariable::Dump( SvStream& rStrm, sal_Bool bFill )
+void SbxVariable::Dump( SvStream& rStrm, bool bFill )
{
OString aBNameStr(OUStringToOString(GetName( SbxNAME_SHORT_TYPES ), RTL_TEXTENCODING_ASCII_US));
rStrm.WriteCharPtr( "Variable( " )
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index dccca16a17e0..aa59796c9068 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -960,7 +960,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
if( !pMod )
{
pMod = pBasicLib->MakeModule( aElementName, OUString() );
- pBasicLib->SetModified( sal_False );
+ pBasicLib->SetModified( false );
}
OUString aCodeStreamName= aElementName;
@@ -1083,7 +1083,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
if( !pMod )
{
pMod = pBasicLib->MakeModule( aElementName, OUString() );
- pBasicLib->SetModified( sal_False );
+ pBasicLib->SetModified( false );
}
try