Get sizes of rows/columns/shapes programmatically

Hi there,
What’s the best approach to getting sizes of everything (rows/columns/custom shapes such as images, charts or textboxes) with a programmatic API? (I’m using PyOO right now, but I’m open to other languages/libraries, including directly calling LibreOffice classes in C++)

Basically I’m trying to get all the layout information (sizes and positions of things) to allow user to select cells and other objects with a mouse in their browser. If I understand correctly, it cannot be just extracted from the document’s xml because some of it is calculated dynamically by the editor application based on the contents, though I may be wrong.

I’m new to this area, so any pointers will be welcome!

https://www.openoffice.org/api/docs/common/ref/com/sun/star/accessibility/XAccessibleComponent.html

Or as this is LibreOffice, LibreOffice: XAccessibleComponent Interface Reference.

1 Like