Bug 112694 - FILEOPEN: DOCX - Top margin imported incorrectly and header incorrectly activated
Summary: FILEOPEN: DOCX - Top margin imported incorrectly and header incorrectly activ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.1.0 target:6.0.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Header-Footer
  Show dependency treegraph
 
Reported: 2017-09-27 16:19 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-02-21 20:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Cut-down reproducer. (58.78 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-02-16 22:36 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2017-09-27 16:19:42 UTC
steps:
1. open http://download.microsoft.com/documents/rus/microsoft4you/How_to_license_the_operating_system_Windows_8_new.docx
2. scroll to page 2
3. notice the header is active and has a purple line in it when it shouldnt
4. also notice that the top margin is set to 0.25 rather than 0.76

regression as this didnt happen in 4.4

Version: 6.0.0.0.alpha0+
Build ID: 892c719fffa06de4c7aeab497326cad7bae9e5c6
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-09-27_03:02:09
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 Xisco Faulí 2017-09-28 09:17:37 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2014-11-21 16:41:24 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2014-11-21 17:10:59 (GMT)
commit	17e51f427b3f0cec74ac8e0a1b3f51189006ae6f (patch)
tree	8ba685a9029fe5972a490abc58fcef69b843f7e9
parent	e37e8f38d1f5c6bc427965dc535f1a64f0c8649c (diff)
DOCX import: first page header should always set default headers as well
writerfilter imports a section with first and default headers / footers
as two page styles: a first page one and a follow one. In case we
nominally have a header on the first page only, we still need to enable
it in the follow page style as well, otherwise on export when we
recognize the first + follow chain as a single section, we'll end up
with a header that looses its header margin.

Bisected with: bibisect-50max

Adding Cc: to Miklos Vajna
Comment 2 Yousuf Philips (jay) (retired) 2017-09-29 03:17:23 UTC
This previously happened for .doc in 4.1 (bug 77844).
Comment 3 Xisco Faulí 2017-11-14 13:09:34 UTC
attachment 137084 [details] from bug 77796 is also affected.
Comment 4 Miklos Vajna 2018-02-16 22:36:02 UTC
Created attachment 139956 [details]
Cut-down reproducer.

I get some loading problem with the original bugdoc, here is a cut-down 2 page version of it (using Word), so that it's possible to see the regression.
Comment 5 Commit Notification 2018-02-20 07:13:10 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112694 DOCX import: handle <w:titlePg> when turning on follow style header

It will be available in 6.1.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 Commit Notification 2018-02-21 20:33:48 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=055aae14063773bdac9ea43b3207f1d7d6ca6b4c&h=libreoffice-6-0

tdf#112694 DOCX import: handle <w:titlePg> when turning on follow style header

It will be available in 6.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.