Hi Cor, Carsten,
Carsten Driesner ha scritto: > Cor Nouws wrote: >> Hi, >> >> From some threads in the mail archive, I reed it is possible to >> replace a uno function by one you define yourself. >> But the example(s) I find are about a component written in Java. >> Is it possible to do replace UNO:Paste also in OOo-Basic? >> >> I think that the devGuide [1] shows the theory, but that is not the >> same as usable basic code for me ;-) >> > Hi Cor, > > Theoretically this could be possible but needs huge effort. Andreas > Schluens told me that some people tried it Perhaps that people are me :-) > but nobody has ever achieved > a positive result yet. It depends. My attempt works well but Andreas said: a) Method createUnoListener() was not thought to be used that way. [...] b) On the other side I believe you can run into trouble with lifetime of your basic objects.[...] a third objection was moved form Ariel, regarding the fact that you'll need to bind the interceptor to some events in order do start and keep it bound to the current frame. (unless you don't mean to start it from a toolbar button or something similar) Speaking of extensions, the event binding requires an XJob implementation and this cannot be done in basic. > I cannot recommend to create a solution based on > dispatch intercepting using Basic. As you have to implement several > interfaces you have to use CreateUnoListener() for every single interface. Here you'll find an an example of dispatch interceptor in basic that replaces some dispatches (copy and paste and some others) See the attached document: http://api.openoffice.org/servlets/ReadMsg?listName=dev&msgNo=20341 In the same thread you'll find comments from Andreas Schlüns ciao Paolo --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
