summaryrefslogtreecommitdiff
path: root/basic/source/comp/exprgen.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-04-23 15:56:37 +0000
committerRüdiger Timm <rt@openoffice.org>2003-04-23 15:56:37 +0000
commit9a75f39c781670c411bf92cd1702e3c39685f9a4 (patch)
treead8202056e808ad7a1d8b7537f7346df74b5f036 /basic/source/comp/exprgen.cxx
parent6e4806301e02f4576328c4694c17de1ee018e177 (diff)
INTEGRATION: CWS uno2 (1.4.44); FILE MERGED
2003/04/13 16:06:27 ab 1.4.44.1: #100883# Enable recursion in Basic
Diffstat (limited to 'basic/source/comp/exprgen.cxx')
-rw-r--r--basic/source/comp/exprgen.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx
index e69d8f6097c9..be444979814c 100644
--- a/basic/source/comp/exprgen.cxx
+++ b/basic/source/comp/exprgen.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: exprgen.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mh $ $Date: 2001-10-17 18:53:05 $
+ * last change: $Author: rt $ $Date: 2003-04-23 16:56:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -98,7 +98,7 @@ static OpTable aOpTable [] = {
// Ausgabe eines Elements
-void SbiExprNode::Gen()
+void SbiExprNode::Gen( BOOL bParam0Allowed )
{
if( IsConstant() )
{
@@ -117,7 +117,11 @@ void SbiExprNode::Gen()
SbiExprNode* pWithParent = NULL;
SbiOpcode eOp;
if( aVar.pDef->GetScope() == SbPARAM )
+ {
eOp = _PARAM;
+ if( !bParam0Allowed && 0 == aVar.pDef->GetPos() )
+ eOp = aVar.pDef->IsGlobal() ? _FIND_G : _FIND;
+ }
// AB: 17.12.1995, Spezialbehandlung fuer WITH
else if( (pWithParent = GetWithParent()) != NULL )
{
@@ -260,11 +264,11 @@ void SbiExprList::Gen()
}
}
-void SbiExpression::Gen()
+void SbiExpression::Gen( BOOL bParam0Allowed )
{
// AB: 17.12.1995, Spezialbehandlung fuer WITH
// Wenn pExpr == .-Ausdruck in With, zunaechst Gen fuer Basis-Objekt
- pExpr->Gen();
+ pExpr->Gen( bParam0Allowed );
if( bBased )
pParser->aGen.Gen( _BASED, pParser->nBase ),
pParser->aGen.Gen( _ARGV );