Bug 135220 - Different number of pages/ layout after CTRL+X undo
Summary: Different number of pages/ layout after CTRL+X undo
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.1 rc
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.4.0 target:7.3.3 target:7.2.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Undo-Redo
  Show dependency treegraph
 
Reported: 2020-07-28 11:25 UTC by Telesto
Modified: 2022-08-10 19:09 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (6.57 MB, application/vnd.oasis.opendocument.text)
2020-07-28 11:26 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-07-28 11:25:59 UTC
Description:
Different number of pages/ layout after CTRL+X undo

Steps to Reproduce:
1. Open the attached file
2. CTRL+A
3. CTRL+X
4. CTRL+Y

Actual Results:
413-416 pages at undo

Expected Results:
398 (worked fine in 6.0-6.4)


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-07-28 11:26:19 UTC
Created attachment 163685 [details]
Example file
Comment 2 Telesto 2020-07-28 11:27:29 UTC
For the record; save the file & reload you get 398 again
Comment 3 BogdanB 2020-09-18 20:38:36 UTC
Before: 398
After: 408
Reload: 398

Your step 4 should be: Ctrl+Z, not Ctrl+Y.
Comment 4 raal 2020-09-24 19:25:27 UTC
This seems to have begun at the below commit.
Adding Cc: to Michael Stahl; Could you possibly take a look at this one?
Thanks
 e10b27a4bccbf917348bd88fa19fe0352d4cc1b3 is the first bad commit
commit e10b27a4bccbf917348bd88fa19fe0352d4cc1b3
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Wed Apr 8 13:26:54 2020 +0200

    source 6c7245e789f973cf6dad03f7008ab3f9d12d350c

https://gerrit.libreoffice.org/c/core/+/91842
Comment 5 Gabor Kelemen (allotropia) 2022-02-14 23:52:46 UTC
I can not reproduce this in 7.1 after 

https://git.libreoffice.org/core/+/810f7e4e0b61ee7cb3a7d6a1b503782d7248a4b1

 810f7e4e0b61ee7cb3a7d6a1b503782d7248a4b1	[log]
author	Michael Stahl <michael.stahl@allotropia.de>	Tue Apr 13 20:13:51 2021 +0200
committer	Thorsten Behrens <thorsten.behrens@allotropia.de>	Fri Apr 23 17:03:13 2021 +0200

sw: layout: if fly's anchor moves forward, move fly off SwPageFrame

Number of pages is 398 at this commit. Since this another bit of change happened and in 7.1-bibisect master and newer the number of pages becomes 397.
This is because the "Image 77" objects caption frame on page 7 becomes invisible and allows more text to the previous page, after:

https://git.libreoffice.org/core/+/8feac9601cfe35ee0966776bab15d122206f154e

author	Michael Stahl <michael.stahl@allotropia.de>	Thu Apr 22 13:43:07 2021 +0200
committer	Thorsten Behrens <thorsten.behrens@allotropia.de>	Fri Apr 23 17:04:27 2021 +0200
tree 9057582bd87ab8c7161150c4089022261234a073
parent c79b92edfb5e650fff76688998cf4f0bbd08d2a4 [diff]

tdf#138518 sw: layout: avoid moving flys forward prematurely

Perhaps we can refocus this bug to the disappearing image (Figure 3: Hay Rake in Weeds) of page 7.
Comment 6 BogdanB 2022-02-15 18:41:09 UTC
Retested
Before: 398
After: 397
Reload: 398

Version: 7.2.5.2 / LibreOffice Community
Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 7 Commit Notification 2022-03-15 10:00:39 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d9e38d5830ac278d7180b96fb6cefe3ee8ef6d76

tdf#135220 sw: fix layout after SwUndoDelete

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Michael Stahl (allotropia) 2022-03-15 10:03:34 UTC
i got 397 pages, always.

fixed on master.
Comment 9 Commit Notification 2022-03-16 18:27:15 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/b28c49a7a54a7df5aa8e119202014350b3ba93b0

tdf#135220 sw: fix layout after SwUndoDelete

It will be available in 7.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2022-03-17 11:26:08 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/24a8c6d10bfe377631d980806a511e1aa00a2e16

tdf#135220 sw: fix layout after SwUndoDelete

It will be available in 7.2.7.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Gabor Kelemen (allotropia) 2022-08-10 19:09:06 UTC
Verified in 

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4e2ce2a460458f17ee4360c45a2da2fc4b4d753e
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

Page number is 398 after select all - cut - undo.