Bug 162290 - Conditional format error
Summary: Conditional format error
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.5.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-01 09:51 UTC by nigelP
Modified: 2024-08-02 18:53 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Corrupted format spreadsheet (33.50 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-08-02 10:39 UTC, nigelP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nigelP 2024-08-01 09:51:38 UTC
Conditional formatting (colour and bold if a calculated value is less than defined percent) is applied to the whole of a spreadsheet instead of just cells in defined range. Error occurs in Linux Mint and Windows 7 (dual boot PC i7-3770)
Comment 1 m_a_riosv 2024-08-01 15:18:31 UTC
Please attach a sample file, reduce the size as much as possible without private information, and paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Comment 2 m_a_riosv 2024-08-02 02:52:58 UTC
Please don't send private messages, paste here the information in Help/About, there is an icon in the middle to copy it as text.

There is no sample file attached. Above your first question, there is a link to Add an attachment.
Comment 3 nigelP 2024-08-02 10:39:08 UTC
Created attachment 195662 [details]
Corrupted format spreadsheet

Select cells H2:H16
Right mouse click - Conditional Formatting
Cell Value = "is less than" =0.03
Range shown is correct H3:H16
Apply Style =New Style
Organiser - Style - Edit Style 
Numbers=Percent  Decimal places=1
Font Style=Bold
Font Effects Font colour=Red
OK
Nearly all cells reformatted to Red / Bold / ###
OK to return to Conditional Formatting for H2:H16
OK to return to corrupted format spreadsheet
Comment 4 ady 2024-08-02 11:33:29 UTC
(In reply to nigelP from comment #3)
> Organiser - Style - Edit Style 

With that step, you are editing the "Default" style, so it is applied to every cell that has that "Default" style. In that sense, this is NAB.

OTOH, I see several other issues with Conditional Formatting in newer (Dev) versions of LO. For instance, selecting the context menu on multiple cells, the "Conditional Formatting" menu entry is not there anymore. Worse than that, the conditional format is applied even when the conditions are not met. (This should be a different new report.)

@Miguel, do you see what I just described in the second paragraph?
Comment 5 ady 2024-08-02 11:42:10 UTC
(In reply to ady from comment #4)
> OTOH, I see several other issues with Conditional Formatting in newer (Dev)
> versions of LO. For instance, selecting the context menu on multiple cells,
> the "Conditional Formatting" menu entry is not there anymore. Worse than
> that, the conditional format is applied even when the conditions are not
> met. (This should be a different new report.)
> 

Strange. I cannot always reproduce those same problems I just described. for example, under some (yet unknown) condition, the context menu includes the Conditional Formatting entry, but sometimes it is not there. So I won's open a new report until I am sure about it.

Anyway, for me, this tdf#162290 should be NAB.
Comment 6 m_a_riosv 2024-08-02 12:58:34 UTC
(In reply to nigelP from comment #3)
> Created attachment 195662 [details]
> Corrupted format spreadsheet
> 
> Select cells H2:H16
> Right mouse click - Conditional Formatting
> Cell Value = "is less than" =0.03
> Range shown is correct H3:H16
What is this?
> Apply Style =New Style
> Organiser - Style - Edit Style 
> Numbers=Percent  Decimal places=1
> Font Style=Bold
> Font Effects Font colour=Red
> OK
> Nearly all cells reformatted to Red / Bold / ###
> OK to return to Conditional Formatting for H2:H16
> OK to return to corrupted format spreadsheet
Comment 7 ady 2024-08-02 13:29:10 UTC
(In reply to m_a_riosv from comment #6)

> What is this?

Miguel, that's the Conditional Formatting dialog, specific for the range that was pre-selected.

The reason that the result is applied to all cells instead of being conditionally used for the pre-selected range (only) is because pressing the "Edit Style" button opens the Style Editor on the _Default_ style.

That step (i.e. pressing the Edit Style button) is unneeded (and unwanted for the result that the OP wants to achieve). The edition of the "New Style" should be (and is) performed on the already-opened dialog (the one that opens when selecting "New Style"). > NAB.

The other issues I mentioned (e.g. the Conditional Formatting is not always part of the cell's context menu, but sometimes it is there) is not clear to me. But that is not part of this bug report.
Comment 8 ady 2024-08-02 13:37:12 UTC
(In reply to m_a_riosv from comment #6)

> What is this?
> > Apply Style =New Style

If it helps, when you open attachment 195662 [details] and follow the above steps, you get to the CF dialog for the pre-selected range. You see in that dialog the name of the field, "Apply Style", and the field itself contains the name of the style, "Untitled 4".

Open that "Untitled 4" drop down field and select "New Style". Here the OP should perform the changes, instead of continuing with the next (unneeded and unwanted) step. The next (wrong) step, pressing the "Edit Style" button, is what triggers the result seen by the OP.

Hopefully this time I am being clear enough.
Comment 9 m_a_riosv 2024-08-02 13:47:24 UTC
Range shown is correct H3:H16?
Comment 10 ady 2024-08-02 18:53:24 UTC
(In reply to m_a_riosv from comment #9)
> Range shown is correct H3:H16?

That is probably a typo. The range is H2:H16. In addition to being the natural range according to the table (header in Row 1, actual data in Rows 2:16), you can also open the Manage CF dialog and there are two ranges with CF: H2:H16 and H3:H21.

But since the problem is triggered later-on in the steps, the specific range and the way you get to the relevant problematic step is less important.