UnoRuntime.queryInterface(XDrawPagesSupplier.class, xImpressDoc);
XDrawPages the_pages = oDPS.getDrawPages();
XIndexAccess oDPi = (XIndexAccess)
UnoRuntime.queryInterface(XIndexAccess.class,the_pages);
XModel aModel = (XModel)
UnoRuntime.queryInterface(XModel.class, xImpressDoc);
XInterface oObj = aModel.getCurrentController();
//Change to Outline view
try {
String aSlotID = "slot:27010";
XDispatchProvider xDispProv = (XDispatchProvider)
UnoRuntime.queryInterface( XDispatchProvider.class, oObj );
XURLTransformer xParser = (com.sun.star.util.XURLTransformer)
UnoRuntime.queryInterface(XURLTransformer.class,
((XMultiServiceFactory)Param.getMSF()).createInstance("com.sun.star.util.URLTransformer"));
// Because it's an in/out parameter we must use an array of URL objects.
URL[] aParseURL = new URL[1];
aParseURL[0] = new URL();
aParseURL[0].Complete = aSlotID;
xParser.parseStrict(aParseURL);
URL aURL = aParseURL[0];
XDispatch xDispatcher = xDispProv.queryDispatch( aURL,"",0);
if( xDispatcher != null )
xDispatcher.dispatch( aURL, null );
} catch (com.sun.star.uno.Exception e) {
log.println("Couldn't change mode");
}
try {
log.println( "creating a second impress document" );
xSecondDrawDoc = SOF.createImpressDoc(null);
shortWait();
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace( log );
throw new StatusException("Couldn't create document", e);
}
XModel aModel2 = (XModel)
UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc);
XWindow anotherWindow = (XWindow) UnoRuntime.queryInterface(
XWindow.class,aModel2.getCurrentController());
oObj = aModel.getCurrentController();
log.println( "creating a new environment for impress view object" );