diff --git a/basic/source/runtime/dllmgr.cxx b/basic/source/runtime/dllmgr.cxx index 8cc6ce7edd82..8baf819372ba 100644 --- a/basic/source/runtime/dllmgr.cxx +++ b/basic/source/runtime/dllmgr.cxx @@ -36,6 +36,7 @@ #include "basic/sbx.hxx" #include "basic/sbxvar.hxx" +#include "runtime.hxx" #include "osl/thread.h" #include "rtl/ref.hxx" #include "rtl/string.hxx" @@ -266,9 +267,15 @@ SbError marshal( std::vector< char > & blob, std::size_t offset, MarshalData & data) { OSL_ASSERT(variable != 0); - if ((variable->GetFlags() & SBX_REFERENCE) == 0) { - if ((variable->GetType() & SbxARRAY) == 0) { - switch (variable->GetType()) { + + SbxDataType eVarType = variable->GetType(); + bool bByVal = (variable->GetFlags() & SBX_REFERENCE) == 0; + if( !bByVal && !SbiRuntime::isVBAEnabled() && eVarType == SbxSTRING ) + bByVal = true; + + if (bByVal) { + if ((eVarType & SbxARRAY) == 0) { + switch (eVarType) { case SbxINTEGER: add(blob, variable->GetInteger(), outer ? 4 : 2, offset); break; @@ -317,8 +324,8 @@ SbError marshal( } } } else { - if ((variable->GetType() & SbxARRAY) == 0) { - switch (variable->GetType()) { + if ((eVarType & SbxARRAY) == 0) { + switch (eVarType) { case SbxINTEGER: case SbxLONG: case SbxSINGLE: diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 02b22a35b732..bbb3668b5b69 100755 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -521,7 +521,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) pPar->Put( NULL, 0 ); } // Index-Access bei UnoObjekten beruecksichtigen - else if( pElem->GetType() == SbxOBJECT && (!pElem->ISA(SbxMethod) || !pElem->IsBroadcaster()) ) + else if( pElem->GetType() == SbxOBJECT && (!pElem->ISA(SbxMethod) || (bVBAEnabled && !pElem->IsBroadcaster()) ) ) { pPar = pElem->GetParameters(); if ( pPar )