summaryrefslogtreecommitdiff
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
parentd7c5d9e3853af0261204fde6c14b349d9c3d9863 (diff)
basic: sal_Bool->bool
Change-Id: Id4952b6f97f9e8f917fea5651dee91499d109e48
-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
-rw-r--r--include/basic/sbmeth.hxx6
-rw-r--r--include/basic/sbmod.hxx34
-rw-r--r--include/basic/sbstar.hxx14
-rw-r--r--include/basic/sbx.hxx28
-rw-r--r--include/basic/sbxcore.hxx58
-rw-r--r--include/basic/sbxobj.hxx10
-rw-r--r--include/basic/sbxvar.hxx150
-rw-r--r--sw/source/core/bastyp/calc.cxx6
27 files changed, 454 insertions, 445 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
diff --git a/include/basic/sbmeth.hxx b/include/basic/sbmeth.hxx
index 134748041306..d38e652e1e1a 100644
--- a/include/basic/sbmeth.hxx
+++ b/include/basic/sbmeth.hxx
@@ -42,12 +42,12 @@ class BASIC_DLLPUBLIC SbMethod : public SbxMethod
sal_uInt16 nDebugFlags;
sal_uInt16 nLine1, nLine2;
sal_uInt32 nStart;
- sal_Bool bInvalid;
+ bool bInvalid;
SbxArrayRef refStatics;
BASIC_DLLPRIVATE SbMethod( const OUString&, SbxDataType, SbModule* );
BASIC_DLLPRIVATE SbMethod( const SbMethod& );
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
virtual ~SbMethod();
public:
diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx
index e1cc3ea62a54..0dc63e390290 100644
--- a/include/basic/sbmod.hxx
+++ b/include/basic/sbmod.hxx
@@ -75,7 +75,7 @@ protected:
SbProperty* GetProperty( const OUString&, SbxDataType );
SbProcedureProperty* GetProcedureProperty( const OUString&, SbxDataType );
SbIfaceMapperMethod* GetIfaceMapperMethod( const OUString&, SbMethod* );
- void EndDefinitions( sal_Bool=sal_False );
+ void EndDefinitions( bool=false );
sal_uInt16 Run( SbMethod* );
void RunInit();
void ClearPrivateVars();
@@ -84,10 +84,10 @@ protected:
void GlobalRunDeInit( void );
const sal_uInt8* FindNextStmnt( const sal_uInt8*, sal_uInt16&, sal_uInt16& ) const;
const sal_uInt8* FindNextStmnt( const sal_uInt8*, sal_uInt16&, sal_uInt16&,
- sal_Bool bFollowJumps, const SbiImage* pImg=NULL ) const;
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
- virtual sal_Bool LoadCompleted() SAL_OVERRIDE;
+ bool bFollowJumps, const SbiImage* pImg=NULL ) const;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadCompleted() SAL_OVERRIDE;
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE;
void handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rHint );
@@ -95,7 +95,7 @@ protected:
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2);
TYPEINFO_OVERRIDE();
- SbModule( const OUString&, sal_Bool bCompat = sal_False );
+ SbModule( const OUString&, bool bCompat = false );
virtual void SetParent( SbxObject* ) SAL_OVERRIDE;
virtual void Clear() SAL_OVERRIDE;
@@ -107,22 +107,22 @@ public:
virtual void SetSource( const OUString& r );
void SetSource32( const OUString& r );
- virtual sal_Bool Compile();
- virtual sal_Bool IsCompiled() const;
+ virtual bool Compile();
+ virtual bool IsCompiled() const;
const SbxObject* FindType( const OUString& aTypeName ) const;
- virtual sal_Bool IsBreakable( sal_uInt16 nLine ) const;
- virtual sal_Bool IsBP( sal_uInt16 nLine ) const;
- virtual sal_Bool SetBP( sal_uInt16 nLine );
- virtual sal_Bool ClearBP( sal_uInt16 nLine );
+ virtual bool IsBreakable( sal_uInt16 nLine ) const;
+ virtual bool IsBP( sal_uInt16 nLine ) const;
+ virtual bool SetBP( sal_uInt16 nLine );
+ virtual bool ClearBP( sal_uInt16 nLine );
virtual void ClearAllBP();
// Store only image, no source (needed for new password protection)
- sal_Bool StoreBinaryData( SvStream& );
- sal_Bool StoreBinaryData( SvStream&, sal_uInt16 nVer );
- sal_Bool LoadBinaryData( SvStream&, sal_uInt16 nVer );
- sal_Bool LoadBinaryData( SvStream& );
- sal_Bool ExceedsLegacyModuleSize();
+ bool StoreBinaryData( SvStream& );
+ bool StoreBinaryData( SvStream&, sal_uInt16 nVer );
+ bool LoadBinaryData( SvStream&, sal_uInt16 nVer );
+ bool LoadBinaryData( SvStream& );
+ bool ExceedsLegacyModuleSize();
void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = NULL ) const;
bool HasExeCode();
bool IsVBACompat() const;
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index bf63b6cd1232..26302a3d4a62 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -69,14 +69,14 @@ class BASIC_DLLPUBLIC StarBASIC : public SbxObject
BASIC_DLLPRIVATE void implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic );
protected:
- sal_Bool CError( SbError, const OUString&, sal_Int32, sal_Int32, sal_Int32 );
+ bool CError( SbError, const OUString&, sal_Int32, sal_Int32, sal_Int32 );
private:
- BASIC_DLLPRIVATE sal_Bool RTError( SbError, sal_Int32, sal_Int32, sal_Int32 );
- BASIC_DLLPRIVATE sal_Bool RTError( SbError, const OUString& rMsg, sal_Int32, sal_Int32, sal_Int32 );
+ BASIC_DLLPRIVATE bool RTError( SbError, sal_Int32, sal_Int32, sal_Int32 );
+ BASIC_DLLPRIVATE bool RTError( SbError, const OUString& rMsg, sal_Int32, sal_Int32, sal_Int32 );
BASIC_DLLPRIVATE sal_uInt16 BreakPoint( sal_Int32 nLine, sal_Int32 nCol1, sal_Int32 nCol2 );
BASIC_DLLPRIVATE sal_uInt16 StepPoint( sal_Int32 nLine, sal_Int32 nCol1, sal_Int32 nCol2 );
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
protected:
virtual sal_Bool ErrorHdl();
@@ -92,7 +92,7 @@ public:
// #51727 SetModified overridden so that the Modfied-State is
// not delivered to Parent.
- virtual void SetModified( sal_Bool ) SAL_OVERRIDE;
+ virtual void SetModified( bool ) SAL_OVERRIDE;
void* operator new( size_t );
void operator delete( void* );
@@ -109,7 +109,7 @@ public:
SbModule* MakeModule( const OUString& rName, const OUString& rSrc );
SbModule* MakeModule32( const OUString& rName, const OUString& rSrc );
SbModule* MakeModule32( const OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, const OUString& rSrc );
- sal_Bool Compile( SbModule* );
+ bool Compile( SbModule* );
static void Stop();
static void Error( SbError );
static void Error( SbError, const OUString& rMsg );
diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx
index ab97b8c345d4..a904bf3e6d25 100644
--- a/include/basic/sbx.hxx
+++ b/include/basic/sbx.hxx
@@ -71,8 +71,8 @@ class BASIC_DLLPUBLIC SbxInfo : public SvRefBase
SbxParams aParams;
protected:
- sal_Bool LoadData( SvStream&, sal_uInt16 );
- sal_Bool StoreData( SvStream& ) const;
+ bool LoadData( SvStream&, sal_uInt16 );
+ bool StoreData( SvStream& ) const;
virtual ~SbxInfo();
public:
SbxInfo();
@@ -131,8 +131,8 @@ class BASIC_DLLPUBLIC SbxArray : public SbxBase
protected:
SbxDataType eType; // Data type of the array
virtual ~SbxArray();
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_ARRAY,1);
@@ -172,14 +172,14 @@ class BASIC_DLLPUBLIC SbxDimArray : public SbxArray
{
SbxDim* pFirst, *pLast; // Links to Dimension table
short nDim; // Number of dimensions
- BASIC_DLLPRIVATE void AddDimImpl32( sal_Int32, sal_Int32, sal_Bool bAllowSize0 );
+ BASIC_DLLPRIVATE void AddDimImpl32( sal_Int32, sal_Int32, bool bAllowSize0 );
bool mbHasFixedSize;
protected:
sal_uInt16 Offset( const short* );
sal_uInt32 Offset32( const sal_Int32* );
sal_uInt32 Offset32( SbxArray* );
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
virtual ~SbxDimArray();
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_DIMARRAY,1);
@@ -198,7 +198,7 @@ public:
short GetDims() const;
void AddDim( short, short );
void unoAddDim( short, short );
- sal_Bool GetDim( short, short&, short& ) const;
+ bool GetDim( short, short&, short& ) const;
using SbxArray::GetRef32;
using SbxArray::Get32;
@@ -207,7 +207,7 @@ public:
void Put32( SbxVariable*, const sal_Int32* );
void AddDim32( sal_Int32, sal_Int32 );
void unoAddDim32( sal_Int32, sal_Int32 );
- sal_Bool GetDim32( sal_Int32, sal_Int32&, sal_Int32& ) const;
+ bool GetDim32( sal_Int32, sal_Int32&, sal_Int32& ) const;
bool hasFixedSize() { return mbHasFixedSize; };
void setHasFixedSize( bool bHasFixedSize ) {mbHasFixedSize = bHasFixedSize; };
};
@@ -217,7 +217,7 @@ class BASIC_DLLPUBLIC SbxCollection : public SbxObject
BASIC_DLLPRIVATE void Initialize();
protected:
virtual ~SbxCollection();
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE;
// Overridable methods (why not pure virtual?):
@@ -240,16 +240,16 @@ class BASIC_DLLPUBLIC SbxStdCollection : public SbxCollection
{
protected:
OUString aElemClass;
- sal_Bool bAddRemoveOk;
+ bool bAddRemoveOk;
virtual ~SbxStdCollection();
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
virtual void CollAdd( SbxArray* pPar ) SAL_OVERRIDE;
virtual void CollRemove( SbxArray* pPar ) SAL_OVERRIDE;
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_FIXCOLLECTION,1);
TYPEINFO_OVERRIDE();
- SbxStdCollection( const OUString& rClassname, const OUString& rElemClass, sal_Bool=sal_True );
+ SbxStdCollection( const OUString& rClassname, const OUString& rElemClass, bool=true );
SbxStdCollection( const SbxStdCollection& );
SbxStdCollection& operator=( const SbxStdCollection& );
virtual void Insert( SbxVariable* ) SAL_OVERRIDE;
diff --git a/include/basic/sbxcore.hxx b/include/basic/sbxcore.hxx
index c7c240d38da7..4fd6cb9fe04b 100644
--- a/include/basic/sbxcore.hxx
+++ b/include/basic/sbxcore.hxx
@@ -42,8 +42,8 @@ class SvStream;
// This version of the macro defines Load/StorePrivateData()-methods
#define SBX_DECL_PERSIST( nCre, nSbxId, nVer ) \
- virtual sal_Bool LoadPrivateData( SvStream&, sal_uInt16 ); \
- virtual sal_Bool StorePrivateData( SvStream& ) const; \
+ virtual bool LoadPrivateData( SvStream&, sal_uInt16 ); \
+ virtual bool StorePrivateData( SvStream& ) const; \
virtual sal_uInt32 GetCreator() const { return nCre; } \
virtual sal_uInt16 GetVersion() const { return nVer; } \
virtual sal_uInt16 GetSbxId() const { return nSbxId; }
@@ -56,8 +56,8 @@ DBG_NAMEEX_VISIBILITY(SbxBase, BASIC_DLLPUBLIC)
class BASIC_DLLPUBLIC SbxBase : virtual public SvRefBase
{
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
- virtual sal_Bool StoreData( SvStream& ) const;
+ virtual bool LoadData( SvStream&, sal_uInt16 );
+ virtual bool StoreData( SvStream& ) const;
protected:
sal_uInt16 nFlags; // Flag-Bits
@@ -72,17 +72,17 @@ public:
inline sal_uInt16 GetFlags() const;
inline void SetFlag( sal_uInt16 n );
inline void ResetFlag( sal_uInt16 n );
- inline sal_Bool IsSet( sal_uInt16 n ) const;
- inline sal_Bool IsReset( sal_uInt16 n ) const;
- inline sal_Bool CanRead() const;
- inline sal_Bool CanWrite() const;
- inline sal_Bool IsModified() const;
- inline sal_Bool IsConst() const;
- inline sal_Bool IsHidden() const;
- inline sal_Bool IsVisible() const;
-
- virtual sal_Bool IsFixed() const;
- virtual void SetModified( sal_Bool );
+ inline bool IsSet( sal_uInt16 n ) const;
+ inline bool IsReset( sal_uInt16 n ) const;
+ inline bool CanRead() const;
+ inline bool CanWrite() const;
+ inline bool IsModified() const;
+ inline bool IsConst() const;
+ inline bool IsHidden() const;
+ inline bool IsVisible() const;
+
+ virtual bool IsFixed() const;
+ virtual void SetModified( bool );
virtual SbxDataType GetType() const;
virtual SbxClassType GetClass() const;
@@ -91,13 +91,13 @@ public:
static SbxBase* Load( SvStream& );
static void Skip( SvStream& );
- sal_Bool Store( SvStream& );
- virtual sal_Bool LoadCompleted();
- virtual sal_Bool StoreCompleted();
+ bool Store( SvStream& );
+ virtual bool LoadCompleted();
+ virtual bool StoreCompleted();
static SbxError GetError();
static void SetError( SbxError );
- static sal_Bool IsError();
+ static bool IsError();
static void ResetError();
// Set the factory for Load/Store/Create
@@ -125,28 +125,28 @@ inline void SbxBase::ResetFlag( sal_uInt16 n )
{ //DBG_CHKTHIS( SbxBase, 0 );
nFlags &= ~n; }
-inline sal_Bool SbxBase::IsSet( sal_uInt16 n ) const
-{ DBG_CHKTHIS( SbxBase, 0 ); return sal_Bool( ( nFlags & n ) != 0 ); }
+inline bool SbxBase::IsSet( sal_uInt16 n ) const
+{ DBG_CHKTHIS( SbxBase, 0 ); return ( nFlags & n ) != 0; }
-inline sal_Bool SbxBase::IsReset( sal_uInt16 n ) const
-{ DBG_CHKTHIS( SbxBase, 0 ); return sal_Bool( ( nFlags & n ) == 0 ); }
+inline bool SbxBase::IsReset( sal_uInt16 n ) const
+{ DBG_CHKTHIS( SbxBase, 0 ); return ( nFlags & n ) == 0; }
-inline sal_Bool SbxBase::CanRead() const
+inline bool SbxBase::CanRead() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_READ ); }
-inline sal_Bool SbxBase::CanWrite() const
+inline bool SbxBase::CanWrite() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_WRITE ); }
-inline sal_Bool SbxBase::IsModified() const
+inline bool SbxBase::IsModified() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_MODIFIED ); }
-inline sal_Bool SbxBase::IsConst() const
+inline bool SbxBase::IsConst() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_CONST ); }
-inline sal_Bool SbxBase::IsHidden() const
+inline bool SbxBase::IsHidden() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_HIDDEN ); }
-inline sal_Bool SbxBase::IsVisible() const
+inline bool SbxBase::IsVisible() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsReset( SBX_INVISIBLE ); }
#endif
diff --git a/include/basic/sbxobj.hxx b/include/basic/sbxobj.hxx
index 57c92bfd2eb8..dbc9b7adeb22 100644
--- a/include/basic/sbxobj.hxx
+++ b/include/basic/sbxobj.hxx
@@ -37,8 +37,8 @@ protected:
SbxProperty* pDfltProp; // Default-Property
OUString aClassName; // Classname
OUString aDfltPropName;
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
virtual ~SbxObject();
virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE;
@@ -52,7 +52,7 @@ public:
virtual SbxClassType GetClass() const SAL_OVERRIDE;
virtual void Clear() SAL_OVERRIDE;
- virtual sal_Bool IsClass( const OUString& ) const;
+ virtual sal_Bool IsClass( const OUString& ) const;
const OUString& GetClassName() const { return aClassName; }
void SetClassName( const OUString &rNew ) { aClassName = rNew; }
// Default-Property
@@ -67,7 +67,7 @@ public:
// Execution of DDE-Commands
SbxVariable* Execute( const OUString& );
// Manage elements
- virtual sal_Bool GetAll( SbxClassType ) { return sal_True; }
+ virtual bool GetAll( SbxClassType ) { return true; }
SbxVariable* Make( const OUString&, SbxClassType, SbxDataType );
virtual SbxObject* MakeObject( const OUString&, const OUString& );
virtual void Insert( SbxVariable* );
@@ -85,7 +85,7 @@ public:
SbxArray* GetProperties() { return pProps; }
SbxArray* GetObjects() { return pObjs; }
// Debugging
- void Dump( SvStream&, sal_Bool bDumpAll=sal_False );
+ void Dump( SvStream&, bool bDumpAll=false );
};
SV_DECL_REF(SbxObject)
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index 686577ac0a74..789cec6cd55d 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -90,7 +90,7 @@ struct SbxValues
class BASIC_DLLPUBLIC SbxValue : public SbxBase
{
// #55226 Transport additional infos
- BASIC_DLLPRIVATE SbxValue* TheRealValue( sal_Bool bObjInObjError ) const;
+ BASIC_DLLPRIVATE SbxValue* TheRealValue( bool bObjInObjError ) const;
BASIC_DLLPRIVATE SbxValue* TheRealValue() const;
protected:
SbxValues aData; // Data
@@ -99,8 +99,8 @@ protected:
virtual void Broadcast( sal_uIntPtr ); // Broadcast-Call
virtual ~SbxValue();
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VALUE,1);
TYPEINFO_OVERRIDE();
@@ -109,40 +109,40 @@ public:
SbxValue( const SbxValue& );
SbxValue& operator=( const SbxValue& );
virtual void Clear() SAL_OVERRIDE;
- virtual sal_Bool IsFixed() const SAL_OVERRIDE;
-
- sal_Bool IsInteger() const { return sal_Bool( GetType() == SbxINTEGER ); }
- sal_Bool IsLong() const { return sal_Bool( GetType() == SbxLONG ); }
- sal_Bool IsSingle() const { return sal_Bool( GetType() == SbxSINGLE ); }
- sal_Bool IsDouble() const { return sal_Bool( GetType() == SbxDOUBLE ); }
- sal_Bool IsString() const { return sal_Bool( GetType() == SbxSTRING ); }
- sal_Bool IsDate() const { return sal_Bool( GetType() == SbxDATE ); }
- sal_Bool IsCurrency()const { return sal_Bool( GetType() == SbxCURRENCY ); }
- sal_Bool IsObject() const { return sal_Bool( GetType() == SbxOBJECT ); }
- sal_Bool IsDataObject()const{return sal_Bool( GetType() == SbxDATAOBJECT);}
- sal_Bool IsBool() const { return sal_Bool( GetType() == SbxBOOL ); }
- sal_Bool IsErr() const { return sal_Bool( GetType() == SbxERROR ); }
- sal_Bool IsEmpty() const { return sal_Bool( GetType() == SbxEMPTY ); }
- sal_Bool IsNull() const { return sal_Bool( GetType() == SbxNULL ); }
- sal_Bool IsChar() const { return sal_Bool( GetType() == SbxCHAR ); }
- sal_Bool IsByte() const { return sal_Bool( GetType() == SbxBYTE ); }
- sal_Bool IsUShort() const { return sal_Bool( GetType() == SbxUSHORT ); }
- sal_Bool IsULong() const { return sal_Bool( GetType() == SbxULONG ); }
- sal_Bool IsInt() const { return sal_Bool( GetType() == SbxINT ); }
- sal_Bool IsUInt() const { return sal_Bool( GetType() == SbxUINT ); }
- sal_Bool IspChar() const { return sal_Bool( GetType() == SbxLPSTR ); }
- sal_Bool IsNumeric() const;
- sal_Bool IsNumericRTL() const; // #41692 Interface for Basic
- sal_Bool ImpIsNumeric( bool bOnlyIntntl ) const; // Implementation
+ virtual bool IsFixed() const SAL_OVERRIDE;
+
+ bool IsInteger() const { return GetType() == SbxINTEGER ; }
+ bool IsLong() const { return GetType() == SbxLONG ; }
+ bool IsSingle() const { return GetType() == SbxSINGLE ; }
+ bool IsDouble() const { return GetType() == SbxDOUBLE ; }
+ bool IsString() const { return GetType() == SbxSTRING ; }
+ bool IsDate() const { return GetType() == SbxDATE ; }
+ bool IsCurrency() const { return GetType() == SbxCURRENCY ; }
+ bool IsObject() const { return GetType() == SbxOBJECT ; }
+ bool IsDataObject() const { return GetType() == SbxDATAOBJECT; }
+ bool IsBool() const { return GetType() == SbxBOOL ; }
+ bool IsErr() const { return GetType() == SbxERROR ; }
+ bool IsEmpty() const { return GetType() == SbxEMPTY ; }
+ bool IsNull() const { return GetType() == SbxNULL ; }
+ bool IsChar() const { return GetType() == SbxCHAR ; }
+ bool IsByte() const { return GetType() == SbxBYTE ; }
+ bool IsUShort() const { return GetType() == SbxUSHORT ; }
+ bool IsULong() const { return GetType() == SbxULONG ; }
+ bool IsInt() const { return GetType() == SbxINT ; }
+ bool IsUInt() const { return GetType() == SbxUINT ; }
+ bool IspChar() const { return GetType() == SbxLPSTR ; }
+ bool IsNumeric() const;
+ bool IsNumericRTL() const; // #41692 Interface for Basic
+ bool ImpIsNumeric( bool bOnlyIntntl ) const; // Implementation
virtual SbxClassType GetClass() const SAL_OVERRIDE;
virtual SbxDataType GetType() const SAL_OVERRIDE;
SbxDataType GetFullType() const;
- sal_Bool SetType( SbxDataType );
+ bool SetType( SbxDataType );
- virtual sal_Bool Get( SbxValues& ) const;
+ virtual bool Get( SbxValues& ) const;
const SbxValues& GetValues_Impl() const { return aData; }
- virtual sal_Bool Put( const SbxValues& );
+ virtual bool Put( const SbxValues& );
inline SbxValues * data() { return &aData; }
@@ -159,7 +159,7 @@ public:
double GetDouble() const;
double GetDate() const;
- sal_Bool GetBool() const;
+ bool GetBool() const;
const OUString& GetCoreString() const;
OUString GetOUString() const;
@@ -168,50 +168,50 @@ public:
sal_uInt16 GetUShort() const;
sal_uInt32 GetULong() const;
- sal_Bool PutInteger( sal_Int16 );
- sal_Bool PutLong( sal_Int32 );
- sal_Bool PutSingle( float );
- sal_Bool PutDouble( double );
- sal_Bool PutDate( double );
- sal_Bool PutBool( sal_Bool );
- sal_Bool PutErr( sal_uInt16 );
- sal_Bool PutStringExt( const OUString& ); // with extended analysis (International, "sal_True"/"sal_False")
- sal_Bool PutInt64( sal_Int64 );
- sal_Bool PutUInt64( sal_uInt64 );
- sal_Bool PutString( const OUString& );
- sal_Bool PutChar( sal_Unicode );
- sal_Bool PutByte( sal_uInt8 );
- sal_Bool PutUShort( sal_uInt16 );
- sal_Bool PutULong( sal_uInt32 );
- sal_Bool PutEmpty();
- sal_Bool PutNull();
+ bool PutInteger( sal_Int16 );
+ bool PutLong( sal_Int32 );
+ bool PutSingle( float );
+ bool PutDouble( double );
+ bool PutDate( double );
+ bool PutBool( bool );
+ bool PutErr( sal_uInt16 );
+ bool PutStringExt( const OUString& ); // with extended analysis (International, "sal_True"/"sal_False")
+ bool PutInt64( sal_Int64 );
+ bool PutUInt64( sal_uInt64 );
+ bool PutString( const OUString& );
+ bool PutChar( sal_Unicode );
+ bool PutByte( sal_uInt8 );
+ bool PutUShort( sal_uInt16 );
+ bool PutULong( sal_uInt32 );
+ bool PutEmpty();
+ bool PutNull();
// Special methods
- sal_Bool PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
- sal_Bool PutDecimal( SbxDecimal* pDecimal ); // This function is needed for Windows build, don't remove
- sal_Bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ) const;
- sal_Bool PutCurrency( const sal_Int64& );
+ bool PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
+ bool PutDecimal( SbxDecimal* pDecimal ); // This function is needed for Windows build, don't remove
+ bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ) const;
+ bool PutCurrency( const sal_Int64& );
// Interface for CDbl in Basic
static SbxError ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingle = false );
- sal_Bool PutObject( SbxBase* );
+ bool PutObject( SbxBase* );
- virtual sal_Bool Convert( SbxDataType );
- virtual sal_Bool Compute( SbxOperator, const SbxValue& );
- virtual sal_Bool Compare( SbxOperator, const SbxValue& ) const;
- sal_Bool Scan( const OUString&, sal_uInt16* = NULL );
+ virtual bool Convert( SbxDataType );
+ virtual bool Compute( SbxOperator, const SbxValue& );
+ virtual bool Compare( SbxOperator, const SbxValue& ) const;
+ bool Scan( const OUString&, sal_uInt16* = NULL );
void Format( OUString&, const OUString* = NULL ) const;
// The following operators are definied for easier handling.
// TODO: Ensure error conditions (overflow, conversions)
// are taken into consideration in Compute and Compare
- inline int operator ==( const SbxValue& ) const;
- inline int operator !=( const SbxValue& ) const;
- inline int operator <( const SbxValue& ) const;
- inline int operator >( const SbxValue& ) const;
- inline int operator <=( const SbxValue& ) const;
- inline int operator >=( const SbxValue& ) const;
+ inline bool operator ==( const SbxValue& ) const;
+ inline bool operator !=( const SbxValue& ) const;
+ inline bool operator <( const SbxValue& ) const;
+ inline bool operator >( const SbxValue& ) const;
+ inline bool operator <=( const SbxValue& ) const;
+ inline bool operator >=( const SbxValue& ) const;
inline SbxValue& operator *=( const SbxValue& );
inline SbxValue& operator /=( const SbxValue& );
@@ -223,22 +223,22 @@ public:
inline SbxValue& operator ^=( const SbxValue& );
};
-inline int SbxValue::operator==( const SbxValue& r ) const
+inline bool SbxValue::operator==( const SbxValue& r ) const
{ return Compare( SbxEQ, r ); }
-inline int SbxValue::operator!=( const SbxValue& r ) const
+inline bool SbxValue::operator!=( const SbxValue& r ) const
{ return Compare( SbxNE, r ); }
-inline int SbxValue::operator<( const SbxValue& r ) const
+inline bool SbxValue::operator<( const SbxValue& r ) const
{ return Compare( SbxLT, r ); }
-inline int SbxValue::operator>( const SbxValue& r ) const
+inline bool SbxValue::operator>( const SbxValue& r ) const
{ return Compare( SbxGT, r ); }
-inline int SbxValue::operator<=( const SbxValue& r ) const
+inline bool SbxValue::operator<=( const SbxValue& r ) const
{ return Compare( SbxLE, r ); }
-inline int SbxValue::operator>=( const SbxValue& r ) const
+inline bool SbxValue::operator>=( const SbxValue& r ) const
{ return Compare( SbxGE, r ); }
inline SbxValue& SbxValue::operator*=( const SbxValue& r )
@@ -300,8 +300,8 @@ protected:
sal_uIntPtr nUserData; // User data for Call()
SbxObject* pParent; // Currently attached object
virtual ~SbxVariable();
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VARIABLE,2);
TYPEINFO_OVERRIDE();
@@ -310,13 +310,13 @@ public:
SbxVariable( const SbxVariable& );
SbxVariable& operator=( const SbxVariable& );
- void Dump( SvStream&, sal_Bool bDumpAll=sal_False );
+ void Dump( SvStream&, bool bDumpAll=false );
virtual void SetName( const OUString& );
virtual const OUString& GetName( SbxNameType = SbxNAME_NONE ) const;
sal_uInt16 GetHashCode() const { return nHash; }
- virtual void SetModified( sal_Bool ) SAL_OVERRIDE;
+ virtual void SetModified( bool ) SAL_OVERRIDE;
sal_uIntPtr GetUserData() const { return nUserData; }
void SetUserData( sal_uIntPtr n ) { nUserData = n; }
@@ -333,7 +333,7 @@ public:
// Sfx-Broadcasting-Support:
// Due to data reduction and better DLL-hierarchie currently via casting
SfxBroadcaster& GetBroadcaster();
- sal_Bool IsBroadcaster() const { return sal_Bool( pCst != NULL ); }
+ bool IsBroadcaster() const { return pCst != NULL; }
virtual void Broadcast( sal_uIntPtr nHintId ) SAL_OVERRIDE;
inline const SbxObject* GetParent() const { return pParent; }
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 4bd0726f461f..4840c162c876 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -336,8 +336,8 @@ SwCalc::SwCalc( SwDoc& rD )
VarTable[ aHashValue[ n ] ] = new SwCalcExp( sTmpStr, nVal, 0 );
}
- ((SwCalcExp*)VarTable[ aHashValue[ 0 ] ])->nValue.PutBool( sal_False );
- ((SwCalcExp*)VarTable[ aHashValue[ 1 ] ])->nValue.PutBool( sal_True );
+ ((SwCalcExp*)VarTable[ aHashValue[ 0 ] ])->nValue.PutBool( false );
+ ((SwCalcExp*)VarTable[ aHashValue[ 1 ] ])->nValue.PutBool( true );
((SwCalcExp*)VarTable[ aHashValue[ 2 ] ])->nValue.PutDouble( F_PI );
((SwCalcExp*)VarTable[ aHashValue[ 3 ] ])->nValue.PutDouble( 2.7182818284590452354 );
@@ -1597,7 +1597,7 @@ SwSbxValue::~SwSbxValue()
sal_Bool SwSbxValue::GetBool() const
{
return SbxSTRING == GetType() ? !GetOUString().isEmpty()
- : 0 != SbxValue::GetBool();
+ : SbxValue::GetBool();
}
double SwSbxValue::GetDouble() const