I use pyuno to create a table in Writer. I would like to rotate the text in one cell. I cannot get this to work.
I first get a cell from the table using getCellByName(). This method returns a com.sun.star.table.XCell.
When I print this object, I get:
(com.sun.star.table.XCell)0x559c48583568{implementationName=SwXCell, supportedServices=
{com.sun.star.text.CellProperties},
supportedInterfaces={com.sun.star.table.XCell,
com.sun.star.lang.XServiceInfo,
com.sun.star.beans.XPropertySet,
com.sun.star.container.XEnumerationAccess,
com.sun.star.lang.XTypeProvider,
com.sun.star.uno.XWeak,com.sun.star.text.XText,
com.sun.star.text.XTextRangeCompare,
com.sun.star.text.XRelativeTextContentInsert,
com.sun.star.text.XRelativeTextContentRemove,
com.sun.star.lang.XUnoTunnel,
com.sun.star.beans.XPropertySet,
com.sun.star.text.XTextPortionAppend,
com.sun.star.text.XParagraphAppend,
com.sun.star.text.XTextContentAppend,
com.sun.star.text.XTextConvert,
com.sun.star.text.XTextAppend,
com.sun.star.text.XTextAppendAndConvert}}
So, this object supports the service com.sun.star.text.CellProperties. However, I believe, in order to rotate the text I should change the Orientation or RotateAngle properties, which are both in the interface com.sun.star.table.CellProperties, and not in com.sun.star.text.CellProperties. If I try to set the Orientation of a cell that I got using getCellByName(), I get an AttributeError, indicating that the attribute does not exist.
Looking at the class tree, I would expect that an object that is returned from getCellByName() should return an object that also implements com.sun.star.table.CellProperties.
How can I access the attributes in com.sun.star.table.CellProperties, and especially Orientation and RotateAngle?