* paragraphs within the text are inserted to a text document.
*/
protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) {
XInterface oObj = null;
TestEnvironment tEnv = null;
XStyle oStyle = null;
log.println( "creating a test environment" );
log.println("getting PageStyle");
XStyleFamiliesSupplier oSFS = (XStyleFamiliesSupplier)
UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
XNameAccess oSF = oSFS.getStyleFamilies();
XIndexAccess oSFIA = (XIndexAccess)
UnoRuntime.queryInterface(XIndexAccess.class, oSF);
try {
XNameAccess oSFNA = (XNameAccess) AnyConverter.toObject(
new Type(XNameAccess.class),oSFIA.getByIndex(2));
oStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oSFNA.getByName("Standard"));
} catch ( com.sun.star.lang.WrappedTargetException e ) {
log.println("Error, exception occured while getting style.");
e.printStackTrace(log);
} catch ( com.sun.star.lang.IndexOutOfBoundsException e ) {
log.println("Error, exception occured while getting style.");
e.printStackTrace(log);
} catch ( com.sun.star.container.NoSuchElementException e ) {
log.println("Error, exception occured while getting style.");
e.printStackTrace(log);
} catch ( com.sun.star.lang.IllegalArgumentException e ) {
log.println("Error, exception occured while getting style.");
e.printStackTrace(log);
}
try {
log.println("Getting property ('TextColumns') value of style "
+ oStyle.getName());
XPropertySet xProps = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class,oStyle);
oObj = (XTextColumns) AnyConverter.toObject(
new Type(XTextColumns.class),xProps.getPropertyValue("TextColumns"));
} catch ( com.sun.star.lang.WrappedTargetException e ) {