Hi Amenel,
you can use an Accelerators.xcu file in you extension, for example:
[...]
<node oor:name="LEFT_MOD1_MOD2" oor:op="replace">
<prop oor:name="Command">
<value
xml:lang="en-US">service:my.extension.Service?myParam1</value>
</prop>
</node>
and register it during extension installation, for example add
<manifest:file-entry manifest:full-path="Accelerators.xcu"
manifest:media-type="application/vnd.sun.star.configuration-data" />
to the manifest.xml of your extension.
your service has to implement the "com.sun.star.task.XJobExecutor" Interface
with the
trigger(string Event ) method.
if you want your extension being instantiated during aoo startup, implement the
"com.sun.star.task.XJob Interface" with it's execute(NamedValue[] args) method.
add a Jobs.xcu, for example:
https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Jobs/Configuration
<?xml version='1.0' encoding='UTF-8'?>
<oor:component-data oor:name="Jobs" oor:package="org.openoffice.Office"
xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<node oor:name="Jobs">
<node oor:name="my.extension.Service" oor:op="replace">
<prop oor:name="Service" oor:type="xs:string">
<value>my.extension.Service</value>
</prop>
</node>
</node>
<!--
https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Jobs/List_of_Supported_Events -->
<node oor:name="Events">
<node oor:name="onFirstVisibleTask" oor:op="modify">
<node oor:name="JobList">
<node oor:name="my.extension.Service"
oor:op="replace"/>
</node>
</node>
</node>
</oor:component-data>
and register in "manifest.xml"
<manifest:file-entry manifest:full-path="Jobs.xcu"
manifest:media-type="application/vnd.sun.star.configuration-data" />
Regards
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org