Bug 159699 - ODT->DOC/X layout mangled (page style columns -> section columns)
Summary: ODT->DOC/X layout mangled (page style columns -> section columns)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: low trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: DOCX-Section
  Show dependency treegraph
 
Reported: 2024-02-12 19:45 UTC by Telesto
Modified: 2024-02-24 19:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file saved to docx in 24.8 (6.14 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-02-13 10:04 UTC, Gabor Kelemen (allotropia)
Details
The original and the saved docx in current 24.8 bibisect (178.34 KB, image/png)
2024-02-13 10:07 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2024-02-12 19:45:17 UTC
Description:
FILEOPEN: DOCX shows up mangled

Steps to Reproduce:
1. Open attachment 192528 [details] (bug 159675)
2. Save as DOCX (or DOC)
3. File -> Reload (Jumbled layout)

It's a fileopen issue. The DOCX file opens fine with older versions

Actual Results:
Jumbled layout

Expected Results:
Same or nearly identical layout as ODT


Reproducible: Always


User Profile Reset: No

Additional Info:
Found in
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4d381b54d1c598c181b4a21a8bf0db86eb4668d1
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

Version: 7.1.8.0.0+ (x64) / LibreOffice Community
Build ID: a94b58277c7aeaa83ce14347cd0b8f7137969d03
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

and in
Version: 6.1.6.3
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: nl-NL (nl_NL); Calc: CL

open fine with
Versie: 5.3.5.2 
Build ID: 50d9bf2b0a79cdb85a3814b592608037a682059d
CPU-threads: 4; Besturingssysteem:Windows 6.2; UI-render: GL; Layout Engine: old; 
Locale: nl-NL (nl_NL); Calc: CL
Comment 1 Gabor Kelemen (allotropia) 2024-02-13 10:04:52 UTC
Created attachment 192533 [details]
Example file saved to docx in 24.8

Bibisected in linux-5.4 to:

https://git.libreoffice.org/core/+/4605bd46984125a99b0e993b71efa6edb411699f

author	Justin Luth <justin_luth@sil.org>	Thu Mar 09 18:13:50 2017 +0300
committer	Miklos Vajna <vmiklos@collabora.co.uk>	Mon Mar 13 11:23:53 2017 +0000

tdf#103931 writerfilter breaktype: same for implicit and explicit
Comment 2 Gabor Kelemen (allotropia) 2024-02-13 10:05:44 UTC
Adding CC to: Justin Luth
Comment 3 Gabor Kelemen (allotropia) 2024-02-13 10:07:21 UTC
Created attachment 192534 [details]
The original and the saved docx in current 24.8 bibisect

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f289fe3dca487c45417f7b40d51a4830f3369fb1
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded
Comment 4 Justin L 2024-02-22 13:08:18 UTC
This sounds like a duplicate of bug 137162.
However, the bibisect report is not what I expected it to be, so I won't mark as a duplicate yet, until I have investigated a bit further.

It can't be a true regression: MSO doesn't have a page style concept, so "page style columns" should not be used when saving into MSO formats.

I suppose section export could be a bit smarter and check whether the start and end nodes of a section are in the same page style, and then apply the page style's column count. That is a lot of work to do, for a very minor use case.
Comment 5 Justin L 2024-02-24 18:08:04 UTC
Yes, a duplicate of bug 137162 (which was marked as worksforme, but should be notabug.

In this document we have both the page style providing columns, and the individual sections providing sub-columns. That will never work, and only human effort could turn that into a proper looking DOCX file.
Comment 6 Justin L 2024-02-24 19:09:39 UTC
This document just happened to have the right combination that made it look good earlier when round-tripping to DOCX. If you take the first "automatic" section and make it into a real section (insert section) and then round-trip, it would look like it does today.