UnoRuntime.queryInterface(XModel.class, xImpressDoc);
//Change to Outline view
try {
String aSlotID = "slot:27011";
XDispatchProvider xDispProv = (XDispatchProvider)
UnoRuntime.queryInterface( XDispatchProvider.class,
aModel.getCurrentController() );
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");
}