Bug 164470 - First line in justified (RTL?) paragraph not actually justified
Summary: First line in justified (RTL?) paragraph not actually justified
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.7.2 release
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Paragraph-Alignment RTL
  Show dependency treegraph
 
Reported: 2024-12-26 22:22 UTC by Eyal Rozenberg
Modified: 2025-01-14 03:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Document for reproducing the bug (11.44 KB, application/vnd.oasis.opendocument.text)
2024-12-28 18:11 UTC, Eyal Rozenberg
Details
Modified reproducer (12.59 KB, application/vnd.oasis.opendocument.text)
2025-01-14 03:20 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2024-12-26 22:22:50 UTC
I've recently installed a 25.8 nightly, after not having installed nightlies for a number of weeks, for use on a Hebrew Writer document, I've done that again this week. While editing, I experienced one or twice the following ephemeral phenomenon: When I set a paragraph to be justified, or when I paste a bunch of text into a justified paragraph - the first line is not justified, as though it were right-aligned (remember, this is Hebrew text), and the second line and onwards, are justified. If I type Backspace-and-then-Space from the beginning of the second line, this seems to correct itself, or if I press Shift-Enter for a line break at the end of the first line, then Backspace, this also goes away. In fact, almost any action I take which affects this paragraph seems to make this go away, so much so that I can't attach a document with an example. I am also not sure exactly in which situations this happens.

Sorry for a bug report that's vague, but - it _does_ happen, it's not a one-off occurrence.
Comment 1 Eyal Rozenberg 2024-12-28 18:07:51 UTC
I have now experienced this also in paragraphs other than the first, while typing and crossing the end-of-line boundary, in the middle of a paragraph.

But - I can now consistently reproduce! Will post an attachment soon.
Comment 2 Eyal Rozenberg 2024-12-28 18:11:55 UTC
Created attachment 198309 [details]
Document for reproducing the bug

To reproduce:

1. Open the attached document.
2. Move the cursor to the end of the (single) paragraph
3. Type in the word שתיים

Expected results:
The first line of the paragraph is justified so as to end at the left edge of the text area.

Actual results:
The first line does _not_ get justified (in fact, it even retracts slightly), and this ends well before the left edge of the text area, despite being supposedly justified, and the second line already showing some text.

A regression for sure.
Comment 3 Jonathan Clark 2025-01-10 13:23:07 UTC
Bisected to the following commit:

commit 4bad9220b911f1624520ff2719571bc3acf99c00
Author: László Németh <nemeth@numbertext.org>
Date:   Mon Sep 16 13:36:41 2024 +0200

    tdf#161810 sw smart justify: fix overhanging lines containing tabs
Comment 4 László Németh 2025-01-14 00:46:16 UTC
I cannot reproduce the problem with the not fresh build 8d7272141f56935a7fbd629706bb4fefb7d3ba84, but this is newer, than the bibisected commit. I will check it with a fresh build next week, maybe my method is wrong (using Ctrl-Shift-u for Unicode input under Linux, also copy + paste instead of a Hebrew keyboard).
Comment 5 Aron Budea 2025-01-14 03:20:03 UTC
Created attachment 198520 [details]
Modified reproducer

I slightly modified the file, it consists of two paragraphs: the original text, and the same text with the added word.
When opened, it looks, okay. But...

- Open the file,
- Move cursor to beginning of the 3rd line.
- Press enter and backspace.

=> Instead of getting justified, the first line of the paragraph (2nd line in document) further retracts after the backspace.