UnoService in PyUNO for keyboard shortcuts in extensions: JobExecutor never called.
jan d
dittrich.c.jan at gmail.com
Tue Aug 8 07:21:36 UTC 2017
Hello,
I wrote an extension (
https://github.com/jdittrich/Office-QDA-TagTree/tree/keyboardShortcut)
using PyUNO. I would like to give some functions of it a keyboard shortcut.
However, I can't get the JobExecutor Interface called.
It would be of great help, if a person experienced with (Py) UNO could have
a look at my approach. I assume it to be a simple misunderstanding of an
PyUNO concept (which I could not find out though I read the documentation I
found)
WHAT I DID:
1. The define-in-"Accelerators.xcu"-part [1] worked (The shortcut shows up
in the Keyboard-shortcut customization dialog).
3. I implemented an XJobExecutor Interface [2]
2. I created an uno service via g_ImplementationHelper.addImplementation,
using the class from 2. [3] this service should be called by the shortcut
PROBLEM: the jobExecutor is never executed when I press the keyboard
shortcut. Despite doing a step-by step debugging and turned on debug
messages, I was unable to locate a problem.
POSSIBLE PROBLEM SOURCES:
* I was unable to find the docuementation for
g_ImplementationHelper.addImplementation e.g. if it takes a class or an
instance. I tried with both (the inked example is an instance), non worked.
LINKS TO RELEVANT CODE PARTS:
[1]
https://github.com/jdittrich/Office-QDA-TagTree/blob/keyboardShortcut/Accelerators.xcu#L10
[2]
https://github.com/jdittrich/Office-QDA-TagTree/blob/keyboardShortcut/src/qdacodehelper.py#L215
[3]
https://github.com/jdittrich/Office-QDA-TagTree/blob/keyboardShortcut/src/qdacodehelper.py#L247
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20170808/6aa27192/attachment.html>
More information about the LibreOffice
mailing list