AutoRecovery of Files and Work Environment

OpenOffice.org 2.0 and StarOffice 8

Document - ID	Specification Owner	Last Change	Status
	Frank Loehmann	05/12/04	Final
Conforms to	
Applies to	OpenOffice.org 2.0, StarOffice 8 (all modules)
Task ID(s)	i20882
Category	Feature

Abstract

Introduce new “AutoRecovery” function with the possibility to configure the saving time frame. “AutoRecovery” recovers all SO applications (including all documents, cursor and window positions) exactly to the previously saved state. The user will get the same working environment he had before the application terminated. User will be informed using dialogs.

i-Team Members (The specification owner is part of the i-Team)

	Name	E-mail Address
User Experience	Frank Loehmann (FL)	Frank.loehmann@sun.com,
Development	Andreas Schlüns (AS)	andreas.schluens@sun.com,
Quality Assurance	Thorsten Martens (TM) Christoph Neumann (CN)	Thorsten.martens@sun.com, Christoph.Neumann@sun.com
Documentation	Uwe Fischer (UFI)	Uwe.fischer@sun.com

Approved for Implementation

	Approved by	Date
User Experience	Frank Loehmann	24.03.04
Development	Andreas Schlüns	27.04.04
Quality Assurance	Thorsten Martens	11.11.04
Documentation	Uwe Fischer	28.03.04
String Review	Elizabeth Matthis	10.05.04

Document Change History

Rev. Level	Change	Initials	Date
1.0	Initial feature list as discussed with MBA, CJ, MMP, MAV and FL	FL	02.05.03
1.1	Update, Dialog Mockup	FL	17.12.03
1.2	Finalization	FL	23.03.04
1.3	4.5.1Do Not Sow File Save Progress Indicator in Status Bar: no progress indicator for autorecovery save operations 4.3What Has to be Saved?: redefine algorithm to trigger autorecovery save operation.	MMP	13.04.04
1.4	Work on finalization of specification	FL	20.04.04
1.5	Work on comment from Andreas Schlüns and Matthias Bauer	FL	22.04.04
1.6	Add approval from TM and fix document outline	FL	11.11.04

Contents

Glossary	1

1	Motivation	1

2	Goals	1

2.1	How does this feature meet the requirements	1

2.2	How does this feature improve the program architecture	1

3	Dependancies	2

3.1	Technical Dependancies/Requirements	2

4	Competitive Analysis	2

4.1	Microsoft Office (XP)	2

4.1.1	Kill MS Office Applications and Start AutoRecovery	2

5	Detailed Specification	3

5.1	Flow Chart of AutoRecovery functionality	3

5.2	Feature Description	5

5.3	What Has to be Saved?	5

5.4	What has to be restored?	6

5.5	User interface	6

5.5.1	Progress in Status Bar of Document	6

5.5.2	Changed User Interface of Option Dialog	7

5.6	Error Conditions	7

6	Future Tasks	8

7	Notes	8

Glossary

Term	Description
AutoRecovery	Is a function to recover the users work environment and documents. Microsoft Office also uses this term.
Emergency Saving	Saving of files when the application has crashed (last action before application terminates)

Motivation

We want to improve file recovery functions we have already introduced with StarOffice 4.0. Furthermore we want to address users needs not to loose information due to the current “single executable” concept and the thus resulting crash of all modules, even if only one module was crashed. (This issue will be worked on in another PCD-Issue of MHU)

OpenOffice 1.1 only offers a function to save a document periodically with or without asking the user. The user must save changes to his original document, even if he don't want to, because current changes are only experimental. Furthermore OpenOffice.org tries to make an emergency backup when the application crashes and tries to recover these files during the automatically restart of OpenOffice.org. If the application hangs, the user will loose changes made until last saving of document and unsaved docs are gone in this case.

Goals

Recover the complete (as far as possible) work environment of the user and restore it automatically after program has crashed and gets restarted automatically. Do not modify content of users document to save current unsaved changes and save work of unsaved documents in case of hanging application.

How does this feature meet the requirements

Make AutoRecovery savings of all documents (even modified but unsaved ones) every n minutes.

