Bug 133818 - Footnote separator direction should inherit from page style (see comment 8 for updated description)
Summary: Footnote separator direction should inherit from page style (see comment 8 fo...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Footnote-Endnote
  Show dependency treegraph
 
Reported: 2020-06-09 11:06 UTC by Eyal Rozenberg
Modified: 2020-07-09 21:53 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2020-06-09 11:06:00 UTC
Description:
In LibreOffice Writer, paragraphs and some other elements  can have their direction set to one of: RTL, LTR, or "Use superordinate object settings" (i.e. inherited).

The "superordinate object" for paragraphs on a page of a (simple) document is _not_ the page (which itself can have a direction LTR or RTL), but rather something else - likely, the entire document. 

It _should_ be the page that's the superordinate object for paragraphs (that aren't in a frame, or table cell etc.) and for the footnote separator.

Steps to Reproduce:
1. Create a new document.
2. Type in some words into the document, to form more than one line, but not two perfectly-full lines (i.e. leave space on the last line)
3. Insert a footnote.
4. Ensure the paragraph style is Default Paragraph Style
5. Modify the Default Paragraph Style, ensuring Text Direction is set to "Use superordinate object settings"
6. Modify the Default Page Style and First Page styles, to have Text Direction LTR
7. Observe the paragraph direction, and the positioning of the footnote separator
8. Modify the Default Page Style and First Page styles, to have Text Direction RTL
9. Observe the paragraph direction, and the positioning of the footnote separator

Actual Results:
Paragraph direction does not change between RTL and LTR despite change in page styles.
Footnote separator does not switch from right to left or vice-versa, despite change in page styles.

Expected Results:
Paragraph direction changes between RTL and LTR.
Footnote separator changes from right to left and vice-versa.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
See also: bug 133816.
Comment 1 eladhen2 2020-06-09 11:20:07 UTC
Reproduced on LO 6.3.6.2 on Linux mint 18.3
Comment 2 Mike Kaganski 2020-06-09 12:03:45 UTC
It is strange to have text direction to depend on page settings, i.e. that LTR/RTL suddenly changes when page settings change. The direction is the text property, not the page property.

I actually don't understand what the direction means on the page level (except vertical variants, which seem to be useful). Additionally, a page style is a property of paragraph - so page properties cannot be superordinate to paragraph (?).

But likely page style's direction *should* affect things specific to the page, not to paragraphs - like the position of the footnote separator line (which is set up right there, in the page style). That would be reasonable and consistent.
Comment 3 Eyal Rozenberg 2020-06-09 12:26:40 UTC
tl;dr: Agree that paragraphs shouldn't inherit from the page; but footnote separators should.

