Steps: 1. Open attachment 59921 [details] from bug 48658 2. Save it as DOCX 3. Open the new file Observed behaviour: A new line has been added to the end [Bug found by office-interoperability-tools] Reproduced in Version: 6.0.0.0.alpha0+ Build ID: cb37c5f0f3de7b545231a53d46a5271058af76ad CPU threads: 1; OS: Windows 6.1; UI render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-06-23_06:55:41 Locale: es-ES (es_ES); Calc: group
Regression introduced by: author Miklos Vajna <vmiklos@collabora.co.uk> 2017-06-13 07:05:06 (GMT) committer Miklos Vajna <vmiklos@collabora.co.uk> 2017-06-13 09:30:43 (GMT) commit 2a73e7d88c19cab69733a4f6433d8576856285ac (patch) tree d448994c4d8877a8cddccc7d4302bb3797b97264 parent 16265a1f84f0ac7c16beee6a3591653eaaa90323 (diff) tdf#107618 DOCX export: fix missing header when doc ends with section See commit b6e62dc0dc2b284c825f1182a67bb2f9259a30ce (tdf#106492 DOCX export: fix duplicated section break at doc end, 2017-03-21) for the context, this is one more case where it's not OK to suppress the two section breaks at the end of a document, since the suppressed section break is the one that provides the headers / footers. Bisected with bibisect-linux64-6.0 Adding Cc: to Miklos Vajna
Created attachment 137617 [details] tdf108954_RTaddsSection.docx: homemade, minimal unit test The problem comes because bEmit is now true after + bEmit = rMaster.GetHeader().IsActive() || rMaster.GetFooter().IsActive(); The fix for bug 107618 was backported to 5.4. My first impression is that this is mostly an unfixable problem, related more to the difference between continuous sections/page styles in LO vs MSO, than to section endings. I need to look at the earlier bug 106492 for a better understanding, but my gut feeling is that this just needs to be reverted.
The unit test from bug 107618 also grows by one section each RT!!! Interestingly, old Word 2003 also has trouble saving tdf107618.doc as .docx format, loosing one section and one header.
*** Bug 105154 has been marked as a duplicate of this bug. ***
proposed fix at https://gerrit.libreoffice.org/62430
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/cb7500ddb8de6c41fca84a0009ffe22240bb1845%5E%21 tdf#108954 docxexport: only emit section if diff from current It will be available in 6.2.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.
Verified in Version: 6.2.0.0.beta1+ Build ID: c13f4d0a2ff503cdebbc789e1711f90e7b5fe379 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
This caused a regression logged as bug 121374, which has been fixed, so marking this one as fixed/verified now.