summaryrefslogtreecommitdiff
path: root/basic/source/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/runtime')
-rw-r--r--basic/source/runtime/methods.cxx38
-rw-r--r--basic/source/runtime/methods1.cxx14
-rw-r--r--basic/source/runtime/stdobj.cxx6
-rw-r--r--basic/source/runtime/step0.cxx12
-rw-r--r--basic/source/runtime/step2.cxx30
5 files changed, 50 insertions, 50 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 162e35d4a748..e5e094a682db 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -112,7 +112,7 @@ SbxVariable* getDefaultProp( SbxVariable* pRef );
#ifndef DISABLE_SCRIPTING
// forward decl.
-sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
+bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
// from source/classes/sbxmod.cxx
Reference< XModel > getDocumentModel( StarBASIC* );
@@ -152,7 +152,7 @@ static const CharClass& GetCharClass( void )
return aCharClass;
}
-static inline sal_Bool isFolder( FileStatus::Type aType )
+static inline bool isFolder( FileStatus::Type aType )
{
return ( aType == FileStatus::Directory || aType == FileStatus::Volume );
}
@@ -685,12 +685,12 @@ void implRemoveDirRecursive( const String& aDirPath )
{
DirectoryItem aItem;
FileBase::RC nRet = DirectoryItem::get( aDirPath, aItem );
- sal_Bool bExists = (nRet == FileBase::E_None);
+ bool bExists = (nRet == FileBase::E_None);
FileStatus aFileStatus( osl_FileStatus_Mask_Type );
nRet = aItem.getFileStatus( aFileStatus );
FileStatus::Type aType = aFileStatus.getFileType();
- sal_Bool bFolder = isFolder( aType );
+ bool bFolder = isFolder( aType );
if( !bExists || !bFolder )
{
@@ -720,7 +720,7 @@ void implRemoveDirRecursive( const String& aDirPath )
// Directory?
FileStatus::Type aType2 = aFileStatus2.getFileType();
- sal_Bool bFolder2 = isFolder( aType2 );
+ bool bFolder2 = isFolder( aType2 );
if( bFolder2 )
{
implRemoveDirRecursive( aPath );
@@ -2378,7 +2378,7 @@ String implSetupWildcard( const String& rFileParam, SbiRTLData* pRTLData )
xub_StrLen nLastWild = aFileParam.SearchBackward( cWild1 );
if( nLastWild == STRING_NOTFOUND )
nLastWild = aFileParam.SearchBackward( cWild2 );
- sal_Bool bHasWildcards = ( nLastWild != STRING_NOTFOUND );
+ bool bHasWildcards = ( nLastWild != STRING_NOTFOUND );
xub_StrLen nLastDelim = aFileParam.SearchBackward( cDelim1 );
@@ -2436,7 +2436,7 @@ inline sal_Bool implCheckWildcard( const String& rName, SbiRTLData* pRTLData )
bool isRootDir( String aDirURLStr )
{
INetURLObject aDirURLObj( aDirURLStr );
- sal_Bool bRoot = sal_False;
+ bool bRoot = false;
// Check if it's a root directory
sal_Int32 nCount = aDirURLObj.getSegmentCount();
@@ -2444,7 +2444,7 @@ bool isRootDir( String aDirURLStr )
// No segment means Unix root directory "file:///"
if( nCount == 0 )
{
- bRoot = sal_True;
+ bRoot = true;
}
// Exactly one segment needs further checking, because it
// can be Unix "file:///foo/" -> no root
@@ -2455,11 +2455,11 @@ bool isRootDir( String aDirURLStr )
INetURLObject::DECODE_WITH_CHARSET );
if( aSeg1.getStr()[1] == (sal_Unicode)':' )
{
- bRoot = sal_True;
+ bRoot = true;
}
}
// More than one segments can never be root
- // so bRoot remains sal_False
+ // so bRoot remains false
return bRoot;
}
@@ -2539,7 +2539,7 @@ RTLFUNC(Dir)
// #78651 Add "." and ".." directories for VB compatibility
if( bIncludeFolders )
{
- sal_Bool bRoot = isRootDir( aDirURLStr );
+ bool bRoot = isRootDir( aDirURLStr );
// If it's no root directory we flag the need for
// the "." and ".." directories by the value -2
@@ -2638,7 +2638,7 @@ RTLFUNC(Dir)
pRTLData->nDirFlags = 0;
// Read directory
- sal_Bool bIncludeFolders = ((nFlags & Sb_ATTR_DIRECTORY) != 0);
+ bool bIncludeFolders = ((nFlags & Sb_ATTR_DIRECTORY) != 0);
pRTLData->pDir = new Directory( aDirURL );
FileBase::RC nRet = pRTLData->pDir->open();
if( nRet != FileBase::E_None )
@@ -2653,7 +2653,7 @@ RTLFUNC(Dir)
pRTLData->nCurDirPos = 0;
if( bIncludeFolders )
{
- sal_Bool bRoot = isRootDir( aDirURL );
+ bool bRoot = isRootDir( aDirURL );
// If it's no root directory we flag the need for
// the "." and ".." directories by the value -2
@@ -2704,7 +2704,7 @@ RTLFUNC(Dir)
if( bFolderFlag )
{
FileStatus::Type aType = aFileStatus.getFileType();
- sal_Bool bFolder = isFolder( aType );
+ bool bFolder = isFolder( aType );
if( !bFolder )
continue;
}
@@ -2804,7 +2804,7 @@ RTLFUNC(GetAttr)
bool bReadOnly = (nAttributes & osl_File_Attribute_ReadOnly) != 0;
FileStatus::Type aType = aFileStatus.getFileType();
- sal_Bool bDirectory = isFolder( aType );
+ bool bDirectory = isFolder( aType );
if( bReadOnly )
nFlags |= Sb_ATTR_READONLY;
if( bDirectory )
@@ -4359,7 +4359,7 @@ sal_Int16 implGetDateYear( double aDate )
return nRet;
}
-sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet )
+bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet )
{
#ifndef DISABLE_SCRIPTING
if ( nYear < 30 && SbiRuntime::isVBAEnabled() )
@@ -4374,7 +4374,7 @@ sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, doub
#ifndef DISABLE_SCRIPTING
StarBASIC::Error( SbERR_BAD_ARGUMENT );
#endif
- return sal_False;
+ return false;
}
#ifndef DISABLE_SCRIPTING
@@ -4387,7 +4387,7 @@ sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, doub
#ifndef DISABLE_SCRIPTING
StarBASIC::Error( SbERR_BAD_ARGUMENT );
#endif
- return sal_False;
+ return false;
}
}
#ifndef DISABLE_SCRIPTING
@@ -4421,7 +4421,7 @@ sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, doub
long nDiffDays = GetDayDiff( aCurDate );
rdRet = (double)nDiffDays;
- return sal_True;
+ return true;
}
sal_Int16 implGetMinute( double dDate )
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 630e52528446..1b80eec60316 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1148,7 +1148,7 @@ void PutGet( SbxArray& rPar, sal_Bool bPut )
sal_Int16 nFileNo = rPar.Get(1)->GetInteger();
SbxVariable* pVar2 = rPar.Get(2);
SbxDataType eType2 = pVar2->GetType();
- sal_Bool bHasRecordNo = (sal_Bool)(eType2 != SbxEMPTY && eType2 != SbxERROR);
+ bool bHasRecordNo = (eType2 != SbxEMPTY && eType2 != SbxERROR);
long nRecordNo = pVar2->GetLong();
if ( nFileNo < 1 || ( bHasRecordNo && nRecordNo < 1 ) )
{
@@ -1166,7 +1166,7 @@ void PutGet( SbxArray& rPar, sal_Bool bPut )
}
SvStream* pStrm = pSbStrm->GetStrm();
- sal_Bool bRandom = pSbStrm->IsRandom();
+ bool bRandom = pSbStrm->IsRandom();
short nBlockLen = bRandom ? pSbStrm->GetBlockLen() : 0;
if( bPut )
@@ -1247,7 +1247,7 @@ RTLFUNC(Environ)
rPar.Get(0)->PutString( aResult );
}
-static double GetDialogZoomFactor( sal_Bool bX, long nValue )
+static double GetDialogZoomFactor( bool bX, long nValue )
{
OutputDevice* pDevice = Application::GetDefaultDevice();
double nResult = 0;
@@ -1287,7 +1287,7 @@ RTLFUNC(GetDialogZoomFactorX)
StarBASIC::Error( SbERR_BAD_ARGUMENT );
return;
}
- rPar.Get(0)->PutDouble( GetDialogZoomFactor( sal_True, rPar.Get(1)->GetLong() ));
+ rPar.Get(0)->PutDouble( GetDialogZoomFactor( true, rPar.Get(1)->GetLong() ));
}
RTLFUNC(GetDialogZoomFactorY)
@@ -1300,7 +1300,7 @@ RTLFUNC(GetDialogZoomFactorY)
StarBASIC::Error( SbERR_BAD_ARGUMENT );
return;
}
- rPar.Get(0)->PutDouble( GetDialogZoomFactor( sal_False, rPar.Get(1)->GetLong()));
+ rPar.Get(0)->PutDouble( GetDialogZoomFactor( false, rPar.Get(1)->GetLong()));
}
@@ -1907,7 +1907,7 @@ IntervalInfo* getIntervalInfo( const String& rStringCode )
}
// From methods.cxx
-sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
+bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
sal_Int16 implGetDateDay( double aDate );
sal_Int16 implGetDateMonth( double aDate );
sal_Int16 implGetDateYear( double aDate );
@@ -1966,7 +1966,7 @@ RTLFUNC(DateAdd)
// Keep hours, minutes, seconds
double dHoursMinutesSeconds = dDate - floor( dDate );
- sal_Bool bOk = sal_True;
+ bool bOk = true;
sal_Int16 nYear, nMonth, nDay;
sal_Int16 nTargetYear16 = 0, nTargetMonth = 0;
implGetDayMonthYear( nYear, nMonth, nDay, dDate );
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index 1b3cd81d366f..8182afff7977 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -762,7 +762,7 @@ SbxVariable* SbiStdObject::Find( const rtl::OUString& rName, SbxClassType t )
// else search one
sal_uInt16 nHash_ = SbxVariable::MakeHashCode( rName );
Methods* p = aMethods;
- sal_Bool bFound = sal_False;
+ bool bFound = false;
short nIndex = 0;
sal_uInt16 nSrchMask = _TYPEMASK;
switch( t )
@@ -779,11 +779,11 @@ SbxVariable* SbiStdObject::Find( const rtl::OUString& rName, SbxClassType t )
&& ( rName.equalsIgnoreAsciiCaseAscii( p->pName ) ) )
{
SbiInstance* pInst = GetSbData()->pInst;
- bFound = sal_True;
+ bFound = true;
if( p->nArgs & _COMPTMASK )
{
if ( !pInst || ( pInst->IsCompatibility() && ( _NORMONLY & p->nArgs ) ) || ( !pInst->IsCompatibility() && ( _COMPATONLY & p->nArgs ) ) )
- bFound = sal_False;
+ bFound = false;
}
break;
}
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index 9ea8ed40a3e8..0ddda8fb9a33 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -389,11 +389,11 @@ void SbiRuntime::StepPUT()
SbxVariableRef refVal = PopVar();
SbxVariableRef refVar = PopVar();
// store on its own method (inside a function)?
- sal_Bool bFlagsChanged = sal_False;
+ bool bFlagsChanged = false;
sal_uInt16 n = 0;
if( (SbxVariable*) refVar == (SbxVariable*) pMeth )
{
- bFlagsChanged = sal_True;
+ bFlagsChanged = true;
n = refVar->GetFlags();
refVar->SetFlag( SBX_WRITE );
}
@@ -522,11 +522,11 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b
}
else
{
- sal_Bool bFlagsChanged = sal_False;
+ bool bFlagsChanged = false;
sal_uInt16 n = 0;
if( (SbxVariable*) refVar == (SbxVariable*) pMeth )
{
- bFlagsChanged = sal_True;
+ bFlagsChanged = true;
n = refVar->GetFlags();
refVar->SetFlag( SBX_WRITE );
}
@@ -889,7 +889,7 @@ void SbiRuntime::StepREDIMP()
short nDimsNew = pNewArray->GetDims();
short nDimsOld = pOldArray->GetDims();
short nDims = nDimsNew;
- sal_Bool bRangeError = sal_False;
+ bool bRangeError = false;
// Store dims to use them for copying later
sal_Int32* pLowerBounds = new sal_Int32[nDims];
@@ -898,7 +898,7 @@ void SbiRuntime::StepREDIMP()
if( nDimsOld != nDimsNew )
{
- bRangeError = sal_True;
+ bRangeError = true;
}
else
{
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index e2d898cf429c..b1cc6609b2cb 100644
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -64,7 +64,7 @@ SbxVariable* SbiRuntime::FindElement
}
else
{
- sal_Bool bFatalError = sal_False;
+ bool bFatalError = false;
SbxDataType t = (SbxDataType) nOp2;
String aName( pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) ) );
// Hacky capture of Evaluate [] syntax
@@ -167,13 +167,13 @@ SbxVariable* SbiRuntime::FindElement
// not there and not in the object?
// don't establish if that thing has parameters!
if( nOp1 & 0x8000 )
- bFatalError = sal_True;
+ bFatalError = true;
// else, if there are parameters, use different error code
if( !bLocal || pImg->GetFlag( SBIMG_EXPLICIT ) )
{
// #39108 if explicit and as ELEM always a fatal error
- bFatalError = sal_True;
+ bFatalError = true;
if( !( nOp1 & 0x8000 ) && nNotFound == SbERR_PROC_UNDEFINED )
@@ -214,12 +214,12 @@ SbxVariable* SbiRuntime::FindElement
{
// shall the type be converted?
SbxDataType t2 = pElem->GetType();
- sal_Bool bSet = sal_False;
+ bool bSet = false;
if( !( pElem->GetFlags() & SBX_FIXED ) )
{
if( t != SbxVARIANT && t != t2 &&
t >= SbxINTEGER && t <= SbxSTRING )
- pElem->SetType( t ), bSet = sal_True;
+ pElem->SetType( t ), bSet = true;
}
// assign pElem to a Ref, to delete a temp-var if applicable
SbxVariableRef refTemp = pElem;
@@ -333,14 +333,14 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
{
if( !refArgv )
StarBASIC::FatalError( SbERR_INTERNAL_ERROR );
- sal_Bool bHasNamed = sal_False;
+ bool bHasNamed = false;
sal_uInt16 i;
sal_uInt16 nArgCount = refArgv->Count();
for( i = 1 ; i < nArgCount ; i++ )
{
if( refArgv->GetAlias( i ).Len() )
{
- bHasNamed = sal_True; break;
+ bHasNamed = true; break;
}
}
if( bHasNamed )
@@ -704,7 +704,7 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
if( p->GetType() == SbxERROR && ( i ) )
{
// if there's a parameter missing, it can be OPTIONAL
- sal_Bool bOpt = sal_False;
+ bool bOpt = false;
if( pMeth )
{
SbxInfo* pInfo = pMeth->GetInfo();
@@ -723,11 +723,11 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
p->PutString( aDefaultStr );
refParams->Put( p, i );
}
- bOpt = sal_True;
+ bOpt = true;
}
}
}
- if( bOpt == sal_False )
+ if( !bOpt )
Error( SbERR_NOT_OPTIONAL );
}
else if( t != SbxVARIANT && (SbxDataType)(p->GetType() & 0x0FFF ) != t )
@@ -794,10 +794,10 @@ void SbiRuntime::StepSTMNT( sal_uInt32 nOp1, sal_uInt32 nOp2 )
{
// If the Expr-Stack at the beginning of a statement constains a variable,
// some fool has called X as a function, although it's a variable!
- sal_Bool bFatalExpr = sal_False;
+ bool bFatalExpr = false;
String sUnknownMethodName;
if( nExprLvl > 1 )
- bFatalExpr = sal_True;
+ bFatalExpr = true;
else if( nExprLvl )
{
SbxVariable* p = refExprStk->Get( 0 );
@@ -805,7 +805,7 @@ void SbiRuntime::StepSTMNT( sal_uInt32 nOp1, sal_uInt32 nOp2 )
&& refLocals.Is() && refLocals->Find( p->GetName(), p->GetClass() ) )
{
sUnknownMethodName = p->GetName();
- bFatalExpr = sal_True;
+ bFatalExpr = true;
}
}
@@ -1011,7 +1011,7 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
short nDimsNew = pArray->GetDims();
short nDimsOld = pOldArray->GetDims();
short nDims = nDimsNew;
- sal_Bool bRangeError = sal_False;
+ bool bRangeError = false;
// Store dims to use them for copying later
sal_Int32* pLowerBounds = new sal_Int32[nDims];
@@ -1019,7 +1019,7 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
sal_Int32* pActualIndices = new sal_Int32[nDims];
if( nDimsOld != nDimsNew )
{
- bRangeError = sal_True;
+ bRangeError = true;
}
else
{