Bug 125310 - DOCX Change tracking: deleting paragraph end mark inserts a page break
Summary: DOCX Change tracking: deleting paragraph end mark inserts a page break
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.2.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Track-Changes
  Show dependency treegraph
 
Reported: 2019-05-15 13:50 UTC by NISZ LibreOffice Team
Modified: 2019-05-23 09:48 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example docx file from Word (17.22 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-05-15 13:50 UTC, NISZ LibreOffice Team
Details
Selecting the end of the first and the beginning of the second paragraph. (37.19 KB, image/png)
2019-05-15 13:51 UTC, NISZ LibreOffice Team
Details
Screenshot of the problem after deleting the selected text (59.44 KB, image/png)
2019-05-15 13:51 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-05-15 13:50:10 UTC
Description:
Attached docx file has two paragraphs and change tracking is enabled.
When deleting the end of the first paragraph and the beginning of the next one a page break gets inserted, and stays there upon rejecting the change.


Steps to Reproduce:
1.	Open attached file
2.	Select the last word of the first paragraph and the first word of the second
3.	Delete them


Actual Results:
The deletion places a page break between the two paragraphs. Rejecting the change does not remove the break.

Expected Results:
No page break appears.


Reproducible: Always


User Profile Reset: No



Additional Info:
Bibisect log:
# bad: [d60ae8383378fcecc7ab077670bf45208a214c71] source sha:e45c30858dec1dd705b9144fab981a3c8819ba96
# good: [b0a56ec98b1368cb5e3e531e0b3f69565af91609] source sha:3a801799536e6870f2fb111b1cc00b9575a35a39
git bisect start 'origin/master' 'oldest'
# good: [5180a3b7a5dc530ad7ec5bd6e5cefecf85beab7e] source sha:8bcc4a98d78869d6839821b9747602777f00ebaf
git bisect good 5180a3b7a5dc530ad7ec5bd6e5cefecf85beab7e
# bad: [1473ee9b216ec27c5410a08036aef0a4b857841c] source sha:93c817971d76ff5020d4210229896a35d357a371
git bisect bad 1473ee9b216ec27c5410a08036aef0a4b857841c
# bad: [0942649607862f8e681eeeb027ead35246eeee6f] source sha:d784612ff788f688eebb851c800228fc01c60470
git bisect bad 0942649607862f8e681eeeb027ead35246eeee6f
# bad: [f8b7df8260b2b21ea776ddda0480d4ecde928aeb] source sha:a9bcbd3dad16c69f1e7ebb52a30611150a49f298
git bisect bad f8b7df8260b2b21ea776ddda0480d4ecde928aeb
# good: [7f9fa743bc9ed65ad739fe9218babd841e0f22fb] source sha:d587931fba77246db3a2ccc6ab61ca77446d23f4
git bisect good 7f9fa743bc9ed65ad739fe9218babd841e0f22fb
# bad: [2a247c7ce197c493d83210a7bde10ea22e7b087f] source sha:c289c25523496f58b81e061cea82757c99e99957
git bisect bad 2a247c7ce197c493d83210a7bde10ea22e7b087f
# bad: [13bec79b498718da7842eee9fee5a75862531911] source sha:7d9e9ecd5bb5d5abec338c2ceb61ad623d2ac5cb
git bisect bad 13bec79b498718da7842eee9fee5a75862531911
# good: [47fd3cb82cff5cad29cbc68901fbd8e6ba5be120] source sha:5e8fd488f17fe0433cc9b31ace6527fb06ea3bb0
git bisect good 47fd3cb82cff5cad29cbc68901fbd8e6ba5be120
# bad: [0f98a5f177e9f9b5669dec6d78beac6e53be365f] source sha:c2139cafe6240991f88b85c1df12613d0ae0e821
git bisect bad 0f98a5f177e9f9b5669dec6d78beac6e53be365f
# bad: [27ec82c32f70ed6b024899d2c444edd9032117f6] source sha:1ddbf5c37a472c72b3b2be23381e18a9f1ad5823
git bisect bad 27ec82c32f70ed6b024899d2c444edd9032117f6
# bad: [a9af3e96e39e3c39e8078d5f8174f6c77b3964a9] source sha:1bbbe57dfc0b43d6b5444798d77dcdf5e4e76e49
git bisect bad a9af3e96e39e3c39e8078d5f8174f6c77b3964a9
# good: [0b703cb8213c1b5fe839bde3e9382eb51a7acea8] source sha:22639148ae5400bac98f32a75d7431b857c80195
git bisect good 0b703cb8213c1b5fe839bde3e9382eb51a7acea8
# first bad commit: [a9af3e96e39e3c39e8078d5f8174f6c77b3964a9] source sha:1bbbe57dfc0b43d6b5444798d77dcdf5e4e76e49
Comment 1 NISZ LibreOffice Team 2019-05-15 13:50:44 UTC
Created attachment 151435 [details]
Example docx file from Word
Comment 2 NISZ LibreOffice Team 2019-05-15 13:51:27 UTC
Created attachment 151436 [details]
Selecting the end of the first and the beginning of the second paragraph.
Comment 3 NISZ LibreOffice Team 2019-05-15 13:51:45 UTC
Created attachment 151437 [details]
Screenshot of the problem after deleting the selected text
Comment 4 Drew Jensen 2019-05-15 16:14:34 UTC
Confirmed with Ubuntu 18.14.01 and LO 6.3Alpha, 6.2.4

Note here - the anomaly only happens if you do the following:

1 - Delete the text.
2 - Use Manage Changes to reject that change, which adds a new entry in tracked changes for the rejection.
3 - Use Manage Changes to accept that rejection - boom anomaly happens

However:

If you delete the text, as described, and then from the Edit menu selected 'Reject all changes' the anomaly does not happen.
Comment 5 Gabor Kelemen (allotropia) 2019-05-16 07:19:16 UTC
Clickable commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=1bbbe57dfc0b43d6b5444798d77dcdf5e4e76e49

Adding CC to László Németh
Comment 6 László Németh 2019-05-17 12:33:09 UTC
Proposed fix: https://gerrit.libreoffice.org/#/c/72469/

Note: DOCX import always sets a master page, that is why the first paragraph of an imported document contains a page break=before setting. (It's equivalent of applying a page style in a new ODT document.)
Comment 7 Commit Notification 2019-05-20 07:25:43 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/b4d2131bc643a5f13e0367d4e43ae5603369ddf6%5E%21

tdf#125310 change tracking: don't copy page break

It will be available in 6.3.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 Commit Notification 2019-05-21 05:49:34 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/23c159d948af360baecfe243e1321987760916d7%5E%21

tdf#125310 change tracking: don't copy page break

It will be available in 6.3.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 9 Xisco Faulí 2019-05-21 12:06:55 UTC
Verified in

Version: 6.3.0.0.alpha1+
Build ID: 38ac0586448d4f07811b139f62f62686b029feba
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@László Németh, thanks for fixing this issue!!
Comment 10 Xisco Faulí 2019-05-21 12:24:35 UTC
Hi László Németh,
Seeing that you push a commit after you set this to FIXED, are you still working on this or you consider this already fixed ?
Comment 11 László Németh 2019-05-21 12:39:36 UTC
@Xisco: You are right, I had already fixed the problem with the first fix, and I only solved a very similar issue under the same bug number. The new redline handling modified the issues, that I solved by losing some formatting during tracked change rejection for the sake of the current (visible and acceptable) text formatting, but maybe there is some better fix for it, I will check it soon. These small patches are good for back porting (or only the first one, that has no such ODT issue).
Comment 12 Commit Notification 2019-05-22 20:30:28 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/0bc56f3081a1c95efd9c5e40ae6a957bf4095aa9%5E%21

tdf#125310 change tracking: don't copy page break

It will be available in 6.2.5.

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 13 László Németh 2019-05-23 07:30:30 UTC
(Note: the second commit is fix of the similar Bug 121109.)
Comment 14 Commit Notification 2019-05-23 09:48:48 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/dfd5b969269eacf33ddd75fb3e4b70b958e911dd%5E%21

tdf#125310 change tracking: don't copy page break

It will be available in 6.2.5.

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.