diff options
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/exprtree.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index 604ac61745..ff5e9ce721 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -971,11 +971,16 @@ 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 ) @@ -1011,7 +1016,7 @@ SbiParameters::SbiParameters( SbiParser* p, BOOL bStandaloneExpression, BOOL bPa if( bByVal ) { - if( !pExpr->IsLvalue() ) + if( !pExpr->IsLvalue() && !bByValBlockLValueError ) pParser->Error( SbERR_LVALUE_EXPECTED ); else pExpr->SetByVal(); |