Bug 89377 - TABLE, FORMATTING: .doc page breaks between tables lost when saved in Word
Summary: TABLE, FORMATTING: .doc page breaks between tables lost when saved in Word
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:5.3.0 target:5.2.4
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-14 17:30 UTC by Rik Shaw
Modified: 2020-06-18 07:18 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
This .dot was last saved in LibreOffice, so when opened in LO, page break exists. Open in Word, save, open in LibreOffice, page break is gone. Page break still exists when viewed again in Word. (21.00 KB, application/msword-template)
2015-02-14 17:30 UTC, Rik Shaw
Details
simple.doc: minimal test duplicating the problem (9.50 KB, application/msword)
2016-10-20 08:54 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rik Shaw 2015-02-14 17:30:47 UTC
Created attachment 113382 [details]
This .dot was last saved in LibreOffice, so when opened in LO, page break exists. Open in Word, save, open in LibreOffice, page break is gone.  Page break still exists when viewed again in Word.

Existing .doc documents (from Word) with page breaks between Tables have the page breaks "lost" when opening in LibreOffice.

Adding the breaks manually in LibreOffice works fine when opening again in LibreOffice or Word.  However, the page breaks between tables are once again "lost" in LibreOffice after the document is re-edited and saved in MS Word.

Again, re-opening in Word the page breaks still exist, but re-opening in LibreOffice the page breaks are lost.

It seems to only be breaks between tables that are lost.  Unfortunately we have many documents using tables as formatting guides.
Comment 1 Buovjaga 2015-02-22 13:52:10 UTC
What versions of LibreOffice and Microsoft Word are you using?

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 2 Rik Shaw 2015-02-22 18:00:30 UTC
LibreOffice 3.5, 3.6, 4.0, 4.1, 4.2, 4.3, 4.4 in Windows and Linux.

MS Word 2003 (in Windows obviously).  I will need to confirm if the same for MS Word 2007 (and newer) but I believe it is so.  Maybe someone else could test if they have 2010 or 2013?  Follow the steps from the original Description, using the attachment (with the unfortunately very long name).
Comment 3 Buovjaga 2015-02-23 17:02:49 UTC
Reproduced.
Opened the .dot file through "Open" in MSO to edit it as a template.
"Saved as", opened new file in LibreOffice and the break was gone.

Win 8.1 32-bit
MSO 2013

LibreOffice:
Version: 4.5.0.0.alpha0+
Build ID: a2fa9e2468aa5c4fd4b610c5d0ebc8959e87a072
TinderBox: Win-x86@39, Branch:master, Time: 2015-02-23_02:10:01
Locale: fi_FI
Comment 4 tommy27 2016-04-16 07:23:34 UTC Comment hidden (obsolete)
Comment 5 Justin L 2016-10-20 08:54:10 UTC
Created attachment 128089 [details]
simple.doc: minimal test duplicating the problem

The problem is related to Paragraph styles with page-break enabled.  Word seems to throw away the "duplicate" page break (sprm 0x2407) that comes from the table-properties text-flow break-before, and uses only the paragraph style setting.

Word honors the paragraph page-break for each row.  Writer ignores all paragraph page-breaks that are inside of a table.

A work-around for OP's LostTableBreaks.dot is to remove the page-break on the "Unit title" paragraph style.
Comment 6 Justin L 2016-10-21 10:45:32 UTC
proposed fix:  https://gerrit.libreoffice.org/#/c/30127
Comment 7 Commit Notification 2016-10-24 10:05:27 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f5f51cb93d11731c64dfd68044144100f5fc4b28

tdf#89377 ww8import: table honors ParaStyle break-before-page

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2016-10-24 11:05:54 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d129099624d2b646d975c9567541ed9c18adb7ef

tdf#89377 writerfilter: table honors ParaStyle break-before-page

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2016-10-25 07:42:14 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=55840d90c43d0ba6db4a9cda4af648df0776749b&h=libreoffice-5-2

tdf#89377 ww8import: table honors ParaStyle break-before-page

It will be available in 5.2.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.