// creation of testobject here
// first we write what we are intend to do to log file
log.println( "creating a test environment" );
SOfficeFactory SOF = SOfficeFactory.getFactory(
(XMultiServiceFactory)Param.getMSF());
// get the drawpage of drawing here
log.println( "getting Drawpage" );
XDrawPagesSupplier oDPS = (XDrawPagesSupplier)
UnoRuntime.queryInterface(XDrawPagesSupplier.class, xDrawDoc);
XDrawPages oDPn = oDPS.getDrawPages();
XIndexAccess oDPi = (XIndexAccess)
UnoRuntime.queryInterface(XIndexAccess.class,oDPn);
try {
oObj = (XDrawPage) AnyConverter.toObject(
new Type(XDrawPage.class),oDPi.getByIndex(0));
} catch (com.sun.star.lang.WrappedTargetException e) {
e.printStackTrace( log );
throw new StatusException( "Couldn't get DrawPage", e );
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
e.printStackTrace( log );
throw new StatusException( "Couldn't get DrawPage", e );
} catch (com.sun.star.lang.IllegalArgumentException e) {
e.printStackTrace( log );
throw new StatusException( "Couldn't get DrawPage", e );
}
//put something on the drawpage
log.println( "inserting some Shapes" );
XShapes oShapes = (XShapes) UnoRuntime.queryInterface
(XShapes.class,oObj);
oShapes.add(SOF.createShape
(xDrawDoc, 2000, 1500, 1000, 1000, "Line"));
oShapes.add(SOF.createShape
(xDrawDoc, 3000, 4500, 15000, 1000, "Ellipse"));
oShapes.add(SOF.createShape
(xDrawDoc, 5000, 3500, 7500, 5000, "Rectangle"));
//get the XMasterPagesSupplier
log.println("get XMasterPagesSupplier");
XMasterPagesSupplier oMPS = (XMasterPagesSupplier)