protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) {
XInterface oObj = null;
// create testobject here
XEnumerationAccess xEA = null ;
try {
SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory)tParam.getMSF()) ;
XShape oShape = SOF.createShape
(xDrawDoc,5000,3500,7500,5000,"Text");
DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0)).add(oShape) ;
XSimpleText text = (XSimpleText) UnoRuntime.queryInterface
(XSimpleText.class, oShape) ;
XTextCursor cursor = text.createTextCursor() ;
text.insertString(cursor, "Paragraph 1", false) ;
text.insertControlCharacter(cursor,
ControlCharacter.PARAGRAPH_BREAK, false) ;
text.insertString(cursor, "Paragraph 2", false) ;
text.insertControlCharacter(cursor,
ControlCharacter.PARAGRAPH_BREAK, false) ;
text.insertString(cursor, "Paragraph 3", false) ;
text.insertControlCharacter(cursor,
ControlCharacter.PARAGRAPH_BREAK, false) ;
xEA = (XEnumerationAccess) UnoRuntime.queryInterface
(XEnumerationAccess.class, text) ;
XInterface oTextContent = (XInterface) AnyConverter.toObject(
new Type(XInterface.class),xEA.createEnumeration().nextElement());
xEA = (XEnumerationAccess) UnoRuntime.queryInterface
(XEnumerationAccess.class, oTextContent) ;
oObj = (XInterface) AnyConverter.toObject(
new Type(XInterface.class),xEA.createEnumeration().nextElement());
} catch (Exception e) {
log.println("Can't create test object") ;
e.printStackTrace(log) ;
}