Bug 69635 - FILESAVE: DOCX Export loses hidden 'first' and 'even' header & footer
Summary: FILESAVE: DOCX Export loses hidden 'first' and 'even' header & footer
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Dániel Arató (NISZ)
URL:
Whiteboard: BSA interoperability target:7.2.0
Keywords: filter:docx
Depends on: 140117
Blocks: DOCX-Header-Footer
  Show dependency treegraph
 
Reported: 2013-09-21 10:01 UTC by Adam CloudOn
Modified: 2021-06-11 08:32 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX containing headers & footers for 'first', 'even' & 'odd' pages - but 'first' and 'even' are turned off (18.75 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-09-21 10:01 UTC, Adam CloudOn
Details
DOCX exported by LO with empty 'first' and 'even' page headers and footers (5.03 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-09-21 10:02 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-09-21 10:01:40 UTC
Created attachment 86234 [details]
DOCX containing headers & footers for 'first', 'even' & 'odd' pages - but 'first' and 'even' are turned off

Problem description: 
LO does not preserve headers & footers if they are not being shown in the document.
Meaning - if a DOCX contains a 'first-page' header, but the 'show different first page' is turned OFF, than LibreOffice will not even import that header and lose it.
However, in Word - you can still turn on & off the 'first-page' header without losing it.

Steps to reproduce:
1. Load the attached DOCX in LO
2. Save as NEW.DOCX
3. Load the NEW.DOCX in Word
4. Turn on the 'Different First Page' flag - the original 'first page' header & footer are lost and are shown blank.
5. Turn on the 'Different Odd & Even pages' flag - the original 'even page' header & footer are lost and are shown blank.

Current behavior:
LO does not preserve 'first page' \ 'even page' headers and footers if they are not shown.

Expected behavior:
LO does should preserve 'first page' \ 'even page' headers and footers even if they are shown.
              
Operating System: All
Version: 4.2.0.0.alpha0+ Master
Comment 1 Adam CloudOn 2013-09-21 10:02:23 UTC
Created attachment 86235 [details]
DOCX exported by LO with empty 'first' and 'even' page headers and footers
Comment 2 Jorendc 2013-10-03 21:14:11 UTC
NEW :)
Comment 3 QA Administrators 2015-04-01 14:42:03 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2015-04-27 09:40:03 UTC
Reproduced with attachment 86234 [details]

Win 8.1 32-bit
MSO 2013
LibO Version: 5.0.0.0.alpha1+
Build ID: f0edb677f09ad338e22ac3b5d91497b4479e0b3c
TinderBox: Win-x86@39, Branch:master, Time: 2015-04-27_00:34:58
Locale: fi_FI
Comment 5 QA Administrators 2017-12-10 16:44:02 UTC Comment hidden (obsolete)
Comment 6 Timur 2018-08-07 15:47:42 UTC
Repro 6.2+
Comment 7 QA Administrators 2019-08-19 06:55:37 UTC Comment hidden (obsolete)
Comment 8 Commit Notification 2021-05-04 17:15:19 UTC
Daniel Arato (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/88e6a1bfeac86e0c89d2ff08c908c2b5ae061177

tdf#69635 DOCX: export hidden (shared) headers/footers

It will be available in 7.2.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 9 NISZ LibreOffice Team 2021-06-08 10:20:32 UTC
Verified in: 
Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 3b57ebb445df8a2bc3d916ea79f8af45e20e4e62
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded