Apache OpenOffice (AOO) Bugzilla – Issue 8242
terminate freezes the office when there are unsaved changes
Last modified: 2013-07-30 02:44:51 UTC
A call to XDesktop.terminate() freezes the office when there are documents with unsaved changes. The user is not asked to save the changes. The office should not freeze, terminate should return false. IMO there should also be a way to close the office with interaction and a way to force termination even if there are unsaved changes and the quickstarter is running. Both seems not to be possible at the moment.
TM->SW: As talked about, please have a look. Thanks !
SW: just tried with OOo1.1RC3, the office doesn't freeze and instead the dialog asking to save the changed document appears. This dialog can be avoided by implementing an XTerminateListener in your java-application where the documents can be closed/saved. SW->AS: as discussed we should/want to have an API-call that avoids user interaction.
AS: Proposal ... a) Desktop.terminate() and its related interfaces (means listener) should be fix in its current list of features. So we break no existing code outside. b) Desktop.dispose() should shutdown the office process without any chance to stop that. That includes the quickstart module, ignoring of modified documents, closing the pipe, ignoring any veto listener(!) ... etcpp. c) The additional interface util.XCloseable() will be added to the Desktop service. It will be implemented in the way to work without any UI. But there will be no interaction. The calli of XCloseable.close() has to be shure that the dialog "There are unsaved changes..." occures. That can be reached by iterate over all currently open tasks and call "XController.suspend(true)". A full featured specification ("How should I termninate an office ...") and an additional chapter for the SDK will follow.
taken over from internal bug #104639# "Desktop:termninate shouldnt use suspend" No dialogs! Also the quickstarter shouldn't veto against termination, it should intercept QuitApp instead. New way for termination: dispatch(".uno:Quit") QueryExit try suspend taks terminate close all tasks notify listeners possibly resume tasks Of course we must write a changes mail that terminate() does not check for modified documents anymore. To terminate the desktop with this query, you must dispatch ".uno:Quit". IMHO a veto exception should automatically mean that the listener is responsible to call terminate() later. MBA->AS: Desktop will offer XCloseable close() will close all frames without calling suspend() terminate() at the desktop will call suspend() on all frames before it calls close() at itself(!) Please write a clear specification before you start the implementation
.
Issue Type changed
It was decided to make this design change not in a time frame of OOo 2.0.
*** Issue 49862 has been marked as a duplicate of this issue. ***
as: I'm not happy with a new interface providing a different way for closing the office. Desktop.terminate() was implemented and thought as an UI related function asking the user if there are some modified documents still open. Thats a fact and you have to deal with that. Desktop.dispoe() will normaly do the job you wish ... but it cant be called because the desktop is an one instance UNO service. And those services are owned by the global service manager and has to be destroyed by those manager only. As a result of that dispose() isnt an option for you - because it has not to be called by you. A further Desktop.close() will make the code more complex ... but wont help you in any case. OK - modified documents wont be a problem for you ... but what should happen with an enabled quick starter, open dialogs, running print jobs, still active extensions not supporting the right interface for ccaneling still running operations. We know that OOo needs a complete redesign of process liefetime handling. But till now nobody have a real good solution. So implementing Desktop.close() isnt an option for me (not at these moment).
Reset assignee on issues not touched by assignee in more than 1000 days.