When exporting this document, the page-break-after is lost. Even if it is added back in, it is lost on import. So both import and export have problems. This is a follow up from bug 132149, so look there for export code pointers.
Created attachment 165771 [details] tdf132149_pgBreakBRT.docx: even when correctly exported, the import misses the page break Probably best is to start with this import document. MSWord 2003 and 2016 both page break between the yellow and white paragraphs. The import was working until LO 4.4 in the range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=4fd65ac3292a219162a19d8cf1d06842a4c4d498..66da64c74829a68a8dc55c9380ecd6c84d0fc331 with the likely candidate being https://cgit.freedesktop.org/libreoffice/core/commit/?id=382bab9412b87f82da82276332496eb28b28d4f3 DOCX import: fix <w:pageBreakBefore> wrt. inherited styles We used to ignore this element with a "false" logical attribute, but that causes a problem when an inherited style wants to explicitly disable this element from a parent style.
This is focusing on docx import and export. DOC is fine in terms of that specific page break for both export and import.
There seems to be some slight import difference in MSWord versions on how to handle a PageBreakBefore=true that is preceded by a w:br. In Word 2003, you get two page breaks. In Word 2010 and 2016, you only get one. (So this is probably just a Word 2003+compatibility pack problem.) There are two examples in the unit tests. ooxmlexport9's tdf89377_tableWithBreakBeforeParaStyle.docx is a good example. When it is round-tripped in LO, it shows as 5 pages in Word 2003, but only 3 pages in Word 2016. The other example is ooxmlexport13's internal_hyperlink_table.odt. Proposed for the import regression is at https://gerrit.libreoffice.org/c/core/+/103223
Proposed patch for export is at https://gerrit.libreoffice.org/c/core/+/103275
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0b8c7a94c6c4b1aa10c7ae0a614d0f1f6cba1002 tdf#136952 writerfilter: PageBreakBefore - don't always overwrite It will be available in 7.1.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f0a495a56489b781177be8ff28c4660214c9bdf2 tdf#136952 ww8export: always check for breakAfter on last split It will be available in 7.1.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.