Ive tried the RectangleShape and its text, tried the TextShape and the PolyPolygonShape.
Sadly the property TextContourFrame doesnt work (which is sufficient for my need).
Here is some code:
Code: Select all
Object shape = msf.createInstance("com.sun.star.drawing.TextShape");
XShape xShape = (XShape)shape;
xShape.setPosition(new Point(5000,1000));
XDrawPageSupplier dps = (XDrawPageSupplier)activeSheet;
XDrawPage drawPage = dps.getDrawPage();
drawPage.add(xShape);
XPropertySet shapeProperties = (XPropertySet)shape;
shapeProperties.setPropertyValue("TextContourFrame", new Any(true));
XText xText = (XText)xShape;
xText.setString("Hello World");
XPropertySet shapeProperties2 = (XPropertySet)shape;
shapeProperties2.setPropertyValue("TextContourFrame", new Any(true));