Hello Reinhold,
Hi again,
assuming several documents re opened. To prevent the user close *all*
documents at once i can disable the exit menu item. So the user must use the
close menu item to close the docs one after the other.
After closing the last document an empty application window remains - what i
want to avoid.
If the user closes the last document window the application will
shutdown autoamticly. The special StartModule (you name it empty window)
will appear only in case you used the special "second" window closer at
the right side of the menu.
Everything you have to do is to intercept the URL ".uno:CloseWin" which
is triggered by this special control. But note: same URL will be
dispatched by using the menu entry "Close Window".
To close this window with the last close operation, i used a variable which
counts the closed docs (by means of a windowListener).
If there is only one doc left, i've tried out to execute xDesktop.terminate(),
but this yields in a app.crash ... seems to be the wrong way.
Calling desktop terminate() automaticly by closing the last open
document window is exactly the functionality implemented by OOo.
The only thing you need is to "ignore" the special closer control.
(As I said: it's call can be intercepted and ignored by doing nothing.)
Is there any other possibility to close the application window, something like
XClosable for xComponent? The application must not necessarily terminate, it
would be enough, if the window becomes invisible.
Regards,
Reinhold
Regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]