Issue 8242 - terminate freezes the office when there are unsaved changes
Summary: terminate freezes the office when there are unsaved changes
Status: ACCEPTED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 643
Hardware: PC Windows 2000
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
: 49862 (view as issue list)
Depends on:
Blocks:
 
Reported: 2002-10-11 12:07 UTC by schulten
Modified: 2013-07-30 02:44 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description schulten 2002-10-11 12:07:06 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.
Comment 1 thorsten.martens 2003-09-03 12:21:46 UTC
TM->SW: As talked about, please have a look. Thanks ! 
Comment 2 stephan.wunderlich 2003-09-05 12:44:36 UTC
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.
Comment 3 andreas.schluens 2003-09-08 09:43:24 UTC
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.
Comment 4 andreas.schluens 2003-09-10 11:33:54 UTC
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
Comment 5 andreas.schluens 2004-01-30 13:38:52 UTC
.
Comment 6 andreas.schluens 2004-04-22 08:51:42 UTC
.
Comment 7 Mathias_Bauer 2004-08-13 09:09:19 UTC
Issue Type changed
Comment 8 andreas.schluens 2004-10-18 09:30:54 UTC
It was decided to make this design change not in a time frame of OOo 2.0.
Comment 9 andreas.schluens 2005-05-26 14:16:55 UTC
*** Issue 49862 has been marked as a duplicate of this issue. ***
Comment 10 andreas.schluens 2008-05-30 08:54:50 UTC
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).
Comment 11 Rob Weir 2013-07-30 02:44:51 UTC
Reset assignee on issues not touched by assignee in more than 1000 days.