Bug 53649 - Writer FILEOPEN, FORMATTING: odt document with header and footer Writer opens without them
Summary: Writer FILEOPEN, FORMATTING: odt document with header and footer Writer opens...
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Writer-Header-Footer
  Show dependency treegraph
 
Reported: 2012-08-17 16:05 UTC by Doug
Modified: 2021-06-21 12:21 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
This document, created by Word, will display with a one-inch first-page margin in Word 2007, and with a half inch first-page margin in LibreOffice 3.3.0 (5.82 KB, application/vnd.oasis.opendocument.text)
2012-08-17 16:05 UTC, Doug
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Doug 2012-08-17 16:05:21 UTC
Created attachment 65702 [details]
This document, created by Word, will display with a one-inch first-page margin in Word 2007, and with a half inch first-page margin in LibreOffice 3.3.0

Problem description: 

Starting with Word document saved in .odt format.  The document has no first page header, but it does have a second page header.  The second page header is dormant, i.e., correctly not displaying in either Word or LibreOffice because there no longer is a second page on the document.  (Actually quite common when one document seeds another, especially letters)

When created and saved in Word using .odt, the first-page margin is one inch.  When opened in LibreOffice, the first page margin incorrectly is reduced to a half-inch.  If saved in LibreOffice, the change to a half-inch first page margin will be preserved and visible if opened again in Word.


Steps to reproduce:
1. Create document in Word 2007 with one-inch top margin
2. Type something, and then enter carriage returns until you get to page two
3. Create a header on page 2
4. Change the header setting to "First Page Different" so that the heading is only on page two
5. Delete some of the carriage returns so that page two no longer displays
6. Save in .odt.
7. Open in LibreOffice.  First page top margin now will be a half-inch.  Same .odt file in Word will display with one inch top margin.

Current behavior:  LibreOffice reduces first page top margin because of existence of dormant second page header

Expected behavior:  No reduction to first page top margin where there is a second-page dormant header

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1
Comment 1 sasha.libreoffice 2012-11-10 10:11:20 UTC
Thanks for bugreport
msWord opens attachment with header and footer enabled, but Writer opens with both disabled.
Exploring internals of attachment, IMHO header and footer should be enabled

[reproduced] in 3.4.2 on Windows XP 32 bit and in 3.5.7, 3.6.3 on RFR 64 bit
Comment 2 sasha.libreoffice 2012-11-10 10:16:36 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2015-01-05 17:51:57 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2015-01-27 17:11:23 UTC
Confirmed the half-inch top & bottom margins.

Win 7 Pro 64-bit Version: 4.5.0.0.alpha0+
Build ID: 784d069cc1d9f1d6e6a4e543a278376ab483d1eb
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-01-25_23:07:36
Comment 5 QA Administrators 2016-02-21 08:36:35 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2017-03-06 15:33:50 UTC Comment hidden (obsolete)
Comment 7 Timur 2017-09-08 10:05:48 UTC Comment hidden (obsolete)
Comment 8 Justin L 2018-05-29 17:59:12 UTC
styles.xml contains 
<style:page-layout-properties fo:page-width="8.5in" fo:page-height="11in" style:print-orientation="portrait" fo:margin-top="0.5in" fo:margin-left="1in" fo:margin-bottom="0.5in" fo:margin-right="1in" style:num-format="1" style:writing-mode="lr-tb">

fo:margin-top="0.5in" would be the key part explaining a 1/2 inch top margin.
Comment 9 QA Administrators 2019-05-30 02:55:31 UTC Comment hidden (obsolete, spam)
Comment 10 QA Administrators 2021-05-30 04:13:20 UTC Comment hidden (obsolete)
Comment 11 Timur 2021-05-31 10:04:36 UTC
Repro 7.2+ in LO with 0.5in. ODT created in MSO opens in MSO with 1 inch header. 
That would sound like a bug.
But as Justin notices, ODT says 0.5in so LO just opens as it's written. And real question is why MSO opens 1in.
So not sure this is LO bug at all.
Comment 12 Justin L 2021-06-21 12:21:55 UTC
(In reply to Timur from comment #11)
> So not sure this is LO bug at all.

When I round-trip First page.odt in Word 2016, then in LO it opens with a 1.27cm header. So as expected, this was an MS Word problem that they must have fixed since 2012.