Description: Same content on left/right pages/ Same content on first page checked on file open DOCX Steps to Reproduce: 1. Open attachment 165014 [details] 2. Go top say page 5 3. Format Header bar -> take a look at settings (top and bottom checkbox checked; rest unchecked) 4. Cancel 5. Save as DOCX 6. File reload 7. Repeat 3 -> All checkboxes checked. This isn't the case on DOC export Actual Results: Also checked: Same content on left/right pages Same content on first page Expected Results: Not so? Reproducible: Always User Profile Reset: No Additional Info: Version: 7.1.0.0.alpha0+ (x64) Build ID: e8b8e7be0b2ad693224cd94062a55610eb69df7e CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL
@Justin They area of DOCX import/export + compability differences is a mystery to me. They only thing I observe that checkbox are checked for they header which isn't they case in the source ODT nor when doing a DOC export. So if DOC has been implemented correctly this must be a bug; because I assume DOCX being more or less DOC except XML and all the additions made to it in the recent years.. But that only guessing Same content on left/right page doesn't get checked with 3.5.0 They "Same content on first page" is being checked by default with LibO 4.0 export. "Same content on left/right page" is not being checked. So even 2 bugs maybe?
The big difference is that two page styles are involved in import. The first header moves into a separate page style for DOCX (not DOC since 4.1). So not really a bug since emulation provides the same look as the original document. This was a good exercise for me to go through - to review the order of support for separate first header/footer. -3.5 (Dec 2011): already had left/right headers and footers, but no first page. So the whole idea of a "next page style" looks like the original concept of LibreOffice. The other stuff (first/left/right headers/footers) was probably added for compatibility with MSWord purposes. At this point, both DOC and DOCX successfully emulate this kind of file on import as a First Page / Default page-style combination. -4.0 UI for first page header/footer added with author Miklos Vajna on 2012-10-05 17:20:01 +0200 commit 751dacec8e0947c2d85187342995822e6dc62912 SvxHFPage: add UI for style::PageProperties::FirstIsShared -4.1: support added to import "default with first" DOC and export to DOC/DOCX. linux bibisect41max commit f1e99f38d537693ab8d73d721421f43d82b365b2 commit 1e113cb7604e1509e7d598a9be329f1f7b6e9322 Author: Luke Deller on Mon Feb 11 10:41:05 2013 +0000 import different first page header/footer from doc and in the prior commit 532e25f8b0ef1daeca1f9f84c7084812b72841d5 Author: Luke Deller on Mon Feb 11 10:26:34 2013 +0000 export different first page header/footer to doc/docx So, it looks like DOCX was never modified to use the new capability of a separate first page header/footer. So I think this is a legitimate enhancement report - although it is a rather dangerous area to mess around in. But it is also a fairly problematic area, so there should be lots of unit tests related to this to help catch re-implementation errors.
*** Bug 91296 has been marked as a duplicate of this bug. ***
Created attachment 169420 [details] Screenshot of the original document and its docx version in Writer - First Page Header settings
Created attachment 169421 [details] Screenshot of the original document and its docx version in Writer - Left Page Header settings
Created attachment 169422 [details] Screenshot of the original document and its docx version in Writer - Right Page Header settings
This should be solved by the patch for bug #69635: https://bugs.documentfoundation.org/show_bug.cgi?id=69635#c8
Not yet solved in Version: 7.2.0.0.alpha1+ / LibreOffice Community Build ID: b238522ca121ca8f863fe4d3394ade088a65ad01 CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3 Locale: en-US (ro_RO.UTF-8); UI: en-US Calc: threaded
(In reply to BogdanB from comment #8) > Not yet solved in Version: 7.2.0.0.alpha1+ / LibreOffice Community > Build ID: b238522ca121ca8f863fe4d3394ade088a65ad01 > CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3 > Locale: en-US (ro_RO.UTF-8); UI: en-US > Calc: threaded Yes. To summarize the problem: Currently Writer imports the "Different first page" setting from DOCX as a First Page page style (see in the Navigator - Styles - Page Styles) with the "Same content on first page" enabled (and Same content on left and right pages too, but that does not make a difference), and the "Even-odd different" setting as a "Default Page Style" with "Same content on left and right pages" enabled (and "Same content on first page" enabled but that does not make a difference either). While from doc, as implemented in https://cgit.freedesktop.org/libreoffice/core/commit/?id=1e113cb7604e1509e7d598a9be329f1f7b6e9322 all is imported as Default Page Style with "Same content on first page" and "Same content on first page" disabled, since that's how it makes sense. The task is to implement this import as "Default Page Style" in docx.
I'm going to try to do this for first headers in 7.4. I have a patch that passes almost all of the ooxml unit tests. RTF might be a bigger problem because it doesn't seem to export properly yet, so that will need to be fixed first.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/1891061f0b99c8a7c5d9983b925efcf401c958fd prelim tdf#136472: remove implementation specific unit tests It will be available in 7.3.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/bac1b748f5b600952b9bf3eaaaf5a4bb8342fe59 prelim tdf#136472: adjust implementation specific unit tests It will be available in 7.3.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.
I don't have enough compelling evidence to actually propose this patch, but it does seem to be working. So I will at least post it here for reference at minimum. http://gerrit.libreoffice.org/c/core/+/124755
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0ce586e1e50deeaf2ba210acc4fea08058f8b15c related tdf#136472 writerfilter: only copy even pages if used It will be available in 7.3.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.
Created attachment 176135 [details] patch_136472.diff: my mostly working attempt to import as first-header. (In reply to Justin L from comment #13) Because a web link can disappear too easily, I'm attaching the code diff.
*** Bug 141225 has been marked as a duplicate of this bug. ***
Tomaž Vajngerl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4b0fa253a4540f5461397815d290586f9ddabe61 tdf#136472 adjust ooxml import to handle first header/footer It will be available in 24.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.