summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-11-22 00:52:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-11-22 22:00:45 +0100
commit8bc69c4a45d1fc4fe73dd579bc5dc828aaa9b1e7 (patch)
tree87a15f0504ab18e0c4449b4197a049ae0576ff71
parent87d6588b11f7483d05334e6bf2e3f7d5cb8552b7 (diff)
Resolves: tdf#113898 create JumpMatrix for svExternalDoubleRef scalar values
Change-Id: I45d2a1e573a7e4923aaaf5b69f3c4b39215aacc2 Reviewed-on: https://gerrit.libreoffice.org/63778 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 266aab73a88ae5b62fcddaf383107d8e7edc51f2) Reviewed-on: https://gerrit.libreoffice.org/63797 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/core/tool/interpr4.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index ecb3bdb95e07..32238916e162 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1524,7 +1524,7 @@ bool ScInterpreter::ConvertMatrixParameters()
case svExternalDoubleRef:
{
formula::ParamClass eType = ScParameterClassification::GetParameterType( pCur, nParams - i);
- if (eType == formula::ParamClass::Array)
+ if (eType == formula::ParamClass::Value || eType == formula::ParamClass::Array)
{
sal_uInt16 nFileId = p->GetIndex();
OUString aTabName = p->GetString().getString();
@@ -1540,6 +1540,15 @@ bool ScInterpreter::ConvertMatrixParameters()
ScMatrixRef pMat = pTemp->GetMatrix();
if (pMat)
{
+ if (eType == formula::ParamClass::Value)
+ { // only if single value expected
+ SCSIZE nC, nR;
+ pMat->GetDimensions( nC, nR);
+ if (nJumpCols < nC)
+ nJumpCols = nC;
+ if (nJumpRows < nR)
+ nJumpRows = nR;
+ }
formula::FormulaToken* pNew = new ScMatrixToken( pMat);
pNew->IncRef();
pStack[ sp - i ] = pNew;