Bug 128889 - FILESAVE: Paragraph style "page break after" incorrect after saving as DOCX
Summary: FILESAVE: Paragraph style "page break after" incorrect after saving as DOCX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.3.2 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.5.0 target:6.4.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-19 08:19 UTC by Mike
Modified: 2019-11-22 08:29 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test case with first 2 steps applied (8.26 KB, application/vnd.oasis.opendocument.text)
2019-11-19 08:32 UTC, Mike
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2019-11-19 08:19:33 UTC
Description:
A new document created in LibreOffice 6.3.3.2 has paragraphs that have the style "insert page breaks after" applied to them. When this document is saved as DOCX and then reopened in LibreOffice, the page breaks are missing. When this DOCX is opened in Microsoft Word, the page break is before the paragraph.

Steps to Reproduce:
1. Create a new document in Writer. Insert any two paragraphs of text.
2. Select the first paragraph of text, and open the Paragraph format settings dialog. In the Text Flow tab, check the Breaks > Insert checkbox, then set Type: Page, and Position: After. Click okay to close dialog.
3. Save the document as DOCX.
4. Close LibreOffice and reopen the DOCX in LibreOffice. The paragraph break is not visible. Opening the document in Microsoft Word has the page break before the paragraph instead of after.

Actual Results:
When opening the output DOCX in LibreOffice, the page break is missing. When opening the output DOCX in Microsoft Word, the page break is before the paragraph it was applied to.

Expected Results:
The output DOCX should appear the same as before saving, with the page break appearing after the first paragraph of text. This should be the behavior when opening the DOCX in both LibreOffice and Microsoft Word.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
I have also reproduced this issue in the 6.4.0.0 beta1
Comment 1 Mike 2019-11-19 08:32:55 UTC
Created attachment 155935 [details]
Test case with first 2 steps applied

Open this document, then save as DOCX to produce a document that has the incorrect page breaks applied when reopened in LibreOffice and Microsoft Word.
Comment 2 Mike Kaganski 2019-11-19 10:21:39 UTC
Repro with Version: 6.3.3.2 (x64)
Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 3 Commit Notification 2019-11-19 21:20:27 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#128889: don't write "page break after" into w:pPr

It will be available in 6.5.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 4 Commit Notification 2019-11-20 22:49:02 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/8e3fa597679a6402bd6d74e2ec25631ae686c423

tdf#128889: don't write "page break after" into w:pPr

It will be available in 6.4.0.1.

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 5 Mike 2019-11-22 08:29:12 UTC
Confirmed resolved fixed in

Version: 6.5.0.0.alpha0+ (x64)
Build ID: d312d02cf43928361be34207a0cdd2d95b3ec5fd
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: en-AU (en_AU); UI-Language: en-GB
Calc: CL

Thank you!