Bug 118412 - FILEOPEN: DOC: Incorrect top/bottom page margin
Summary: FILEOPEN: DOC: Incorrect top/bottom page margin
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Luke Deller
URL:
Whiteboard: target:6.2.0 target:6.1.0.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-06-27 14:39 UTC by Xisco Faulí
Modified: 2018-07-11 14:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
sample 1 (50.00 KB, application/msword)
2018-06-27 14:39 UTC, Xisco Faulí
Details
Comparison LibreOffice 6.0 and Master (239.60 KB, image/png)
2018-06-27 14:39 UTC, Xisco Faulí
Details
comparison MSO 2010 and LibreOffice 6.2 with attachment 131601 (161.12 KB, image/png)
2018-06-27 14:49 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2018-06-27 14:39:39 UTC
Created attachment 143164 [details]
sample 1

Steps to reproduce:
1. Open attached document

Observed behaviour: the bottom margin is 2.54 instead of 1.25. See comparison between LibreOffice 6.0.5.2 and LibreOffice 6.2 master

Reproduced in

Version: 6.2.0.0.alpha0+
Build ID: 6ebc026e34d0c119067e7dfbad8d932f92844760
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded
Comment 1 Xisco Faulí 2018-06-27 14:39:57 UTC
Created attachment 143165 [details]
Comparison LibreOffice 6.0 and Master
Comment 2 Xisco Faulí 2018-06-27 14:41:10 UTC
Regression introduced by:

author	Luke Deller <luke@deller.id.au>	2018-05-31 23:16:26 +1000
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2018-06-06 09:42:41 +0200
commit 6c68e52532d45c97a83b2396bd40c98ade9b5bb4 (patch)
tree 70caddf710e4b7a927483b538d0786c4aa33f194
parent 9739c37d8ad7c6fca269709674a6975fa7ebd191 (diff)
Fix top margin in DOC import for tdf#117885
When calculating the height of the top/bottom margin, we take into
account whether the DOC section has a header/footer enabled.

If the DOC section contains only a first-page header/footer, and the
display of first-page header/footer in this section is not enabled,
then we must consider the section to have no header/footer.

(Also add a test case using the doc supplied by the reporter in
 tdf#117885)

Bisected with: bibisect-linux64-6.2

Adding Cc: to Luke Deller
Comment 3 Xisco Faulí 2018-06-27 14:43:50 UTC
See issue reproduced with attachment 44637 [details] from bug 35464

[Bug found by office-interoperability-tools]
Comment 4 Xisco Faulí 2018-06-27 14:49:56 UTC
Created attachment 143166 [details]
comparison MSO 2010 and LibreOffice 6.2 with attachment 131601 [details]

Same issue reproduced with attachment 131601 [details] from bug 106297, which makes the TOC in page 2 to move to page 3...
Comment 5 Commit Notification 2018-07-03 12:45:23 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "master":

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

tdf#118412: DOC incorrect bottom page margin

It will be available in 6.2.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 6 Xisco Faulí 2018-07-04 14:49:10 UTC
Issue verified in

Version: 6.2.0.0.alpha0+
Build ID: d05b7b32d9ecb6fcb4a268eb68cdcee09bafa6dd
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Luke, could you please cherry-pick the commit to 6-1 and close this as RESOLVED FIXED ?
Comment 7 Commit Notification 2018-07-10 09:47:02 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3fbb1d03110018c1ffe96c01b35b62e9b0742ded&h=libreoffice-6-1

tdf#118412: DOC incorrect bottom page margin

It will be available in 6.1.0.2.

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.