File Chooser Type Handling Specification

From Apache OpenOffice Wiki
Jump to: navigation, search
Specification Status
Author Allen Pulsifer
Last Change 2007-02-13
Status Preliminary Help

Abstract

The specification relates to the handling of file "types" in the File | Open dialog. It specifies how the user's choice of file type affects the files displayed in the file chooser and the filters that may be used to open or import the file. It also specifies how files with unrecognized formats are handled.

References

Reference Document Check Location (URL)
Specification Process Entry Check [passed/failed] n/a
Product Requirement, RFE, Issue ID (required) available Issue 67163 Issue 74277 Issue 74295
Product Concept Document [available/not available] <PLEASE ENTER LOCATION HERE>
Test case specification (required) [available/not available] <PLEASE ENTER LOCATION HERE>
IDL Specification [available/not available] <PLEASE ENTER LOCATION HERE>
Software Specification Rules n/a n/a
Other, e.g. references to related specs <PLEASE ENTER LOCATION HERE>

Contacts

Role Name E-Mail Address
Developer <First Name, Last Name> <User@openoffice.org>
Quality Assurance <First Name, Last Name> <User@openoffice.org>
Documentation <First Name, Last Name> <User@openoffice.org>
User Experience <First Name, Last Name> <User@openoffice.org>

Acronyms and Abbreviations

Acronym / Abbreviation Definition
<WYSIWYG> <What You See Is What You Get>

Detailed Specification

Comment: Except as noted, the following paragraphs describe the behavior that is already implemented in OOo v2.1. The sections describing new behavior begin at Paragraph 4.

1. When the user does a File | Open, the File Chooser dialog (also known as the File Picker dialog) shall be displayed. The File Chooser dialog shall allow the user to browse the files available on the local and network storage locations using either a OOo dialog or a native (operating system) dialog.

Comment: Support for this specification in a native dialog may depend on the host operating system.

2. The File Chooser dialog shall display a drop down selection for File Type.

The first or top option in the File Type drop down list shall be "All Files (*.*)"

Immediately under "All Files (*.*)" shall be the following list of document type groups:

  • Text documents
  • Spreadsheets
  • Presentations
  • Drawings
  • Web pages
  • Master documents
  • Formulas
  • Database documents

Following the document type groups shall be a list of specific formats. For example, there shall be selections available for:

  • OpenDocument Text (*.odt)
  • OpenDocument Text Template (*.ott)
  • OpenOffice.org 1.0 Text document (*.swx)
  • etc.

The specific formats shall be grouped by application type, separated a horizontal line, with Text document types first, then Spreadsheets types, Presentation types, Drawing types, Web page types, Master document types, Formula types and Database document types.

Comment: OOo v2.1 lists Database document types above Formula document types.

3. When "All Files (*.*)" is selected, all files shall be displayed in the File Chooser dialog, with the exception of hidden files not displayed by the operating system's native dialog.

When one of the document type groups is selected, the list of displayed files shall be filtered by extension, and only files with extensions corresponding to known document types shall be displayed. So for example, when "Text documents" is selected, only files with .odt, .ott, .swx, etc., shall be displayed.

When one of the specific document formats is selected, only the files with extensions corresponding to that document type shall be displayed.


Comment: The following paragraphs specify new behavior that is not implemented in OOo v2.1:

4. The default type selected in the File Type drop down shall correspond to the application that has the foreground window when File | Open is selected. For example, if the foreground window is a Writer document, the default File Type shall be the "Text documents" group. If there is no document open in the foreground window, or if the document type cannot be determined, the default selection for File Type shall be "All Files (*.*)".

Ref: Issue 67163

Comment: If the default File Type is a type group such as Text documents, the user can easily open a document of any other type, such as a spreadsheet, by simply selecting that file type or "All Files (*.*)" in the File Type drop down list.

Opening a File

5. After the user selects a file to open, the filter behavior shall depend on the type selected in the File Type drop down, as specified in the sections below:

When "All Files" is selected

If All Files (*.*) is selected for the File Type, OOo shall attempt to detect the file format.

A. If the file format detection fails, OOo shall attempt to determine if the operating system has an association for the file extension. For example, if the file extension is .pdf, the operating system may tell OOo that the file is associated with the Adobe Reader application.

Ref: Issue 74295

A(i). If the operating system provides a file association, OOo shall display the following dialog:
Title: Error opening document
Icon: Warning icon (!)
Text: File <path>\n. OOo cannot open this file. Would you like to open the document using <detected application name>?
Buttons: OK; Cancel
A(ii). If the operating system does not provide a file association, OOo shall display the following dialog:
Title: Error opening document
Icon: Warning icon (!)
Text: File <path>\n. The format is not recognized. Would you like to chose a specific format?
Buttons: OK; Cancel
If OK is selected, OOo shall present the user with the Type Chooser Dialog (see below). The Type Chooser Dialog shall by default display all available types.

