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 - XDispatchProviderInterception.registerDispatchProviderInterceptor( ... my interceptor ... ) - ... just ignore .uno:CloseDoc, .uno:CloseWin - query XFrame for XCloseable - XCloseable.addCloseListener( ... my listener ... ) - ... throw CloseVetoException in queryClosing - start your application ( JFrame in my case ) - when application is done, removeCloseListener and remove dispatch interceptor This works perfectly for me. I know limitations, but it fits all my needs for now. It's not so elegant as with one listener, but it works. This solution leaves other OpenOffice.org windows untouched and user can close them. -- Robert Vojta --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
