Bug 109080 - ODF: LibreOffice writes invalid element <style:header-first>
Summary: ODF: LibreOffice writes invalid element <style:header-first>
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Luke Deller
URL: http://docs.oasis-open.org/office/v1....
Whiteboard: target:6.0.0 target:5.3.6 target:5.4....
Keywords: filter:odt
Depends on:
Blocks: ODF-export-invalid
  Show dependency treegraph
 
Reported: 2017-07-12 12:23 UTC by Regina Henschel
Modified: 2021-05-28 12:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-07-12 12:23:10 UTC
Start new document in Writer.
Go to page style properties of "Default Style"
Enable header.
Check option "Same content on right and left pages"
Do not check option "Same content on first page". OK
Enter some text in header.
Enter some text in body.
Insert page break.
Enter some text in header.
Enter some text in body.
Save.

Validate as "extended conformant ODF1.2"
The element <style:header-first> is not allowed as child of <style:header-style>. As long as it is not included in ODF it needs to be in own namespace.

[The second error, 'draw:fill' not allowed, is already tracked in bug 103602.]
Comment 1 Luke Deller 2017-07-12 13:36:23 UTC
This was introduced in commit 7ac60704206d229b45dd002ca3b9d70c4c64034e as part of the original first page header work in LibreOffice 4.0.

The corresponding behaviour exists for <style:footer-first>

One consequence of changing LibreOffice to emit <loext:header-first> will be that ODT files created in LibreOffice 6.0+ with first page headers will not be correctly read by earlier LibreOffice versions.  Is this acceptable?
Comment 2 Miklos Vajna 2017-07-12 13:52:43 UTC
I think the protocol for such changes is:

- make commit A: read loext:footer-first
- make commit B: write loext-footer-first

Push these to master, and backport commit A to active release branches (but not commit B). Does that help?
Comment 3 Commit Notification 2017-07-18 07:51:22 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "master":

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

tdf#109080 First page header/footer ODF (1/2)

It will be available in 6.0.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 4 Commit Notification 2017-07-20 09:48:19 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "master":

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

tdf#109080 First page header/footer ODF (2/2)

It will be available in 6.0.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 5 Commit Notification 2017-07-20 13:19:49 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=63274a5b0528e82faf7eed9cbc50badfdd1d3b55&h=libreoffice-5-3

tdf#109080 First page header/footer ODF (1/2)

It will be available in 5.3.6.

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 6 Commit Notification 2017-07-20 13:21:10 UTC
Luke Deller committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c027764f94a1fc0a367e03b412d3c11d6c10769c&h=libreoffice-5-4

tdf#109080 First page header/footer ODF (1/2)

It will be available in 5.4.1.

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 Thomas Lendo 2017-08-31 19:13:00 UTC
Thanks for the fix, Luke.

Verified in Version: 5.4.1.2
Build-ID: ea7cb86e6eeb2bf3a5af73a8f7777ac570321527
CPU-Threads: 4; Betriebssystem:Linux 4.10; UI-Render: Standard; VCL: gtk2; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
Comment 8 Commit Notification 2018-03-01 13:31:26 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a75b4cefe89a8e9ebf0c1c0563390d076e85dc49&h=libreoffice-6-0

tdf#116102 Revert "tdf#109080 First page header/footer ODF (2/2)"

It will be available in 6.0.3.

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.