Bug 119886 - Fileopen DOCX: Wrong rendering of "xyz" frame in header
Summary: Fileopen DOCX: Wrong rendering of "xyz" frame in header
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2018-09-14 17:55 UTC by Patrick Jaap
Modified: 2022-06-01 14:46 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
example file (1.62 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-09-14 18:55 UTC, Patrick Jaap
Details
situation in LO Writer (31.41 KB, application/pdf)
2018-09-14 18:55 UTC, Patrick Jaap
Details
situation in Word (30.09 KB, application/pdf)
2018-09-14 18:56 UTC, Patrick Jaap
Details
odt-export (by word 2013) of the sample file (5.08 KB, application/vnd.oasis.opendocument.text)
2018-09-17 14:28 UTC, Patrick Jaap
Details
example file compared in MSO, LO 5.2, LO 6.4 and LO 7.4+ (86.69 KB, image/webp)
2022-06-01 11:27 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Jaap 2018-09-14 17:55:30 UTC
Description:
In the example file, there are two problems:

1. At the top, there is an additional new line in Word, in LO not.
2. There is a too wide horizontal spacing in the last line in Writer, causing an additional line in Writer

Steps to Reproduce:
1. Open the example file

Actual Results:
No new line at the top, a new line at the buttom

Expected Results:
A new line at the top, no new line at the buttom


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Patrick Jaap 2018-09-14 18:55:27 UTC
Created attachment 144876 [details]
example file
Comment 2 Patrick Jaap 2018-09-14 18:55:48 UTC
Created attachment 144877 [details]
situation in LO Writer
Comment 3 Patrick Jaap 2018-09-14 18:56:07 UTC
Created attachment 144878 [details]
situation in Word
Comment 4 V Stuart Foote 2018-09-15 15:13:34 UTC Comment hidden (obsolete)
Comment 5 Patrick Jaap 2018-09-17 14:27:45 UTC
(In reply to V Stuart Foote from comment #4)
> As LibreOffice will always handle OOXML via import filter, why expect layout
> fidelity coming from a MS Word generated document.
> 
> What happens when importing/opening the document with OpenSans but saved
> from MS Word 2013 as ODF?

Hi,

when I use Word 2013 to export the example file to an .odt document, the layout is completely messed up. I think Word cannot handle the graphics in the header. Nevertheless, the line break in the last line persists.
Comment 6 Patrick Jaap 2018-09-17 14:28:19 UTC
Created attachment 144943 [details]
odt-export (by word 2013) of the sample file
Comment 7 Miklos Vajna 2018-09-18 08:26:07 UTC
I can confirm all 4 problems.
Comment 8 Xisco Faulí 2018-09-19 10:48:01 UTC
Also reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.15; Render: default;
Comment 9 Mike Kaganski 2018-10-16 21:34:44 UTC
The problem 1 ("Vertical spacing not correct" on the "situation in LO Writer" PDF) is caused by using two text boxes with "Square" wrap and "Allow overlap" disabled, one of them with text "xyz", and another empty. With overlap disabled, in Word, the empty box aligns below the "xyz" one, creating the "spacing". In Writer, we don't yet support disabling the "Allow overlap". This is definitely irrelevant to used font.

The problem 2 (the three "Linebreak not correct") is caused by Word not only expanding spaces when justify-aligning paragraphs, but also shrinking them (maximum by about 5%), while Writer only expands spaces. I believe this isn't font-specific.
Comment 10 NISZ LibreOffice Team 2020-06-05 09:36:31 UTC
(In reply to Mike Kaganski from comment #9)
> The problem 1 ("Vertical spacing not correct" on the "situation in LO
> Writer" PDF) is caused by using two text boxes with "Square" wrap and "Allow
> overlap" disabled, one of them with text "xyz", and another empty. With
> overlap disabled, in Word, the empty box aligns below the "xyz" one,
> creating the "spacing". In Writer, we don't yet support disabling the "Allow
> overlap". This is definitely irrelevant to used font.
> 

This part is fixed in 6.4 since:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=f8c7a2284b88c149addc8a30abb0cad8a10dad77

author	Miklos Vajna <vmiklos@collabora.com>	2019-09-20 11:55:21 +0200
committer	Miklos Vajna <vmiklos@collabora.com>	2019-09-20 12:42:17 +0200

Related: tdf#124600 sw anchored object allow overlap: add DOCX filter
Comment 11 Timur 2022-06-01 11:27:07 UTC
Created attachment 180517 [details]
example file compared in MSO, LO 5.2, LO 6.4 and LO 7.4+

This bug is about rendering of "xyz" frame in header. Spacing is bug 124769.

True it looked better in 6.4 but it's again wrong in 7.4+.
Comment 12 Timur 2022-06-01 14:46:44 UTC
I don't know how I got that comparison with a bug but on a repeated test it's not.
I close this one for top line. Spacing is bug 124769.