diff options
author | Eike Rathke <erack@redhat.com> | 2017-12-17 17:34:15 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-06 21:57:12 +0100 |
commit | e617d9d4d234dbad8beb1a04dc7ea6e9737ee001 (patch) | |
tree | e155c683998a25eb242e7c70eb529cdc25cc8282 | |
parent | 0b741a0b6595daf463e01707616ffd0ce3e84541 (diff) |
Related: tdf#114251 disable vectorization of svDoubleRef
It doesn't work, not knowing how to handle implicit intersections
not only produces huge unnecessary matrix operations but also
delivers wrong results.
Unit test will follow as a separate commit.
Change-Id: I14982d4a53d6af57196da998e53d426502c22fec
Reviewed-on: https://gerrit.libreoffice.org/46647
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 67444cbe5dae6e24db776ab712017ad063319276)
Reviewed-on: https://gerrit.libreoffice.org/46670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 811b40327c15e197b0967393e4071f48a60af42a)
-rw-r--r-- | sc/source/core/data/grouptokenconverter.cxx | 13 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/sc/source/core/data/grouptokenconverter.cxx b/sc/source/core/data/grouptokenconverter.cxx index 4f063eccabb9..534b53766cd2 100644 --- a/sc/source/core/data/grouptokenconverter.cxx +++ b/sc/source/core/data/grouptokenconverter.cxx @@ -166,6 +166,18 @@ bool ScGroupTokenConverter::convert( ScTokenArray& rCode, sc::FormulaLogger::Gro break; case svDoubleRef: { + /* FIXME: this simply does not work, it doesn't know + * a) the context of implicit intersection, for which creating + two arrays dows not only result in huge unnecessary matrix + operations but also produces wrong results, e.g. =B:B/C:C + * b) when to keep a reference as a reference depending on the + expected parameter type, e.g. INDEX(), OFFSET() and + others (though that *may* be disabled by OpCode already). + * Until both are solved keep the reference. */ + mrGroupTokens.AddToken(*p); + break; + +#if 0 ScComplexRefData aRef = *p->GetDoubleRef(); ScRange aAbs = aRef.toAbs(mrPos); @@ -238,6 +250,7 @@ bool ScGroupTokenConverter::convert( ScTokenArray& rCode, sc::FormulaLogger::Gro //ensure that backing storage exists for our lifetime mxFormulaGroupContext = mrDoc.GetFormulaGroupContext(); } +#endif } break; case svIndex: diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 584502f17c1f..fcfabfaefa49 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1548,10 +1548,11 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) // Don't change the state. break; case svSingleRef: - case svDoubleRef: // Depends on the reference state. meVectorState = FormulaVectorCheckReference; break; + case svDoubleRef: + // Does not work yet, see ScGroupTokenConverter::convert() case svError: case svEmptyCell: case svExternal: |