Bug 127778 - FILEOPEN DOCX Margin setting is not considered if smaller than heading size
Summary: FILEOPEN DOCX Margin setting is not considered if smaller than heading size
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:7.0.0 target:6.4.5
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Page
  Show dependency treegraph
 
Reported: 2019-09-26 09:17 UTC by NISZ LibreOffice Team
Modified: 2020-07-28 10:22 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
The margin settings and rendering in the same document in MSO Word, LO5.0 and LO4.4 (123.27 KB, image/png)
2019-09-26 09:18 UTC, NISZ LibreOffice Team
Details
The sample document side by side in the MSO and LO6.4master (195.27 KB, image/png)
2019-09-26 09:18 UTC, NISZ LibreOffice Team
Details
The sample file from Word (22.68 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-09-26 09:18 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-09-26 09:17:20 UTC
Description:
The attached DOCX file has two pages with different header styles (First Page and Header), and Writer does not hide the empty header of the second page unlike Word does.

Steps to Reproduce:
    1. Open the sample DOCX
    2. Notice that in the second page the header part does not match the margin follows the first page settings.

Actual Results:
Second page shows an empty header instead of hiding it and applying the very small page margin set.

Expected Results:
The layout matches Words layout.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.0.0.alpha0+ (x64)
Build ID: e1b51d4588b4b39592bb94dd5bb90de5e04d061e
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-09-23_09:16:11
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded

Also happens in
Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: hu-HU (hu_HU)

But not in
Version: 4.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale: hu_HU

Bibisected using bibisect-win32-5.0 to:
URL https://cgit.freedesktop.org/libreoffice/core/commit/?id=17e51f427b3f0cec74ac8e0a1b3f51189006ae6f 
author: 	 Miklos Vajna <vmiklos@collabora.co.uk>
committer:  Miklos Vajna <vmiklos@collabora.co.uk>
summary: DOCX import: first page header should always set default headers as well
Comment 1 NISZ LibreOffice Team 2019-09-26 09:18:06 UTC
Created attachment 154525 [details]
The margin settings and rendering in the same document in MSO Word, LO5.0 and LO4.4
Comment 2 NISZ LibreOffice Team 2019-09-26 09:18:28 UTC
Created attachment 154526 [details]
The sample document side by side in the MSO and LO6.4master
Comment 3 NISZ LibreOffice Team 2019-09-26 09:18:44 UTC
Created attachment 154527 [details]
The sample file from Word
Comment 4 NISZ LibreOffice Team 2019-09-26 09:19:13 UTC
Adding CC to:   Miklos Vajna
Comment 5 Dieter 2019-09-29 05:55:02 UTC
I confirm it with

Version: 6.3.2.2 (x64)
Build ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded
Comment 6 Xisco Faulí 2020-02-27 16:06:32 UTC
Adding Cc: to Miklos Vajna
Comment 7 Commit Notification 2020-05-12 07:03:50 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/51534ac2b9747975945acb6a1e1ba5cc6d73f5c2

tdf#127778 DOCX import: fix unexpected heading on non-first page ...

It will be available in 7.0.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 8 Dieter 2020-05-19 19:08:45 UTC
Verified with

Version: 7.0.0.0.alpha1+ (x64)
Build ID: 4804d969bacd25ad586b3bf70d3dc8c27adb48ef
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win; 
Locale: en-GB (de_DE); UI: en-GB
Calc: threaded

Miklos, thanks for fixing it!
Comment 9 Xisco Faulí 2020-05-19 19:57:29 UTC
Indeed, verified in

Version: 7.0.0.0.alpha1+
Build ID: 8209c2569f5726f9ed29f75d30efdccb94f98fe5
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 10 Commit Notification 2020-05-19 19:59:33 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/a2b8ede5b45101c45291d1e1e96e7fa1ad47dd2b

tdf#127778 DOCX import: fix unexpected heading on non-first page ...

It will be available in 6.4.5.

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.