Bug 156689 - Deleting empty column(s) removes styling / formatting of adjacent column
Summary: Deleting empty column(s) removes styling / formatting of adjacent column
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 157188 157525 (view as bug list)
Depends on:
Blocks: Calc-Styles Cell-Management
  Show dependency treegraph
 
Reported: 2023-08-09 03:52 UTC by Saburo
Modified: 2023-10-16 14:44 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Condition Format test file (9.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-09-19 07:22 UTC, Saburo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Saburo 2023-08-09 03:52:54 UTC
Description:
Deleting columns to the right of the rightmost column in a used cell range can revert the style of the rightmost column.

Steps to Reproduce:
1.Enter "aaa" in cell A1
2.Set a style to cell A1 (e.g. Heading 1)
3.delete column B

Actual Results:
Column A has been unstyled

Expected Results:
Don't undo the style of the irrelevant column A .


Reproducible: Sometimes


User Profile Reset: No

Additional Info:
Sometimes it doesn't happen when you insert a column

Deleting multiple columns may remove styles for columns other than the rightmost column


Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded
Comment 1 ady 2023-08-09 04:34:01 UTC
I can confirm.

Additionally, after the STR from comment 0, I add some steps to show how this is some quirk:

1. Enter "aaa" in cell A1
2. Set a style to cell/column A1 (e.g. Heading 1)
3. Delete column B (note: this is to the right side of the right-most column)

As pointed, the style in A1 is no longer there.

4. Undo all the 3 actions ([CTRL]+[Z] times 3)
5. Redo all the 3 actions ([CTRL]+[Y] times 3)

Now the style _is_ still applied.

Please also note that the following slightly different steps do not show the problem:

1. Enter "aaa" in cell A1
2. Set a style to cell/column A1 (e.g. Heading 1)

3. Cell C1: 1

4. Delete column B (note: this is to the _left_ side of the right-most column; i.e. some middle column).
Comment 2 Saburo 2023-08-13 02:00:12 UTC
I confirmed that not only styles but also conditional formatting disappear

Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded
Comment 3 m_a_riosv 2023-09-11 14:54:09 UTC
*** Bug 157188 has been marked as a duplicate of this bug. ***
Comment 4 Kira Tubo 2023-09-19 04:59:50 UTC
Able to reproduce original report with styles using daily master build. Unable to reproduce with conditional formatting from Comment 2. 

Not reproducible using v. 3.3, therefore it is a regression. 

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 36163d269bd8f77a86605e4c5ff5adce17b4c66c
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 5 Kira Tubo 2023-09-19 05:31:40 UTC
Bibisected win64-7.5. Added Czeber László Ádám to cc. 

Regression occurring at:
https://git.libreoffice.org/core/+/93c6fdc58d577d059968a71ae08b80096f73ef1a


commit 93c6fdc58d577d059968a71ae08b80096f73ef1a	[log]
author	Czeber László Ádám <czeber.laszloadam@nisz.hu>	Thu Jun 08 14:55:34 2023 +0200
committer	Xisco Fauli <xiscofauli@libreoffice.org>	Tue Jun 27 22:36:53 2023 +0200
tree 9f3c8663de60cfc4f9a84221db3be69a7b1f581c
parent 8ad80d1f07cd2f8c483ef2f8678eee0b147e5b43 [diff]


commit 9432d97af3772794a63f9c4a28a04ea0b6668d7e
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Tue Jun 27 14:16:17 2023 -0700

    source 93c6fdc58d577d059968a71ae08b80096f73ef1a
Comment 6 Saburo 2023-09-19 07:22:22 UTC
Created attachment 189692 [details]
Condition Format test file

1.Test file Open
2.Delete culumns("B")

The conditional formatting settings remain, but the background color and text decorations are removed.
The background and text decorations will not be restored unless you reopen the file or edit the conditional formatting.

I think this is a different issue than the original bug.
Comment 7 Kira Tubo 2023-10-06 20:10:21 UTC
(In reply to Saburo from comment #6)
> Created attachment 189692 [details]
> Condition Format test file
> 
> 1.Test file Open
> 2.Delete culumns("B")
> 
> The conditional formatting settings remain, but the background color and
> text decorations are removed.
> The background and text decorations will not be restored unless you reopen
> the file or edit the conditional formatting.
> 
> I think this is a different issue than the original bug.

Thanks for the sample document @Saburo. Actually, it seems I am able to reproduce this, but only if I scroll down after step 2. So steps for me are:

1. Open test file attachment 189692 [details]
2. Delete columns("B")
3. Scroll down until cells containing data are no longer visible
4. Scroll back up to cells containing data

It looks like this issue also starts at the same commit from the bibisect I did on Comment 5, so I am inclined to think that it is actually part of the same issue. Let's keep it as part of the same bug report for now.
Comment 8 BogdanB 2023-10-07 08:44:29 UTC
I use at work 7.6.2 and this bug it's annoying. I have many formatted cells from documents I receive, and when I delete some columns after that formatted columns, the formatted is lost. So I need to undo, and delete what I need more carefully.
Comment 9 Stéphane Guillou (stragu) 2023-10-16 14:38:50 UTC
*** Bug 157525 has been marked as a duplicate of this bug. ***