I'm very new to the api, but have figured out how to get a slide show
to open and query a few things about it such as the number of pages,
etc.  However, when I obtain the XPresentation2 reference and query it
for the XSlideShowController, it is returning null.  How do I get a
reference to the XSlideShowController?

Here's my existing Java code (I'm sure it could be more compact, but I
haven't made it work yet, let alone clean it up!):

XComponentContext xContext = Bootstrap.bootstrap();

XMultiComponentFactory xMCF = xContext.getServiceManager();

Object desktop =
xMCF.createInstanceWithContext("com.sun.star.frame.Desktop",
xContext);

XComponentLoader xComponentLoader = (XComponentLoader)
UnoRuntime.queryInterface(XComponentLoader.class,desktop);

XComponent xDocument =
xComponentLoader.loadComponentFromURL("file:///Users/dbreese/Documents/test.odp",
"_default", 0, new PropertyValue[0]);

XPresentationSupplier supplier = (XPresentationSupplier)
UnoRuntime.queryInterface(XPresentationSupplier.class, xDocument);

XPresentation pres = supplier.getPresentation();
                        
XPresentation2 pres2 = (XPresentation2)
UnoRuntime.queryInterface(XPresentation2.class, pres);
// if I do "pres2.start();" or even "pres.start();", my slideshow does
go full screen and stars here

XSlideShowController slideController = pres2.getController();
System.err.println("slideController = " + slideController);

Always produces:
slideController = null

Thanks,
Dustin

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to