B. If the format is detected as "ASCII" or "plain text" and the file has no extension or a presumptive text file extension (as listed below), OOo shall attempt to open the document as a Text document using the ASCII filter. Otherwise, if the file has an unknown extension, or if the ASCII import filter requires configuration (for example, the character encoding or paragraphs markers), OOo shall first display the following dialog before proceeding:

Title: Open as Text?
Icon: Question mark icon (?)
Text: File <path>\n. Would you like to open the file as a Text document?
Buttons: OK; Cancel

The Text import filter shall not fail due to the content of the file, instead, all characters in the file shall be converted to a text representation and displayed in a new document.

Presumptive text file extensions: .txt, .log

C. If the format is detected as some type other than "ASCII", OOo shall attempt to open the document in the detected format. If the file import filter fails, OOo shall display the following dialog:

Title: Error opening document
Icon: Warning icon (!)
Text: File <path>\n. This file cannot be opened as a <type> document. Would you like to try opening it in another format?
Buttons: OK; Cancel

When a document type group is selected

If a document type group such as "Text document" is selected for the File Type, OOo shall attempt to detect the format using only the import filters that correspond to the selected type group.

Ref: Issue 74277

A. If the file format detection fails, OOo shall display the following dialog:

Title: Error opening document
Icon: Warning icon (!)
Text: File <path>\n. This file cannot be opened as a <type group> document. Would you like to try opening it in another format?
Buttons: OK; Cancel
If OK is selected, OOo shall present the user with the Type Chooser Dialog (see below). The Type Chooser Dialog shall by default display all available types.

B. If the file format detection succeeds, OOo shall attempt to open the file using the filter for the detected type. If the filter fails, OOo shall display the following dialog:

Title: Error opening document
Icon: Warning icon (!)
Text: File <path>\n. This file cannot be opened as a <detected format> document. Would you like to try opening it in another format?
Buttons: OK; Cancel
If OK is selected, OOo shall present the user with the Type Chooser Dialog (see below). The Type Chooser Dialog shall by default display all available types.

When a specific document format is selected

If a specific format is selected for the File Type, OOo shall attempt to open the document using the import filter for that format. If the import filter fails, OOo shall attempt to detect the file format.

A. If an alternate format is detected, OOo shall display the following dialog:

Title: Error opening document
Icon: Warning icon (!)
Text: Text: File <path>\n. This file cannot be opened as a <failed type> document. Would you like to try opening it as a <detected type> document?
Buttons: OK; Choose type...; Cancel
If OK is selected, OOo shall attempt to open the document as if the user had selected the detected type.
If Choose type... is detected, OOo shall present the user with the type chooser dialog (see below). The initial list of types in the type chooser dialog shall include only the types that open in the same application as the type the user initially chose. For example, if the user initially chose the type OpenDocument Text (*.odt), then only Text document types shall be initially displayed.

B. If no alternate format is detected, OOo shall display the following dialog:

Title: Error opening document
Icon: Warning icon (!)
Text: File <path>\n. This file cannot be opened as a <type> document. Would you like to try opening it in another format?
Buttons: OK; Cancel
If OK is selected, OOo shall shall present the user with the type chooser dialog, as specified in Paragraph A.

The Type Chooser Dialog

At the top of the Type Chooser dialog shall be a drop down list. This list shall contain the following options:

  • All types
  • Text documents
  • Spreadsheets
  • Presentations
  • Drawings
  • Web pages
  • Master documents
  • Formulas
  • Database documents

Below the drop down list shall be a scrollable list of types. The types displayed shall be filtered to only include the types selected in the drop down list. For example, if "Text documents" is selected in the drop down list, then only the types that open as Text documents shall be displayed.

The default selection in the drop down list shall depend on the context in which the Type Chooser dialog is presented to the user, as specified in the paragraphs above.

Help | User Interface Element Templates | Example Spec

Migration

<START TYPING HERE --- If this part is irrelevant state a reason for its absence.>

Configuration

<START TYPING HERE --- If this part is irrelevant state a reason for its absence.>

Help | Configuration Table Template

File Format

<START TYPING HERE --- If this part is irrelevant state a reason for its absence.> Help

Help | File Format Table Template

Open Issues

  • What happens when attempting to open more than one file at once, i.e., when more than one file has been selected in the File Chooser dialog?
  • TODO: expand list of presumptive text file extensions
  • For the test spec:
    • test with common unsupported document types, such as .pdf
    • try opening a text document with each type group selected
Personal tools