Strange Alignment / Formatting in Text Boxes and Frames

I get a very strange alignment in Text Boxes and text Frames. I first found it with Text Boxes in Draw, and confirmed I got the same thing with Text Boxes in Writer, then (seeing many answers/comments here disparaging Text Boxes) found the same behavior in Frames.
I ask for left justification, and instead of getting

Green: th ;
.attachments-list th

I get a weird alignment

Green:
th ; .attachments-list
th

If I add a bunch of x’s to the first line I get

Green: xxxxxxx th
; .attachments-list th

but only after adding the seventh x to the line. It’s kind of like it’s trying to find/create the longest possible line for the box, and basing everything else around that.
Strange Alignment in Text Boxes and Frames - Example.odt (14.3 KB)
The attached Writer file demonstrates this behavior. The first two (with the dashed border) are Text Boxes - #1 has simply what I want (were it properly formatted) and #2 shows what happens with the added x’s. The last three (with solid borders) show the same behavior with Frames - #3 simple text misaligned, #4 with seven added x’s, and #5 with only six x’s added.
Size of box/frame changes exact alignments, but the strange behavior continues with modification. Feel free to play around with the boxes and frames - but I found no simple algorithm to explain the behavior.
Anybody know what is going on here? Anybody know how to get Text Boxes or text Frames to behave in a predictable fashion, to get what we want?

Version: 7.6.5.2 (X86_64) / LibreOffice Community
Build ID: 60(Build:2)
CPU threads: 8; OS: Linux 5.18; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:7.6.5-0ubuntu0.20.04.1~lo1
Calc: threaded

I can’t find anything out of the ordinary. But everyone may see that differently.


You should not mix up Writer and Darw in your description.
I am simply missing your statement of what exactly you want to achieve and which component.

Text boxes are “alien” to Writer text management. They are controlled by their own rules and may show unexpected result. However I don’t understand the reason for linewraps here. They should not occur where they are.

Frames are kind of Writer sub-documents. They are fully driven by styles and all the “standard” Writer features. Therefore your text inside frames should behave the same as main text. That is, as long as remaining space in a line can accommodate a word, this word should be set on the line.

Which puzzles me is the similarity between your text boxes and frames although they are two different “objects”. I see no obvious setting causing this anomalous behaviour.

The only questionable point is anchoring text boxes and frames To page. It is not relevant here. I think you designed your sample file quick’n’dirty (which is what we expect for a throw-away document) and it does not matter. However, I want to draw your attention on this faux-ami anchor mode. Avoid it in your real documents. It ia a simili-DTP feature which does not result in what you think. Don’t confuse anchor with position. Any frame or graphical object can be positioned anywhere in the page in any anchor mode (except As character). To page will pin the object to some physical page and this object will no longer move with text.

@Hrbrgr
What is out of the ordinary is that in left justification, the result should have been as in example one, not example two; “as long as remaining space in a line can accommodate a word, this word should be on the line” as @ajlittoz says. Lines should not be split arbitrarily; at least that is my understanding.
Mixing Writer and Draw is: 1) history of problem detection; 2) relevant in that Text Boxes in both have the same anomalous behavior.

@ajlittoz
If text Frames had not behaved the same as Text Boxes, I would have simply switched to them, and written Text Boxes’ justification off as weird. I suspect something is weird in the justification logic somewhere, affecting them both, but I have no proof.
Although it is not relevant here, thanks for the anchoring comment. I so often deal with short documents that I get away with anchoring To Page, but your warning is good for bigger documents; I will keep it in mind.

@fpy
As @Hrbrgr said, please move your comment to a comment, as it is most definitely not an answer; @ajlittoz is the closest to a sort-of-answer. It appears only you can make the edit on your comment; I certainly can’t.
My statement was “I first found it … in Draw”, giving a chronology of my work.

You might like to report a bug, How to Report Bugs in LibreOffice - The Document Foundation Wiki

Have a look at:

Text Box in Writer

Text Boxes in Draw


In Draw you can choose

like regression or just discovered here ?

@fpy
Answer/solution boxes are reserved for solutions, otherwise please use comments.
Thank you very much.
You can delete the Answer box and add a comment instead. Thank you.