sal_Bool to bool
Change-Id: I16ddbcf100e21d6c05fccbe24faca2932a605902
This commit is contained in:
@@ -442,7 +442,7 @@ namespace basic
|
|||||||
SotStorageRef xDummyStor = new SotStorage( OUString() );
|
SotStorageRef xDummyStor = new SotStorage( OUString() );
|
||||||
_out_rpBasicManager = new BasicManager( *xDummyStor, OUString() /* TODO/LATER: xStorage */,
|
_out_rpBasicManager = new BasicManager( *xDummyStor, OUString() /* TODO/LATER: xStorage */,
|
||||||
pAppBasic,
|
pAppBasic,
|
||||||
&aAppBasicDir, sal_True );
|
&aAppBasicDir, true );
|
||||||
if ( !_out_rpBasicManager->GetErrors().empty() )
|
if ( !_out_rpBasicManager->GetErrors().empty() )
|
||||||
{
|
{
|
||||||
// handle errors
|
// handle errors
|
||||||
@@ -467,7 +467,7 @@ namespace basic
|
|||||||
// create new BASIC-manager
|
// create new BASIC-manager
|
||||||
StarBASIC* pBasic = new StarBASIC( pAppBasic );
|
StarBASIC* pBasic = new StarBASIC( pAppBasic );
|
||||||
pBasic->SetFlag( SBX_EXTSEARCH );
|
pBasic->SetFlag( SBX_EXTSEARCH );
|
||||||
_out_rpBasicManager = new BasicManager( pBasic, NULL, sal_True );
|
_out_rpBasicManager = new BasicManager( pBasic, NULL, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
// knit the containers with the BasicManager
|
// knit the containers with the BasicManager
|
||||||
|
@@ -874,7 +874,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
|
|||||||
{
|
{
|
||||||
INetURLObject aObj( aRealStorageName, INET_PROT_FILE );
|
INetURLObject aObj( aRealStorageName, INET_PROT_FILE );
|
||||||
aObj.removeSegment();
|
aObj.removeSegment();
|
||||||
bool bWasAbsolute = sal_False;
|
bool bWasAbsolute = false;
|
||||||
aObj = aObj.smartRel2Abs( pInfo->GetRelStorageName(), bWasAbsolute );
|
aObj = aObj.smartRel2Abs( pInfo->GetRelStorageName(), bWasAbsolute );
|
||||||
|
|
||||||
//*** TODO: Replace if still necessary
|
//*** TODO: Replace if still necessary
|
||||||
@@ -960,7 +960,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
|
|||||||
|
|
||||||
INetURLObject aLibRelStorage( aStorName );
|
INetURLObject aLibRelStorage( aStorName );
|
||||||
aLibRelStorage.removeSegment();
|
aLibRelStorage.removeSegment();
|
||||||
bool bWasAbsolute = sal_False;
|
bool bWasAbsolute = false;
|
||||||
aLibRelStorage = aLibRelStorage.smartRel2Abs( aLibRelStorageName, bWasAbsolute);
|
aLibRelStorage = aLibRelStorage.smartRel2Abs( aLibRelStorageName, bWasAbsolute);
|
||||||
DBG_ASSERT(!bWasAbsolute, "RelStorageName was absolute!" );
|
DBG_ASSERT(!bWasAbsolute, "RelStorageName was absolute!" );
|
||||||
|
|
||||||
@@ -971,11 +971,11 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xStorageRef = new SotStorage( sal_False, aLibAbsStorage.GetMainURL
|
xStorageRef = new SotStorage( false, aLibAbsStorage.GetMainURL
|
||||||
( INetURLObject::NO_DECODE ), eStorageReadMode, sal_True );
|
( INetURLObject::NO_DECODE ), eStorageReadMode, true );
|
||||||
if ( xStorageRef->GetError() != ERRCODE_NONE )
|
if ( xStorageRef->GetError() != ERRCODE_NONE )
|
||||||
xStorageRef = new SotStorage( sal_False, aLibRelStorage.
|
xStorageRef = new SotStorage( false, aLibRelStorage.
|
||||||
GetMainURL( INetURLObject::NO_DECODE ), eStorageReadMode, sal_True );
|
GetMainURL( INetURLObject::NO_DECODE ), eStorageReadMode, true );
|
||||||
}
|
}
|
||||||
if ( xStorageRef.Is() )
|
if ( xStorageRef.Is() )
|
||||||
{
|
{
|
||||||
@@ -1077,7 +1077,7 @@ sal_Bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurS
|
|||||||
|
|
||||||
if ( !xStorage.Is() )
|
if ( !xStorage.Is() )
|
||||||
{
|
{
|
||||||
xStorage = new SotStorage( sal_False, aStorageName, eStorageReadMode );
|
xStorage = new SotStorage( false, aStorageName, eStorageReadMode );
|
||||||
}
|
}
|
||||||
SotStorageRef xBasicStorage = xStorage->OpenSotStorage( OUString(szBasicStorage), eStorageReadMode, sal_False );
|
SotStorageRef xBasicStorage = xStorage->OpenSotStorage( OUString(szBasicStorage), eStorageReadMode, sal_False );
|
||||||
|
|
||||||
@@ -1328,11 +1328,11 @@ sal_Bool BasicManager::RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage
|
|||||||
SotStorageRef xStorage;
|
SotStorageRef xStorage;
|
||||||
if ( !pLibInfo->IsExtern() )
|
if ( !pLibInfo->IsExtern() )
|
||||||
{
|
{
|
||||||
xStorage = new SotStorage( sal_False, GetStorageName() );
|
xStorage = new SotStorage( false, GetStorageName() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xStorage = new SotStorage( sal_False, pLibInfo->GetStorageName() );
|
xStorage = new SotStorage( false, pLibInfo->GetStorageName() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( xStorage->IsStorage( OUString(szBasicStorage) ) )
|
if ( xStorage->IsStorage( OUString(szBasicStorage) ) )
|
||||||
@@ -1551,7 +1551,7 @@ StarBASIC* BasicManager::CreateLib( const OUString& rLibName, const OUString& Pa
|
|||||||
{
|
{
|
||||||
if( !LinkTargetURL.isEmpty())
|
if( !LinkTargetURL.isEmpty())
|
||||||
{
|
{
|
||||||
SotStorageRef xStorage = new SotStorage( sal_False, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE );
|
SotStorageRef xStorage = new SotStorage( false, LinkTargetURL, STREAM_READ | STREAM_SHARE_DENYWRITE );
|
||||||
if( !xStorage->GetError() )
|
if( !xStorage->GetError() )
|
||||||
{
|
{
|
||||||
pLib = AddLib( *xStorage, rLibName, sal_True );
|
pLib = AddLib( *xStorage, rLibName, sal_True );
|
||||||
|
@@ -1483,15 +1483,15 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
|
|||||||
case TypeClass_BYTE:
|
case TypeClass_BYTE:
|
||||||
{
|
{
|
||||||
sal_Int16 nVal = pVar->GetInteger();
|
sal_Int16 nVal = pVar->GetInteger();
|
||||||
sal_Bool bOverflow = sal_False;
|
bool bOverflow = false;
|
||||||
if( nVal < -128 )
|
if( nVal < -128 )
|
||||||
{
|
{
|
||||||
bOverflow = sal_True;
|
bOverflow = true;
|
||||||
nVal = -128;
|
nVal = -128;
|
||||||
}
|
}
|
||||||
else if( nVal > 127 )
|
else if( nVal > 127 )
|
||||||
{
|
{
|
||||||
bOverflow = sal_True;
|
bOverflow = true;
|
||||||
nVal = 127;
|
nVal = 127;
|
||||||
}
|
}
|
||||||
if( bOverflow )
|
if( bOverflow )
|
||||||
@@ -1936,7 +1936,7 @@ OUString Impl_DumpProperties( SbUnoObject* pUnoObj )
|
|||||||
// Is it in Uno a sequence?
|
// Is it in Uno a sequence?
|
||||||
SbxDataType eType = pVar->GetFullType();
|
SbxDataType eType = pVar->GetFullType();
|
||||||
|
|
||||||
sal_Bool bMaybeVoid = sal_False;
|
bool bMaybeVoid = false;
|
||||||
if( i < nUnoPropCount )
|
if( i < nUnoPropCount )
|
||||||
{
|
{
|
||||||
const Property& rProp = pUnoProps[ i ];
|
const Property& rProp = pUnoProps[ i ];
|
||||||
@@ -1946,7 +1946,7 @@ OUString Impl_DumpProperties( SbUnoObject* pUnoObj )
|
|||||||
if( rProp.Attributes & PropertyAttribute::MAYBEVOID )
|
if( rProp.Attributes & PropertyAttribute::MAYBEVOID )
|
||||||
{
|
{
|
||||||
eType = unoToSbxType( rProp.Type.getTypeClass() );
|
eType = unoToSbxType( rProp.Type.getTypeClass() );
|
||||||
bMaybeVoid = sal_True;
|
bMaybeVoid = true;
|
||||||
}
|
}
|
||||||
if( eType == SbxOBJECT )
|
if( eType == SbxOBJECT )
|
||||||
{
|
{
|
||||||
|
@@ -1125,7 +1125,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
|
|||||||
|
|
||||||
// Launcher problem
|
// Launcher problem
|
||||||
// i80726 The Find below will genarate an error in Testtool so we reset it unless there was one before already
|
// i80726 The Find below will genarate an error in Testtool so we reset it unless there was one before already
|
||||||
sal_Bool bWasError = SbxBase::GetError() != 0;
|
bool bWasError = SbxBase::GetError() != 0;
|
||||||
SbxVariable* pMSOMacroRuntimeLibVar = Find( "Launcher", SbxCLASS_OBJECT );
|
SbxVariable* pMSOMacroRuntimeLibVar = Find( "Launcher", SbxCLASS_OBJECT );
|
||||||
if ( !bWasError && (SbxBase::GetError() == SbxERR_PROC_UNDEFINED) )
|
if ( !bWasError && (SbxBase::GetError() == SbxERR_PROC_UNDEFINED) )
|
||||||
SbxBase::ResetError();
|
SbxBase::ResetError();
|
||||||
@@ -2277,9 +2277,9 @@ class FormObjEventListenerImpl : public FormObjEventListener_BASE
|
|||||||
uno::Reference< lang::XComponent > mxComponent;
|
uno::Reference< lang::XComponent > mxComponent;
|
||||||
uno::Reference< frame::XModel > mxModel;
|
uno::Reference< frame::XModel > mxModel;
|
||||||
bool mbDisposed;
|
bool mbDisposed;
|
||||||
sal_Bool mbOpened;
|
bool mbOpened;
|
||||||
sal_Bool mbActivated;
|
bool mbActivated;
|
||||||
sal_Bool mbShowing;
|
bool mbShowing;
|
||||||
|
|
||||||
FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined
|
FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined
|
||||||
FormObjEventListenerImpl& operator=(const FormObjEventListenerImpl&); // not defined
|
FormObjEventListenerImpl& operator=(const FormObjEventListenerImpl&); // not defined
|
||||||
@@ -2287,7 +2287,7 @@ class FormObjEventListenerImpl : public FormObjEventListener_BASE
|
|||||||
public:
|
public:
|
||||||
FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent, const uno::Reference< frame::XModel >& xModel ) :
|
FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent, const uno::Reference< frame::XModel >& xModel ) :
|
||||||
mpUserForm( pUserForm ), mxComponent( xComponent), mxModel( xModel ),
|
mpUserForm( pUserForm ), mxComponent( xComponent), mxModel( xModel ),
|
||||||
mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False )
|
mbDisposed( false ), mbOpened( false ), mbActivated( false ), mbShowing( false )
|
||||||
{
|
{
|
||||||
if ( mxComponent.is() )
|
if ( mxComponent.is() )
|
||||||
{
|
{
|
||||||
@@ -2319,7 +2319,7 @@ public:
|
|||||||
removeListener();
|
removeListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool isShowing() const { return mbShowing; }
|
bool isShowing() const { return mbShowing; }
|
||||||
|
|
||||||
void removeListener()
|
void removeListener()
|
||||||
{
|
{
|
||||||
@@ -2354,11 +2354,11 @@ public:
|
|||||||
{
|
{
|
||||||
if ( mpUserForm )
|
if ( mpUserForm )
|
||||||
{
|
{
|
||||||
mbOpened = sal_True;
|
mbOpened = true;
|
||||||
mbShowing = sal_True;
|
mbShowing = true;
|
||||||
if ( mbActivated )
|
if ( mbActivated )
|
||||||
{
|
{
|
||||||
mbOpened = mbActivated = sal_False;
|
mbOpened = mbActivated = false;
|
||||||
mpUserForm->triggerActivateEvent();
|
mpUserForm->triggerActivateEvent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2399,8 +2399,8 @@ public:
|
|||||||
|
|
||||||
virtual void SAL_CALL windowClosed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
|
virtual void SAL_CALL windowClosed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
|
||||||
{
|
{
|
||||||
mbOpened = sal_False;
|
mbOpened = false;
|
||||||
mbShowing = sal_False;
|
mbShowing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SAL_CALL windowMinimized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
|
virtual void SAL_CALL windowMinimized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException)
|
||||||
@@ -2415,10 +2415,10 @@ public:
|
|||||||
{
|
{
|
||||||
if ( mpUserForm )
|
if ( mpUserForm )
|
||||||
{
|
{
|
||||||
mbActivated = sal_True;
|
mbActivated = true;
|
||||||
if ( mbOpened )
|
if ( mbOpened )
|
||||||
{
|
{
|
||||||
mbOpened = mbActivated = sal_False;
|
mbOpened = mbActivated = false;
|
||||||
mpUserForm->triggerActivateEvent();
|
mpUserForm->triggerActivateEvent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -311,11 +311,11 @@ void SbiExprNode::FoldConstants()
|
|||||||
|| eTok == IDIV || eTok == MOD )
|
|| eTok == IDIV || eTok == MOD )
|
||||||
{
|
{
|
||||||
// Integer operations
|
// Integer operations
|
||||||
sal_Bool err = sal_False;
|
bool err = false;
|
||||||
if( nl > SbxMAXLNG ) err = sal_True, nl = SbxMAXLNG;
|
if( nl > SbxMAXLNG ) err = true, nl = SbxMAXLNG;
|
||||||
else if( nl < SbxMINLNG ) err = sal_True, nl = SbxMINLNG;
|
else if( nl < SbxMINLNG ) err = true, nl = SbxMINLNG;
|
||||||
if( nr > SbxMAXLNG ) err = sal_True, nr = SbxMAXLNG;
|
if( nr > SbxMAXLNG ) err = true, nr = SbxMAXLNG;
|
||||||
else if( nr < SbxMINLNG ) err = sal_True, nr = SbxMINLNG;
|
else if( nr < SbxMINLNG ) err = true, nr = SbxMINLNG;
|
||||||
ll = (long) nl; lr = (long) nr;
|
ll = (long) nl; lr = (long) nr;
|
||||||
llMod = (long) (nl < 0 ? nl - 0.5 : nl + 0.5);
|
llMod = (long) (nl < 0 ? nl - 0.5 : nl + 0.5);
|
||||||
lrMod = (long) (nr < 0 ? nr - 0.5 : nr + 0.5);
|
lrMod = (long) (nr < 0 ? nr - 0.5 : nr + 0.5);
|
||||||
@@ -325,20 +325,20 @@ void SbiExprNode::FoldConstants()
|
|||||||
bError = true;
|
bError = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sal_Bool bBothInt = sal_Bool( pLeft->eType < SbxSINGLE
|
bool bBothInt = ( pLeft->eType < SbxSINGLE
|
||||||
&& pRight->eType < SbxSINGLE );
|
&& pRight->eType < SbxSINGLE );
|
||||||
delete pLeft; pLeft = NULL;
|
delete pLeft; pLeft = NULL;
|
||||||
delete pRight; pRight = NULL;
|
delete pRight; pRight = NULL;
|
||||||
nVal = 0;
|
nVal = 0;
|
||||||
eType = SbxDOUBLE;
|
eType = SbxDOUBLE;
|
||||||
eNodeType = SbxNUMVAL;
|
eNodeType = SbxNUMVAL;
|
||||||
sal_Bool bCheckType = sal_False;
|
bool bCheckType = false;
|
||||||
switch( eTok )
|
switch( eTok )
|
||||||
{
|
{
|
||||||
case EXPON:
|
case EXPON:
|
||||||
nVal = pow( nl, nr ); break;
|
nVal = pow( nl, nr ); break;
|
||||||
case MUL:
|
case MUL:
|
||||||
bCheckType = sal_True;
|
bCheckType = true;
|
||||||
nVal = nl * nr; break;
|
nVal = nl * nr; break;
|
||||||
case DIV:
|
case DIV:
|
||||||
if( !nr )
|
if( !nr )
|
||||||
@@ -348,10 +348,10 @@ void SbiExprNode::FoldConstants()
|
|||||||
} else nVal = nl / nr;
|
} else nVal = nl / nr;
|
||||||
break;
|
break;
|
||||||
case PLUS:
|
case PLUS:
|
||||||
bCheckType = sal_True;
|
bCheckType = true;
|
||||||
nVal = nl + nr; break;
|
nVal = nl + nr; break;
|
||||||
case MINUS:
|
case MINUS:
|
||||||
bCheckType = sal_True;
|
bCheckType = true;
|
||||||
nVal = nl - nr; break;
|
nVal = nl - nr; break;
|
||||||
case EQ:
|
case EQ:
|
||||||
nVal = ( nl == nr ) ? SbxTRUE : SbxFALSE;
|
nVal = ( nl == nr ) ? SbxTRUE : SbxFALSE;
|
||||||
@@ -427,9 +427,9 @@ void SbiExprNode::FoldConstants()
|
|||||||
nVal = -nVal; break;
|
nVal = -nVal; break;
|
||||||
case NOT: {
|
case NOT: {
|
||||||
// Integer operation!
|
// Integer operation!
|
||||||
sal_Bool err = sal_False;
|
bool err = false;
|
||||||
if( nVal > SbxMAXLNG ) err = sal_True, nVal = SbxMAXLNG;
|
if( nVal > SbxMAXLNG ) err = true, nVal = SbxMAXLNG;
|
||||||
else if( nVal < SbxMINLNG ) err = sal_True, nVal = SbxMINLNG;
|
else if( nVal < SbxMINLNG ) err = true, nVal = SbxMINLNG;
|
||||||
if( err )
|
if( err )
|
||||||
{
|
{
|
||||||
pGen->GetParser()->Error( SbERR_MATH_OVERFLOW );
|
pGen->GetParser()->Error( SbERR_MATH_OVERFLOW );
|
||||||
|
@@ -85,21 +85,21 @@ SbiExpression::~SbiExpression()
|
|||||||
// Are there parameters without brackets following? This may be a number,
|
// Are there parameters without brackets following? This may be a number,
|
||||||
// a string, a symbol or also a comma (if the 1st parameter is missing)
|
// a string, a symbol or also a comma (if the 1st parameter is missing)
|
||||||
|
|
||||||
static sal_Bool DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTok )
|
static bool DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken eTok )
|
||||||
{
|
{
|
||||||
if( eTok == LPAREN )
|
if( eTok == LPAREN )
|
||||||
{
|
{
|
||||||
return sal_True;
|
return true;
|
||||||
}
|
}
|
||||||
// but only if similar to CALL!
|
// but only if similar to CALL!
|
||||||
if( !p->WhiteSpace() || eCurExpr != SbSYMBOL )
|
if( !p->WhiteSpace() || eCurExpr != SbSYMBOL )
|
||||||
{
|
{
|
||||||
return sal_False;
|
return false;
|
||||||
}
|
}
|
||||||
if ( eTok == NUMBER || eTok == MINUS || eTok == FIXSTRING ||
|
if ( eTok == NUMBER || eTok == MINUS || eTok == FIXSTRING ||
|
||||||
eTok == SYMBOL || eTok == COMMA || eTok == DOT || eTok == NOT || eTok == BYVAL )
|
eTok == SYMBOL || eTok == COMMA || eTok == DOT || eTok == NOT || eTok == BYVAL )
|
||||||
{
|
{
|
||||||
return sal_True;
|
return true;
|
||||||
}
|
}
|
||||||
else // check for default params with reserved names ( e.g. names of tokens )
|
else // check for default params with reserved names ( e.g. names of tokens )
|
||||||
{
|
{
|
||||||
@@ -108,10 +108,10 @@ static sal_Bool DoParametersFollow( SbiParser* p, SbiExprType eCurExpr, SbiToken
|
|||||||
tokens.Next();
|
tokens.Next();
|
||||||
if ( tokens.Peek() == ASSIGN )
|
if ( tokens.Peek() == ASSIGN )
|
||||||
{
|
{
|
||||||
return sal_True;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sal_False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// definition of a new symbol
|
// definition of a new symbol
|
||||||
@@ -121,7 +121,7 @@ static SbiSymDef* AddSym ( SbiToken eTok, SbiSymPool& rPool, SbiExprType eCurExp
|
|||||||
{
|
{
|
||||||
SbiSymDef* pDef;
|
SbiSymDef* pDef;
|
||||||
// A= is not a procedure
|
// A= is not a procedure
|
||||||
sal_Bool bHasType = sal_Bool( eTok == EQ || eTok == DOT );
|
bool bHasType = ( eTok == EQ || eTok == DOT );
|
||||||
if( ( !bHasType && eCurExpr == SbSYMBOL ) || pPar )
|
if( ( !bHasType && eCurExpr == SbSYMBOL ) || pPar )
|
||||||
{
|
{
|
||||||
// so this is a procedure
|
// so this is a procedure
|
||||||
@@ -137,7 +137,7 @@ static SbiSymDef* AddSym ( SbiToken eTok, SbiSymPool& rPool, SbiExprType eCurExp
|
|||||||
// special treatment for Colls like Documents(1)
|
// special treatment for Colls like Documents(1)
|
||||||
if( eCurExpr == SbSTDEXPR )
|
if( eCurExpr == SbSTDEXPR )
|
||||||
{
|
{
|
||||||
bHasType = sal_True;
|
bHasType = true;
|
||||||
}
|
}
|
||||||
pDef = pProc;
|
pDef = pProc;
|
||||||
pDef->SetType( bHasType ? eType : SbxEMPTY );
|
pDef->SetType( bHasType ? eType : SbxEMPTY );
|
||||||
@@ -249,7 +249,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
|
|||||||
// It might be an object part, if . or ! is following.
|
// It might be an object part, if . or ! is following.
|
||||||
// In case of . the variable must already be defined;
|
// In case of . the variable must already be defined;
|
||||||
// it's an object, if pDef is NULL after the search.
|
// it's an object, if pDef is NULL after the search.
|
||||||
sal_Bool bObj = sal_Bool( ( eTok == DOT || eTok == EXCLAM )
|
bool bObj = ( ( eTok == DOT || eTok == EXCLAM )
|
||||||
&& !pParser->WhiteSpace() );
|
&& !pParser->WhiteSpace() );
|
||||||
if( bObj )
|
if( bObj )
|
||||||
{
|
{
|
||||||
@@ -444,7 +444,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj )
|
|||||||
eTok = pParser->Peek();
|
eTok = pParser->Peek();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sal_Bool bObj = sal_Bool( ( eTok == DOT || eTok == EXCLAM ) && !pParser->WhiteSpace() );
|
bool bObj = ( ( eTok == DOT || eTok == EXCLAM ) && !pParser->WhiteSpace() );
|
||||||
if( bObj )
|
if( bObj )
|
||||||
{
|
{
|
||||||
if( eType == SbxVARIANT )
|
if( eType == SbxVARIANT )
|
||||||
@@ -846,22 +846,22 @@ SbiConstExpression::SbiConstExpression( SbiParser* p ) : SbiExpression( p )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// #40204 special treatment for sal_Bool-constants
|
// #40204 special treatment for sal_Bool-constants
|
||||||
sal_Bool bIsBool = sal_False;
|
bool bIsBool = false;
|
||||||
if( pExpr->eNodeType == SbxVARVAL )
|
if( pExpr->eNodeType == SbxVARVAL )
|
||||||
{
|
{
|
||||||
SbiSymDef* pVarDef = pExpr->GetVar();
|
SbiSymDef* pVarDef = pExpr->GetVar();
|
||||||
|
|
||||||
sal_Bool bBoolVal = sal_False;
|
bool bBoolVal = false;
|
||||||
if( pVarDef->GetName().equalsIgnoreAsciiCase( "true" ) )
|
if( pVarDef->GetName().equalsIgnoreAsciiCase( "true" ) )
|
||||||
{
|
{
|
||||||
bIsBool = sal_True;
|
bIsBool = true;
|
||||||
bBoolVal = sal_True;
|
bBoolVal = true;
|
||||||
}
|
}
|
||||||
else if( pVarDef->GetName().equalsIgnoreAsciiCase( "false" ) )
|
else if( pVarDef->GetName().equalsIgnoreAsciiCase( "false" ) )
|
||||||
//else if( pVarDef->GetName().ICompare( "false" ) == COMPARE_EQUAL )
|
//else if( pVarDef->GetName().ICompare( "false" ) == COMPARE_EQUAL )
|
||||||
{
|
{
|
||||||
bIsBool = sal_True;
|
bIsBool = true;
|
||||||
bBoolVal = sal_False;
|
bBoolVal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bIsBool )
|
if( bIsBool )
|
||||||
|
@@ -358,7 +358,7 @@ void SbiParser::Select()
|
|||||||
TestEoln();
|
TestEoln();
|
||||||
sal_uInt32 nNextTarget = 0;
|
sal_uInt32 nNextTarget = 0;
|
||||||
sal_uInt32 nDoneTarget = 0;
|
sal_uInt32 nDoneTarget = 0;
|
||||||
sal_Bool bElse = sal_False;
|
bool bElse = false;
|
||||||
|
|
||||||
while( !bAbort )
|
while( !bAbort )
|
||||||
{
|
{
|
||||||
@@ -369,13 +369,13 @@ void SbiParser::Select()
|
|||||||
aGen.BackChain( nNextTarget ), nNextTarget = 0;
|
aGen.BackChain( nNextTarget ), nNextTarget = 0;
|
||||||
aGen.Statement();
|
aGen.Statement();
|
||||||
|
|
||||||
sal_Bool bDone = sal_False;
|
bool bDone = false;
|
||||||
sal_uInt32 nTrueTarget = 0;
|
sal_uInt32 nTrueTarget = 0;
|
||||||
if( Peek() == ELSE )
|
if( Peek() == ELSE )
|
||||||
{
|
{
|
||||||
// CASE ELSE
|
// CASE ELSE
|
||||||
Next();
|
Next();
|
||||||
bElse = sal_True;
|
bElse = true;
|
||||||
}
|
}
|
||||||
else while( !bDone )
|
else while( !bDone )
|
||||||
{
|
{
|
||||||
@@ -415,7 +415,7 @@ void SbiParser::Select()
|
|||||||
|
|
||||||
}
|
}
|
||||||
if( Peek() == COMMA ) Next();
|
if( Peek() == COMMA ) Next();
|
||||||
else TestEoln(), bDone = sal_True;
|
else TestEoln(), bDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !bElse )
|
if( !bElse )
|
||||||
|
@@ -32,12 +32,12 @@ struct SbiParseStack { // "Stack" for statement-blocks
|
|||||||
struct SbiStatement {
|
struct SbiStatement {
|
||||||
SbiToken eTok;
|
SbiToken eTok;
|
||||||
void( SbiParser::*Func )();
|
void( SbiParser::*Func )();
|
||||||
sal_Bool bMain; // sal_True: OK outside the SUB
|
bool bMain; // true: OK outside the SUB
|
||||||
sal_Bool bSubr; // sal_True: OK inside the SUB
|
bool bSubr; // true: OK inside the SUB
|
||||||
};
|
};
|
||||||
|
|
||||||
#define Y sal_True
|
#define Y true
|
||||||
#define N sal_False
|
#define N false
|
||||||
|
|
||||||
static const SbiStatement StmntTable [] = {
|
static const SbiStatement StmntTable [] = {
|
||||||
{ ATTRIBUTE, &SbiParser::Attribute, Y, Y, }, // ATTRIBUTE
|
{ ATTRIBUTE, &SbiParser::Attribute, Y, Y, }, // ATTRIBUTE
|
||||||
|
Reference in New Issue
Block a user