Bug Hunting Session
Bug 70195 - FILESAVE: DOCX export of empty header\footer exports wrong distance from top\bottom (seen only in MSWord)
Summary: FILESAVE: DOCX export of empty header\footer exports wrong distance from top\...
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: filter:docx
Depends on:
Blocks: DOCX-Header-Footer
  Show dependency treegraph
 
Reported: 2013-10-06 14:03 UTC by Adam CloudOn
Modified: 2019-01-31 09:34 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX containing an empty header (11.16 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-10-06 14:03 UTC, Adam CloudOn
Details
DOCX exported by LO with wrong header distance from top and wrong footer distance from bottom (5.46 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-10-06 14:04 UTC, Adam CloudOn
Details
Screenshot comparison between original DOCX and exported DOCX (66.71 KB, image/png)
2013-10-06 14:07 UTC, Adam CloudOn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam CloudOn 2013-10-06 14:03:33 UTC
Created attachment 87189 [details]
DOCX containing an empty header

Problem description: 
When LO imports a document with no header\footer - and exports it back to DOCX - the header has a distance of 0 from the top (instead of 36) and the footer has a distance of 0 from the bottom (instead of 36).

Steps to reproduce:
1. Load attached DOCX in LO
2. Save as NEW.DOCX
3. Load NEW.DOCX in Word
4. Header is in distance of 0 from top, footer in distance of 0 from bottom

Current behavior:
In exported file the header is in distance of 0 from top, footer in distance of 0 from bottom

Expected behavior:
In exported file the header should be in distance of 36 from top, footer in distance of 36 from bottom

Please Note !
If you 'inspect' the file in Word and remove the document information - this problem doesn't happen (so don't do it if you want to reproduce the bug).
              
Operating System: All
Version: 4.2.0.0.alpha0+ Master
Comment 1 Adam CloudOn 2013-10-06 14:04:05 UTC
Created attachment 87190 [details]
DOCX exported by LO with wrong header distance from top and wrong footer distance from bottom
Comment 2 Adam CloudOn 2013-10-06 14:07:08 UTC
Created attachment 87191 [details]
Screenshot comparison between original DOCX and exported DOCX
Comment 3 tommy27 2014-10-25 06:27:45 UTC
I don't have MS Word to test, so please give an update of the bug status with current LibO 4.3.2.2 or 4.4.0.0 master

I set status back to UNCONFIRMED since the status NEW has to be set only after independent confirmation by another user
Comment 4 QA Administrators 2015-12-20 16:21:44 UTC Comment hidden (obsolete, spam)
Comment 5 Justin L 2018-08-23 18:19:19 UTC
What happens if top margin is less than the default 720? Word still uses header=720 - it doesn't come into effect until the header is enabled, so just a default.

fix proposed at https://gerrit.libreoffice.org/59523
Comment 6 Commit Notification 2018-08-25 05:50:22 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#70195 docx export: default header/footer at 720

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 7 Commit Notification 2018-12-31 01:12:20 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/63b32bff885169ef77f86b205257fb573da7b70c%5E%21

Revert "tdf#70195 docx export: default header/footer at 720"

It will be available in 6.3.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 Justin L 2019-01-28 16:41:45 UTC
Problems found with the patch so it is reverted in master and proposed to be reverted in 6.2, where it was first introduced. https://gerrit.libreoffice.org/67020
Comment 9 Commit Notification 2019-01-31 09:28:58 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/7a527a9e61bccf7a8b02ed80a9a3075261be81f9%5E%21

Revert "tdf#70195 docx export: default header/footer at 720"

It will be available in 6.2.1.

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.