[Solved] Incorrect Offset for Text in Shape

Discuss the drawing application
Locked
alupo
Posts: 10
Joined: Tue Aug 02, 2022 3:39 am

[Solved] Incorrect Offset for Text in Shape

Post by alupo »

Hi all,

This is for LibreOffice but it is my understanding that the behavior should mimic that of OpenOffice Draw.

When adding text in a shape you can change the Text Attributes parameters to offset the location of the text within the box. This works as expected as long as the the anchor point of the text does not exceed the bounds of the shape. Setting the offset to a value larger than the width of the shape has no effect on the text location.

https://www.dropbox.com/s/vblvwgvqafsp3 ... r.png?dl=0
vblvwgvqafsp386.png
vblvwgvqafsp386.png (33.75 KiB) Viewed 2878 times

A workaround is to know the width of the text "label" and spoof LO into offsetting it to the desired location. This is very clunky, the width of the "label" is dynamic and changes as the text is changed.

https://www.dropbox.com/s/2vb94l2znbuft ... d.png?dl=0
vb94l2znbuftfr.png
vb94l2znbuftfr.png (39.33 KiB) Viewed 2878 times
Another way around this is to create a second shape, large enough to include the spacing to the label. But this is also undesired as it creates two objects for every instance and if you're working with hundreds of shapes it becomes frustrating. You could also create a borderless unfilled shape to just hold the text and position it next to the initial object but this also suffers from the same problem, you double the amount of objects.

I was wondering if there's a more human-friendly workaround to this or if this can be submitted to the bug list.


/Alex
Last edited by Hagar Delest on Sun Feb 05, 2023 4:09 pm, edited 2 times in total.
Reason: tagged solved.
/Alex

LibreOffice 7.5.9.2 (X84_64) on Windows 10
alupo
Posts: 10
Joined: Tue Aug 02, 2022 3:39 am

Re: Incorrect Offset for Text in Shape

Post by alupo »

OP here, had an issue with the forum account and am unable to log in as alexlupo. Found another, more elegant, approach. Setting Left: 1 mm in Paragraph settings achieves the desired outcome by offsetting the text label 1 mm from the object.
/Alex

LibreOffice 7.5.9.2 (X84_64) on Windows 10
Locked