Created attachment 144127 [details] .DOC with page header issue When opening a 2-page Word document with a right page header, the right page header and left page header are reversed. So, the right page header appears on the left page and the left page header appears on the right page. The right page header contains a page number where the left page header is blank. As a result, the first page of the document shows the page number where the second page does not show a page number. This doesn't happen when viewing the document in MS Word. In MS Word, the page number appears in the header of the second page, which I believe to be the right-side page. The document is a resume so the page number should appear only on the right-side page.
I forgot to mention this behavior occurs in Writer 4.4.6.3 on Ubuntu Linux, Writer 5.1.6.2 on Linux Mint, and Writer 6.0.6.2 on Windows 7 and Windows 10.
I can't see what's wrong with the document. Page layout is right - left. so the first page is the right page with the right header and the second page is the left page with left header. I'm not familiar with MS-Word, so I don't know if there is for example a page layout left-right, that can't be imported in LO.
Thanks. So, when I open the attached document in MS Word, the header *does not* appear on the top of the first page, which has the name and address on the top. The header appears only on the second page, which continues the resume. In LibreOffice Writer, the exact opposite happens. I'm ok with the MS Word being "wrong" in that the right and left pages are reversed, yet Word somehow manages to reverse them. It's just this will appear as misbehavior in Writer because the page header appears on the "wrong page". I'll get a screen shot in MS Word to post, when I get a chance.
In Word, if we start with Even header for page 1 and check Diff. Odd&Even, Word will turn page 1 to Odd and set 2 as Even, so it will correctly save. DOC attachment 144127 [details] seems wrong and it's not clear how it was created. I'm not sure if this is NotaBug (LO behaves as it should), WontFix (doesn't read properly this DOC but it's wrong anyway) or New enhancement (LO should read even wrong DOC correctly, similar to Word).
Thanks for the comments. I actually don't know how the original document was created either. I was helping a friend with her resume and reduced her original document to the attached test, in MS Word. If the document is "bad" and Writer is behaving correctly, I'm ok with that and we can close this bug report. Thanks!
(In reply to Tom Williams from comment #5) > If the document is "bad" and Writer is behaving correctly, I'm ok with that > and we can close this bug report. > > Thanks! I think, we can close this report as RESOLVED NOTABUG. If anybody diagrees, please reopen it.
This is one case where LO actually reads a .docx better than a .doc. I seem to remember seeing a patch in docx for this. Note that in Word, the first page is numbered as page2 and the second page is numbered as page3.
Interesting. DOC format does support import the starting page number, but in this document, it indicates that is starts on page1 and not page2. warn:JCL:21938:21938:sw/source/filter/ww8/ww8par6.cxx:1012: pgnStart[1] I guess the fact that the section starts on an even page means that Word automatically changes the starting page number.
Created attachment 144236 [details] .DOC with page numbers Here is the same .DOC with more clear headers. From Justin's comment I conclude we may have bug in reading DOC differently from DOCX.
Created attachment 144237 [details] .DOCX with page numbers Same DOCX is read in LO as shown in MSO. Note headers and page numbers.
proposed fix: https://gerrit.libreoffice.org/59221 DOCX doesn't have this problem at all, and I didn't find any code trying to massage this. In fact, it looks like PROP_PAGE_NUMBER_OFFSET isn't being set at all, so basically that suggests that complete default values are being done "properly" by sw. But the same was true in the ww8 side - SetNumOffset wasn't being called at all in this case, but sw wasn't handling it properly this time.
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2127581728ae61eca7470b288c21d1c02754fb5b tdf#119232 ww8import: even page means default to start on page 2 It will be available in 6.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.