summaryrefslogtreecommitdiff
path: root/basic
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
parentae19e5feff59f578d3f8de6fe9c27f9a57ba63d1 (diff)
changefileheader2: #i10000#: convert files with CR/LF characters to CR only
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbxmod.cxx2
-rw-r--r--basic/source/comp/dim.cxx102
-rw-r--r--basic/source/comp/scanner.cxx24
-rw-r--r--basic/source/inc/expr.hxx2
-rw-r--r--basic/source/inc/parser.hxx2
-rw-r--r--basic/source/runtime/methods.cxx4
-rw-r--r--basic/source/sbx/sbxexec.cxx4
-rw-r--r--basic/source/sbx/sbxvalue.cxx28
8 files changed, 84 insertions, 84 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 67f414446810..092ef458041e 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -589,7 +589,7 @@ void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic )
{
// #67781 Rueckgabewerte der Uno-Methoden loeschen
clearUnoMethods();
- clearUnoServiceCtors();
+ clearUnoServiceCtors();
ClearUnoObjectsInRTL_Impl_Rek( pBasic );
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 );
}
}
}
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index a60921c35346..dd68f20893f5 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -193,7 +193,7 @@ BOOL SbiScanner::NextSym()
}
// Leerstellen weg:
- while( *pLine && (( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' )) )
+ while( *pLine && (( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' )) )
pLine++, nCol++, bSpaces = TRUE;
nCol1 = nCol;
@@ -476,17 +476,17 @@ PrevLineCommentLbl:
eoln:
if( nCol && *--pLine == '_' )
{
- pLine = NULL;
- bool bRes = NextSym();
- if( bVBASupportOn && aSym.GetBuffer()[0] == '.' )
- {
- // object _
- // .Method
- // ^^^ <- spaces is legal in MSO VBA
- OSL_TRACE("*** resetting bSpaces***");
- bSpaces = FALSE;
- }
- return bRes;
+ pLine = NULL;
+ bool bRes = NextSym();
+ if( bVBASupportOn && aSym.GetBuffer()[0] == '.' )
+ {
+ // object _
+ // .Method
+ // ^^^ <- spaces is legal in MSO VBA
+ OSL_TRACE("*** resetting bSpaces***");
+ bSpaces = FALSE;
+ }
+ return bRes;
}
else
{
diff --git a/basic/source/inc/expr.hxx b/basic/source/inc/expr.hxx
index 3c4acf61bdbb..8ccbcebe4309 100644
--- a/basic/source/inc/expr.hxx
+++ b/basic/source/inc/expr.hxx
@@ -141,7 +141,7 @@ public:
SbiExprNode* GetRealNode(); // letzter Knoten in x.y.z
short GetDepth(); // Tiefe eines Baumes berechnen
const String& GetString() { return aStrVal; }
- short GetNumber() { return (short)nVal; }
+ short GetNumber() { return (short)nVal; }
SbiExprList* GetParameters() { return aVar.pPar; }
SbiExprListVector* GetMoreParameters() { return aVar.pvMorePar; }
diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx
index fa77340f69e4..3dc8525377a2 100644
--- a/basic/source/inc/parser.hxx
+++ b/basic/source/inc/parser.hxx
@@ -63,7 +63,7 @@ class SbiParser : public SbiTokenizer
void StmntBlock( SbiToken ); // Statement-Block abarbeiten
void DefType( BOOL bPrivate ); // Parse type declaration
void DefEnum( BOOL bPrivate ); // Parse enum declaration
- void DefDeclare( BOOL bPrivate );
+ void DefDeclare( BOOL bPrivate );
void EnableCompatibility();
public:
SbxArrayRef rTypeArray; // das Type-Array
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index e950825341d7..9a21e488d4aa 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1783,9 +1783,9 @@ INT16 implGetDateYear( double aDate )
BOOL implDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, double& rdRet )
{
- if ( nYear < 30 && SbiRuntime::isVBAEnabled() )
+ if ( nYear < 30 && SbiRuntime::isVBAEnabled() )
nYear += 2000;
- else if ( nYear < 100 )
+ else if ( nYear < 100 )
nYear += 1900;
Date aCurDate( nDay, nMonth, nYear );
if ((nYear < 100 || nYear > 9999) )
diff --git a/basic/source/sbx/sbxexec.cxx b/basic/source/sbx/sbxexec.cxx
index 4506e37a7d2a..c602b130fc5e 100644
--- a/basic/source/sbx/sbxexec.cxx
+++ b/basic/source/sbx/sbxexec.cxx
@@ -91,7 +91,7 @@ static const xub_Unicode* Symbol( const xub_Unicode* p, XubString& rSym, const S
{
rSym = p;
// Dann darf es Buchstaben, Zahlen oder Underlines enthalten
- while( *p && (rCharClass.isAlphaNumeric( *p ) || *p == '_') )
+ while( *p && (rCharClass.isAlphaNumeric( *p ) || *p == '_') )
p++, nLen++;
// BASIC-Standard-Suffixe werden ignoriert
if( *p && (*p == '%' || *p == '&' || *p == '!' || *p == '#' || *p == '$' ) )
@@ -115,7 +115,7 @@ static SbxVariable* QualifiedName
{
// Element einlesen
refVar = Element( pObj, pGbl, &p, t, aCharClass );
- while( refVar.Is() && (*p == '.' || *p == '!') )
+ while( refVar.Is() && (*p == '.' || *p == '!') )
{
// Es folgt noch ein Objektelement. Das aktuelle Element
// muss also ein SBX-Objekt sein oder liefern!
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 971f13024a55..7ee31af70556 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1570,9 +1570,9 @@ BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
{
aL.eType = aR.eType = SbxDOUBLE;
//if( Get( aL ) && rOp.Get( aR ) )
- bool bGetL = Get( aL );
- bool bGetR = rOp.Get( aR );
- if( bGetL && bGetR )
+ bool bGetL = Get( aL );
+ bool bGetR = rOp.Get( aR );
+ if( bGetL && bGetR )
switch( eOp )
{
case SbxEQ:
@@ -1590,17 +1590,17 @@ BOOL SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
default:
SetError( SbxERR_NOTIMP );
}
- // at least one value was got
- // if this is VBA then a conversion error for one
- // side will yield a false result of an equality test
- else if ( bGetR || bGetL )
- {
- if ( bVBAInterop && eOp == SbxEQ && GetError() == SbxERR_CONVERSION )
- {
- ResetError();
- bRes = FALSE;
- }
- }
+ // at least one value was got
+ // if this is VBA then a conversion error for one
+ // side will yield a false result of an equality test
+ else if ( bGetR || bGetL )
+ {
+ if ( bVBAInterop && eOp == SbxEQ && GetError() == SbxERR_CONVERSION )
+ {
+ ResetError();
+ bRes = FALSE;
+ }
+ }
}
}
if( eOld != SbxERR_OK )