diff options
author | Eike Rathke <erack@redhat.com> | 2018-03-06 18:41:56 +0100 |
---|---|---|
committer | Kohei Yoshida <libreoffice@kohei.us> | 2018-03-21 12:29:04 +0100 |
commit | b52ca1a7cf9e3652ebd433753b6642b6f5124d1f (patch) | |
tree | 551ada99f2d1818a75d507b57c527831a3d30620 /sc | |
parent | 070f3db51da48c70cde12050c18fb03de2192c0f (diff) |
Resolves: tdf#116100 fewer array of references cases, tdf#58874 related
In particular if in any ForceArray context use the matrix result
instead of the array of references list.
(cherry picked from commit cfc6cf5177f8df23af35c4509c0276a19de56cce)
Change-Id: I72328a690760637f6d31fadba447641c64711a67
Reviewed-on: https://gerrit.libreoffice.org/50842
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 18a93676fa4a..679a165f7e9c 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -800,12 +800,19 @@ bool ScInterpreter::JumpMatrix( short nStackLevel ) } if ( !bCont ) { // We're done with it, throw away jump matrix, keep result. - // For an intermediate result of Reference use the array of references, + // For an intermediate result of Reference use the array of references + // if there are more than one reference and the current ForceArray + // context is not ForceArray or related, suppressed, ..., // else (also for a final result of Reference) use the matrix. // Treat the result of a jump command as final and use the matrix (see // tdf#115493 for why). + ParamClass eParamClass; if (!FormulaCompiler::IsOpCodeJumpCommand( pJumpMatrix->GetOpCode()) && + pJumpMatrix->GetRefList().size() > 1 && ScParameterClassification::GetParameterType( pCur, SAL_MAX_UINT16) == ParamClass::Reference && + (eParamClass = pCur->GetInForceArray()) != ParamClass::ForceArray && + eParamClass != ParamClass::ReferenceOrForceArray && + eParamClass != ParamClass::SuppressedReferenceOrForceArray && aCode.PeekNextOperator()) { FormulaTokenRef xRef = new ScRefListToken(true); |