Bug 159520 - Undo of Find and Replace (Change a number with a time value) does not work.
Summary: Undo of Find and Replace (Change a number with a time value) does not work.
Status: RESOLVED DUPLICATE of bug 38982
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-02 07:07 UTC by Utku B.
Modified: 2024-02-16 14:23 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
For bug reproducion. (13.59 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-02-02 07:08 UTC, Utku B.
Details
Steps to reproduce bug with images (211.20 KB, application/pdf)
2024-02-02 07:11 UTC, Utku B.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Utku B. 2024-02-02 07:07:46 UTC
Description:
I used find and replace dilog for finding a number and change with a time value. When i clicked undo, the cells with time replaced with 00:00:00 but not previous number.

Steps to Reproduce:
1. Open Sample File.ods
2. Open find and replace dialog
3. Find a number such as “1” and replace with a time such as "10:00"
4. Undo
5. When click undo, the cells undo to 00:00:00 but not “1”.

Actual Results:
5. When click undo, the cells undo to 00:00:00 but not “1”.

Expected Results:
5. When click undo, the cells undo to previous value and format.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
I will send a sample file for bugs reproducion.
Comment 1 Utku B. 2024-02-02 07:08:12 UTC
Created attachment 192337 [details]
For bug reproducion.
Comment 2 Utku B. 2024-02-02 07:11:05 UTC
Created attachment 192338 [details]
Steps to reproduce bug with images
Comment 3 Utku B. 2024-02-02 07:18:18 UTC
This bug is similar to Bug 38982 but i can't say it is a duplicate.
Comment 4 Werner Tietz 2024-02-02 11:20:36 UTC
Unfortunatly it does not »undo« the implizit Formatting!

Select Column A and do →→RightClick→→Clear Direct Formatting
Comment 5 Utku B. 2024-02-02 11:55:53 UTC
I understand, thank you. 

But is this a right behavior for undo? I am not an expert but also i am not a novice or beginner. Is this a bug or  am i missing something?
Comment 6 ady 2024-02-02 12:51:43 UTC
As a simple user, I see this as a bug, just as bug 38982. I'll leave someone else to decide whether to mark as duplicate or new (or anything else).

This is indeed about implicit automatic formatting not taking part of the list of actions, therefore the implicit formatting is not part of the undo actions.

For instance, 

1. In an empty new spreadsheet, introduce the numeric value 1 in cell A1, [ENTER].
2. F&R 1 with 10:00.

... if you undo enough steps and then redo (but without redoing the find & replace action), then the same value (1) is re-introduced, so the implicit automatic formatting changes the format from the prior "time" to "general", displaying again the original number 1.

The list of actions go from "input" to "replace" (no "format" is listed, to be part of the undo actions). That is _not_ to say that the solution is to have the format action included in the list, because maybe that would cause some unintentional consequences(?). It is up to devs to evaluate what exactly would improve the situation, if anything.
Comment 7 Buovjaga 2024-02-16 14:23:17 UTC

*** This bug has been marked as a duplicate of bug 38982 ***