Bug 80188 - Undo after Cut/Paste does not restore original cell contents
Summary: Undo after Cut/Paste does not restore original cell contents
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Undo-Redo
  Show dependency treegraph
 
Reported: 2014-06-18 14:08 UTC by jlc
Modified: 2023-06-16 09:25 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
attachment-6751-0.html (3.56 KB, text/html)
2014-06-21 09:01 UTC, jlc
Details
attachment-6751-1.dat (1 bytes, multipart/alternative)
2014-06-21 09:01 UTC, jlc
Details
Capture du 2014-06-21 10:49:14.png (261.68 KB, image/png)
2014-06-21 09:01 UTC, jlc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jlc 2014-06-18 14:08:32 UTC
Hi

1 - I write "azerty" in A1 (in LibreOfficeCalc)
2 - I cut A1 and I paste in A3
3 - If I do "CTRL Z" : A1 and A3 are empty !
4 - I have to do "CTRL" Z a second time for retriving "azerty" in A1

I think that "cleaning a move" is "cleaning a move" and not "half a move".

Greatings
==
JLC
Comment 1 Robinson Tryon (qubit) 2014-06-20 20:03:08 UTC
(In reply to comment #0)
> Hi
> 
> 1 - I write "azerty" in A1 (in LibreOfficeCalc)
> 2 - I cut A1 and I paste in A3
> 3 - If I do "CTRL Z" : A1 and A3 are empty !
> 4 - I have to do "CTRL" Z a second time for retriving "azerty" in A1

Behavior confirmed on Ubutu 12.04.4
LO Version: 4.4.0.0.alpha0+
Build ID: fc49c052dbdbb5ab3b0a02a13143705f769b9662
 
> I think that "cleaning a move" is "cleaning a move" and not "half a move".
> 

Good question.

I tried the same test with Gnumeric Spreadsheet 1.10.17 and current Google Docs 'Sheets' application, and got the results you expected (after the Undo operation, A3 was empty and A1 was restored to 'azerty'). So the LibreOffice behavior appears to be unique.

Do you happen to have access to MS-Office? What's the behavior there?

Interestingly, a very similar bug 50843 (relating to COPY-paste, then Undo) was reported/fixed a while ago. Too bad they didn't try CUT-and-paste!
Comment 2 Robinson Tryon (qubit) 2014-06-20 20:04:53 UTC Comment hidden (obsolete)
Comment 3 Yousuf Philips (jay) (retired) 2014-06-20 20:24:31 UTC
(In reply to comment #1)
> Do you happen to have access to MS-Office? What's the behavior there?

MS-Office has it as a single undo. When seeing it, i see it doesnt actually cut the contents from the cell until you paste it, so it acts similar to copy.
Comment 4 ign_christian 2014-06-21 07:10:51 UTC
Reproduced on Ubuntu 12.04 x86 with:
- LO 4.2.5.2, 4.0.6.2, 3.5.7.2
- AOO 4.1.0

So LO, like AOO, thinks that 2 operations (cut & paste) must be restored to original position with double (2) undo.

But Kingsoft 9 only needs single undo, just like MSO as Jay observed
Comment 5 jlc 2014-06-21 09:01:53 UTC
Created attachment 101472 [details]
attachment-6751-0.html

Hi
1 - With Excel 2002 (10.6871.6870) SP3 "cut-paste" is restored with only 
one "undo"
2 - As you can see on the sceenshoot *Capture du 2014-06-21 
10:49:14.png* the first "CTRL Z" is "Annuler:déplacer" (i.e. 
"Undo:move"). It should be "Undo:paste".
If "Undo:move" appear in the menu, you have to undo move
At this time, "Undo:paste" should be write in place of "Undo:move"
Greatings
==
JLC






Le 21/06/2014 09:10, bugzilla-daemon@freedesktop.org a écrit :
> ign_christian <mailto:ign_christian@yahoo.com> changed bug 80188 
> <https://bugs.freedesktop.org/show_bug.cgi?id=80188>
> What 	Removed 	Added
> See Also 		https://bugs.freedesktop.org/show_bug.cgi?id=65217, 
> https://bugs.freedesktop.org/show_bug.cgi?id=74264
> Version 	4.2.3.3 release 	3.5.7.2 release
>
> *Comment # 4 <https://bugs.freedesktop.org/show_bug.cgi?id=80188#c4> 
> on bug 80188 <https://bugs.freedesktop.org/show_bug.cgi?id=80188> from 
> ign_christian <mailto:ign_christian@yahoo.com> *
> Reproduced on Ubuntu 12.04 x86 with:
> - LO 4.2.5.2, 4.0.6.2, 3.5.7.2
> - AOO 4.1.0
>
> So LO, like AOO, thinks that 2 operations (cut & paste) must be restored to
> original position with double (2) undo.
>
> But Kingsoft 9 only needs single undo, just like MSO as Jay observed
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 6 jlc 2014-06-21 09:01:53 UTC
Created attachment 101473 [details]
attachment-6751-1.dat
Comment 7 jlc 2014-06-21 09:01:53 UTC
Created attachment 101474 [details]
Capture du 2014-06-21 10:49:14.png
Comment 8 QA Administrators 2015-07-18 17:43:18 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2015-10-17 13:37:32 UTC
Still repro.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 186f32f63434e16ff5776251657f902d5808ed3d
TinderBox: Win-x86@39, Branch:master, Time: 2015-10-16_09:42:47
Locale: en-US (fi_FI)
Comment 10 QA Administrators 2016-11-08 11:27:15 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2019-12-03 14:16:36 UTC Comment hidden (obsolete)
Comment 12 Mike 2020-06-07 16:25:06 UTC
repro

Version: 7.0.0.0.beta1 (x64)
Build ID: 94f789cbb33335b4a511c319542c7bdc31ff3b3c
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-US
Calc: threaded
Comment 13 LeroyG 2020-07-03 16:35:40 UTC
It seem to me not a bug. If you cut and then paste, there are two different actions. Then you will need to undo twice.
If you drag, that is a single action.
Comment 14 QA Administrators 2022-07-04 03:28:27 UTC Comment hidden (obsolete)
Comment 15 Stéphane Guillou (stragu) 2023-06-14 15:40:58 UTC
Same in OOo 3.3, so behaviour is inherited.

Same in recent master build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ec60d354359067f8c5c686ef2239ee705916de43
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

However I agree with Leroy that a cut and paste action is a two-step process, and that two undos are needed.
Imagine you paste at the wrong spot. I think being able to just undo the paste action is a plus when compared to other suites.

Office.com currently has the UI of greyed-out contents in cut cell until it is pasted, which does visually hint at it being considered a single action.

Design team, thoughts?
Comment 16 Heiko Tietze 2023-06-16 09:25:42 UTC
What if cut is (ab)used to delete content? It's clearly a two-step thing and NAB.