Bug 123242 - Reverting changes made with Undo is leading to inconsistent results.
Summary: Reverting changes made with Undo is leading to inconsistent results.
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.7.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Undo-Redo
  Show dependency treegraph
 
Reported: 2019-02-07 21:53 UTC by Richard
Modified: 2021-02-10 11:48 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Described File (18.96 KB, application/vnd.oasis.opendocument.text)
2019-02-07 21:54 UTC, Richard
Details
Original DOCX file. (30.59 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-01-28 10:12 UTC, Richard
Details
Screen capture of the bug occuring (705.02 KB, video/webm)
2021-02-09 12:16 UTC, Richard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard 2019-02-07 21:53:28 UTC
Description:
When opening the attached file and deleting the first two paragraphs, at the the initial cursor location, it will move the rest of the document upwards as expected.

However, when reverting these deletions with Undo, the rest of the document will end up on the next page, rather than in the middle of the first one, where it was initially.

Steps to Reproduce:
1.
Open attached document.
2.
At the initial cursor position, hit delete twice, removing the paragraphs.
I suggest enabling formatting marks for this.
3.
Revert those two deletions with Undo.

Actual Results:
The rest of the document below the cursor position will end up on the second page.

Expected Results:
Returned to the same state as when the document was opened. Leaving the rest of the document back on the first page.


Reproducible: Always


User Profile Reset: No



Additional Info:
This document was initially a Microsoft Word OOXML document, saved with Word 2016, likely initially created in Word 2003.

When using the original OOXML file in Word, there isn't as much white space between the Quotation header and the table that starts with Attention. I'll file another bug for this issue.
Comment 1 Richard 2019-02-07 21:54:18 UTC
Created attachment 149000 [details]
Described File
Comment 2 Dieter 2019-02-08 09:48:05 UTC
I confirm and with

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 411f3a050ac2be598019d512f8ccfe041080c28f
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-01-14_03:17:11
Locale: en-US (de_DE); UI-Language: en-US
Calc: threaded

and with

Version: 5.4.7.2 (x64)
Build-ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU-Threads: 4; BS: Windows 6.19; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: CL
Comment 3 Dieter 2021-01-28 07:23:52 UTC
Tested again with

Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

nothing happens, if I delete twice

Richard, is it possible for you to add the original docx-file?
=> NEEDINFO
Comment 4 Richard 2021-01-28 10:10:36 UTC
Hi Dieter,

That's interesting as I'm still able to repeat it with 7.0.4.2 myself. My full version information is;

Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 4; OS: Linux 5.6; UI render: default; VCL: gtk3
Locale: en-NZ (en_GB.UTF-8); UI: en-US
Ubuntu package version: 1:7.0.4_rc2-0ubuntu0.18.04.2
Calc: threaded

I uploaded the original DOCX file for the bug after this one, #123243, for another issue which has since been resolved. I'll upload it here as well.

In that version, you can press delete twice from the initial cursor position, the top of the document. It should remove the top Quotation header and reverting with Undo will trigger the bug.
Comment 5 Richard 2021-01-28 10:12:32 UTC
Created attachment 169221 [details]
Original DOCX file.
Comment 6 QA Administrators 2021-01-29 04:23:17 UTC Comment hidden (obsolete)
Comment 7 Dieter 2021-02-04 13:13:56 UTC
Tested with

Version: 7.1.0.3 (x64) / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

and with original docx-file

I can't reproduce the problem (document has one page after deleting and undo). Same result, if I save document as odt-file.

Richard, can you retest with 7.1.0.3?
=> NEEDINFO
Comment 8 Richard 2021-02-09 12:15:40 UTC
Just tried it on 7.1.0.3.

Version: 7.1.0.3 (x64) / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-NZ (en_NZ); UI: en-GB
Calc: CL

With this version, the original DOCX file has no problems, however I'm still able to repeat it with the ODT file.

Very strange as we both appear to now be using the exact same build. I'll upload a screen cast showing exactly what I'm doing with the key presses.
Comment 9 Richard 2021-02-09 12:16:59 UTC
Created attachment 169615 [details]
Screen capture of the bug occuring
Comment 10 Dieter 2021-02-09 19:02:16 UTC
(In reply to Richard from comment #8)
> With this version, the original DOCX file has no problems, however I'm still
> able to repeat it with the ODT file.

Is it odt-file from comment 1 or odt file, that you save from docx-file with the actual version of LO?
Comment 11 Richard 2021-02-09 23:06:53 UTC
It's the file from comment 1.
Comment 12 QA Administrators 2021-02-10 04:12:12 UTC Comment hidden (obsolete)
Comment 13 Dieter 2021-02-10 08:04:00 UTC
(In reply to Richard from comment #11)
> It's the file from comment 1.

But that file has been created with an old version of LO. Could you please save original docx-file from comment 5 as odt-file and retest?
=> NEEDINFO
Comment 14 Richard 2021-02-10 10:06:05 UTC
If I save the DOCX file as ODT and open that, I'm unable to repeat the bug.

Right now, the bug only resides in the original ODT file.
Comment 15 Dieter 2021-02-10 10:36:31 UTC
(In reply to Richard from comment #14)
> Right now, the bug only resides in the original ODT file.
We won't change this, because it has been created with an old version of LO. So let's close this bug.

=> ESOLVED WORKSFORME
Comment 16 Richard 2021-02-10 11:02:39 UTC
I can't say that I agree with this and not sure why the original DOCX file needed to be involved. I'm not sure if it was wise to mention it on my initial report.

Looking at this from a low-level, you would expect Undo to revert changes back to their original former state. This is beyond file formats and if I copy the document's contents over a new unsaved file, the issue repeats there as well.

I can also save this file as a new ODT in 7.1.0.3 and the bug remains.
Comment 17 Dieter 2021-02-10 11:48:17 UTC
(In reply to Richard from comment #16)
> I can't say that I agree with this and not sure why the original DOCX file
> needed to be involved. I'm not sure if it was wise to mention it on my
> initial report.

The point is, that the problem is related to a file, that has been created with a version, that won't have further development. So I guess that no developer will take this problem an tries to investigate, what has happened in that old version. And since the problem is related to a single file from an old version it's not a general general and actual problem.