Bug 124678 - Writer: DOCX export from ODT: Header/Footer are wrong when first node is section
Summary: Writer: DOCX export from ODT: Header/Footer are wrong when first node is section
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.beta1
Hardware: All All
: medium normal
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard: target:7.2.0 target:7.1.2
Keywords: bibisected, bisected, filter:docx
Depends on:
Blocks: DOCX-Header-Footer
  Show dependency treegraph
 
Reported: 2019-04-11 09:23 UTC by Serge Krot (CIB)
Modified: 2021-03-04 09:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Document starts with section (8.91 KB, application/vnd.oasis.opendocument.text)
2019-04-11 09:24 UTC, Serge Krot (CIB)
Details
Document starts with paragraph (8.95 KB, application/vnd.oasis.opendocument.text)
2019-04-11 09:25 UTC, Serge Krot (CIB)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Krot (CIB) 2019-04-11 09:23:31 UTC
Two ODT with two pages:
1. Default page descriptor has header/footer (without first page header/footer) and first node is a section without headers/footers.
2. The same as previous but contains one empty paragraph before the section.

In both cases:
* Page-1: No header/footer
* Page-2: Header/footer exists

During export into DOCX:
First document:
* Page-1: Header/footer exists (wrong behavior)
* Page-2: Header/footer exists

Second document:
* Page-1: No header/footer (correct behavior)
* Page-2: Header/footer exists
Comment 1 Serge Krot (CIB) 2019-04-11 09:24:51 UTC
Created attachment 150688 [details]
Document starts with section
Comment 2 Serge Krot (CIB) 2019-04-11 09:25:16 UTC
Created attachment 150689 [details]
Document starts with paragraph
Comment 3 mulla.tasanim 2019-04-13 07:32:47 UTC
Thank you for reporting the bug.

I can confirm that the bug is present in

Version: 6.2.1.2 (x64)
Build ID: 7bcb35dc3024a62dea0caee87020152d1ee96e71
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL


Version: 6.3.0.0.alpha0+ (x64)
Build ID: 91cdf22b88a4f7bec243c8fb187627e766d3294c
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-03-08_00:38:10
Locale: en-US (en_US); UI-Language: en-US
Calc: CL
Comment 5 Serge Krot (CIB) 2019-04-17 07:48:37 UTC
The unit test was implemented here:
https://gerrit.libreoffice.org/#/c/70646/
Comment 6 Commit Notification 2021-03-03 09:26:44 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e305289f87ea058cc92ecd83379b848697aa5a80

tdf#124678 DOCX export: always write title page in section props

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 7 Vasily Melenchuk (CIB) 2021-03-03 09:39:20 UTC
Reason for problem was missing <w:titlePg/> in first DOCX section definition. Resolved by patch in previous comment.
Comment 8 Commit Notification 2021-03-04 09:45:41 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/93b66d0e99c9b601616f5110318eeec3ebac8091

tdf#124678 DOCX export: always write title page in section props

It will be available in 7.1.2.

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.