the objects are being created but no text is written.
i can see the elipse in the document and if i drag select all i also see the empty text shape.
please help, im coverting over a set of powerpoint generators from being coupled to ms office powerpoint to openoffice impress, so far boot times and interaction times are far quicker than with powerpoint.
Code: Select all
public void DrawOnDrawing(XComponent document)
{
XDrawPages xp = ((XDrawPagesSupplier) document).getDrawPages();
XDrawPage xpage1 = xp.insertNewByIndex(0);
XDrawPage xpage0 = (XDrawPage)xp.getByIndex(0).Value;
xp.remove(xpage0);
XMultiServiceFactory xDocMSF = (XMultiServiceFactory)document;
XShape shape = (XShape)xDocMSF.createInstance("com.sun.star.drawing.EllipseShape");
shape.setPosition(new unoidl.com.sun.star.awt.Point(100, 100));
shape.setSize(new unoidl.com.sun.star.awt.Size(5000, 5000));
XShape txtshape = (XShape)xDocMSF.createInstance("com.sun.star.drawing.TextShape");
txtshape.setPosition(new unoidl.com.sun.star.awt.Point(6000, 6000));
txtshape.setSize(new unoidl.com.sun.star.awt.Size(5000, 5000));
((XText)txtshape).setString("test text");
((XText)shape).setString("another test");
xpage1.add(txtshape);
xpage1.add(shape);
}