Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


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.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.