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


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

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.