diff options
Diffstat (limited to 'basic/source/runtime/dllmgr.cxx')
-rw-r--r-- | basic/source/runtime/dllmgr.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
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: |