I've been trying to find a way to insert text into a presentation page.
I have a working example which creates several presentation pages. On one, it creates a rectangle ... What I want to do, is to insert text (Arial, 24pt font, bold) on a page as well. From the documentation, it appears that I have to crate a shape (ie. my rectangle), get the text for this object via
Code: Select all
XText xShapeText = (XText)UnoRuntime.queryInterface(XText.class, lastAddedShape);
then
Code: Select all
xShapeText.setString("<SF Name> Build X.X Public API Changes");
Finally, set the font using something link this (not 'something' b/c I can't get it to work)
Code: Select all
XTextCursor xTextCursor = xShapeText.createTextCursor();
XPropertySet xCursorProps = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xTextCursor);
xCursorProps.setPropertyValue("CharFontName", "Arial");
Thanks,
--MA