(In reply to Mike Kaganski from comment #2)
> It is strange to have text direction to depend on page settings

But:

1. That's what we have in Calc.
2. The page is the superordinate object of the paragraph. Now, if pages didn't have an RTL/LTR setting, you could say that it's the document that should be superordinate (or the document section); but pages _do_ have directions. Still, you do have a point.
3. It's already the case that you set the footnote separator direction via the Page Style.

>, i.e. that
> LTR/RTL suddenly changes when page settings change. The direction is the
> text property, not the page property.

Why would this be sudden?

> I actually don't understand what the direction means on the page level
> (except vertical variants, which seem to be useful).

TBH, me neither, but I guess it should affect positioning of page-specific objects or those that specifically refer back to the page direction.

> Additionally, a page
> style is a property of paragraph - so page properties cannot be
> superordinate to paragraph (?).

A page style is a property of a paragraph? No, it isn't. If you change the page style, the margins and size change on the page. Paragraphs don't affect that.

> But likely page style's direction *should* affect things specific to the
> page, not to paragraphs - like the position of the footnote separator line
> (which is set up right there, in the page style). That would be reasonable
> and consistent.

Yes.
Comment 4 Eyal Rozenberg 2020-06-09 12:27:30 UTC
Mike, would you confirm with the altered title?
Comment 5 Mike Kaganski 2020-06-09 12:41:32 UTC
(In reply to Eyal Rozenberg from comment #3)
> tl;dr: Agree that paragraphs shouldn't inherit from the page; but footnote
> separators should.
> 
> (In reply to Mike Kaganski from comment #2)
> > It is strange to have text direction to depend on page settings
> 
> But:
> 
> 1. That's what we have in Calc.

I don't see that. Trying to change page style direction does not change text direction for me. Additionally: in Calc, you have page belonging to Sheet; and cells also belonging to sheet, and text belonging to cells, so the structure of dependencies is very different.

> >, i.e. that
> > LTR/RTL suddenly changes when page settings change. The direction is the
> > text property, not the page property.
> 
> Why would this be sudden?

Because you e.g. have a RTL style which defines an LTR "Next style" on its organizer. You have some paragraphs on the first (RTL) page. You decide to add some content above the last paragraph; and you type new paragraphs above until the last paragraph can't fit on page 1 anymore -> it goes to page 2, which has an LTR style -> sudden change of *paragraph* direction.

> > Additionally, a page
> > style is a property of paragraph - so page properties cannot be
> > superordinate to paragraph (?).
> 
> A page style is a property of a paragraph? No, it isn't. If you change the
> page style, the margins and size change on the page. Paragraphs don't affect
> that.

You are wrong. It's paragraph settings that define which page style they use. See Paragraph (style)->Text Flow->Breaks->Insert->Page->With page style. Pages in Writer are artifacts of layouting, not primary objects. They are created as needed to place the actual content; and content defines which page styles to use for its placement (it might be "don't care, use whatever was set before", or "start a new page for me with this exact style").

(In reply to Eyal Rozenberg from comment #4)
> Mike, would you confirm with the altered title?

So is your proposal to add a footnote separator direction choice like "follow page text direction"? I would agree (as a low-priority enhancement, since currently existing option allows all kinds of formatting, although implementing that would require one tweaking less).
Comment 6 Eyal Rozenberg 2020-06-09 13:13:30 UTC
(In reply to Mike Kaganski from comment #5)
> > But:
> > 
> > 1. That's what we have in Calc.
> 
> I don't see that. Trying to change page style direction does not change text
> direction for me.

Then you're not looking at content which would be effected by this. If I have a cell with the words שלום, hello, להתראות (in that order, separated by spaces) - in an LTR Calc sheet I see the להתראות as the leftmost word and שלום as the rightmost; in an RTL Calc page - it's the opposite.

> Additionally: in Calc, you have page belonging to Sheet;

Ah, yes. I meant "Sheet", not page, about calc.

> and cells also belonging to sheet, and text belonging to cells, so the
> structure of dependencies is very different.

Fair enough.

> Because you e.g. have a RTL style which defines an LTR "Next style" on its
> organizer. You have some paragraphs on the first (RTL) page. You decide to
> add some content above the last paragraph; and you type new paragraphs above
> until the last paragraph can't fit on page 1 anymore -> it goes to page 2,
> which has an LTR style -> sudden change of *paragraph* direction.

Oh, sudden in that sense. Ok, although - if you set your page to have an explicit RTL/LTR style rather than "inherit", then maybe you expect this. But again, fair enough, I've withdrawn my suggestion about paragraphs.

> > A page style is a property of a paragraph? No, it isn't. If you change the
> > page style, the margins and size change on the page. Paragraphs don't affect
> > that.
> 
> You are wrong. It's paragraph settings that define which page style they
> use.

That's not possible even in principle, because if two pages on the same paragraphs have conflicting page styles, you can't render the page.

> See Paragraph (style)->Text Flow->Breaks->Insert->Page->With page
> style.

That's something different - when a paragraph gets its own associated page. Usually a paragraph doesn't have such an associated page.

> Pages in Writer are artifacts of layouting, not primary objects.

If that were completely true, pages could not have had styles.

> They
> are created as needed to place the actual content; and content defines which
> page styles to use for its placement (it might be "don't care, use whatever
> was set before", or "start a new page for me with this exact style").

You're misrepresenting the situation. The "start a page" is not a page style setting, it's something different.


> So is your proposal to add a footnote separator direction choice like
> "follow page text direction"? I would agree (as a low-priority enhancement,
> since currently existing option allows all kinds of formatting, although
> implementing that would require one tweaking less).

Yes, but not exactly. Right now, the footnote direction (if we can call it that) inherits, by default, the document direction - or some other object I am not aware of. But - I'm guessing this inheritence is only used once, at generation time, because afterwards you can only set it to "left" or "right". I suggest that:

1. Footnote separators have an "inherit" option (like paragraphs), visible in the footnote separator direction selection listbox.
2. The superordinate object for purposes of this inheritance be the page in which the footnote separator appears.
3. The inherit option be the default.
Comment 7 Mike Kaganski 2020-06-09 13:34:20 UTC
(In reply to Eyal Rozenberg from comment #6)
> (In reply to Mike Kaganski from comment #5)
> > > A page style is a property of a paragraph? No, it isn't. If you change the
> > > page style, the margins and size change on the page. Paragraphs don't affect
> > > that.
> > 
> > You are wrong. It's paragraph settings that define which page style they
> > use.
> 
> That's not possible even in principle, because if two pages on the same
> paragraphs have conflicting page styles, you can't render the page.

You seem to have very strange ideas on how things work in Writer. Not only that's possible in principle, it's how it is implemented. And "if two pages on the same paragraphs have conflicting page styles, you can't render the page" is unclear - which page you mean in this case? (I read it as you mean a long paragraph that flows from one page with some style to another page with another style - but what would make that impossible in my explanation?)

> > See Paragraph (style)->Text Flow->Breaks->Insert->Page->With page
> > style.
> 
> That's something different - when a paragraph gets its own associated page.
> Usually a paragraph doesn't have such an associated page.

That's not "something different". Paragraph has different options. It tells "draw this border around me"; it tells "use this indent on me"; it tells "create a page with this page style for me". It's *paragraph* (actually first-class content citizen in text document) that defines which page styles to use; it's text (consisting of characters gathered into text runs gathered into paragraphs, with settings on all those levels, that define how much space is needed to place them) define when a new page is created, and - combined with styles requested at paragraph level - how those pages will look like. Page style is kind of inventory; it's text that takes what it needs from that inventory, and creates pages using it.

> > Pages in Writer are artifacts of layouting, not primary objects.
> 
> If that were completely true, pages could not have had styles.

How so? Please read again.

> > They
> > are created as needed to place the actual content; and content defines which
> > page styles to use for its placement (it might be "don't care, use whatever
> > was set before", or "start a new page for me with this exact style").
> 
> You're misrepresenting the situation. The "start a page" is not a page style
> setting, it's something different.

Insert page with page style *is* the machinery in Writer. There's a potentially implicit such break in the beginning of the document (i.e., when first paragraph does not have such explicit setting, it's implied that there's one defining "Default" page style). Tables (the other principal content objects) may have such property, too. Having endnotes with specified page style, they also behave in the same way.
Comment 8 Mike Kaganski 2020-06-09 13:36:16 UTC
(In reply to Eyal Rozenberg from comment #6)
> Right now, the footnote direction (if we can call it
> that) inherits, by default, the document direction - or some other object I
> am not aware of. But - I'm guessing this inheritence is only used once, at
> generation time, because afterwards you can only set it to "left" or
> "right". I suggest that:
> 
> 1. Footnote separators have an "inherit" option (like paragraphs), visible
> in the footnote separator direction selection listbox.
> 2. The superordinate object for purposes of this inheritance be the page in
> which the footnote separator appears.
> 3. The inherit option be the default.

UX team: please take a look at the updated proposal!
Comment 9 Heiko Tietze 2020-06-19 15:27:33 UTC
We discussed the topic in the design meeting, see bug 133820 comment 9.

This ticket boils down to the same reason, the workflow is unclear. While everything is possible, users may have a hard time to figure out the relation between different functions. And the suggestion is to improve the documentation.

I would resolve this ticket as duplicate of bug 133820.
Comment 10 Eyal Rozenberg 2020-06-19 16:42:41 UTC
(In reply to Heiko Tietze from comment #9)
> This ticket boils down to the same reason, the workflow is unclear.

I think you're mistaken. Unlike bug 133820, this bug is not about the UI. Or - mostly not about the UI. The basic suggestion is:

[[[ Footnote separator direction should (have the option to) be inherited. ]]]

This is not about clarity of workflow - unless I'm misunderstanding your comment.
Comment 11 Heiko Tietze 2020-06-20 08:28:48 UTC
(In reply to Eyal Rozenberg from comment #10)
> Footnote separator direction should (have the option to) be inherited.

And it does. 
* Tools > Options > Language > Locale = English -> new document, dummy text + footnote = left-aligned
* Tools > Options > Language > Locale = Hebrew -> new document, dummy text + footnote = right-aligned (both text and footnote)

Following the discussion with Mike you may have a misconception how it works- not blaming you but UI (don't see how we can improve without worsen things) and documentation. That's why I suggest to make it a duplicate. But maybe I'm wrong with the inheritance.

Tested with
Version: 6.3.6.2
Build ID: 6.3.6-1
CPU threads: 8; OS: Linux 5.7; UI render: default; VCL: kde5; 
Locale: he-IL (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 12 Eyal Rozenberg 2020-06-20 09:44:08 UTC
(In reply to Heiko Tietze from comment #11)
> And it does. 

I believe it does not - even by your description; let me explain why I mean with an example.

1. Create a new document in an LTR locale (say, English).
2. Type "hello".
3. Insert a footnote with the text "world".
3. Sanity check: Note the first page has the Default Page Style; the first paragraph is LTR; the footnote paragraph is LTR; the footnote separator is on the left; and if you open Format|Paragraph you see "use superordinate".
4. Now, Create a new page style, "Fun Page".
5. Change the direction of the "Fun Page" style from LTR to RTL.
6. Set the page style to "Fun Page"

What we now see is:

* The first paragraph's (effective) direction has switched to RTL.
* The footnote paragraph's (effective) direction has switched to RTL.
* The footnote separator remains on the left.

You see? Paragraph direction inherits, footnote separator does not.

What I'm asking for is the same behavior for footnote separator as for paragraphs: Both should have LTR, RTL, or "use supraordinate" for their direction setting; the footnote separator only currently has "left" and "right". (Alternatively, one could just force it to always inherit, respecting the page style, but maybe that's too harsh.)
Comment 13 Heiko Tietze 2020-06-22 05:18:24 UTC
(In reply to Eyal Rozenberg from comment #12)
> 4. Now, Create a new page style, "Fun Page".
> 5. Change the direction of the "Fun Page" style from LTR to RTL.

Your default is LTR meaning the page style has all properties respectively. You have to change not only Text Direction but also Positon at the Footnote tab. If your default is RTL (when locale is Hebrew, for example) you will use RTL by default and have to switch from right to left.

=> documentation
Comment 14 Eyal Rozenberg 2020-06-22 08:08:45 UTC
(In reply to Heiko Tietze from comment #13)
> You have to change not only Text Direction but also Positon at the Footnote
> tab. 

Exactly. That means the footnote separator position is not the same as the paragraph direction. It doesn't inherit. That's the problem.

If your default is RTL (when locale is Hebrew, for example) you will
> use RTL by default and have to switch from right to left.

But I shouldn't have to do that. Typically, when the user switches the page style direction, they want both the paragraph direction and the footnote direction to switch. Forcing their direction should be _an_ option, not the default and certainly not the only option.

And that is why

> => documentation

is an incorrect conclusion.
Comment 15 Lior Kaplan 2020-06-22 08:16:28 UTC
Changed bug status to confirmed per comment#1
Comment 16 Heiko Tietze 2020-06-22 10:41:57 UTC
Sounds like a bad plan to automatically change something on another tab. Not only because users are not aware of these automatism but also since you run into trouble when the option was changed manually before. Not saying in the particular case it would be wrong but a) the issue is very unlikely and b) fixing the mistake is pretty simple (and could be described in the help).
Comment 17 Eyal Rozenberg 2020-06-22 11:11:04 UTC
(In reply to Heiko Tietze from comment #16)
> Sounds like a bad plan to automatically change something on another tab. 

I'm not suggesting that, Heiko. If the footnote separator placement is set to "use superordinate object setting" (or "by page style direction setting" etc.) - then it doesn't get changed. Just like with the paragraph direction.

> a) the issue is very unlikely 

On the contrary. The unlikely situation is what we have now, which is a manual forcing of the separator to one side. (In fact, I'm not even sure people would ask for the ability to set the footnote separator to the opposite of the page style default.)
Comment 18 Heiko Tietze 2020-06-22 15:41:45 UTC
(In reply to Eyal Rozenberg from comment #17)
> ... footnote separator placement ... "use superordinate object setting"

Okay you convinced me, finally :-).
 
> > a) the issue is very unlikely 
> On the contrary.

You are the RTL expert.

Nevertheless I suggest to improve the documentation.
Comment 19 Eyal Rozenberg 2020-06-22 17:09:34 UTC
(In reply to Heiko Tietze from comment #18)
> Okay you convinced me, finally :-).

Really? Great! I tip my hat off to you, Heiko. Most people aren't open to change their opinion based purely on discussion, after this much back-and-forth.

> Nevertheless I suggest to improve the documentation.

For sure, yes. And as a sign of good will - I volunteer to help with that. Just point me at where you want the change to happen, and I'll either suggest a rephrasing/expansion; or if you like, I can review something written by others.

(of course the documentation will need to change again after this feature is implemented.)
Comment 21 Eyal Rozenberg 2020-07-09 21:53:59 UTC
(In reply to Buovjaga from comment #20)
> Eyal: the pages I found (pointing to very latest builds):
> https://help.libreoffice.org/7.1/en-US/text/swriter/guide/footnote_usage.html
> https://help.libreoffice.org/7.1/en-US/text/swriter/guide/footnote_with_line.
> html

So, these pages don't regard the position of the separator. I suggest we take the discussion of updated the documentation over to mail messages, since it's mostly off-topic for this bug. Please write me to explain how the documentation should improve.