Re: [api-dev] Consume event OnPrepareUnload

2007-12-04 Thread Robert Vojta
On Dec 3, 2007 6:50 PM, Mathias Bauer [EMAIL PROTECTED] wrote: This only helps for the case where the GUI is used. If a script or any other code closed the document or frame directly (through its XCloseable interface) it would bypass your interceptor. The XCloseListener is the more general

Re: [api-dev] Consume event OnPrepareUnload

2007-12-04 Thread Robert Vojta
On Dec 4, 2007 4:17 PM, Robert Vojta [EMAIL PROTECTED] wrote: Just for archive ... How do I prevent the inner document window from being closed? - get XFrame from current XTextDocument - query XFrame for XDispatchProviderInterception -

Re: [api-dev] Consume event OnPrepareUnload

2007-12-04 Thread Mathias Bauer
Robert Vojta wrote: On Dec 3, 2007 6:50 PM, Mathias Bauer [EMAIL PROTECTED] wrote: This only helps for the case where the GUI is used. If a script or any other code closed the document or frame directly (through its XCloseable interface) it would bypass your interceptor. The XCloseListener

[api-dev] Consume event OnPrepareUnload

2007-12-03 Thread Robert Vojta
Hallo, is there a way how to consume event receieved from document's XEventListenrr? I can listen for events, but I have no idea how to consume them. The goal is simple - when I have non-modal JFrame opened, I would like to remove possibility to close document until my JFrame disappears. Best

Re: [api-dev] Consume event OnPrepareUnload

2007-12-03 Thread Andreas Schlüns
Hello Robert, Hallo, is there a way how to consume event receieved from document's XEventListenrr? I can listen for events, but I have no idea how to consume them. The goal is simple - when I have non-modal JFrame opened, I would like to remove possibility to close document until my JFrame

Re: [api-dev] Consume event OnPrepareUnload

2007-12-03 Thread Mathias Bauer
Robert Vojta wrote: Hallo, is there a way how to consume event receieved from document's XEventListenrr? I can listen for events, but I have no idea how to consume them. The goal is simple - when I have non-modal JFrame opened, I would like to remove possibility to close document until

Re: [api-dev] Consume event OnPrepareUnload

2007-12-03 Thread Mathias Bauer
Sascha Jensen wrote: Hello, i use ::com::sun::star::frame::XDispatchProviderInterception and ::com::sun::star::frame::XDispatch to intercept commands that are about to close the document (.uno:CloseDoc) or window (.uno:CloseWin). The .uno:CloseDoc is executed when file-close is