diff options
author | Andreas Bregas <ab@openoffice.org> | 2010-07-07 14:58:53 +0200 |
---|---|---|
committer | Andreas Bregas <ab@openoffice.org> | 2010-07-07 14:58:53 +0200 |
commit | cbd90787ccc28ff36fb439ae3e012d28688b2ecd (patch) | |
tree | 7e1678e4b6e26c3bb2a75d3052075c72151d1287 /basic | |
parent | b8d18edc25262dcd77c160d2910ac77e2d683a18 (diff) |
mib17: #162916# No error if byval in calls isn't followed by lvalue
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/disas.cxx | 2 | ||||
-rw-r--r-- | basic/source/comp/exprtree.cxx | 14 | ||||
-rw-r--r-- | basic/source/comp/sbcomp.cxx | 2 |
3 files changed, 5 insertions, 13 deletions
diff --git a/basic/source/classes/disas.cxx b/basic/source/classes/disas.cxx index 7317005d74fe..87b4cad4e94b 100644 --- a/basic/source/classes/disas.cxx +++ b/basic/source/classes/disas.cxx @@ -153,6 +153,7 @@ static const char* pOp3[] = { "DCREATE_REDIMP", // Change dimensions of a user defined Object-Array (+StringId+StringId) "FIND_CM", // Search inside a class module (CM) to enable global search in time "PUBLIC_P", // Module global Variable (persisted between calls)(+StringID+Typ) + "FIND_STATIC", // local static var lookup (+StringID+Typ) }; static const char** pOps[3] = { pOp1, pOp2, pOp3 }; @@ -220,6 +221,7 @@ static const Func pOperand3[] = { &SbiDisas::Str2Op, // Redimensionate User defined Object-Array (+StringId+StringId) &SbiDisas::VarOp, // FIND_CM &SbiDisas::VarDefOp, // PUBLIC_P + &SbiDisas::VarOp, // FIND_STATIC }; // TODO: Why as method? Isn't a simple define sufficient? diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index 9b6f419e15ce..42969b98d0d8 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -971,16 +971,11 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa else { bool bByVal = false; - bool bByValBlockLValueError = false; if( eTok == BYVAL ) { bByVal = true; pParser->Next(); eTok = pParser->Peek(); - - // Special handling for VBA function "StrPtr" that's accepted as lvalue - if( eTok == SYMBOL && pParser->GetSym().EqualsIgnoreCaseAscii( "StrPtr" ) ) - bByValBlockLValueError = true; } if( bAssumeExprLParenMode ) @@ -1014,13 +1009,8 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa else pExpr = new SbiExpression( pParser ); - if( bByVal ) - { - if( !pExpr->IsLvalue() && !bByValBlockLValueError ) - pParser->Error( SbERR_LVALUE_EXPECTED ); - else - pExpr->SetByVal(); - } + if( bByVal && pExpr->IsLvalue() ) + pExpr->SetByVal(); //pExpr = bConst ? new SbiConstExpression( pParser ) // : new SbiExpression( pParser ); diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index 50dc6f847076..faabba046c99 100644 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -67,7 +67,7 @@ void dbg_SaveDisassembly( SbModule* pModule ) ( OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY ); if( xSFI.is() ) { - String aFile( RTL_CONSTASCII_USTRINGPARAM("file:///d:/BasicAsm_") ); + String aFile( RTL_CONSTASCII_USTRINGPARAM("file:///d:/zBasic.Asm/Asm_") ); StarBASIC* pBasic = (StarBASIC*)pModule->GetParent(); if( pBasic ) { |