Bug 155737 - EDITING a cell: can't undo back to overwritten contents
Summary: EDITING a cell: can't undo back to overwritten contents
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Undo-Redo
  Show dependency treegraph
 
Reported: 2023-06-08 13:15 UTC by Charles Dobie
Modified: 2023-06-16 09:21 UTC (History)
2 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 Charles Dobie 2023-06-08 13:15:02 UTC
The problem I found is in LibreOffice Calc

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL:
win
Locale: en-CA (en_CA); UI: en-US
Calc: threaded

I've been transcribing a census listing into a spreadsheet. There are no formulas, and I've entered all numbers (ages, etc.) as text -- eg.'25 -- so they will sort alphabetically.

When I type over text which was previously in a cell and try to use
'Control-Z' to undo, the contents of the cell are erased permanently rather than
replaced with the previous contents.

Thanks,
Charles Dobie
cdobie@superaje.com
Comment 1 Eike Rathke 2023-06-08 14:00:25 UTC
Because overtyping clears the cell and in the fresh cell enters new content, which Undo only leads to the fresh cell again.
Either hit Esc to abort editing, or confirm new content with Enter and then hit Ctrl+Z
Or start editing with placing the cell into edit mode first (F2), then you can use in-cell Undo.

Confirming, but I doubt this will get changed.
Comment 2 Stéphane Guillou (stragu) 2023-06-14 16:48:31 UTC
This has been the case since OOo 3.3, so marking as inherited.

Editing a cell has its own undo stack, and exiting edit mode will take that whole stack as one single change.

- Office.com and Google Sheets do the same as LO
- OnlyOffice can undo back to the overwritten contents (what OP wants)
- Gnumeric doesn't have an "in-cell" undo stack

Design team, should "Select cell > Type" give access to the same undo stack as "Edit mode > Select all > Type"?
I think that could make things more consistent.
Comment 3 Heiko Tietze 2023-06-16 09:21:31 UTC
(In reply to Stéphane Guillou (stragu) from comment #2)
> "Edit mode > Select all > Type"?

F2 + type wont delete content but add at the end. In most situations you want to replace the cell content with what you type. Which makes the first in-cell undo step clearing the content.

Ultimately it's not a big deal I guess. You press enter/escape anyway, which either returns to the original value (esc) or allows to undo. => NAB