wiki/ situation

Current Situation

The following is a mail sent to the udk-dev list seeking help. It lays the situation out fairly effectively. It has since also been sent to the api-dev list, which suggested that the issue lies in using the system's Python rather than the Python built by OpenOffice. Having sorted this out, things are on their way to working.

Hello all,

I'm currently trying to use the Python bindings to Uno to automate the
display and movement of Impress presentations.  I'm using the 64-bit deb
packages from 'http://download.openoffice.org/3.0beta/'.  I'm currently
doing:

  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()

At this point, p is (with some formatting applied to aid readability):
  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 'supportInterfaces' of
'com.sun.star.presentation.XPresentation2', suggests that 'p' should
have a 'getController' method.  However, 'p' only has the following
methods:
  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?


Thanks,

Dan