Download it now!
Bug 135515 - Print preview always places pages in LTR order
Summary: Print preview always places pages in LTR order
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTL-UI
  Show dependency treegraph
 
Reported: 2020-08-07 01:07 UTC by Safeer Pasha
Modified: 2020-09-09 10:02 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of print preveiw. and the ODT file (11.51 KB, application/vnd.oasis.opendocument.text)
2020-08-07 01:07 UTC, Safeer Pasha
Details
print_preview screenshot (38.03 KB, image/png)
2020-08-07 01:11 UTC, Safeer Pasha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Safeer Pasha 2020-08-07 01:07:55 UTC
Created attachment 164018 [details]
screenshot of print preveiw. and the ODT file

Expected: when the document is RTL,in the 'print preview', the pages should be arranged from Right to Left. 

but 

they are arranged from Left to Right. 

the attached screenshot clarifies this. the ODT file is also attached.

Note: the option in (page style) dialog box under ‘page’ tab that says Text Direction to RTL is toggled on.
Comment 1 Safeer Pasha 2020-08-07 01:11:21 UTC
Created attachment 164019 [details]
print_preview screenshot
Comment 2 Timur 2020-08-07 14:23:35 UTC Comment hidden (obsolete)
Comment 3 Safeer Pasha 2020-08-08 06:18:06 UTC
(In reply to Timur from comment #2)
> Dis you search existing RTL bugs before reporting?

yes, to my knowledge this bug has not been reported. 
if you have more information about the bug, please provide.
Comment 4 Eyal Rozenberg 2020-08-08 13:21:50 UTC
The bug is indeed valid. I still wonder if there isn't a dupe.

Another point is: It's not clear what exactly should determine the inter-page order in print preview. Obviously, a document with RTL default page style, default paragraph style, and RTL content should be print-previewed with RTL page order by default. But - what if some pages have an LTR style and some an RTL style? What if the default paragraph style doesn't agree with the default page style? Things become less obvious then.

I therefore suggest that:

1. The default page ordering during print preview correspond to the default page style's direction.
2. There be some UI for toggling the page order (between LTR and RTL).
Comment 5 Safeer Pasha 2020-08-09 06:02:26 UTC
(In reply to Eyal Rozenberg from comment #4)
> The bug is indeed valid. I still wonder if there isn't a dupe.
> 
> Another point is: It's not clear what exactly should determine the
> inter-page order in print preview. Obviously, a document with RTL default
> page style, default paragraph style, and RTL content should be
> print-previewed with RTL page order by default. But - what if some pages
> have an LTR style and some an RTL style? What if the default paragraph style
> doesn't agree with the default page style? Things become less obvious then.
> 
> I therefore suggest that:
> 
> 1. The default page ordering during print preview correspond to the default
> page style's direction.
> 2. There be some UI for toggling the page order (between LTR and RTL).

"what if some pages have an LTR style and some an RTL style? What if the default paragraph style doesn't agree with the default page style?"

I think this case is very very rare.
Comment 6 Heiko Tietze 2020-08-13 21:36:41 UTC
(In reply to Eyal Rozenberg from comment #4)
> 1. The default page ordering during print preview correspond to the default
> page style's direction.

What exactly is the page style text direction? Left/Right on the printer layout affects only the page number. Was thinking about the Default Paragraph Style but this shouldn't be used- and you cannot be sure whether Text Body is the actual used default.

> 2. There be some UI for toggling the page order (between LTR and RTL).

The PS has an option under Alignment but this doesn't affects the print preview neither the multiple-page view. Point is still what we take.
Comment 7 Mike Kaganski 2020-08-13 22:16:24 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to Eyal Rozenberg from comment #4)
> > 1. The default page ordering during print preview correspond to the default
> > page style's direction.
> 
> What exactly is the page style text direction? 

Format->Page Style->Page tab->Text direction.

I am generally unsure how to do this best. A toggle button on print preview toolbar? an option... Using default paragraph style direction? also an option, but is guaranteed to create confusion. Follow page style text direction? also seems sane, but then we should allow alternating page order direction inside the document? which might be logical (? I don't know how bi-directional books are created, if any) - like allowing alternating text direction in one paragraph is OK...

People really knowledgeable in RTL should decide this, not Englih- (Russian- (myself), German-....) speaking people.
Comment 8 Safeer Pasha 2020-08-14 04:25:07 UTC
> (? I don't know how
> bi-directional books are created, if any)

I have no idea how if bi-directional books exist or not. I have not seen any. but here is my opinion:

If a document is typed in RTL then pages which follow LTR rules should also be numbered according to RTL and previewed as well. This will make it easier for the RTL reader since the document is essentially written for RTL readers.
Comment 9 Safeer Pasha 2020-08-18 03:06:25 UTC
(In reply to Mike Kaganski from comment #7)


> I am generally unsure how to do this best. A toggle button on print preview
> toolbar?

a toggle button would be fine to overcome the issues at hand at the moment. if something else turned out to be needed or desired then we can look for a way for it.
Comment 10 Heiko Tietze 2020-09-07 15:31:32 UTC
(In reply to Safeer Pasha from comment #8)
> If a document is typed in RTL then pages which follow LTR rules should also
> be numbered according to RTL and previewed as well. 

Different topic, let's keep this ticket for the print preview/print dialog thumbnail view. 

My comment 6 was about what property defines whether a _document_ is LTR or RTL:
a) Style of the first page (page > text direction; requires tools > options > ctl or cjk enabled)
b) Style of the first paragraph (alignment > text direction)
c) Document language
d) Application locale
e) Some toggle in the print preview dialog (that would need a default anyway)

I would go with c) meaning Tools > Options > Language Settings > Default Language for Documents. It would show RTL in the print preview even when the entire document is written in English. Adding e) is cheap and might help in this case. While there is enough room for the option in the print preview, it fit's only in the thumbnail of the print dialog. And I would rather not clutter this part. So how about a context menu?
Comment 11 Safeer Pasha 2020-09-08 15:40:22 UTC
(In reply to Heiko Tietze from comment #10)

  
> I would go with c) meaning Tools > Options > Language Settings > Default
> Language for Documents. It would show RTL in the print preview even when the
> entire document is written in English. Adding e) is cheap and might help in
> this case. While there is enough room for the option in the print preview,
> it fit's only in the thumbnail of the print dialog. And I would rather not
> clutter this part. So how about a context menu?

I agree with option C) and E). 
I don't know what you mean by this: 

"it fit's only in the thumbnail of the print dialog. And I would rather not clutter this part. So how about a context menu?"
Comment 12 Heiko Tietze 2020-09-09 07:38:54 UTC
(In reply to Safeer Pasha from comment #11)
> I don't know what you mean by this: 
> "it fit's only in the thumbnail of the print dialog.

It's about the UI. This toggle needs to be realized as radio buttons, checkbox, or whatever, and placed somewhere. My reasoning starts with the fact that the dialog is cluttered and the feature to be introduced is for the preview only. And my conclusion is to "hide" the LTR/RTL selection with radio buttons in a context menu (right click on the thumbnail).
Comment 13 Safeer Pasha 2020-09-09 10:02:01 UTC
> It's about the UI. This toggle needs to be realized as radio buttons,
> checkbox, or whatever, and placed somewhere. My reasoning starts with the
> fact that the dialog is cluttered and the feature to be introduced is for
> the preview only. And my conclusion is to "hide" the LTR/RTL selection with
> radio buttons in a context menu (right click on the thumbnail).

your point seems valid. Do as you please as long as the job gets done.