Bug 136472 - Same content on left/right pages/ Same content on first page checked on file open DOCX
Summary: Same content on left/right pages/ Same content on first page checked on file ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: Dániel Arató (NISZ)
URL:
Whiteboard:
Keywords:
: 91296 (view as bug list)
Depends on:
Blocks: DOCX-Header-Footer Writer-Styles-Page-Odd-Even
  Show dependency treegraph
 
Reported: 2020-09-04 18:26 UTC by Telesto
Modified: 2021-05-13 08:59 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the original document and its docx version in Writer - First Page Header settings (98.15 KB, image/png)
2021-02-03 11:14 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document and its docx version in Writer - Left Page Header settings (85.94 KB, image/png)
2021-02-03 11:18 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document and its docx version in Writer - Right Page Header settings (98.82 KB, image/png)
2021-02-03 11:21 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-09-04 18:26:04 UTC
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
Comment 1 Telesto 2020-09-04 18:36:42 UTC
@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?
Comment 2 Justin L 2020-09-07 09:47:01 UTC
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.
Comment 3 Justin L 2020-12-14 11:02:44 UTC
*** Bug 91296 has been marked as a duplicate of this bug. ***
Comment 4 NISZ LibreOffice Team 2021-02-03 11:14:21 UTC
Created attachment 169420 [details]
Screenshot of the original document and its docx version in Writer - First Page Header settings
Comment 5 NISZ LibreOffice Team 2021-02-03 11:18:38 UTC
Created attachment 169421 [details]
Screenshot of the original document and its docx version in Writer - Left Page Header settings
Comment 6 NISZ LibreOffice Team 2021-02-03 11:21:31 UTC
Created attachment 169422 [details]
Screenshot of the original document and its docx version in Writer - Right Page Header settings
Comment 7 Dániel Arató (NISZ) 2021-05-13 08:59:04 UTC
This should be solved by the patch for bug #69635:
https://bugs.documentfoundation.org/show_bug.cgi?id=69635#c8