How to access LibreOffice help texts with Python3-uno?

Miguel Teixeira miguel.teixeira at poli.ufrj.br
Sat Aug 10 16:48:03 UTC 2019


Hi,

I am trying to write an extension for LibreOffice using Python3-uno. I need
to access all the help texts that appear in the user interface to write it.
Unfortunately, I'm having trouble with documentation when things I want to
do are not related to, for example, "creating an extension that modifies
documents" or "creating new windows". I found here:

https://www.openoffice.org/api/docs/common/ref/com/sun/star/awt/UnoControlButtonModel.html#HelpText

But I don't know if this is exactly what I am wanting or if I am doing it
wrong, because it generates no return for me:

>>> localContext = uno.getComponentContext()
localContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver",
localContext)
>>> resolver =
localContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver",
localContext)
>>> context =
resolver.resolve("uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext")

>>> helpt =
context.ServiceManager.createInstanceWithContext('com.sun.star.awt.UnoControlButtonModel',
context)
>>> helpt.HelpText
''
I always get an empty rope. Even with both windows open (IDLE and
LibreOffice), with the mouse above a button generating a help text

Thanks!
Regards,
Miguel Teixeira.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20190810/e280486a/attachment.html>


More information about the LibreOffice mailing list