sc/source/core/tool/interpr1.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 90bea1ea24838845646ec253d1a4b472b73d53ca Author: Eike Rathke <[email protected]> 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(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
