Bug 148722 - Clearing line break with restart position set to "Right" behaves unexpectedly
Summary: Clearing line break with restart position set to "Right" behaves unexpectedly
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2022-04-22 10:12 UTC by Mike Kaganski
Modified: 2022-04-22 11:40 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

Screencast for the clearing break (649.42 KB, image/gif)
2022-04-22 10:12 UTC, Mike Kaganski
Screen cast of Word doing the same (218.36 KB, image/gif)
2022-04-22 10:55 UTC, Mike Kaganski

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-04-22 10:12:52 UTC
Created attachment 179724 [details]
Screencast for the clearing break

The screencast shows some unexpected behavior of a clearing break with Right restart position.

The next line immediately below the current is unblocked *from both sides* - it only has some object in the middle.

When the break happens to be to the left of the object, the behavior is that the next line starts below the whole object - as if the space immediately below is blocked to the right. Well - that would be true for the current position, but when the current position is to the right of the object, the next line *starts to the left of the object*, exactly on the same position it would be in the previous case - likely because this lines flow after the object up to the right border; so what the "blocked" means in this context?
Comment 1 Miklos Vajna 2022-04-22 10:19:49 UTC
Is it possible to simplify this to a docx file that is rendered correctly by Word, but not by Writer? That would help debugging.
Comment 2 Mike Kaganski 2022-04-22 10:54:48 UTC
Apparently not a bug - Word behaves identically. Just difficult to clearly understand what this might mean in a human-comprehendable terms (I still fail).

Sorry for the noise.
Comment 3 Mike Kaganski 2022-04-22 10:55:12 UTC
Created attachment 179726 [details]
Screen cast of Word doing the same
Comment 4 Miklos Vajna 2022-04-22 11:40:34 UTC
Here is my understanding in developer terms, perhaps that helps. :-)

clear=all means "jump down" enough that the next line will have full body text width.

clear=left/right is more legacy, hidden on the Word UI: sometimes useful, but expect weirdness. It makes sense to use these if you have multiple anchored objects intersecting with the line and you want to "jump down" a bit less than in the clear=all case: left/right means to jump down enough so the next line starts has its start/end on the left/right edge of the body text rectangle.

Examples for these are figure 8, figure 11 from https://vmiklos.hu/blog/sw-clearing-breaks.html.

clear=left or clear=right for a single object doesn't make much sense to me, so there my check would be just to make sure we behave the same way as word, but it's a bit like garbage-in -> garbage-out. I hope this helps.