Bug 125778 - FILESAVE DOCX Page break before TOC disappears
Summary: FILESAVE DOCX Page break before TOC disappears
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0 target:6.3.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-TableofContents
  Show dependency treegraph
 
Reported: 2019-06-07 12:28 UTC by NISZ LibreOffice Team
Modified: 2019-11-09 14:58 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (19.69 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-06-07 12:28 UTC, NISZ LibreOffice Team
Details
The example file as saved by Writer master. (15.10 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-06-07 12:29 UTC, NISZ LibreOffice Team
Details
Screenshot of the problem in Word and Writer side by side (111.38 KB, image/png)
2019-06-07 12:29 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-06-07 12:28:24 UTC
Created attachment 152022 [details]
Example file from Word

Attached document contains a TOC prepended by a page break. On saving the document in Writer the page break disappears.

Steps to reproduce:
    1. Create a new document in Word (also happens if you create it in Writer)
    2. Enter a word on the page, insert a page break
    3. Enter a word, format it as Heading 1 on the second page
    4. Insert a Table of Contents at the top of the second page (before the Heading 1), save the file
    5. Open and save the file in LO

Actual results:
The page break before the TOC disappears.

Expected results:
The page break is retained.

LibreOffice details:
Version: 6.3.0.0.beta1+ (x86)
Build ID: 5cfac16dbd4af456a7fb6d52c8953c69a72ba2ba
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded

Bibisected to: 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=ff4f2ba3242d303f7f238a7a142440f1f4b1f288 

author Serge Krot <Serge.Krot@cib.de> 2018-12-06 19:11:58 +0100
committer Thorsten Behrens <Thorsten.Behrens@CIB.de> 2019-01-09 22:30:08 +0100

sw: DOCX: recognize TOC title during import
Comment 1 NISZ LibreOffice Team 2019-06-07 12:29:21 UTC
Created attachment 152023 [details]
The example file as saved by Writer master.
Comment 2 NISZ LibreOffice Team 2019-06-07 12:29:40 UTC
Created attachment 152024 [details]
Screenshot of the problem in Word and Writer side by side
Comment 3 Dieter 2019-06-07 13:20:11 UTC
I opened file from attachment in comment 1, but for me it looks fine in

Version: 6.3.0.0.beta1 (x64)
Build ID: a187af327633f5f00363be5131bd21a13e0f1a7b
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: en-US (de_DE); UI-Language: en-GB
Calc: threaded

Very strange.
Comment 4 Xisco Faulí 2019-06-07 16:14:35 UTC
Reproduced in

Version: 6.4.0.0.alpha0+
Build ID: 6b911ae9eb9484bebbdc1323210020486f5ef33f
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

Adding Cc: to Serge Krot
Comment 5 Gabor Kelemen 2019-06-11 12:27:52 UTC
Correcting title: this is a save time problem.
Comment 6 Justin L 2019-09-25 06:01:56 UTC
The fix for this one will be very similar to bug 126994 - but I'm not certain of any side effects, so I'm planning to leave this until LO 6.5 master starts in November - if no one has fixed it before then.
Comment 7 Justin L 2019-11-04 05:32:22 UTC
Reviewed again, and the fix isn't that scary. Proposed fix at https://gerrit.libreoffice.org/81979
Comment 8 Commit Notification 2019-11-07 11:42:47 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4ea43e887498f9d78f70b40bcdc53865057a78c0

tdf#125778 docxexport: handle pageBreak before TOX

It will be available in 6.4.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 9 Xisco Faulí 2019-11-07 16:07:40 UTC
Verified in

Version: 6.4.0.0.alpha1+
Build ID: 498c2d3944b666c2f016b65903001920db2cb2a4
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

@Justin Luth, thanks for fixing this issue!
Comment 10 Commit Notification 2019-11-09 14:58:21 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

tdf#125778 docxexport: handle pageBreak before TOX

It will be available in 6.3.4.

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.