Bug 81426 - FILESAVE: Data from header and footer is getting lost in DOCX (continuous sections)
Summary: FILESAVE: Data from header and footer is getting lost in DOCX (continuous sec...
Status: RESOLVED DUPLICATE of bug 112202
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: bibisected, bisected, filter:docx
Depends on:
Blocks: DOCX-Section
  Show dependency treegraph
 
Reported: 2014-07-16 11:27 UTC by Rajashri
Modified: 2020-06-23 14:08 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Original File (499.91 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-07-16 11:27 UTC, Rajashri
Details
Round Trip document (257.08 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-07-16 11:28 UTC, Rajashri
Details
385_docx.pdf: MSWord2003's view of the first 4 pages (94.04 KB, application/pdf)
2017-03-11 07:40 UTC, Justin L
Details
File compared MSO LO (173.82 KB, image/png)
2020-03-19 08:37 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rajashri 2014-07-16 11:27:05 UTC
Created attachment 102915 [details]
Original File

Problem description: 

Steps to reproduce:
1. Open the file in LibreOffice
2. Save the file in Docx format
3. Open the file in Microsoft Office

Current behavior:
Data from header and footer is getting lost.
Expected behavior:
Header and footer data should be preserved.
              
Operating System: All
Version: 4.4.0.0.alpha0+ Master
Comment 1 Rajashri 2014-07-16 11:28:25 UTC
Created attachment 102916 [details]
Round Trip document
Comment 2 Jorendc 2014-07-16 11:33:06 UTC Comment hidden (obsolete)
Comment 3 Xisco Faulí 2015-08-20 13:28:10 UTC Comment hidden (obsolete)
Comment 4 tommy27 2015-11-03 06:27:40 UTC Comment hidden (obsolete)
Comment 5 Cor Nouws 2016-05-09 08:36:57 UTC Comment hidden (obsolete)
Comment 6 mahfiaz 2016-08-04 16:28:18 UTC Comment hidden (obsolete)
Comment 7 hausheer@bluewin.ch 2016-11-30 10:29:07 UTC
Problem still ocurs in Version 5.1.6.2

in Libre Calc, saved as XLT.
Comment 8 Justin L 2017-03-11 07:40:20 UTC
Created attachment 131810 [details]
385_docx.pdf: MSWord2003's view of the first 4 pages

This document is an enhancement request since it uses formatting that LibreOffice doesn't currently mimic.

There are four continuous sections defined on page1.  The fourth section contains the desired header/footer for the following pages.  It spills over onto page2, and thus in MSWord, that becomes the header/footer for that page. LibreOffice only assigns header/footers to page styles, not continuous sections.

Section 5 is defined at the top of page 11, first applies to the Vendor Information page and continues to the end of the document. 

The authors of this document ought to have used nextPage sections instead of continuous sections since, at each section change, a pagebreak was appropriate. In that case it would have worked.
Comment 9 Justin L 2018-08-23 14:26:42 UTC
*** Bug 116959 has been marked as a duplicate of this bug. ***
Comment 10 Xisco Faulí 2019-11-29 13:27:33 UTC
Changing priority back to 'medium' since the number of duplicates is lower than 5
Comment 11 Samuel Mehrbrodt (allotropia) 2019-12-19 17:19:38 UTC
This seems to work in

Version: 6.5.0.0.alpha0+
Build ID: 6015634de5ada0f9dda9bb4354b2939d8f015a27
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: gtk3; 
Locale: de-DE (de_DE.UTF-8); UI-Language: en-US
Calc: threaded
Comment 12 Timur 2019-12-20 21:02:16 UTC
I'm not in favor of simple closing this one if not fully resolved all header issues. 
There's an improvement with headers and I set bibisectRequest. But not with all.

No header and footer are shown in Vendor Information when re-opened in MSO or LO. And that's the remaining bug.
Also, in whole document and also in Vendor Information, line is missing in footer. Would be nice if resolved with previous.
Comment 13 Timur 2020-03-19 08:19:48 UTC
Oldest in 6.5 bibisect opened header/footer wrong and then DOCX was crashing LO and from this commit DOCX could be open with an aforementioned improvement in headers: 
 4bb350830b2222e496b86167b73438519f0cac6c is the first bad (here: good) commit
Date:   Tue Dec 17 15:22:56 2019 +0100
    source 08f13ab85b5c65b5dc8adfa15918fb3e426fcc3c

https://gerrit.libreoffice.org/plugins/gitiles/core/+/08f13ab85b5c65b5dc8adfa15918fb3e426fcc3c%5E!/

commit 08f13ab85b5c65b5dc8adfa15918fb3e426fcc3c	[log]
author	Michael Stahl <Michael.Stahl@cib.de>	Mon Dec 16 12:58:46 2019 +0100
committer	Michael Stahl <michael.stahl@cib.de>	Tue Dec 17 10:16:36 2019 +0100
tree 0aa3c140eb2c76360aa2b91edc3bf6fe6aacb4f3
parent e9e57a3dbd8b780e0ae3c9015d757719b893f190 [diff]

tdf#112202 writerfilter,sw: fix loss of headers
Comment 14 Timur 2020-03-19 08:37:08 UTC
Created attachment 158793 [details]
File compared MSO LO

As seen on page 13, after that 1st fix still there was no footer. 
Now with current master 7.0+, it's there. 
So only issue remaining is line in footer. 
This bug should be for that - or duplicated if line is already reported.
Comment 15 Timur 2020-03-19 09:04:11 UTC
Page 13 fix:
 bb0b63f68c1b5bdd70b8bd393fd85b950756ca98 is the first bad (here: good) commit
Date:   Fri Jan 10 17:23:33 2020 +0100
    source c12358166a9bd88fe10feabca45a6ad3f65dff8e

https://gerrit.libreoffice.org/plugins/gitiles/core/+/c12358166a9bd88fe10feabca45a6ad3f65dff8e%5E!/

commit c12358166a9bd88fe10feabca45a6ad3f65dff8e	[log]
author	Miklos Vajna <vmiklos@collabora.com>	Fri Jan 10 16:03:43 2020 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	Fri Jan 10 17:20:23 2020 +0100
tree c1f99c98052fbbd8d8c063bf626b43a3115e860c
parent cd260db2ac2e96455df5bae00dc371565f16255b [diff]

DOCX import: fix lost objects anchored to an empty linked header

This is really similar to commit 04b2310aaa094794ceedaa1bb6ff1823a2d29d3e (DOCX import: fix lost objects
anchored to the single para of a linked header, 2020-01-10), except here
the header is not just a single-paragraph one, but has no text portions.

Update text-copy.docx to have a header which is not only a single
paragraph, but also has no character content. This keeps testing the
original case, but now also tests the more strict case (single paragraph
-> single empty paragraph).

Change-Id: I11bb062e77af1a83f717225ea5b4daef39e5a672
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86552
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Comment 16 Timur 2020-03-19 11:33:56 UTC
As for "missing line in footer", that's not footer but frame with border, probably bug 97274.
Anyway, with thanks to Michael and Miklos, let's close as a duplicate of 1st bug.

*** This bug has been marked as a duplicate of bug 112202 ***