Bug 159488 - FILEOPEN DOCX Specific document is rendered more tightly as in Word
Summary: FILEOPEN DOCX Specific document is rendered more tightly as in Word
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Regressions-Universal-Line-Spacing
  Show dependency treegraph
 
Reported: 2024-01-31 21:26 UTC by Gabor Kelemen (allotropia)
Modified: 2024-02-17 22:29 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word 2016 (65.02 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-01-31 21:26 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the example file in Word 2016 and Writer master (87.78 KB, image/png)
2024-01-31 21:30 UTC, Gabor Kelemen (allotropia)
Details
shorter-document-min1_mso2010.png: page2 text definitely starts higher than page1 (14.37 KB, image/png)
2024-02-01 02:10 UTC, Justin L
Details
Diffpdf view of the Word10-saved PDF and LO saved PDF (164.46 KB, image/png)
2024-02-17 22:29 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-01-31 21:26:40 UTC
Created attachment 192306 [details]
Example file from Word 2016

Attached document is rendered on 3 pages in Word 2010/2016 with one row on the third page, but it is on 2 pages in Writer.

1. Open attached document
-> 2 pages instead of 3

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: dfcdef6d94993131b5f150d00d08cc81a987eebb
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

Seemst to have started in 7.6 with:

https://git.libreoffice.org/core/+/96a502b3756a1c100b40235f50ef2122d5b543f9

author	Justin Luth <justin.luth@collabora.com>	Tue Mar 07 07:43:14 2023 -0500
committer	Justin Luth <jluth@mail.com>	Wed Mar 08 12:25:57 2023 +0000
tree bb18c5e330166f01b79432b9d6c0d2db8cdffafa
parent bcf0f2b6d87f6be18c417e3537f5cf9b320c4348 [diff]

tdf#153964 writerfilter compat15: top margin after break split

Before this the last line was rendered on the third page.

Adding CC to: Justin Luth
Comment 1 Gabor Kelemen (allotropia) 2024-01-31 21:30:07 UTC
Created attachment 192307 [details]
Screenshot of the example file in Word 2016 and Writer master
Comment 2 Justin L 2024-02-01 02:10:27 UTC
Created attachment 192311 [details]
shorter-document-min1_mso2010.png: page2 text definitely starts higher than page1

This is a compat14 document - i.e. designed for 2010.

I think the cause of the problem is not my patch.

The text on page 2 is supposed to start higher than the text on page 1 (which has a 6pt/.21cm top margin). The 12pt/.42cm stated top margin on page 2 is ignored by Word (well, actually applied to the paragraph start at the end of page 1) and also ignored by LO with my patch.

In Word 2010, if I set the top margin to something huge (like 70pt) then nothing changes - so it is acting as if the top margin is zero (which is what my patch did).

I don't have Calibri font on my linux/LO box, so font substitution will be having an effect for me. I assume Gabor has that font since he ran the test on Windows.

Please do a PDF comparison of the TOP of the second page. I expect the tops in LO and MSO to match up - hopefully better after my patch than before my patch. In that case, the root cause is just some difference in the cumulative spacing that prevents the last line from fitting in MS Word.
Comment 3 Gabor Kelemen (allotropia) 2024-02-17 22:29:33 UTC
Created attachment 192615 [details]
Diffpdf view of the Word10-saved PDF and LO saved PDF

Seems like there is less spacing between the bulleted paragraphs in Writer than in Word.

The bibisected change has removed the upper spacing from the first paragraph after the page break, this looks like in Word 2010+.

Manually removing this 0.42 cm before spacing makes the document 2 pages back until 5.3, but in 5.2 was still rendered as 3 pages under both Linux and Windows.

Bibisected under linux-5.3 to:

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

author	Khaled Hosny <khaledhosny@eglug.org>	2016-11-09 15:22:43 +0200
committer	Khaled Hosny <khaledhosny@eglug.org>	2016-11-22 15:32:11 +0000
commit 34d7602954d4483b3bc9db700e7df2c15348947a (patch)

tdf#55469 Consistent line spacing across platforms