Created attachment 184488 [details] Example file from Word 2016 Attached RTF example file contains a page break and a continous section break after each other. In Word this results in a two pages document, with a paragraph at the very top of the second page. In Writer the document is two pages and there is an extra empty paragraph at the very top of the second page, changing page layout. 1. Open attached file in Writer 2. Notice there is an empty paragraph before "Second page". Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 44355a90b3450111ad87ad4b6607a564e41d7b54 CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: de-DE (hu_HU); UI: en-US Calc: threaded Works like this since 5.3, before this commit it was worse (there was an extra empty page): https://git.libreoffice.org/core/+/50bf96d31ab2eb546f6c71cc93c1fa5dd4bf3044 author Justin Luth <justin_luth@sil.org> Sat Jun 25 22:21:08 2016 +0300 committer Miklos Vajna <vmiklos@collabora.co.uk> Wed Jun 29 07:35:54 2016 +0000 tdf#90697 docx - don't change continuous break into page break Before that in 4.3 there were 2 pages but an extra empty paragraph before the page break, so not exactly good either. If the example file is saved as docx, it is displayed correctly in Writer since 6.0 commit: https://git.libreoffice.org/core/+/cee02e81cd3b55fb46eacf5db5713e8bf4363bcd%5E%21/#F5 author Justin Luth <justin_luth@sil.org> Tue Apr 11 21:01:45 2017 +0300 committer Justin Luth <justin_luth@sil.org> Fri May 19 13:31:27 2017 +0200 ooxmlexport: roundtrip tdf#103975's unit tests
Created attachment 184489 [details] The example file in Word 2016 and Writer
Created attachment 184490 [details] The example file saved as docx by Word
I confirm it with Version: 7.5.0.2 (X86_64) / LibreOffice Community Build ID: c0dd1bc3f1a385d110b88e26ece634da94921f58 CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: de-DE Calc: CL threaded
Created attachment 191090 [details] Updated example file
The content of attachment 184488 [details] has been deleted for the following reason: User's request
not sure if this can be called a duplicate of a bug that was a recent regression; in any case this was fixed by: commit 17e2c7226a73675d69febf0915aaeae61ad8e9f1 Author: Michael Stahl <michael.stahl@allotropia.de> AuthorDate: Wed Jan 31 14:33:46 2024 +0100 Commit: Michael Stahl <michael.stahl@allotropia.de> CommitDate: Wed Jan 31 18:58:56 2024 +0100 tdf#158586 writerfilter: RTF import: fix \page \sect \skbnone w/ header The problem was not fixed yet for the less-minimized bugzilla attachment where the sections contain headers and footers. What happened there is that first \page caused a deferred page break, then \sect and sectBreak() delayed-read the header substream and the \par in the header resets all the deferred break flags. Add the deferred break to an already existing Context class, and remove the direct members in DomainMapper_Impl in favor of always using the m_StreamStateStack. Probably this problem cannot occur for DOCX import, because it imports header/footer eagerly where the reference element is, and sectPr is before any runs that contain breaks in the same paragraph element. Change-Id: Iba971955e9cf0c398d416518e72d99307d3e1cfd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162833 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> *** This bug has been marked as a duplicate of bug 158586 ***