summaryrefslogtreecommitdiff
path: root/basic/source/comp/dim.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2010-02-12 16:56:44 +0100
committerJens-Heiner Rechtien <hr@openoffice.org>2010-02-12 16:56:44 +0100
commitdb02ac8b89b8ec1e3d84f2676665667916582423 (patch)
tree55446fdc25ea149952589d200fb6b4224a6996f8 /basic/source/comp/dim.cxx
parentae19e5feff59f578d3f8de6fe9c27f9a57ba63d1 (diff)
changefileheader2: #i10000#: convert files with CR/LF characters to CR only
Diffstat (limited to 'basic/source/comp/dim.cxx')
-rw-r--r--basic/source/comp/dim.cxx102
1 files changed, 51 insertions, 51 deletions
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index 82ca48ec882b..fb4071bcc2a2 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -238,12 +238,12 @@ void SbiParser::DefVar( SbiOpcode eOp, BOOL bStatic )
DefEnum( bPrivate );
return;
}
- else if( eCurTok == DECLARE )
- {
- Next();
- DefDeclare( bPrivate );
- return;
- }
+ else if( eCurTok == DECLARE )
+ {
+ Next();
+ DefDeclare( bPrivate );
+ return;
+ }
}
#ifdef SHARED
@@ -582,42 +582,42 @@ void SbiParser::DefType( BOOL bPrivate )
else
{
SbxProperty *pTypeElem = new SbxProperty (pElem->GetName(),pElem->GetType());
- if( pDim )
- {
- SbxDimArray* pArray = new SbxDimArray( pElem->GetType() );
- if ( pDim->GetSize() )
- {
- // Dimension the target array
-
- for ( short i=0; i<pDim->GetSize();++i )
- {
- INT32 ub = -1;
- INT32 lb = nBase;
- SbiExprNode* pNode = pDim->Get(i)->GetExprNode();
- ub = pNode->GetNumber();
- if ( !pDim->Get( i )->IsBased() ) // each dim is low/up
- {
- if ( ++i >= pDim->GetSize() ) // trouble
- StarBASIC::FatalError( SbERR_INTERNAL_ERROR );
- pNode = pDim->Get(i)->GetExprNode();
- lb = ub;
- ub = pNode->GetNumber();
- }
- else if ( !bCompatible )
- ub += nBase;
- pArray->AddDim32( lb, ub );
- }
- pArray->setHasFixedSize( true );
- }
- else
- pArray->unoAddDim( 0, -1 ); // variant array
- USHORT nSavFlags = pTypeElem->GetFlags();
- // need to reset the FIXED flag
- // when calling PutObject ( because the type will not match Object )
- pTypeElem->ResetFlag( SBX_FIXED );
- pTypeElem->PutObject( pArray );
- pTypeElem->SetFlags( nSavFlags );
- }
+ if( pDim )
+ {
+ SbxDimArray* pArray = new SbxDimArray( pElem->GetType() );
+ if ( pDim->GetSize() )
+ {
+ // Dimension the target array
+
+ for ( short i=0; i<pDim->GetSize();++i )
+ {
+ INT32 ub = -1;
+ INT32 lb = nBase;
+ SbiExprNode* pNode = pDim->Get(i)->GetExprNode();
+ ub = pNode->GetNumber();
+ if ( !pDim->Get( i )->IsBased() ) // each dim is low/up
+ {
+ if ( ++i >= pDim->GetSize() ) // trouble
+ StarBASIC::FatalError( SbERR_INTERNAL_ERROR );
+ pNode = pDim->Get(i)->GetExprNode();
+ lb = ub;
+ ub = pNode->GetNumber();
+ }
+ else if ( !bCompatible )
+ ub += nBase;
+ pArray->AddDim32( lb, ub );
+ }
+ pArray->setHasFixedSize( true );
+ }
+ else
+ pArray->unoAddDim( 0, -1 ); // variant array
+ USHORT nSavFlags = pTypeElem->GetFlags();
+ // need to reset the FIXED flag
+ // when calling PutObject ( because the type will not match Object )
+ pTypeElem->ResetFlag( SBX_FIXED );
+ pTypeElem->PutObject( pArray );
+ pTypeElem->SetFlags( nSavFlags );
+ }
delete pDim;
pTypeMembers->Insert( pTypeElem, pTypeMembers->Count() );
}
@@ -775,7 +775,7 @@ void SbiParser::DefEnum( BOOL bPrivate )
SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
{
BOOL bFunc = BOOL( eCurTok == FUNCTION );
- BOOL bProp = BOOL( eCurTok == GET || eCurTok == SET || eCurTok == LET );
+ BOOL bProp = BOOL( eCurTok == GET || eCurTok == SET || eCurTok == LET );
if( !TestSymbol() ) return NULL;
String aName( aSym );
SbxDataType eType = eScanType;
@@ -896,7 +896,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
// if( pDef->GetType() == SbxOBJECT )
// pDef->SetType( SbxVARIANT ),
// Error( SbERR_SYNTAX );
- if( pDef->GetType() == SbxVARIANT && !( bFunc || bProp ) )
+ if( pDef->GetType() == SbxVARIANT && !( bFunc || bProp ) )
pDef->SetType( SbxEMPTY );
return pDef;
}
@@ -905,11 +905,11 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl )
void SbiParser::Declare()
{
- DefDeclare( FALSE );
-}
-
-void SbiParser::DefDeclare( BOOL bPrivate )
-{
+ DefDeclare( FALSE );
+}
+
+void SbiParser::DefDeclare( BOOL bPrivate )
+{
Next();
if( eCurTok != SUB && eCurTok != FUNCTION )
Error( SbERR_UNEXPECTED, eCurTok );
@@ -938,8 +938,8 @@ void SbiParser::DefDeclare( BOOL bPrivate )
else
aPublics.Add( pDef );
- if ( pDef )
- pDef->SetPublic( !bPrivate );
+ if ( pDef )
+ pDef->SetPublic( !bPrivate );
}
}
}