Bug 67701 - FORMATTING: Mirrored format incorrect if first page is on the left with certain header/footer settings
Summary: FORMATTING: Mirrored format incorrect if first page is on the left with certa...
Status: RESOLVED DUPLICATE of bug 69065
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: Other Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-03 08:48 UTC by librebugzzz
Modified: 2018-08-15 18:52 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen shot of document in preview mode demonstrating the margin bug (135.67 KB, image/png)
2013-08-03 08:48 UTC, librebugzzz
Details
Sample document demonstrating the problem. (23.05 KB, application/vnd.oasis.opendocument.text)
2013-08-03 18:15 UTC, librebugzzz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description librebugzzz 2013-08-03 08:48:41 UTC
Created attachment 83569 [details]
Screen shot of document in preview mode demonstrating the margin bug

Problem description: With certain header and footer settings, the mirrored margins may not be correct on the first page of a custom page style when the first page in the new style is on the left (i.e., an even-numbered page); instead the page may have margins correct for a right-hand page.

Steps to reproduce:
1. Define a page style using a mirrored layout with a large inner margin and visibly smaller outer margin
2. Define headers for the custom style with the header options of header on, not same content left/right, not same content on first page
3. Define footers for the custom style with the footer options of footer on, same content left/right, same content on first page
4. On the first page of the document (which would be the right-hand page), open the Insert Break dialog (e.g., Insert, Manual Break)
5. Ensure the Type is Page break
6. Ensure the Style is the style defined in #1 above
7. Click OK
8. On the new page, type or paste text content if necessary to help see the margins

Current behavior: The first page of the new page style will be a left page but the margins will be for a right page.

Expected behavior: The first page of the new page style with mirrored layout should be correct whether it is on the left or right. Header and footer settings should not affect inner/outer margins.

Note that the style on the back of a page may be different from the style on the front of the page, so it is not valid to assume that the first page of a style is a right (odd-numbered) page.

Note also that if header and footer options are set differently, this bug may not appear.
Operating System: Windows 7
Version: 4.1.0.4 release
Comment 1 Cor Nouws 2013-08-03 09:02:05 UTC
Hi!
thanks for your report. Could you pls attach a sample document too?
Regards,
Cor
Comment 2 librebugzzz 2013-08-03 18:15:09 UTC
Created attachment 83592 [details]
Sample document demonstrating the problem.

This document has one custom style, to demonstrate the bug. Explanatory text and lorem ipsum filler is also included.
Comment 3 librebugzzz 2013-08-03 18:20:21 UTC
An imperfect work-around is to use style flow automation to force a left-only page style before the desired style, to force the first page of the desired style to begin on the right page.

For example, if the desired style with mirrored layout is ChapterBody, a left-only style of FixChapter could be created with the Next Style set to ChapterBody. If there is a separate style, such as ChapterStart, the "fix" style would have to be inserted accordingly using a Next Style chain, i.e., ChapterStart -> FixChapter -> ChapterBody.

This is imperfect because in a long work that is undergoing revisions the left- or right-start of a section of content may change, so the fix would need to be manually applied or removed whenever the start changed from left to right or vice versa.
Comment 4 librebugzzz 2013-08-03 18:21:11 UTC
I believe this may be related to bug 60250: https://www.libreoffice.org/bugzilla/show_bug.cgi?id=60250
Comment 5 Jean-Baptiste Faure 2013-09-14 07:50:58 UTC
(In reply to comment #0)
> [...] 
> Note that the style on the back of a page may be different from the style on
> the front of the page, so it is not valid to assume that the first page of a
> style is a right (odd-numbered) page.

Perhaps, but it seems to me that for a _mirrored_ page style, you need to know if the first page with this style is left-hand or right-hand. It seems that the design of mirrored page style assumes that first page with this style is left-hand.

Is there a problem to work with this constraint?

Best regards. JBF
Comment 6 Rick 2013-10-01 23:38:57 UTC
I currently struggle with this same issue. I have a chapter book where chapters begin on either left or right depending on the end of the previous chapter. You shouldn't assume that with mirrored style all first pages are recto. That's an out-dated standard.
Comment 7 Jean-Baptiste Faure 2013-11-10 12:29:19 UTC
If, in the page break format, I choose a starting page number that is odd, then the first page with the BugDemo page style is a right hand page and the page mirroring works as expected. In the bug doc the starting page number is set to zero.

I think that there is no bug there, but only a design based on an old though venerable publishing doctrine. ;-)
Set status to NEW and importance to ENHANCEMENT.

Best regards. JBF
Comment 8 Justin L 2018-08-15 18:52:44 UTC
fixed in LO 4.3 with fix for bug 69065
commit e936ecc92a7e362f57ce72a955697840920636b8
    Author:     Michael Stahl
    CommitDate: Fri Dec 20 23:56:11 2013 +0100
    
        fdo#69065: sw: fix mirrored page style with first-page
    
        If a mirrored page style is used with first-page on both a right page
        and a left page the current design cannot work because the margins in
        the SwPageDesc::aFirst cannot be right for both cases.
    
        So split that up so we get a first-master and first-left format and
        copy the headers/footers and margins as appropriate... which is really
        adding epicycles to a flawed design; probably this would be better with
        just a single SwFrmFmt that has different items for master/left/first
        headers.

*** This bug has been marked as a duplicate of bug 69065 ***