summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-02-15 20:28:22 +0100
committerEike Rathke <erack@redhat.com>2021-02-16 11:19:56 +0100
commit64701c68b5878209574663fd1b0ed333cd181511 (patch)
treec1ccbae916754f109a1b96de27f1de73c1dce657 /sc
parentf456c4dacf700e064e112ef068ff7edb04239754 (diff)
Resolves: tdf#66409 CELL() 2nd argument range take top-left cell
... instead of the otherwise usual intersecting position. Change-Id: I0edbf32b39e45e1c8fe8fcd7af2c84380aa4cd6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110951 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/interpr1.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 0d86f2c4dac9..65200917a8cc 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2243,7 +2243,6 @@ void ScInterpreter::ScCell()
return;
ScAddress aCellPos( aPos );
- bool bError = false;
if( nParamCount == 2 )
{
switch (GetStackType())
@@ -2255,13 +2254,25 @@ void ScInterpreter::ScCell()
ScCellExternal();
return;
}
+ case svDoubleRef:
+ {
+ // Exceptionally not an intersecting position but top left.
+ // See ODF v1.3 part 4 OpenFormula 6.13.3 CELL
+ ScRange aRange;
+ PopDoubleRef( aRange);
+ aCellPos = aRange.aStart;
+ }
+ break;
+ case svSingleRef:
+ PopSingleRef( aCellPos);
+ break;
default:
- ;
+ PopError();
+ SetError( FormulaError::NoRef);
}
- bError = !PopDoubleRefOrSingleRef( aCellPos );
}
OUString aInfoType = GetString().getString();
- if( bError || nGlobalError != FormulaError::NONE )
+ if (nGlobalError != FormulaError::NONE)
PushIllegalParameter();
else
{