summaryrefslogtreecommitdiff
path: root/basic/source/runtime/step1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/runtime/step1.cxx')
-rw-r--r--basic/source/runtime/step1.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx
index f448f7900b..1e8a3a7426 100644
--- a/basic/source/runtime/step1.cxx
+++ b/basic/source/runtime/step1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,7 @@
#include "sbunoobj.hxx"
#include "errobject.hxx"
-bool checkUnoObjectType( SbUnoObject* refVal,
+bool checkUnoObjectType( SbUnoObject* refVal,
const String& aClass );
// Laden einer numerischen Konstanten (+ID)
@@ -93,6 +94,15 @@ void SbiRuntime::StepARGN( UINT32 nOp1 )
{
String aAlias( pImg->GetString( static_cast<short>( nOp1 ) ) );
SbxVariableRef pVal = PopVar();
+ if( bVBAEnabled && ( pVal->ISA(SbxMethod) || pVal->ISA(SbUnoProperty) || pVal->ISA(SbProcedureProperty) ) )
+ {
+ // named variables ( that are Any especially properties ) can be empty at this point and need a broadcast
+ if ( pVal->GetType() == SbxEMPTY )
+ pVal->Broadcast( SBX_HINT_DATAWANTED );
+ // Methoden und Properties evaluieren!
+ SbxVariable* pRes = new SbxVariable( *pVal );
+ pVal = pRes;
+ }
refArgv->Put( pVal, nArgc );
refArgv->PutAlias( aAlias, nArgc++ );
}
@@ -160,7 +170,7 @@ void SbiRuntime::StepPAD( UINT32 nOp1 )
void SbiRuntime::StepJUMP( UINT32 nOp1 )
{
#ifdef DBG_UTIL
- // #QUESTION shouln't this be
+ // #QUESTION shouln't this be
// if( (BYTE*)( nOp1+pImagGetCode() ) >= pImg->GetCodeSize() )
if( nOp1 >= pImg->GetCodeSize() )
StarBASIC::FatalError( SbERR_INTERNAL_ERROR );
@@ -182,7 +192,9 @@ void SbiRuntime::StepJUMPT( UINT32 nOp1 )
void SbiRuntime::StepJUMPF( UINT32 nOp1 )
{
SbxVariableRef p = PopVar();
- if( !p->GetBool() )
+ // In a test e.g. If Null then
+ // will evaluate Null will act as if False
+ if( ( bVBAEnabled && p->IsNull() ) || !p->GetBool() )
StepJUMP( nOp1 );
}
@@ -443,7 +455,7 @@ bool SbiRuntime::implIsClass( SbxObject* pObj, const String& aClass )
SbClassData* pClassData;
if( pClassMod && (pClassData=pClassMod->pClassData) != NULL )
{
- SbxVariable* pClassVar =
+ SbxVariable* pClassVar =
pClassData->mxIfaces->Find( aClass, SbxCLASS_DONTCARE );
bRet = (pClassVar != NULL);
}
@@ -572,3 +584,4 @@ void SbiRuntime::StepBASED( UINT32 nOp1 )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */