Hello all,
I'm currently trying to use the API, via Python, to automate the display
of slideshows in Impress. I am using the 64-bit deb
packages from 'http://download.openoffice.org/3.0beta/'.
Currently, I am doing this:
import os.path
import uno
localContext = uno.getComponentContext()
resolver =
localContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver",
localContext )
ctx = resolver.resolve(
"uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
smgr = ctx.ServiceManager
desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)
url = uno.systemPathToFileUrl(os.path.abspath("foo.ppt"))
doc = desktop.loadComponentFromURL(url, "_blank", 0, () )
p = doc.getPresentation()
This gives me 'p', with some formatting, as:
pyuno object (com.sun.star.presentation.XPresentation)0xb4b238{
implementationName=com.sun.star.comp.sd.SlideShow,
supportedServices={
com.sun.star.presentation.Presentation
},
supportedInterfaces={
com.sun.star.presentation.XPresentation2,
com.sun.star.lang.XServiceInfo,
com.sun.star.lang.XTypeProvider,
com.sun.star.uno.XWeak,
com.sun.star.lang.XComponent
}
}
The presence in 'supportedInterfaces' of
'com.sun.star.presentation.XPresentation2' suggests that 'p' should have
getController', 'isRunning' and 'startWithArguments' methods, as per
[0]. However, 'p' only has the following relevant methods available:
p.addEventListener
p.dispose
p.getImplementationId
p.getImplementationName
p.getSupportedServiceNames
p.getTypes
p.queryAdapter
p.queryInterface
p.removeEventListener
p.supportsService
Can anyone shed some light on what might be going on here?
Finally, I would like to note that I don't believe this issue to be
language-specific but, having only a Python environment set up, I cannot
be sure. If it does prove to be language specific, I apologise.
Thanks,
Dan
[Footnote 0:
http://api.openoffice.org/docs/common/ref/com/sun/star/presentation/XPresentation2.html]
--
credativ ltd UK office: +44 1788 298150
PO Box 3868 Direct ext: +44 1788 298152
Rugby Email: [EMAIL PROTECTED]
CV21 3WW Web: http://www.credativ.co.uk/
credativ limited is registered in England & Wales, company no. 5261743
registered office: Suite 2 Bloxam Court, Corporation Street, Rugby CV21
2DU
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]