How to get text area rectangle from shape type, position, size and adjustment values?
rb.henschel at t-online.de
Sun Jul 24 21:59:28 UTC 2022
I know that the calculation of moTextOffFoo values in transform2dcontext
is correct in principle. But I am very unhappy with calculating the
position and size of the required text area rectangle by hand using the
preset geometry. I have now done this for the shape types that I know
are in the preset SmartArts. But the user can also exchange these shapes
with others in the UI of MS Office. So the calculation of the text area
rectangle would have to be done for all preset shapes. That's why I'm
looking for another way.
At that point I have the type of the shape and know position, size and
adjustment values. If I had a ready CustomShape, I could get the needed
text area rectangle with the method getTextBounds(). But in
transform2dcontext.cxx there is no CustomShape. Or do I miss something?
Is there any way to make such a shape temporarily so that you can use
getTextBounds()? Or maybe someone has another idea how to get the text
area rectangle from type, position, size and adjustment values?
More information about the LibreOffice