Bug 94847 - In RTL documents, headers and footers are labeled incorrectly.
Summary: In RTL documents, headers and footers are labeled incorrectly.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: high normal
Assignee: Not Assigned
Depends on:
Blocks: Writer-Styles-Page-Odd-Even RTL-UI
  Show dependency treegraph
Reported: 2015-10-07 08:03 UTC by Jonathan Joseph Chiarella
Modified: 2023-06-06 17:37 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:

Test file (8.42 KB, application/vnd.oasis.opendocument.text)
2017-11-09 11:43 UTC, Omer Zak
Testfile with writing mode right-to-left (11.61 KB, application/vnd.oasis.opendocument.text)
2021-02-24 23:11 UTC, Regina Henschel
First Page is labeled Right in RTL (424.65 KB, image/png)
2023-03-20 21:21 UTC, Munzir Taha

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Joseph Chiarella 2015-10-07 08:03:58 UTC
When writing with Format->Page set to Left to Right, the first page (odd, #1) is the "Right page".*

However, when Format->Page is set to Right to Left, the first page (odd, #1) is labelled "Right page" and acts as such when mirrored page margins are set. (I.e. The outer margin is on the right for the right pages).

In RTL books the first page is on the Left. You open a book ("from the back"). The cover is on the left side. You unfurl it to the right. Turn the page again. Now there is the Title Page, the first page, the odd page, the #1 page, on the LEFT. I know of no way to fix this. Adding an additional Title Page a dummy page does not change this.

I could tell the page numbers to start at 2 or 4 to offset the odd/even problem. But then I have to think backwards whenever I set inner/outer margins in a mirrored setup and text alignment in headers and footers.

Oh, and also it makes booklet printouts impossible.

Please fix

*(That it is displayed on the left on two-page view is a minor annoyance. The first two pages should be just grey on the left and the first page, #1, should be displayed on the right)
Comment 1 Jonathan Joseph Chiarella 2015-10-07 08:06:30 UTC
Edit for missing words: Adding an additional Title Page to act as a dummy page does not change this.
Comment 2 Jonathan Joseph Chiarella 2015-10-07 09:54:47 UTC
Also for Vertical Up-Down then RTL in addition to horizontal layout RTL
Comment 3 Buovjaga 2015-10-08 17:00:58 UTC
labelled "Right page" -> how can I display this?
Comment 4 Jonathan Joseph Chiarella 2015-10-14 17:49:05 UTC
There are several ways.

One is to create a header and have it be NOT same on left and right.

Now hover mouse over the header on the first page.

It says right page.

As I wrote, in RTL contexts orvertical then RTL contexts, page 1 is on the left.

Then you turn the page/open the booklet etc

Now you have page 2 on right andpage 3 on left.

In Fornat-> Page if I change the page order direction, the first page does NOT change it should.

As proof,now set the page margins to mirrored. Set an outer margin of 10 cm.

The outer margin on the first page is now a 10cm on the right side. The only way the outer margin could be on the right sideof the first page is if the first page is indeed set to be, incorrectly here, the rightside page.

I finally noticed the book view mode toggle (next to multipage view). the pages are displayed side by side in pairs. The page order in display and joining of inner margins shows that Libreoffice is behaving wrong.

In RTL page flow direction, page 1 is a single page on the right or is the front cover of a closed booklet/pamphlet. Opening the pamphlet/turning the page will then reveal the first pair of page faces. The backside of page 1 is page 2 and is now on the right side. Page 3 is part of a new sheetof paper. Page 3 ison the left side.

LTR book

Nothing - Page 1 (or front cover)
Page 2 - Page 3
Page 4 - Page 5
Page 6 - Page 7
Page 8 (or back cover) - Nothing

RTL book (this is what it SHOULD be)

Page 1 (or front cover) - Nothing
Page 3 - Page 2
Page 5 - Page 4
Page 7 - Page 6
Nothing - Page 8 (or back cover)
Comment 5 Jonathan Joseph Chiarella 2015-10-14 17:53:07 UTC
To see page display as pop-up.

Have multiple pages. Having 8 pages of text will give you the feel of a book.

Format -> Page (right to left)

Insert -> header

Fornat -> Page -> Header tab

Same content on left and right UNCHECK.


Move screen focus to first page.

Move mouse to where footer is.


Read blue pop-up. It says "Header (Right page)
Comment 6 Buovjaga 2015-10-14 17:56:27 UTC
Don't have time to test today, so let's keep it as unconfirmed before someone else tests.
Comment 7 Jonathan Joseph Chiarella 2015-10-14 17:58:45 UTC
Sorry. Typing on smart phone screent. Made some misclicks rrying tozoom
Comment 8 Buovjaga 2015-10-16 19:08:11 UTC
Thanks, I confirm.

Win 7 Pro 64-bit, Version: (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)

Build ID: 186f32f63434e16ff5776251657f902d5808ed3d
TinderBox: Win-x86@39, Branch:master, Time: 2015-10-16_09:42:47
Locale: en-US (fi_FI)
Comment 9 QA Administrators 2016-11-08 11:07:35 UTC Comment hidden (obsolete)
Comment 10 Omer Zak 2017-11-09 11:43:37 UTC
Created attachment 137639 [details]
Test file

This file has 4 pages, with mirrored pages.
The outer margin is very large to make it easy to see the bug.
Comment 11 Omer Zak 2017-11-09 11:49:58 UTC
I tested in the following version:

Build ID: 6070dec9ca9a15587a2aece81f9ae1ab5ac0f8c4
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.utf8); Calc: group
(Build from 2017-Nov-05 00:00)

OS: Debian 64bit Stretch (Debian 9.2, with some backported packages)

Format -> Page in this version is:

Format > Page... > Page
And you set:
  Page layout - Mirrored
  Outer margin - 4.00"

The Test direction control affects the text direction in the pages rather than the "page mirroring" i.e. page 1 stays at the right side, page 2 stays at the left side, etc.

I found no way to set "page mirroring" so that page 1 is at the left side as needed by RTL books.

It seems to me that there is a confusion over terminology, much like the confusion that used to exist among paragraph justification and paragraph major text directionality.
Comment 12 QA Administrators 2018-11-10 03:51:53 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2020-11-10 04:17:52 UTC Comment hidden (obsolete)
Comment 14 Regina Henschel 2021-02-24 23:10:20 UTC
The labels "inner" and "outer" need to be reversed in case of "right-to-left" writing modes. The page arrangements are correct, you can check that in "Book view" with my attachment. But the value, which you have entered in margin field "inner" is in fact at the outside, and the value, which you have entered in margin field "outer" is in fact at the binding side. The preview in the page dialog has to be adapted too.

Tested with Version: (x64) / LibreOffice Community
Build ID: 85a74ebd929d6396daf591a01f79758888fd7e4f
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: threaded

The attachment "Test file" is wrong, because it has not set the writing direction to "right-to-left". 

Making books with alternating "right" and "left" pages is wrong too. But that can likely be fixed with renaming to "odd" and "even".
Comment 15 Regina Henschel 2021-02-24 23:11:24 UTC
Created attachment 170040 [details]
Testfile with writing mode right-to-left
Comment 16 Regina Henschel 2021-02-24 23:24:33 UTC
I have written bug 140655 for the problem of alternating page styles for odd and even pages.
Comment 17 Eyal Rozenberg 2023-02-10 14:11:22 UTC
I'm sorry, but I'm not sure I understand this bug, at all. The title is a noun phrase, not a sentence. The opening comment talking about page "labeling" - I don't know what page labeling in LO means.

When I create a new document, the Page Style is set to "Default Page Style". When I add a different-left-and-write-pages footer and click it, the blueish tab says "Footer (Default Page Style)" on both odd and even pages.

is the bug in the fact, that the first page of a document is assumed to be to the right of the spine? i.e. that its left margin is considered to be inner rather than outer?

If that's the case, please say so and either update the bug title or ask me to do so.
Comment 18 Eyal Rozenberg 2023-03-17 13:17:22 UTC
No response from anybody so far.

As far as I am concerned, this is INVALID. Anyone who said they confirm - what exactly did you confirm? Can you provide reproduction instructions? Marking NEEDINFO for now.
Comment 19 Munzir Taha 2023-03-20 21:21:10 UTC
Created attachment 186099 [details]
First Page is labeled Right in RTL

Attached is a screenshot for the first page of an RTL document. The header is wrongly labeled "Right Page Header".

As the reporter explained in RTL documents the first page is a left page and hence should have a "Left Page Header".

Also, notice the gutter position is set to "Left" from the drop-down menu and to set it to Right you need to click a checkbox. There should be only one widget to set the position.