Bug 160299 - Improper display of boolean cell value stats in LibreOffice Calc status bar
Summary: Improper display of boolean cell value stats in LibreOffice Calc status bar
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-21 09:57 UTC by Valery
Modified: 2024-04-11 15:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
sample ODS (11.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-04-06 13:56 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valery 2024-03-21 09:57:52 UTC
Description:
If the cell value is TRUE, the status bar displays "Average:TRUE; Sum:TRUE". But if the cell value is FALSE, then instead of "Average:FALSE; Sum:FALSE" we see "Average:0; Sum:0".
In fact, MS Excell doesn't display the average and sum at all if the cell values are not numbers. Perhaps this is a good idea. At least when cells contain text values.

Steps to Reproduce:
1. enter (or calculate) FALSE value to one or more cells
2. select this/these cell(s)
3. look at Formula section in the program status bar

Actual Results:
"Average:0; Sum:0"

Expected Results:
"Average:FALSE; Sum:FALSE"
or just nothing


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded
Comment 1 Naresh 2024-03-25 05:12:01 UTC Comment hidden (obsolete)
Comment 2 ady 2024-03-25 12:11:57 UTC
In Excel, there is such a thing as a boolean type of value, which is (usually, not always) automatically interpreted as a number when such conversion is required; in some cases, some function might be required.

In Calc, boolean values _are_ numeric values.


FALSE() is equivalent to zero; zero is equivalent to FALSE().

TRUE() is equivalent to one; any non-zero numeric value is equivalent to TRUE().


There might be cases in which users might take advantage of showing "Average:TRUE; Sum:TRUE". As described in comment 0, this already happens.

Perhaps the similar "Average:FALSE; Sum:FALSE" case might have some advantage for some users. My only concern (as a user) would be a potential misinterpretation, either from what such status bar text means (a user that has no knowledge about boolean might misinterpret it as some kind of error/crash), or from misinterpreting other "kinds" of zero as "FALSE()" (including but not limiting [empty] cases).
Comment 3 Stéphane Guillou (stragu) 2024-04-06 13:56:10 UTC
Created attachment 193545 [details]
sample ODS

The behaviour is inherited from OOo, I see the same in OOo 3.3.

From what ady explained, I think the current distinction makes some sense.

However, there is some inconsistency between the result of the function in cell and the status bar: Average() and Sum() always return numeric data, even for a single TRUE value as input. Shouldn't the status bar always match that?

Another inconsistency is that the status bar returns boolean values if a range is selected with the cell cursor on a FALSE cell (see attached spreadsheet, select range B1:B2 starting from B2). Why not numeric, if a 0 is shown when a single FALSE cell is selected?

I think I am leaning toward the most transparent, consistent and useful: always show a numeric value in the status bar.
(e.g. M1:N2 sum in sample ODS should be 4 in status bar)
Comment 4 Stéphane Guillou (stragu) 2024-04-06 13:56:51 UTC
erack, what's your opinion?
Comment 5 ady 2024-04-06 19:14:30 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)

> (e.g. M1:N2 sum in sample ODS should be 4 in status bar)

I disagree.

If the original request in comment 0 (i.e. show FALSE when relevant) cannot be implemented, I would _not_ change the current behavior of showing TRUE in order to always show a number. There is no point in changing a behavior that might be useful to some users (and it is already implemented) just because the counter-part cannot be implemented too.
Comment 6 Eike Rathke 2024-04-11 15:15:07 UTC
The status bar displays the result in the format of the currently active cell of the selection. That is desired. e.g. if in the attached sample N1:N4 are selected starting from N1 downwards then status is "Average: TRUE; Sum: TRUE". If the selection instead is started from N4 upwards then status is "Average: 1.25; Sum: 5".

Now we could start treating boolean formats differently, and while at it then date(+time) formats because they don't make much sense either, but keep for time formats because durations are summed, what else?