Suppose I have a document and iterate over its DrawPage objects like so:
- Code: Select all Expand viewCollapse view
shapeobjenum = document.DrawPage.createEnumeration()
while shapeobjenum.hasMoreElements():
shapeobj = shapeobjenum.nextElement()
# shapeobj.Size, shapeobj.ActualSize give me the object’s size on the page in 100th/mm
Some of these XShape objects are implemented by SwXTextGraphicObject (a simple jpg image dropped into the document) and others by SwXShape or SvxShapeCollection (a hand-drawn shape, for example). Can there be other implementations for shapes?
As I iterate over these shape objects, I can get their size but I am at a loss as for their alignment. The XShapeAligner is deprecated (and I did not see it used in MRI) but the drawing module has an Alignment enum whose values I can not find when I browse the shape objects in MRI.
Can somebody please point me into the right direction? How can I find the alignment of a shape?