Giuseppe Castagno wrote:

> Hi all,
> 
> I'd like to intercept some dispatch commands (as ".uno:Save" for
> example) from inside an extension, using Java.
> 
> Is it possible to use a XDispatchProviderInterceptor interface for that,
> intercepting the dispatch command before it is sent to the right executor?

Yes.

>  From what I've seen from the tests I carried out so far and from
> studying the DevGuide code examples, using a
> XDispatchProviderInterceptor from inside an extension doesn't seem possible.
> 
> Prompted from the response I got from another message I posted on this
> ML, I first tried by implementing a job, but I need to do some user
> interaction while processing the job, and again that wasn't possible
> from inside it.
> Besides the job can't interrupt the processing chain: something I need
> depending on some user action.
> 

The trick is how you get the interceptor attached to the frames whose
DispatchProviders they want to intercept. This will need an additional
"Job" service implemented in the extension that is registered to the
DocumentEvent "OnViewCreated". The job then can register the
DispatchInterceptor.

Best regards,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to