Bug 131430 - The format in (all) cells of a spreadsheet is deleted when undoing the Replace All command in combination with Cell Styles.
Summary: The format in (all) cells of a spreadsheet is deleted when undoing the Replac...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Undo-Redo Find&Replace-Styles
  Show dependency treegraph
 
Reported: 2020-03-20 00:27 UTC by Jürgen Kirsten
Modified: 2024-04-19 17:04 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example document to reproduce the bug. (13.16 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-03-20 00:30 UTC, Jürgen Kirsten
Details
New Excample Document (15.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-10-22 10:49 UTC, Jürgen Kirsten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Kirsten 2020-03-20 00:27:18 UTC
Description:
When you use the "Undo" command in a spreadsheet, if you have previously used the Find & Replace command in conjunction with Format, all formats in all cells of the current spreadsheet will be deleted.
If you only use the simple "Replace" command, the problem does not exist. Only when using the "Replace All" command the problem appears.


Steps to Reproduce:
In the attached document, you have to use the Find & Replace command (Ctrl+H). Please activate Format and use "Accent 1" for Find and a format of your choice for Replace. Then click on "Replace all".  You will probably have to click it twice, because Calc only replaces when the cell is selected. But this is a different bug! After the format has been replaced please close the dialog. Now use the Undo command.  

Actual Results:
The format in cell D3 is actually reset to the original format "Accent 1". But all cells in the spreadsheet lose their format.

Expected Results:
The format in cell D3 is actually reset to the original format "Accent 1".


Reproducible: Always


User Profile Reset: No



Additional Info:
See also Bug 112275 - Find & Replace all for cell styles in empty cells shows an empty results window.
Comment 1 Jürgen Kirsten 2020-03-20 00:30:18 UTC
Created attachment 158826 [details]
Example document to reproduce the bug.
Comment 2 Buovjaga 2020-06-19 12:43:13 UTC
(In reply to Jürgen Kirsten from comment #0)
> Steps to Reproduce:
> In the attached document, you have to use the Find & Replace command
> (Ctrl+H). Please activate Format and use "Accent 1" for Find and a format of
> your choice for Replace. Then click on "Replace all".  You will probably
> have to click it twice, because Calc only replaces when the cell is
> selected. But this is a different bug! After the format has been replaced
> please close the dialog. Now use the Undo command.  

Corrections: tick "Cell Styles", find "Accent 3".

Reproduced all the way back to 3.3.0.

Arch Linux 64-bit
Version: 7.1.0.0.alpha0+
Build ID: ad0351b84926075297fb74abbe9b31a0455782af
CPU threads: 8; OS: Linux 5.7; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 17 June 2020
Comment 3 QA Administrators 2022-06-20 03:26:44 UTC Comment hidden (obsolete)
Comment 4 Jürgen Kirsten 2022-10-22 10:46:42 UTC
The bug was tested again under the latest LibreOffice version.

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Windows 10.0 Build 22000; UI render: Skia/Raster; VCL: win
Locale: en-GB (de_DE); UI: en-GB
Calc: threaded

The error continues to happen. However, a few small changes / Updates are still necessary. I have also renewed the attachment. I have added additional cell styles to see the effect.

Description:
When you use the "Undo" command in a spreadsheet, if you have previously used the Find & Replace command in conjunction with Format (in newer LO versions: "Cell Styles"), all direct formats in all cells of the current spreadsheet will be deleted and other Cell Styles are reset to "Default" style.
If you only use the simple "Replace" command, the problem does not exist. Only when using the "Replace All" command the problem appears.


Steps to Reproduce:
In the attached document, you have to use the Find & Replace command (Ctrl+H). Please activate "Cell Styles" (in older LO versions: "Format" and use "Accent 3" for Find and a format of your choice for Replace. Then click on "Replace all".  You must click it twice regardless of whether you have already searched for the style with FIND or are already in the cell anyway. But this is a different bug! After the format has been replaced please close the dialog. Now use the Undo command.  

Actual Results:
The format in cell D3 is actually reset to the original format "Accent 3". But all cells in the spreadsheet lose their format (Direct Formatting and Cell Style Formatting.

Expected Results:
The format in cell D3 is actually reset to the original format "Accent 3". Nothing else.

Reproducible: Always


User Profile Reset: No
Comment 5 Jürgen Kirsten 2022-10-22 10:49:32 UTC
Created attachment 183201 [details]
New Excample Document
Comment 6 Jürgen Kirsten 2024-04-19 17:04:21 UTC
The bug still occurs in version:

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded