Bug 168537 - DF RTL followed by "Clear DF" retains RTLness, aligns left
Summary: DF RTL followed by "Clear DF" retains RTLness, aligns left
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Clear-Formatting RTL
  Show dependency treegraph
 
Reported: 2025-09-24 12:07 UTC by Eyal Rozenberg
Modified: 2025-09-29 22:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Video file showing failure to reproduce (5.96 MB, video/x-matroska)
2025-09-29 20:11 UTC, Jonathan Clark
Details
Video showing the effect (6.47 MB, video/x-matroska)
2025-09-29 20:47 UTC, Jonathan Clark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2025-09-24 12:07:19 UTC
Reproduction instructions:

1. Enable full RTL support via Tools > Options
2. Make sure the default template's default paragraph style is LTR and left-aligned or jusfieid.
2. Create new Writer document.
3. Type some text, e.g. "Hello world".
4. Press the RTL toolbar button, making the paragraph RTL .
5. Select the entire paragraph (e.g. using Ctrl+A since that's all the document has).
6. On the menus, choose Format > Clear Direct formatting

Expected result:
The single paragraph is LTR and left-aligned after step 3, RTL and right-aligned after step 4, and LTR and left-aligned again after step 6.

Actual result:
The single paragraph is LTR and left-aligned after step 3, RTL and right-aligned after step 4, but - RTL and left-aligned after step 6. Weird!

Why is this happening? Direction is a paragraph DF feature.

Note: Not seeing this with textboxes in Impress, for example.

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ed45cdaef3d2807d0b9d6a4c08da375fc72024a6
CPU threads: 4; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US

Version: 25.8.1.1 (X86_64)
Build ID: 54047653041915e595ad4e45cccea684809c77b5
CPU threads: 4; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Comment 1 Jonathan Clark 2025-09-29 18:11:19 UTC Comment hidden (obsolete)
Comment 2 Eyal Rozenberg 2025-09-29 19:32:59 UTC
(In reply to Jonathan Clark from comment #1)
> Besides selections, paragraph DF is also cleared when the cursor is inside
> the paragraph, as expected.

I'm not sure what you mean about the cursor; why does it matter?

It's weird that you can't reproduce. Shall I create a video? Would you like to?
Comment 3 Jonathan Clark 2025-09-29 20:11:48 UTC Comment hidden (obsolete)
Comment 4 Jonathan Clark 2025-09-29 20:47:01 UTC
Created attachment 203045 [details]
Video showing the effect
Comment 5 Jonathan Clark 2025-09-29 21:29:09 UTC
This behavior was changed intentionally. See bug 40496.
Comment 6 Eyal Rozenberg 2025-09-29 21:47:47 UTC
(In reply to Jonathan Clark from comment #5)
> This behavior was changed intentionally. See bug 40496.

Well, I disclaim all responsibility for that silliness, since it was before my time. But project people should have blocked that IMNSHO.

Anyway, perhaps that makes this bug easy to fix.
Comment 7 Eyal Rozenberg 2025-09-29 22:01:36 UTC
An alternative approach to let LO "reflect the inherent RTLness" of text is if we have an "autodetect" horizontal direction setting in addition to "ltr", "rtl" and "inherit".