diff options
Diffstat (limited to 'basic/source/runtime/step2.cxx')
-rw-r--r-- | basic/source/runtime/step2.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 419f00bd21..5068470278 100644 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -96,7 +96,7 @@ SbxVariable* SbiRuntime::FindElement if( bLocal ) { if ( bStatic ) - { + { if ( pMeth ) pElem = pMeth->GetStatics()->Find( aName, SbxCLASS_DONTCARE ); } @@ -139,7 +139,7 @@ SbxVariable* SbiRuntime::FindElement if ( pElem ) bSetName = false; // don't overwrite uno name else - pElem = getVBAConstant( aName ); + pElem = VBAConstantHelper::instance().getVBAConstant( aName ); } // #72382 VORSICHT! Liefert jetzt wegen unbekannten // Modulen IMMER ein Ergebnis! @@ -259,10 +259,10 @@ SbxVariable* SbiRuntime::FindElement if( bSet ) pElem->SetType( t2 ); pElem = pNew; - } + } // Index-Access bei UnoObjekten beruecksichtigen - // definitely we want this for VBA where properties are often - // collections ( which need index access ), but lets only do + // definitely we want this for VBA where properties are often + // collections ( which need index access ), but lets only do // this if we actually have params following else if( bVBAEnabled && pElem->ISA(SbUnoProperty) && pElem->GetParameters() ) { @@ -455,7 +455,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) { // Falls wir ein Array haben, wollen wir bitte das Array-Element! SbxArray* pPar; - if( pElem->GetType() & SbxARRAY ) + if( ( pElem->GetType() & SbxARRAY ) && (SbxVariable*)refRedim != pElem ) { SbxBase* pElemObj = pElem->GetObject(); SbxDimArray* pDimArray = PTR_CAST(SbxDimArray,pElemObj); @@ -487,7 +487,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) pPar->Put( NULL, 0 ); } // Index-Access bei UnoObjekten beruecksichtigen - else if( pElem->GetType() == SbxOBJECT && !pElem->ISA(SbxMethod) ) + else if( pElem->GetType() == SbxOBJECT && !pElem->ISA(SbxMethod) && ( !bVBAEnabled || ( bVBAEnabled && !pElem->ISA(SbxProperty) ) ) ) { pPar = pElem->GetParameters(); if ( pPar ) @@ -679,7 +679,7 @@ void SbiRuntime::StepPARAM( UINT32 nOp1, UINT32 nOp2 ) p = new SbxVariable(); if( SbiRuntime::isVBAEnabled() && - (t == SbxOBJECT || t == SbxSTRING) ) + (t == SbxOBJECT || t == SbxSTRING) ) { if( t == SbxOBJECT ) p->PutObject( NULL ); @@ -731,6 +731,8 @@ void SbiRuntime::StepPARAM( UINT32 nOp1, UINT32 nOp2 ) SaveRef( q ); *q = *p; p = q; + if ( i ) + refParams->Put( p, i ); } SetupArgs( p, nOp1 ); PushVar( CheckArray( p ) ); @@ -1170,11 +1172,11 @@ void SbiRuntime::StepGLOBAL( UINT32 nOp1, UINT32 nOp2 ) String aName( pImg->GetString( static_cast<short>( nOp1 ) ) ); SbxDataType t = (SbxDataType)(nOp2 & 0xffff); - // Store module scope variables at module scope + // Store module scope variables at module scope // in non vba mode these are stored at the library level :/ // not sure if this really should not be enabled for ALL basic SbxObject* pStorage = &rBasic; - if ( SbiRuntime::isVBAEnabled() ) + if ( SbiRuntime::isVBAEnabled() ) { pStorage = pMod; pMod->AddVarName( aName ); |