Bug 159245 - Conditional Format breaks after deleting row
Summary: Conditional Format breaks after deleting row
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2024-01-17 15:14 UTC by Xisco Faulí
Modified: 2024-03-14 05:04 UTC (History)
5 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 Xisco Faulí 2024-01-17 15:14:05 UTC
This is a follow-up of bug 140330 based on https://bugs.documentfoundation.org/show_bug.cgi?id=140330#c4

Steps to reproduce:
1. Open attachment 191945 [details] from bug 140330
2. Delete Row 2

-> Conditional formats breaks -> Cell value != $Sheet1.$B#REF

Reproduced in

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6fc537cdf496f3a644ec68d6103de51eb7f5c9cb
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

and

Version: 6.0.0.0.alpha1+
Build ID: 6eeac3539ea4cac32d126c5e24141f262eb5a4d9
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3; 
Locale: es-ES (es_ES.UTF-8); Calc: group threaded
Comment 1 m_a_riosv 2024-01-17 16:01:09 UTC Comment hidden (obsolete)
Comment 2 Xisco Faulí 2024-01-17 16:05:09 UTC Comment hidden (obsolete)
Comment 3 m_a_riosv 2024-01-17 16:17:35 UTC Comment hidden (obsolete)
Comment 4 raal 2024-01-17 21:09:32 UTC
I can reproduce steps from comment 2 and description.

  Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 96493091a80fb01c33ea9153b737fdc554de61f0
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

and Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 5 Xisco Faulí 2024-01-18 08:39:12 UTC
I can also reproduce it in

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 1; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 6 Xisco Faulí 2024-01-18 08:52:03 UTC
(In reply to Xisco Faulí from comment #2)
> (In reply to m_a_riosv from comment #1)
> > And what should be expected?, the same happens in a cell with references to
> > row 2.
> 
> if you do
> 
> 1. Open attachment 191945 [details] from bug 140330
> 2. Delete Row 2
> 3. Undo
> 4. Redo
> 
> Then the conditional format is correct -> $Sheet1.$B2

Btw, the wrong behaviour on step 4 was recently fixed by 96493091a80fb01c33ea9153b737fdc554de61f0
@Mike, I thought you might be also interested in this issue
Comment 7 Mike Kaganski 2024-01-18 08:56:12 UTC
(In reply to m_a_riosv from comment #1)
> And what should be expected?, the same happens in a cell with references to
> row 2.

Indeed - if you have a single cell, which references a deleted cell, you expect that its reference is now broken.

But please check this bug. There is an *area* conditional formatting. In it, *every cell* references *to its right* (using *relative reference*), not up; and after the deletion, the remaining cell should still reference its right neighbor. The conditional format range should shrink, not become invalid.
Comment 8 m_a_riosv 2024-01-18 16:11:14 UTC
(In reply to Mike Kaganski from comment #7)
> (In reply to m_a_riosv from comment #1)
> > And what should be expected?, the same happens in a cell with references to
> > row 2.
> 
> Indeed - if you have a single cell, which references a deleted cell, you
> expect that its reference is now broken.
> 
> But please check this bug. There is an *area* conditional formatting. In it,
> *every cell* references *to its right* (using *relative reference*), not up;
> and after the deletion, the remaining cell should still reference its right
> neighbor. The conditional format range should shrink, not become invalid.

Understand and agree.
It seems like it could be adapted as arrays do, when deleting reference rows from the array formula.