log.println("getting style");
XStyleFamiliesSupplier oSFS = (XStyleFamiliesSupplier)
UnoRuntime.queryInterface(XStyleFamiliesSupplier.class,
xTextDoc);
XNameAccess oSF = oSFS.getStyleFamilies();
XIndexAccess oSFsIA = (XIndexAccess)
UnoRuntime.queryInterface(XIndexAccess.class, oSF);
oSFNA = (XNameAccess) AnyConverter.toObject(
new Type(XNameAccess.class),oSFsIA.getByIndex(0));
XIndexAccess oSFIA = (XIndexAccess)
UnoRuntime.queryInterface(XIndexAccess.class, oSFNA);
oStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oSFIA.getByIndex(10));
} catch ( com.sun.star.lang.WrappedTargetException e ) {
log.println("Error: exception occured.");
e.printStackTrace(log);
throw new StatusException( "Couldn't create environment ", e );
} catch ( com.sun.star.lang.IndexOutOfBoundsException e ) {