Bug 147853 - FORMATTING: Conditional formatting is inconsistent when inserting new first row
Summary: FORMATTING: Conditional formatting is inconsistent when inserting new first row
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2022-03-08 20:27 UTC by Peter F
Modified: 2022-12-20 14:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Document used for testing (7.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-03-08 20:27 UTC, Peter F
Details
Screenshot of mismatched formatting and format range (11.40 KB, image/png)
2022-03-08 20:28 UTC, Peter F
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter F 2022-03-08 20:27:59 UTC
Created attachment 178735 [details]
Document used for testing

Description:
If a new row is inserted above the first row of a spreadsheet, and cells in that row have conditional formatting, the conditional formatting is applied to the new top row. However, this is not reflected in the ranges shown in "Format > Conditional > Manage..."; additionally, when saving and reopening, the new top row is no longer conditionally formatted.

Reproduction steps:
1. Open the attached document bug_test.ods, or create a new document with conditional formatting applied to cells in the top row.
2. Right-click on the row number of Row 1 and select "Insert Rows Above".
3. Edit the value of the new cell to observe that it is conditionally formatted.
4. Navigate to the menu Format > Conditional > Manage... and observe that the new cell is not included in the conditional formatting range.
5. Save, close, and reopen the document.
6. Observe that the cell in the new top row is no longer conditionally formatting.

Expected behavior:
Either of the following (not sure which is intended).
1. Cells in the new first row do not inherit conditional formatting from the previous first row.
2. Cells in the new first row inherit conditional formatting from the previous first row, and this is correctly saved and shown in the Manage Conditional Formatting dialog.

Version information:
Version: 7.2.5.2.0+ / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 6; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
7.2.5-4
Calc: threaded

Package information:
Operating system: Arch Linux x64
Package source: https://archlinux.org/packages/extra/x86_64/libreoffice-still/
Package version: 7.2.5-4

Also reproduced with the following version:

Version information:
Version: 7.3.0.3 / LibreOffice Community
Build ID: 30(Build:3)
CPU threads: 6; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
7.3.0-5
Calc: threaded

Package information:
Operating system: Arch Linux x64
Package source: https://archlinux.org/packages/extra/x86_64/libreoffice-fresh/
Package version: 7.3.0-5
Comment 1 Peter F 2022-03-08 20:28:45 UTC
Created attachment 178736 [details]
Screenshot of mismatched formatting and format range
Comment 2 m_a_riosv 2022-03-08 21:57:43 UTC
Works fine for me.
Version: 7.2.6.2 (x64) / LibreOffice Community
Build ID: b0ec3a565991f7569a5a7f5d24fed7f52653d754
CPU threads: 4; OS: Windows 10.0 Build 21390; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL
Comment 3 Peter F 2022-03-08 23:10:56 UTC
I was just able to reproduce in Windows on what looks like the same version:
Version: 7.2.6.2 (x64) / LibreOffice Community
Build ID: b0ec3a565991f7569a5a7f5d24fed7f52653d754
CPU threads: 6; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Here is what I did:
1. Open Calc (makes a new document).
2. Select cells B1:B5.
3. Navigate to menu Format > Conditional > Condition....
4. Change "is equal to" to "is less than" and enter 1 in the rightmost box.
5. Change "Accent" to "Note".
6. Select "OK".
7. Select Row 1.
8. Right-click Row 1 and select "Insert Rows Above".
9. Enter "2" into the new cell (yellow background disappears).
10. Enter "0" into the new cell (yellow background reappears).
11. Navigate to menu Format > Conditional > Manage... (Range field does not match formatted range).

Is there anything I can do to help narrow down the issue?
Comment 4 m_a_riosv 2022-03-09 09:29:10 UTC
Works fine for me with
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 6adabd915d931b845fcf2fef15fbf3fca14ec9b3
CPU threads: 4; OS: Windows 10.0 Build 21390; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL

Maybe it is an only Linux issue.
Comment 5 Peter F 2022-03-09 21:23:45 UTC
My last comment was on Windows, and I just tried again with the latest dev build (also on Windows):

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 279abd670317760dd1d58c549a0589c3a31c1e4d
CPU threads: 6; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Safe mode didn't make a difference either.

I also got a reproduction from someone else on Linux:
"Reproducable on Debian SID; LibreOffice version 7.3.1.1"
Comment 6 Peter F 2022-03-18 21:54:31 UTC
I just tried on an Intel Mac with the same results as all my other tests.

Version: 7.3.1.3 / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 6; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

I have a couple of questions:
1. What would be the best way to ensure we're following the same steps to reproduce the issue?
2. Can you please confirm which of the expected behaviors I listed in the original description you are seeing? I'm not sure which one is correct.
Comment 7 Buovjaga 2022-12-20 12:03:38 UTC
(In reply to Peter F from comment #3)
> Here is what I did:
> 1. Open Calc (makes a new document).
> 2. Select cells B1:B5.
> 3. Navigate to menu Format > Conditional > Condition....
> 4. Change "is equal to" to "is less than" and enter 1 in the rightmost box.
> 5. Change "Accent" to "Note".
> 6. Select "OK".
> 7. Select Row 1.
> 8. Right-click Row 1 and select "Insert Rows Above".
> 9. Enter "2" into the new cell (yellow background disappears).
> 10. Enter "0" into the new cell (yellow background reappears).
> 11. Navigate to menu Format > Conditional > Manage... (Range field does not
> match formatted range).

Reproduced

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f6b4c3fb68f9b36e1e64fc4a4c680ab1bb7fb013
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 20 December 2022
Comment 8 Buovjaga 2022-12-20 14:37:40 UTC
Same in 3.5.0