summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2021-10-05 21:10:22 +0200
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2021-10-07 08:21:58 +0200
commite090afc29bdff4303f1235080fb169011220be4a (patch)
tree60bd3b1cd411da434af3c7062e201d208473e16d /basic/source
parentf78aebd4c2a2b740559e54906a26653dc89fd610 (diff)
tdf#144924 - Change return type of array elements of the split function
If VBA is not enabled, allow the assignment of variables with different data types to the individual array elements created by the split function. Change-Id: I7bdd432cdebbfded5f7fb3acc0216474eb6b6821 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123122 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/runtime/methods1.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index b554f3f6c94e..e750627943d6 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1629,11 +1629,17 @@ void SbRtl_Split(StarBASIC *, SbxArray & rPar, bool)
pArray->unoAddDim(0, nArraySize - 1);
// insert parameter(s) into the array
+ const bool bIsVBAInterOp = SbiRuntime::isVBAEnabled();
for(sal_Int32 i = 0 ; i < nArraySize ; i++ )
{
// tdf#123025 - split returns an array of substrings
SbxVariableRef xVar = new SbxVariable( SbxSTRING );
xVar->PutString( vRet[i] );
+ // tdf#144924 - allow the assignment of different data types to the individual elements
+ if (!bIsVBAInterOp)
+ {
+ xVar->ResetFlag(SbxFlagBits::Fixed);
+ }
pArray->Put(xVar.get(), &i);
}