diff options
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 11 |
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; |