openoffice.org - open office java extension undo and onStartApp method -
i'm creating java extension open office , need use open office undo method. i've found documentation xundomanager since i'm quite unexperienced api don't know how use in code.
furthermore, want extension things before openning document, i've found onstartapp but, again due non experience, don't know how use on code.
could me ? in advance !
for undo, use dispatcher call shown in listing 4.3 of andrew pitonyak's macro document.
for onstartapp, did not find lot of documentation. create file called events.xcu
code following:
<node oor:name="applicationevents"> <node oor:name="bindings"> <node oor:name="onstartapp" oor:op="replace"> <prop oor:name="bindingurl" oor:type="xs:string"> <value>vnd.sun.star.script:events.py$onstartapp?language=python&location=application</value>
change value of vnd.sun.star.script
use java, according this documentation.
then add manifest.xml:
<manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="events.xcu" />
the ctlo project @ github example of using events.xcu , manifest.xml in way.
edit:
here example of dispatcher call in java:
propertyvalue[] printproperties = new propertyvalue[1]; printproperties[0] = new propertyvalue(); printproperties[0].name = "print"; printproperties[0].value = new boolean(true); xdispatchprovider xdispatchprovider = (xdispatchprovider) unoruntime.queryinterface (xdispatchprovider.class, xdesktop); dispatcher.executedispatch( xdispatchprovider, ".uno:print","_self", 0, printproperties);
Comments
Post a Comment