diff options
author | Eike Rathke <erack@redhat.com> | 2018-07-23 15:16:18 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-07-23 15:18:18 +0200 |
commit | 0549b5dded97cd6b315531baf50a874f5bb53155 (patch) | |
tree | e8e8d961f932495351d5d855bd9433d7bd49c69c /sc | |
parent | 26f1fc7c520b442a3c56b3346a19d921e1574f81 (diff) |
HandleIIOpCode: testing for ForceArray is not sufficient
There are also other "force to array" context modes in which a
range reference does not result in an implicit intersection.
Change-Id: I3f4d85f73ecde5bbf9f011deeac2936d5f43949b
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index cab029d5e78b..b7e62c52e3df 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -5844,9 +5844,18 @@ void ScCompiler::HandleIIOpCode(OpCode nOpCode, formula::ParamClass eClass, Form if (nNumParams != 1) return; - if (eClass == formula::ForceArray || mbMatrixFlag) + // NOTE: eClass is the CurrentFactor token's GetInForceArray() state, + // not the function's parameter classification. + if (mbMatrixFlag || + eClass == formula::ForceArray || + eClass == formula::ReferenceOrForceArray || + eClass == formula::SuppressedReferenceOrForceArray) return; + /* TODO: this assumes that there is no function taking a single + * parameter that does evaluate a range reference. There currently + * isn't any, but we should rather check that. */ + if ((*pppToken[0])->GetType() != svDoubleRef) return; |