summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-06-12 11:59:26 +0200
committerTor Lillqvist <tml@collabora.com>2018-06-12 16:12:31 +0200
commit2926c9e40e17a806e29b95d08ddf186904103d33 (patch)
tree2e2bd2317e1d9d62cff4fe9f6a2d457409350417
parentc8a739a2c84f45f878d2ae75eaf16a2f814d1c6e (diff)
don't use opencl with deleted cells
Without this testFormulaRefUpdateDeleteAndShiftLeft2 fails with OpenCL enabled (and the mnOpenCLMinimumFormulaGroupSize check disabled). If I'm getting it right, anything working with #REF! (=invalid reference) should result in #REF! too, but without this fix the function effectively converted the #REF! to an empty cell. Change-Id: Icdda64ad751d7c0e9c0d5995673e4fb30c4c9ac4 Reviewed-on: https://gerrit.libreoffice.org/55672 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--sc/source/core/data/grouptokenconverter.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/data/grouptokenconverter.cxx b/sc/source/core/data/grouptokenconverter.cxx
index 5fc6b292214e..a388b34d04ec 100644
--- a/sc/source/core/data/grouptokenconverter.cxx
+++ b/sc/source/core/data/grouptokenconverter.cxx
@@ -116,6 +116,8 @@ bool ScGroupTokenConverter::convert( const ScTokenArray& rCode, sc::FormulaLogge
case svSingleRef:
{
ScSingleRefData aRef = *p->GetSingleRef();
+ if( aRef.IsDeleted())
+ return false;
ScAddress aRefPos = aRef.toAbs(mrPos);
if (aRef.IsRowRel())
{
@@ -178,6 +180,8 @@ bool ScGroupTokenConverter::convert( const ScTokenArray& rCode, sc::FormulaLogge
#if 0
ScComplexRefData aRef = *p->GetDoubleRef();
+ if( aRef.IsDeleted())
+ return false;
ScRange aAbs = aRef.toAbs(mrPos);
// Multiple sheets not handled by vector/matrix.