Time period is configureable

Function can be turned off, but default is “off”.

Emergency saving if application crashes or the system gives termination signal

Store work environment such as pick list, document positions, cursor positions and most recently used URL list (configuration in general)

Automatic repair of damaged OpenOffice.org file containers (ZIP-files) - standard functionality on loading any OpenDocument file.

Improved status information to user via better dialogs, please see following spec for details:

http://specs.openoffice.org/appwide/errorreporter/error_report_2_0_ui_specification.sxw

Integration of Error report tool is described in the following spec:

http://specs.openoffice.org/appwide/errorreporter/error_report_2_0_ui_specification.sxw

How does this feature improve the program architecture

This feature strengthen the trust of the user not to loose information even if OpenOffice.org crashes. This will strongly improve the OpenOffice.org program quality impression.

Dependancies

Technical Dependancies/Requirements

This feature is related to the error reporter feature and will share parts of the user interface with that feature. Specification owner for this GUI is Christian Jansen:

http://specs.openoffice.org/appwide/errorreporter/error_report_2_0_ui_specification.sxw

Competitive Analysis

Microsoft Office (XP)

MS Office offers a task pane for document recovery. User has to restore these documents manually. Program asks for deleting those restored files on close of application.

Illustration 1 Document Recovery in MS Word XP

Kill MS Office Applications and Start AutoRecovery

The following dialog show the status of all currently started MS Office applications and allows to kill hanging applications to start recovery for those documents.

Illustration 2 Screenshot of Application Recovery dialog, taken from Office 2003

Detailed Specification

This specification covers only the requirements for the AutoRecovery function itself. This related with the Error-Report and Recovery tool, which will be overworked for OpenOffice.org 2.0. The graphical user interface elements which are shown when an error occurs, will be defined in that specification.

http://specs.openoffice.org/appwide/errorreporter/error_report_2_0_ui_specification.sxw

Flow Chart of AutoRecovery functionality

The following two charts show how the AutoRecovery function works.

Illustration 3 Part 1 of the time line chart for AutoRecovery and Emergency Saving

Illustration 4 Part 2 of the time line chart for AutoRecovery and Emergency Saving

Feature Description

Always use native OpenOffice.org (OO.org) formats to avoid data loss due to current restrictions of current used format

during AutoRecovery

during Emergency saving

information about previously used file format (i.e. MS Word) have to be kept

automatic zip file recovery for OO.org documents

in case of emergency saved documents, try to restore AutoRecovery docs

keep emergency saved and AutoRecovery files until the documents have been closed by the user to avoid data loss by a second crash i.e. if emergency saving didn't work properly at a second crash.

Error report tool has to be integrated in recovery process (Owner is Christian Jansen)

Please see following specification for details:

http://specs.openoffice.org/appwide/errorreporter/error_report_2_0_ui_specification.sxw

What Has to be Saved?

Save user's work environment

Save configuration files (should be implemented right know, but has to be checked)

AutoRecovery Saving

save one doc at a time

use user idl to save documents

AFTER time period n	// n is the AutoRecovery period in minutes

REPEAT UNTIL successful save
save all inactive documents
IF user idles for 10 seconds

THEN save active document

also save unsaved but modified docs

but save only factory URL of empty docs (except Impress document) and URL of original documents. Impress documents will always be emergency saved, because the Wizard has already changed the document, so that restoring the factory URL will not reproduce the originally used document.

do not change documents meta data while saving

do not reset document undo in application

do not interrupt user while typing

do not loose keyboard input during saving of current document

What has to be restored?

All documents will be restored. The original file type and original path is set and the documents are modified if they are modified compared to the original file (if they are Emergency Saved of AutoRecovered).

from original file (if it was up to date)

or from Emergency saved backup (if file is readable) [written when the crash occurs]

or from latest AutoRecovery backup (if no Emergency Saved document exists or when this one could not be opened)

Restore document window size, z-order and position

restore multiple views and splited views

Restore document title. Today the application name (as part of the document title) can not be restored, but Falko Tesch is working on a specification about document titles:

