Bug 93640 - Footer from DOCX Is Missing When Odd/Even Footers Are Different in MS Office
Summary: Footer from DOCX Is Missing When Odd/Even Footers Are Different in MS Office
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.6.2 release
Hardware: All All
: high normal
Assignee: Luke Deller
URL:
Whiteboard: interoperability target:5.2.0 target:...
Keywords: bibisected, filter:docx, regression
: 38639 93224 (view as bug list)
Depends on:
Blocks: DOCX-Limitations Writer-Styles-Page-Odd-Even
  Show dependency treegraph
 
Reported: 2015-08-25 00:13 UTC by Matthew Holloway
Modified: 2017-10-04 12:08 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Source document of even footer issue (283.33 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-08-25 00:13 UTC, Matthew Holloway
Details
msword rendering of document (106.83 KB, image/png)
2015-08-25 00:14 UTC, Matthew Holloway
Details
Rendering in LibreOffice 5.0.0.5 (59.31 KB, application/pdf)
2015-08-25 00:14 UTC, Matthew Holloway
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Holloway 2015-08-25 00:13:49 UTC
Created attachment 118145 [details]
Source document of even footer issue

In the attached document there is a configuration of different footers based on being `even` or `odd` page numbers, and the even numbered footers aren't displayed.

This issue starts on page 8 of the attached document.
Comment 1 Matthew Holloway 2015-08-25 00:14:12 UTC
Created attachment 118146 [details]
msword rendering of document
Comment 2 Matthew Holloway 2015-08-25 00:14:29 UTC
Created attachment 118147 [details]
Rendering in LibreOffice 5.0.0.5
Comment 3 Joel Madero 2015-08-25 03:54:52 UTC
Confirmed:
Ubuntu 15.04 x64
LibreOffice 5.0.0.4


Setting as:
NEW
Major - Unlike the other ones, in this case it actually looks like the data is missing - major (loss of data)
High - default

@Matthew - simpler test case would be fantastic. Also testing to see older versions if you have the time: http://downloadarchive.documentfoundation.org/libreoffice/old/

Thanks!
Comment 4 Matthew Holloway 2015-08-26 03:15:53 UTC
Regression first occurred in LibreOffice 4.1.6.1

(in LibreOffice 4.1.5.3 it works)
Comment 5 Matthew Holloway 2015-08-26 03:26:19 UTC
4.1.6.1 isn't an option so I've chosen 4.1.6.2
Comment 6 Robinson Tryon (qubit) 2015-12-13 12:20:18 UTC Comment hidden (obsolete)
Comment 7 Joel Madero 2015-12-15 07:00:24 UTC
 70cea68b2de84c293ea8adbe2de81f75c23d0beb is the first bad commit
commit 70cea68b2de84c293ea8adbe2de81f75c23d0beb
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Thu Oct 17 12:15:48 2013 +0000

    source-hash-4a143c44fe7ad266ab9ab7dca317b0099b1438d0
    
    commit 4a143c44fe7ad266ab9ab7dca317b0099b1438d0
    Author:     Andras Timar <atimar@suse.com>
    AuthorDate: Thu Jun 13 16:18:29 2013 +0200
    Commit:     Gerrit Code Review <gerrit@vm2.documentfoundation.org>
    CommitDate: Thu Jun 13 15:15:03 2013 +0000
    
        Updated core
        Project: help  50f2902dc9d125c6ab5b379d5389364bb7bdf09c

:100644 100644 88d0da0595db38c08d152d0767e2c78ee0286eae 0cf6236b9d5dde5c57d4a12847bee37338c34630 M	ccache.log
:100644 100644 554c2684861e3ceffe574a5ddbb3346a90d92224 c9dc12cedacb3166e93d8a357364c623904f37ff M	commitmsg
:100644 100644 885f065ed99f5d8ee71841c77ad4a48275c72df3 d478f1a28e2f5762b631d2fffd30e63885d1fbfc M	dev-install.log
:100644 100644 fd4ad2dd5eec7738c780b33d28f6bdfdbebbeccc bcdfd152efb2c54f1b5be1ff400afd2e3c85502d M	make.log
:040000 040000 0e333dc18542aaa76b19508654b4406e5bab10ce 572b4cd4d3105d37cfd78bc6d44a3e166b8daa9c M	opt


# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574
# bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b
git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d
# skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681
git bisect skip a043626b542eb8314218d7439534dce2fc325304
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a
git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930
git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31
# bad: [1d4980621741d3050a5fe61b247c157d769988f2] source-hash-89d01a7d8028ddb765e02c116d202a2435894217
git bisect bad 1d4980621741d3050a5fe61b247c157d769988f2
# bad: [ba096f438393091574da98fe7b8e6b05182a8971] source-hash-8499e78ca03c792f4fa2650e02b519094ba0baa8
git bisect bad ba096f438393091574da98fe7b8e6b05182a8971
# bad: [9daa289e178460daaafa4b3911031df5b8736218] source-hash-704292996a3731a61339b1a4a5c90c9403aa095f
git bisect bad 9daa289e178460daaafa4b3911031df5b8736218
# bad: [69bf614869471f46413fe1d2af5976b2e6d85084] source-hash-76dea8b2db906156e77f78738a68f932a15afd4b
git bisect bad 69bf614869471f46413fe1d2af5976b2e6d85084
# good: [91c3e68c86f5b7143ab0de18c70c46de8314d6e1] source-hash-4e41227dd6af52ec562d10efcb365defba6bd36e
git bisect good 91c3e68c86f5b7143ab0de18c70c46de8314d6e1
# bad: [70cea68b2de84c293ea8adbe2de81f75c23d0beb] source-hash-4a143c44fe7ad266ab9ab7dca317b0099b1438d0
git bisect bad 70cea68b2de84c293ea8adbe2de81f75c23d0beb
# good: [d4078738db5f3c995eff2987d3ebdb0ac0aaf3ce] source-hash-3d5fb88cc0aa8ee6be6cec5ce0255f1412368519
git bisect good d4078738db5f3c995eff2987d3ebdb0ac0aaf3ce
# first bad commit: [70cea68b2de84c293ea8adbe2de81f75c23d0beb] source-hash-4a143c44fe7ad266ab9ab7dca317b0099b1438d0
Comment 8 Luke Deller 2016-01-04 12:18:38 UTC
Section 3 of the docx defines an even(/left) page footer

Section 4 defines a new odd(/right) page footer, but it takes the even page footer from section 3 (shown in Word as "Link to Previous").

This "Link to Previous" is not working in LibreOffice.  I can see in the code that it is not implemented for even page headers/footers from docx.  I'll have a go at fixing it.
Comment 9 Commit Notification 2016-01-08 10:25:49 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "master":

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

tdf#93640 Fix import of linked left page header/footer

It will be available in 5.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 10 Commit Notification 2016-05-03 15:59:37 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7e9b5d9ba6bccdc75bfee4ddfd2f1582ea10746f&h=libreoffice-5-1

tdf#93640 Fix import of linked left page header/footer

It will be available in 5.1.4.

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 11 Justin L 2016-06-23 09:50:16 UTC
*** Bug 38639 has been marked as a duplicate of this bug. ***
Comment 12 Justin L 2016-06-23 09:52:35 UTC
*** Bug 93224 has been marked as a duplicate of this bug. ***
Comment 13 Commit Notification 2017-03-11 04:15:44 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

ooxmlimport: unit test for tdf#93640 is round-trippable

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