Created attachment 163811 [details] n652364_c15.docx: hand modified to change compatibilityMode=15 (from 11) attachment 163807 [details] (n652364_A6.docx) is the compat=11 version. It is a one-page document, and the section break is treated as a column break, so you get a document that looks like TEXT1 TEXT2 text1 text2 The attached version is identical except that it changed the compatibilityMode setting to 15. Now the break is treated like a section page break, looking like TEXT1 text1 --- page break --- TEXT2 text2 Unfortunately, LO 7.1 doesn't open it either way. It looks like TEXT1 text1 --- page break --- TEXT2 text2
It looks like LO NEVER exports a nextColumn section break (nBreakCode = 1). It just uses a normal column break. Hurray! Fortunately, in Word it is not easy to make a column section break. In old Word 2003, it isn't a UI option under "insert breaks". It can only be specified in "page setup", "layout", "section start new column". So, my guess is that LO has absolutely no clue how to handle a real section column break. (Indeed, no unit tests fail if that section of code is just commented out.) What we probably need to do for the compat11 case is to EXTEND the existing section to cover this text (HOW?), and insert a regular column-break-before at the start of the range. (It looks like that is all the columnbreak code is trying to do, except that it fails to extend the previous section. For the compat15 case, it looks like it should just treat a nextColumn as a nextPage. [Need to test the compat version though. What do 14 and 12 do?]
Created attachment 163841 [details] columnSectionBreak_c15.docx: as much complexity as I could muster in two pages. This is a two page document showing how badly LO currently handles column breaks. It was round-tripped by Word 2016 as compatibility mode = 11, and then hand-tweaked to be changed into compatibilityMode 15 - which caused the page break to happen at the section-column-break before the RTL column section.
Created attachment 163842 [details] columnSectionBreak_c14.docx: Word 2010 version still fits on only one page. (In reply to Justin L from comment #1) > [Need to test the compat version though. What do 14 and 12 do?] Yes, like most things it behaves very differently starting with compat 15. > What we probably need to do for the compat14 case is to EXTEND the existing > section to cover this text. Yes, after more testing this still seems to be the case.
Created attachment 163843 [details] columnSectionBreak_c14.pdf: how the one page looks in Word 2016
proposed fix at https://gerrit.libreoffice.org/c/core/+/99936 Still needed is a way to join the section to the previous via a column break.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/75b45d43b53abd457c98f47078ca7ff3c492ce2c tdf#135343 writerfilter: compat15 treats section nextCol as nextPage 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/98665425ebb5cdeeda341336871ca4da7f4842b7 related tdf#135343 writerfilter: document broken nextColumn 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.