SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory)tParam.getMSF()) ;
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) ;
cursor.setString("TextForMove");
aRange = cursor;
XTextCursor cursor1 = text.createTextCursorByRange(text.getEnd());
text.insertControlCharacter(cursor1,
ControlCharacter.PARAGRAPH_BREAK, false) ;
text.insertString(cursor1, "Paragraph 2", false);
text.insertControlCharacter(cursor1,
ControlCharacter.PARAGRAPH_BREAK, false) ;
text.insertString(cursor1, "Paragraph 3", false) ;
text.insertControlCharacter(cursor1,
ControlCharacter.PARAGRAPH_BREAK, false) ;
oObj = text.getText() ;
} catch (Exception e) {
log.println("Can't create test object") ;
e.printStackTrace(log) ;
}