Bug 153644 - Calc: Undo doesn't remove cell's borders
Summary: Calc: Undo doesn't remove cell's borders
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.0.0 beta1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 154066 (view as bug list)
Depends on:
Blocks: Undo-Redo Regressions-1024plus-Columns
  Show dependency treegraph
 
Reported: 2023-02-15 15:47 UTC by Timur
Modified: 2023-12-17 19:10 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 Timur 2023-02-15 15:47:15 UTC
Open a new calc sheet
Mark some cells
Apply borders to the cells: Outer Border and All Inner
Undo to remove the borders
Wrong behavior: Borders are not removed

Repro in 7.6+. Regression from 7.4 in bug 149213:
commit 970ff17f47731be788ec34c0c8ddf3fb2c24ceac	[log]
author	Luboš Luňák <l.lunak@collabora.com>	May 30 2022
committer	Luboš Luňák <l.lunak@collabora.com>	May 30 2022 

Luboš, please see. Also affected Online. T40584.
Comment 1 Timur 2023-02-15 15:51:31 UTC
As for existing sheet with content, I could reproduce sometimes but not always, maybe depending on the content or if clicked outside the table before Undo. 
That should be also tested. 

There's another Undo problem, but not from the referenced commit as it was reproducible also before (to be tested separately):
Open a new calc sheet
Mark some cells
Apply borders to the cells: Criss-Cross Border
Undo to remove the borders
Wrong behavior: Borders are half removed (slashed)
Comment 2 Telesto 2023-02-15 20:44:41 UTC
Confirm
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 37e3455a13ab5741104bf41d05a80e60a4612682
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 3 ady 2023-02-16 06:22:54 UTC
(In reply to Timur from comment #1)
> As for existing sheet with content, I could reproduce sometimes but not
> always, maybe depending on the content or if clicked outside the table
> before Undo. 
> That should be also tested. 

I have the same exact behavior. It is not exactly in each and every situation, but I wasn't able to determine in which case(s) it doesn't happen.

What I _can_ say is that when I undo, the relevant cell(s) look as if they were "selected", while the focus is still elsewhere (but this is probably not a surprise):

1. Click once on one cell.
2. Apply one outer border combination (it doesn't have to be all the 4 sides).
3. Click on some other cell.
4. [CTRL]+[Z]
5. Note that the border is still on, the cell looks as if it was "selected", while the focus is on the second cell (as demonstrated by the cell address shown on the top-left box between column A and row 1).

> 
> There's another Undo problem, but not from the referenced commit as it was
> reproducible also before (to be tested separately):
> Open a new calc sheet
> Mark some cells
> Apply borders to the cells: Criss-Cross Border
> Undo to remove the borders
> Wrong behavior: Borders are half removed (slashed)

In the case of diagonal lines, it varies depending on how many cells I select to apply the border attribute. For one cell only, I can apply both diagonal borders at _once_, and then undo _twice_ (yes, 2 actions are available), effectively going back to the status before applying both diagonal lines. But when the lines are applied simultaneously to several cells (also at once), the first undo works whereas the second doesn't – it is available, but it doesn't undo the "second" diagonal.
Comment 4 Stéphane Guillou (stragu) 2023-06-13 22:37:19 UTC
*** Bug 154066 has been marked as a duplicate of this bug. ***