Bug 140330 - Conditional formatting breaks after redoing cell deletion
Summary: Conditional formatting breaks after redoing cell deletion
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1 all versions
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.8.0 target:24.2.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2021-02-11 09:34 UTC by Xisco Faulí
Modified: 2024-03-13 06:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
A simplified document (4.14 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-01-15 10:08 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2021-02-11 09:34:27 UTC
I found this issue while creating a UItest for bug 104026 < https://gerrit.libreoffice.org/c/core/+/110753 >

Steps to reproduce it:
1. Open attachment from 128858 bug 104026
2. Delete Row 2
3. Undo
4. Redo

-> Conditional format breaks and the condition becomes "Cell value != Sheet1.$B#REF!"

Reproduced in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 066799b4a162aa0a4bc6aa28339f1f943a13971e
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2021-02-11 09:36:11 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=3f614f431475e1bf3bb3bbeac59b0681309628b7

author	Mike Kaganski <mike.kaganski@collabora.com>	2017-12-01 15:25:56 +0300
committer	Eike Rathke <erack@redhat.com>	2017-12-11 23:29:26 +0100
commit 3f614f431475e1bf3bb3bbeac59b0681309628b7 (patch)
tree 104fc56d968dd51802b658d97775c02e06424524
parent 7d202623b007979d9d0f93f6cd62c3c031d6d1d4 (diff)
tdf#95295: don't add duplicate conditional formats

Bisected with: bibisect-linux64-6.1

Adding Cc: to Mike Kaganski
Comment 2 Xisco Faulí 2021-02-11 09:38:20 UTC
@Eike, I thought you might be interested in this issue
Comment 3 QA Administrators 2023-02-12 03:21:05 UTC Comment hidden (obsolete)
Comment 4 Mike Kaganski 2024-01-15 10:08:31 UTC
Created attachment 191945 [details]
A simplified document

This is basically just a manifestation of a *previous* issue: open the attachment from this comment ( which is just a simplified attachment 128858 [details], but with the *single* conditional formatting range over A2:B3, as opposed to separate ranges in the older file ) in LO as old as 4.0; and delete row 2. Observe how the conditional formatting range is now broken.

Of course, the fact that undo does not restore the true initial status (i.e., it merges the restored ranges, as if they are added anew) is an own bug - let us track it here. But please consider the bug with the attachment that I post here as a separate bug.
Comment 5 Mike Kaganski 2024-01-15 11:27:03 UTC
https://gerrit.libreoffice.org/c/core/+/162084

As said, this only addresses the true regression here. The *old* underlying problem discovered here needs an own report.
Comment 6 Commit Notification 2024-01-15 13:08:24 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/96493091a80fb01c33ea9153b737fdc554de61f0

tdf#140330: do not deduplicate conditional formatting in undo context

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2024-01-16 08:30:38 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/e7285c5e520a35d34bce66fd1fe5bcd7771f9978

tdf#140330: do not deduplicate conditional formatting in undo context

It will be available in 24.2.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2024-01-16 21:02:12 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e4755087cad159f8a3f628789256a4faa90a76bf

tdf#140330: sc_uicalc: Add unittest

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Xisco Faulí 2024-01-17 15:15:08 UTC
(In reply to Mike Kaganski from comment #5)
> https://gerrit.libreoffice.org/c/core/+/162084
> 
> As said, this only addresses the true regression here. The *old* underlying
> problem discovered here needs an own report.

Done -> bug 159245