summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-10-28 22:30:24 +0100
committerEike Rathke <erack@redhat.com>2015-10-28 22:32:15 +0100
commitb5cd11b4b02a85a83db77ba9d8d1763f0cd88cb1 (patch)
tree8207b19a0b711cd0e8dc0dce79055d102cad73ab /sc
parentac00222a258c837bf60669db2bd03ee06cdf86a0 (diff)
Resolves: tdf#95395 force range reference to array only in array formula
... and not already if the function has a (ReferenceOr)ForceArray type parameter somewhere else in the parameter list. Regression triggered by commit 01eea7fe40c939311bf1920b6e8b4391a93c2e82 for MATCH, HLOOKUP and VLOOKUP first parameter, but behavior already present since OOo for LOOKUP; FORECAST in its first parameter, PROB, LINEST, LOGEST and TTEST in the last two parameters. Change-Id: I4a30ea3362f86274a048b0e3f47fa12da3001a3a
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/interpr4.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index bd84fa625afd..dc0e00f10c1f 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1398,7 +1398,13 @@ bool ScInterpreter::ConvertMatrixParameters()
ScParameterClassification::Type eType =
ScParameterClassification::GetParameterType( pCur, nParams - i);
if ( eType != ScParameterClassification::Reference &&
- eType != ScParameterClassification::ReferenceOrForceArray)
+ eType != ScParameterClassification::ReferenceOrForceArray &&
+ // For scalar Value: convert to Array/JumpMatrix
+ // only if in array formula context, else (function
+ // has ForceArray or ReferenceOrForceArray
+ // parameter *somewhere else*) pick a normal
+ // position dependent implicit intersection later.
+ (eType != ScParameterClassification::Value || bMatrixFormula))
{
SCCOL nCol1, nCol2;
SCROW nRow1, nRow2;