Bug 85258 - ISBLANK counts cells with reference to an empty cell in array context
Summary: ISBLANK counts cells with reference to an empty cell in array context
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:4.5.0 target:4.4.0.2 target:4...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-20 20:58 UTC by Regina Henschel
Modified: 2016-03-08 08:23 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Testcases for ISBLANK (13.62 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2014-10-20 20:58 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2014-10-20 20:58:48 UTC
Created attachment 108139 [details]
Testcases for ISBLANK

Open attached document.
Compare the results for a simple call =ISBLANK(B3) in column C, with the corresponding result, when =ISBLANK gets a Force Array attribute.

ISBLANK expects a single value, see ODF 6.13.14 ISBLANK in part2:
 "Syntax: ISBLANK( Scalar X )"
If such functions are forced to array context, then they follow the concept "iteration", see 6.3.4 Force to array context (ForceArray) in part 2:
"... where a reference to a single cell is expected and multiple cells are provided, iteration over the multiple cells is performed and results are stored in an array that is passed on."

Such iteration is done as:
"When evaluating a formula in 'matrix' mode, and a non-scalar value is passed to a function argument that expects a scalar, the function is evaluated multiple times, iterating over the non-scalar input(s) and putting the function result into a matrix at the position corresponding to the input."
see 3.3 Non-Scalar Evaluation (aka 'Array expressions'), section 2.2.

Therefore the results in column D need to be the same as in column C.
Comment 1 A (Andy) 2014-10-24 20:43:11 UTC
Reproducible with LO 4.3.2.2 (Win 8.1)
Comment 2 Eike Rathke 2014-12-22 17:18:18 UTC
Taking.
Comment 3 Commit Notification 2014-12-22 20:17:45 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=069698de192ef7e8d3582398e4542c175cabb987

fdo#85258 differentiate between empty cell and empty result in matrix

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2014-12-22 20:35:15 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ee21699b90fb5ca3c7f5869465b3f442d643aac3&h=libreoffice-4-4

fdo#85258 differentiate between empty cell and empty result in matrix

It will be available in 4.4.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Eike Rathke 2014-12-22 20:59:14 UTC
Pending review for 4-3 https://gerrit.libreoffice.org/13617
Comment 6 Commit Notification 2015-01-07 13:29:35 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=007bede69824b2caee948d21acefc2f5b0f63b3a&h=libreoffice-4-3

fdo#85258 differentiate between empty cell and empty result in matrix

It will be available in 4.3.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.