https://bugs.documentfoundation.org/show_bug.cgi?id=150901
Bug ID: 150901
Summary: FILEOPEN DOCX better position for text frame in
rotated shape
Product: LibreOffice
Version: 7.5.0.0 alpha0+ Master
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
Created attachment 182351
--> https://bugs.documentfoundation.org/attachment.cgi?id=182351&action=edit
Example document to see the current bad position
Currently the position of the text frame is calculated this way:
1. Get left distance L from the left edge of the text area rectangle to the
left edge of the un-rotated shape.
2. Get top distance T from the top edge of the text area rectangle to the top
edge of the un-rotated shape.
3. Get the snap-rectangle of the rotated shape
4. Set the top of the text area rectangle distance T down to the top of the
snap-rectangle.
5. Set the left of the text area rectangle distance L right from the left edge
of the snap-rectangle.
That positiones the text area rectangle far away from the place it has in Word.
I suggest to use this way:
1. Get the center C of the text area rectangle of the un-rotated shape.
2. Rotate this point C the same way as the shape is rotated (which means a
rotation around the center of the shape). You get a point C'.
3. Position the text area rectangle so, that its center coincides with C'.
--
You are receiving this mail because:
You are the assignee for the bug.