Bug 121665 - FILESAVE DOCX Only one Manual Column Break remains after export
Summary: FILESAVE DOCX Only one Manual Column Break remains after export
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.3.0 target:6.2.1
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: Page-Layout-Columns
  Show dependency treegraph
 
Reported: 2018-11-23 10:21 UTC by NISZ LibreOffice Team
Modified: 2019-01-28 15:48 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the original document side by side in Word and Writer. (194.24 KB, image/png)
2018-11-23 10:21 UTC, NISZ LibreOffice Team
Details
Example file from Word (21.10 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-23 10:22 UTC, NISZ LibreOffice Team
Details
The original file saved by Writer (15.64 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-23 10:23 UTC, NISZ LibreOffice Team
Details
lost_column_break.odt: export test document (11.15 KB, application/vnd.oasis.opendocument.text)
2019-01-24 07:38 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2018-11-23 10:21:03 UTC
Description:
Manual Column Breaks in DOCX documents created with Microsoft Word 2010 are missing when the document is exported in LibreOffice Writer.

Steps to Reproduce:
    1. Create a new document in Microsoft Word.
    2. On the Page Layout tab, in the Page Setup group, click Columns.
    3. Select Three.
    4. Type “=lorem(1)” and press Enter.
    5. On the Page Layout tab, in the Page Setup group, click Breaks.
    6. Choose Column.
    7. Type “=lorem(1)” and press Enter.
    8. On the Page Layout tab, in the Page Setup group, click Breaks.
    9. Choose Column.
    10. Save the file as DOCX.
    11. Open the same file in LibreOffice Writer.
    12. Select File and Save As.
    13. Name the file.
    14. Reload the file.
    15. Compare the original file opened in Writer and the exported file opened in Writer.

Actual Results:
There is only one Manual Column Break. With more Column Breaks inserted there was the same result.

Expected Results:
Column Breaks should have the same number as the original file opened in Microsoft Word 2010.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2018-11-23 10:21:41 UTC
Created attachment 146959 [details]
Screenshot of the original document side by side in Word and Writer.
Comment 2 NISZ LibreOffice Team 2018-11-23 10:22:53 UTC
Created attachment 146960 [details]
Example file from Word
Comment 3 NISZ LibreOffice Team 2018-11-23 10:23:21 UTC
Created attachment 146961 [details]
The original file saved by Writer
Comment 4 Durgapriyanka 2018-11-28 18:20:25 UTC
I Can not reproduce in

Microsoft Word 2007

Version: 6.0.6.2
Build ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77
CPU threads: 2; OS: Windows 6.1; UI render: default; 
Locale: en-US (en_US); Calc: group
Comment 5 Xisco Faulí 2019-01-23 13:01:32 UTC
Reproduced in

Version: 6.3.0.0.alpha0+
Build ID: 8f7c35072a6bbb33f6582c8c9a37a275c8d3cb14
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

but not in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.15; Render: default;
Comment 6 Buovjaga 2019-01-23 19:40:15 UTC
Bibisected with win32-6.0 to https://gerrit.libreoffice.org/plugins/gitiles/core/+/cee02e81cd3b55fb46eacf5db5713e8bf4363bcd%5E!/

ooxmlexport: roundtrip tdf#103975's unit tests

MS documentation for splitPgBreakAndParaMark
only mentions page breaks, not column breaks.

Adding Cc: to Justin Luth
Comment 7 Justin L 2019-01-24 05:47:30 UTC
Before LO 6.0, the import wasn't actually correct - LO showed two carriage returns in column 2, while Word has the last carriage return in column 3 instead.  After comment 6's patch, LO properly has the last CR in column 3.

Also worth noting is that Word and LO import lost_column_break_export.docx from comment 3 identically.

Must have exposed an existing export problem. The patch in comment 6 is an import patch, and importing looks fine in all cases. Not a true regression.
Comment 8 Justin L 2019-01-24 07:38:50 UTC
Created attachment 148577 [details]
lost_column_break.odt: export test document

This ODT example loads properly all the way back to LO3.5, so we can use it to bibisect the export.

Before LO3.6, it exports terribly - Word 2003 cannot read it.  Starting in 3.6, MSWord imports the result which looks the same as today (although it looks bad in LO itself). The export change was somewhere between May 11 - June 5 2012.

In LO4.4, the import more closely matches what Word sees, and I confirmed that in LO60 it fully matches starting at cee02e81cd3b55fb46eacf5db5713e8bf4363bcd identified in comment 6.
Comment 9 Buovjaga 2019-01-24 15:52:03 UTC
(In reply to Justin L from comment #8)
> Created attachment 148577 [details]
> lost_column_break.odt: export test document
> 
> This ODT example loads properly all the way back to LO3.5, so we can use it
> to bibisect the export.
> 
> Before LO3.6, it exports terribly - Word 2003 cannot read it.  Starting in
> 3.6, MSWord imports the result which looks the same as today (although it
> looks bad in LO itself). The export change was somewhere between May 11 -
> June 5 2012.
> 
> In LO4.4, the import more closely matches what Word sees, and I confirmed
> that in LO60 it fully matches starting at
> cee02e81cd3b55fb46eacf5db5713e8bf4363bcd identified in comment 6.

I bibisected the ODT -> DOCX export on Linux with 44max and got this: https://gerrit.libreoffice.org/plugins/gitiles/core/+/c4a5f8c1afd42acb52d0ae9b4d6f42f3e87364d5%5E!/

MSWordExportBase: fix export of header/footer in case of multiple columns

Adding Cc: to Miklos Vajna

During the bibisect, there was a commit (from Armin) that caused the odt to import so all text was already in the first column. Had to mark those as good.
Comment 10 Buovjaga 2019-01-24 15:56:42 UTC
(In reply to Buovjaga from comment #9)
> I bibisected the ODT -> DOCX export on Linux with 44max and got this:
> https://gerrit.libreoffice.org/plugins/gitiles/core/+/
> c4a5f8c1afd42acb52d0ae9b4d6f42f3e87364d5%5E!/
> 
> MSWordExportBase: fix export of header/footer in case of multiple columns

Eh, same blame is in bug 121659 - to dupe or not to dupe?
Comment 11 Justin L 2019-01-24 15:58:58 UTC
proposed fix at https://gerrit.libreoffice.org/66878
Comment 12 Miklos Vajna 2019-01-24 16:06:26 UTC
Thanks Justin, much appreciated!
Comment 13 Justin L 2019-01-24 16:06:53 UTC
(In reply to Buovjaga from comment #10)
> Eh, same blame is in bug 121659 - to dupe or not to dupe?
No dupe. That one seems to be an import bug, not an export one.
Comment 14 Commit Notification 2019-01-25 08:10:12 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/128369d6c853b5541abe08b240ece0abe7c28a4c%5E%21

tdf#121665 ooxmlexport: allow each para to have a column break

It will be available in 6.3.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 15 Commit Notification 2019-01-25 08:20:42 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/48b3893e0200417640f07eb6fd01b9a5d3b0b623%5E%21

tdf#121665 ooxmlexport: allow each para to have a column break

It will be available in 6.2.1.

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 16 BogdanB 2019-01-28 09:07:20 UTC
Verified. Works as expected.

Version: 6.3.0.0.alpha0+
Build ID: 9bc10964f0673b64e282ad567d08bf7ebba4df65
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-01-27_18:08:30
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded
Comment 17 Xisco Faulí 2019-01-28 15:48:57 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 6da3cd5521ffba2f6502929260d33c91ec56d556
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!