Bug 66409 - failure to correctly implement CELL
Summary: failure to correctly implement CELL
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2013-06-30 18:27 UTC by Andreas J Guelzow
Modified: 2021-02-16 13:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas J Guelzow 2013-06-30 18:27:57 UTC
In LO enter the following in A1:

=CELL("col",C5:C7)

and in A2:

=CELL("col",C5)

A2 shows, as expected, 3. A1 on the other hand showws #VALUE! It appears that LO uses implicit intersection and fails since C5:C7 does not interset with row 1. This contravenes the ODF definition, see ODF 1.2 part 2 6.13.3:
"R : if R is a reference to a cell, it is the cell whose information will be returned; if R is a reference to a range, the top-left cell in the range is the selected one; if R is omitted, the current cell is used."
Comment 1 m.a.riosv 2013-06-30 21:53:48 UTC Comment hidden (off-topic)
Comment 2 A (Andy) 2014-09-27 10:15:47 UTC
Comment 1 was probably not the right response to this bug report.

This issue is reproducible with LO 4.3.2.2 (Win 8.1).  But a correction is necessary: "," needs to be replaced by ";" in the formulas.

The ODF definitions mentions this reference to a range.
Comment 3 QA Administrators 2015-10-14 19:57:57 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2016-01-30 14:47:07 UTC
Repro.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: 9784ff3d878eaa21491fbd779e57d7d4710f5449
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-01-30_01:31:57
Locale: fi-FI (fi_FI)
Comment 5 QA Administrators 2017-03-06 14:40:42 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2021-02-15 04:08:10 UTC Comment hidden (obsolete)
Comment 7 Eike Rathke 2021-02-15 12:36:41 UTC
Still the same.

This went under my radar, I'll fix.
Comment 8 Commit Notification 2021-02-16 10:21:03 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/64701c68b5878209574663fd1b0ed333cd181511

Resolves: tdf#66409 CELL() 2nd argument range take top-left cell

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2021-02-16 13:13:32 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/de51b1aa540ce1e3532e4a8d3650c82f8d600d17

tdf#66409: sc_ucalc: Add unittest

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.