Bug 163193 - Conditional Formatting corruption when duplicating sheets
Summary: Conditional Formatting corruption when duplicating sheets
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.2.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2024-09-28 14:30 UTC by Francisco Manuel Pavón Fernández
Modified: 2024-09-30 17:08 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Original sheet (96.67 KB, image/png)
2024-09-28 14:35 UTC, Francisco Manuel Pavón Fernández
Details
Duplicated sheet (Right click on original sheet > Duplicate sheet) (93.91 KB, image/png)
2024-09-28 14:36 UTC, Francisco Manuel Pavón Fernández
Details
Sample file (9.82 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-09-29 07:11 UTC, Francisco Manuel Pavón Fernández
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francisco Manuel Pavón Fernández 2024-09-28 14:30:44 UTC
Description:
When duplicating sheets, or when coping the full contents of a sheet into another one, the conditional formattings get corrupted.

Steps to Reproduce:
1. Create 3 conditional formattings, colour scale with default values, one for column A, other for column B and a last one for column C.
2. Right click sheet and select "Duplicate Sheet"

Actual Results:
The new sheet doesn't maintain the conditional formattings properly and only has one conditional formatting. When going to Conditional > Manage in the new sheet we see one conditional formatting:

- A1:C1048576

Expected Results:
The new sheet should maintain the 3 different conditional formattings as in the original sheet. When going to Conditional > Manage we should see 3 conditional formattings:

- Range A1:A1048576
- Range B1:B1048576
- Range C1:C1048576


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: en-IE (en_IE); UI: en-GB
Calc: CL threaded
Comment 1 Francisco Manuel Pavón Fernández 2024-09-28 14:35:34 UTC
Created attachment 196764 [details]
Original sheet
Comment 2 Francisco Manuel Pavón Fernández 2024-09-28 14:36:23 UTC
Created attachment 196765 [details]
Duplicated sheet (Right click on original sheet > Duplicate sheet)
Comment 3 m_a_riosv 2024-09-28 23:39:06 UTC
Please attach a sample file, reduce the size as much as possible without private information.
Comment 4 Francisco Manuel Pavón Fernández 2024-09-29 07:11:08 UTC
Created attachment 196777 [details]
Sample file
Comment 5 Francisco Manuel Pavón Fernández 2024-09-29 07:17:18 UTC
Sample file attached, issue can be replicated duplicating Sheet1. Sheet1_2 is a duplication of Sheet1 where the issue is present.

I have tested and this issue happens in two of my machines, one running Windows 11 and LibreOffice 24.8.2.1 and other running Fedora 40 and LibreOffice 24.2.2.1.
Comment 6 ady 2024-09-29 13:03:35 UTC
This happens because of the forced imposed unification of CF, which not always is desired, and sometimes the result is not equivalent to the original multiple CF conditions (as in this case).

The unification of CF should not be forced, but manual. The user, when interested, should be able to select specific lines of the CF manager, and then press some button in the UI in order to attempt to unify several CFs. If a possible (partial) unification can happen on the previously-selected CF lines/rules, only then such unification should be applied (and when the selected CF lines cannot be unified, then the specific lines that cannot be unified should remain as-is).

IOW, the unification should not be automatic and forced, but manually selected by the interested user. The current unification algorithm might remain the same (at least as a first approach), and users won't be forced to delete and rebuild the whole CF anew. The user would have control, instead of getting the unintended result (and having to rebuild it/them by hand).
Comment 7 m_a_riosv 2024-09-29 20:36:29 UTC
@Ady, agree, but a better description in title could help to get it solved.
Comment 8 ady 2024-09-30 17:08:24 UTC
(In reply to m_a_riosv from comment #7)
> a better description in title could help to get it solved.

As a bug report, the Summary seems at least accurate.

As a request (for enhancement) to actually solve the problem (not just for this case) by transforming the forced automatic unification to a manual unification of CF on selected CF items, probably Heiko and relevant devs should rather propose a more adequate Summary, depending on how they plan to solve the problem.