[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Wed Jun 14 09:42:36 UTC 2017
sc/source/core/tool/interpr1.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 90bea1ea24838845646ec253d1a4b472b73d53ca
Author: Eike Rathke <erack at redhat.com>
Date: Wed Jun 14 11:41:40 2017 +0200
Final result of Reference array is svMatrix instead of svRefList, tdf#58874
So {=OFFSET(A1,{1;2;3},0)} or {=OFFSET(A1,B1:B3,0)} return a column vector and
{=OFFSET(A1,{1,2,3},0)} or {=OFFSET(A1,B1:D1,0)} return a row vector like they
did before.
Excel doesn't handle this at all and returns #VALUE! instead.
Change-Id: Iba14ba4ca089568ddc724a22d3093bfe6b73b995
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 547dd0a98db3..c9fa796a551f 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -799,9 +799,11 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
}
}
if ( !bCont )
- { // we're done with it, throw away jump matrix, keep result
+ { // We're done with it, throw away jump matrix, keep result.
+ // For an intermediate result of Reference use the array of references,
+ // else (also for a final result of Reference) use the matrix.
formula::ParamClass eReturnType = ScParameterClassification::GetParameterType( pCur, SAL_MAX_UINT16);
- if (eReturnType == ParamClass::Reference)
+ if (eReturnType == ParamClass::Reference && aCode.PeekNextOperator())
{
FormulaTokenRef xRef = new ScRefListToken(true);
*(xRef->GetRefList()) = pJumpMatrix->GetRefList();
More information about the Libreoffice-commits
mailing list