Bug 131192 - Comprehensive support for "start" / "end" text alignment
Summary: Comprehensive support for "start" / "end" text alignment
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: needDevComment
Keywords:
Depends on:
Blocks: RTL-CTL RTL-UI
  Show dependency treegraph
 
Reported: 2020-03-06 20:51 UTC by Eyal Rozenberg
Modified: 2023-12-03 17:12 UTC (History)
8 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-03-06 20:51:19 UTC
Libreoffice supports the following types of text (paragraph) alignment:

* Left: Align the leftmost character on each line to the left  boundary
* Right: Align the leftmost character on each line to the right boundary
* Center: Align so that the content on each line is equidistant from the left and right boundaries.
* Justify: Space so that each line except the last starts and ends at the left and right margin respectively; align last line to start

Note that I used the term "start" in there. Indeed, it is not "Justify and align last line to left" or "to right" - it is to the start of the flow of characters in the paragraph. This hints that the full set of alignment modes should be

* Left
* Right
* Start
* End
* Center

[ ] Justify all lines but last

Justification is not an independent mode - the last line can have any one of left, right, stand and end alignments.

When you're only working with left-to-right text, there is no distinguishing between "Start" and "Left", and between "End" and "Right" - that's how LTR text flows. But these are conceptually different. And when we change paragraph direction, Left/Right alignment should not be affected, while Start/End should be flipped.

It should be noted that:

* The UI doesn't fully match this functionality (in different applications).
* We get confused about file formats which do support Start/End, see bug 37128.
* This causes interoperability issues when other apps do use Start and End - but not consistently and not quite opaquely. See bug 118350.
Comment 1 eladhen2 2020-06-09 15:00:37 UTC
This is indeed lacking. 
Confirmed I guess.
Comment 2 Eyal Rozenberg 2020-06-09 15:19:24 UTC
El'ad, to confirm - you change the status to CONFIRMED...

I've done this now myself based on your input (although generally people shouldn't confirm their own bugs).
Comment 3 Telesto 2022-03-08 16:48:19 UTC
@Mike
I stumbled upon this by bug 147814. Some input from the DEV perspective would be helpful, I think.
Comment 4 Eyal Rozenberg 2022-03-08 17:24:24 UTC
(In reply to Telesto from comment #3)

Do you think we should expand this bug into "Comprehensive support for Start and End everywhere we now have Left and Right"? Seeing how there are potentially other places where the distinction is relevant?
Comment 5 Eyal Rozenberg 2022-07-11 21:01:36 UTC
Justin Luth said, in
https://git.libreoffice.org/core/commit/cf02b94bc513ee1b742b4c5d7174632b568e8b72
that:

> IIRC, LO interally always refers to justify literally,
> while DOCX normally depends on the RtL context,
> treating LEFT as START and RIGHT as END.

Thought I should also mention that here.