Http://specs.openoffice.org/appwide/module_name_in_caption_bar/module_name_in_caption_bar.sxw

This issue has to be addressed as soon as the “module name in caption bar” specification has been implemented.

User interface

Progress in Status Bar of Document

The document being AutoSaved shows a progress indicator in status bar of the document. Instead of the string “Saving document...” the status bar shows “Saving AutoRecovery information...”

Changed User Interface of Option Dialog

The Tools-Option Dialog will change as follows:

Illustration 5 Removed AutoSave feature – replaced with new AutoRecovery option

The minimum value for AutoRecovery info is 5 minutes. The default is 15 minutes.

Please note: The default for backup copy has not been changed to “on”, it was only the current state when creating the mockup.

Item	English	German	Comments
Button	Save ~AutoRecovery information every	Speichern von AutoWiederherstellungsinfo alle	
String in Doc Title	[Automatically recovered, from %TIME %DATE]	[Automatisch wiederhergestellt, von %TIME %DATE]	Is shown, only if a AutoRecovered document is restored (emergency recovering had failed).
String in Status Bar	Saving AutoRecovery information...	AutoWiederherstellungsinfo wird gespeichert...	
Label after Spin button with number	minutes	Minuten	

Add the string "[Automatically recovered version from %TIME, %DATE]" to the title of an AutoRecovered document, directly behind application name. Example for the placeholders:

“MyDocument.sxw - OpenOffice.org 2.0 [Automatically recovered, saved 15:55, 23. April 2003]”

Error Conditions

None

Future Tasks

Do not show a progress bar in documents processing autosave, if they do not have the focus.

FL: We should talk about this issue. Please also see endnote:iv

Do not restore Emergency or AutoRecovery saved documents, if the original file is newer than the backed one (i.e. had been changed by another user or workstation in the meantime).

FL: Problem is not so easy to solve, time stamp of different sources must not be synchronized/same time zone.

Notes

What's about versioning in documents

AS: Die UI für Emergency Save informiert den Nutzer über einen “Nicht Behebaren Fehlerzustand”. Das trifft hier nicht zu. Entweder muß man die UI allgemeiner halten - oder aber hierfür extra eine neue UI erfinden. Keine UI zu zeigen - ist auch keine Lösung. Da der Nutzer sonst denken könnte, daß das Herunterfahren des Systems stecken geblieben ist.
Wobei man noch klären muß, ob es überhaupt noch möglich ist großartig UI zu zeigen, wenn zB Windows XP herunterfährt und den normalen Desktop schon ausgeblendet hat!

FL: If a Windows systems is shutting down, the application raises the save as dialog for modified documents. Furthermore Windows starts a counter if the user/application does not respond to the term signal and kills the application after n seconds. If we could respond to a kill signal, isn't it possible to kill a looping SO application and save the documents?

AS: Die Grafik zuvor zeigt aber ein anderes Bild! Dort werden die AutoSave/EmergencySave Dokumente schon nach dem restaurieren gelöscht.

FL: I had only changed the text in the graphic to “on close of orig. document” because I had not better idea how to change the drawing instead.

AS: Die Grafik zuvor erwähnt für AutoSave ebenfalls “Empty or not modified Documents”!?
Das ist für ein AutoSave nicht nötig! Und für eine EmergencySave auch nur bedingt. Will heißen: Beim EmergenceSave brauch man für “Empty/NotModified Documents” nur die URL in der Konfiguration vermerken. Damit kann man soclhe Dokumente später beim AutoRecovery problemlos wieder herstellen. Ein physikalisches Speichern auf Festplatte ist dafür nicht notwendig!

FL: Done

Optional feature, if possible

FL: The progress bar issue has to be discussed with OS and AS. If we do not show/use the progress bar we could not save other docs in background – technical problem. But we do not want to show the progress in all windows, because this is irritating for the user if he uses windowed documents and could see other progress bars. For current document we have to show this bar, because document could not be edited while saving.

AutoRecovery of Files and Work Environment

Page 8

http://specs.openoffice.org/appwide/recovery/Autorecovery.sxw

Frank Loehmann

2003-04-28T18:30:05