OpenOffice.org File Thumbnails

OpenOffice.org 2.0 Gnome/Windows Desktop Integration

Document - ID	Specification Owner	Last Change	Status
	Tino Rachui	23.03.05	Final
Conforms to	
Applies to	Gnome/Windows Desktop Integration
Task ID(s)	i20077(node), i24335 (impl), i24337 (spec)
Category	Feature

Abstract

The standard file system explorer on all three relevant desktops Gnome (Nautilus), KDE (Konqueror), and Windows (Explorer) support a thumbnail view mode in which a small preview of the respective file system object will be displayed if available. By providing a custom plugin for the particular file system explorer it is possible to display a thumbnail representation of an OpenOffice.org file.

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

	Name	E-mail Address
User Experience	Matthias Müller-Prove (MMP)	mmp@openoffice.org
Development	Tino Rachui (TRA)	tra@openoffice.org
	Gorden Lin (deuce)	deuce@openoffice.org
	Matthias Bauer	mba@openoffice.org
	Mikhail Voitenko	mav@openoffice.org
	Michael Brauer	mib@openoffice.org
Quality Assurance	Thorsten Martens (TM)	tm@openoffice.org
Documentation	Uwe Fischer	ufi@openoffice.org

Approved for Implementation

	Approved by	Date
User Experience	Matthias Müller-Prove	02.04.04
Development	Gorden Lin	02.04.04
	Matthias Bauer	14.04.04
	Mikhail Voitenko	14.04.04
	Michael Brauer	15.04.04
Quality Assurance	Thorsten Martens	02.04.04
Documentation	Uwe Fischer	05.04.04
String Review	n.a.	

Document Change History

Rev. Level	Change	Initials	Date
1.0	Specification setup	TRA	18.12.03
	Further technical dependencies added	TRA	20.01.04
	Review	MMP	23.01.04
	Update after meeting with MMP (no configuration for this feature, instead thumbnails will be saved by default,	TRA	26.01.04
	Added replacement representations for encrypted and signed documents	TRA	02.04.04
	Changes to the format of the thumbnails on request of the Impress team	TRA	08.04.04
	Final changes after review by MIB (folder “thumbnail” will be named “thumbnails”)	TRA	15.04.04
	update task Ids	MMP	12.05.04
	Update of section about signed document	TRA	15.09.04
	New (application independen) preview images for encrypted documents	TRA	21.03.05
	Exception added: No thumbnails will be saved for OpenOffice.org database files	TRA	23.03.05

Contents

1	Motivation	1

2	Goals	1

3	Requirements	2

3.1	Non technical Requirements	2

3.2	Technical Requirements	2

3.2.1	Thumbnail Image Format	2

4	Competitive Analyses	2

5	Detailed Specification	3

5.1	Generating and Saving Thumbnails	3

5.1.1	Encrypted Files	4

5.1.2	Signed Documents	6

5.2	Displaying Thumbnails	7

5.3	Error Conditions	7

6	Technical Dependencies	8

6.1	Platforms on which this Feature will work	8

6.2	OpenOffice.org Template Dialog	8

6.3	Preview for Embedded OLE Objects	8

7	Notes	9

8	References	9

Glossary

Term	Description
Thumbnail	A small preview picture.
TMS	Thumbnail Managing Standard

Motivation

The standard file system explorer on all three relevant desktops Gnome (Nautilus), KDE (Konqueror), and Windows (Explorer) support a thumbnail view mode in which a small preview of the respective file system object will be displayed if available. By providing a custom plugin for the particular file system explorer it is possible to display a thumbnail representation of an OpenOffice.org file. Such thumbnail view might make it easier for the user to explorer the content of a directory and find a certain file for instance.

Illustration 1Windows Explorer in Thumbnail View

Goals

n.a

Requirements

Non technical Requirements

To achieve a better system integration, OpenOffice.org 2.0 will make increased use of information and infrastructure that is provided with the Gnome desktop instead of creating platform independent solutions. The same applies to the Windows and the KDE Desktop.

Technical Requirements

Thumbnail Image Format

The format of the thumbnails must be the Portable Network Graphics format (PNG). Nautilus on Gnome as well as the Konqueror on KDE natively support the PNG format for thumbnails. The Thumbnail Managing Standard (TMS) at www.freedesktop.org also stipulates the use of the PNG format for thumbnails.

In order to conform to the TMS thumbnails must be saved as 24bit, non-interlaced PNG image with full alpha transparency. The required size for the thumbnails is 128x128 pixel.

Note: This dimension defines only the rectangle area where the thumbnail must fit in. Don't scale every image to a rectangular thumbnail but preserve the aspect ration!

Competitive Analyses

Existing competitive office suites like Microsoft Office and KOffice already support the thumbnail view of the Windows Explorer resp. Konqueror. This thumbnail is always a preview of the first page of the respective document (see figure 1).

Detailed Specification

Generating and Saving Thumbnails

A thumbnail representation of an OpenOffice.org file should be generated by default when the file will be saved. It should be a representation of the first page, first sheet, etc. of an OpenOffice.org document.

Exception: For OpenOffice.org database files no thumbnail will be generated and saved.

For maximum reusability of the thumbnails they have to be generated without any effects, surrounding frames, or borders. Such effects might interfere with effects added to the thumbnails by the different file system explorers or may not be desired at all for certain use cases (see Illustration 2, Note: The illustration incorrectly shows thumbnails with a surrounding border).

Illustration 2Thumbnail samples

Because OpenOffice.org files are standard Zip files already it is preferable to save the thumbnails within it. The content of a usual OpenOffice.org Zip file looks like this for instance :

OpenOffice.org Zip File
|
|-META-INF\
|	manifest.xml
|-Pictures

|	...
|-content.xml
|-meta.xml
|-settings.xml
|-styles.xml

The thumbnail must be saved as “thumbnail.png” in a separate folder named “Thumbnails”.
Example:
OpenOffice.org Zip File
|
|-META-INF\
|	manifest.xml
|-Pictures
|	...
|-Thumbnails
|	thumbnail.png
|-content.xml
|-meta.xml
|-settings.xml
|-styles.xml

The “Thumbnails” folder must not get a media type in the manifest.xml file this ensures that older version of OpenOffice.org discard an existing thumbnail.

OpenOffice.org preserves unknown content of the Zip package if a media type has been assigned to this content in the manifest.xml file. This way it's guaranteed that older versions of OpenOffice.org do discard an unknown content written by a newer version of OpenOffice.org for instance. When a file saved by a newer version of OpenOffice.org will be edited and saved with an older version there is a risk that the content of the document and the thumbnail representation diverge as the old version is not able to generate and save a new thumbnail.

Encrypted Files

Encrypted OpenOffice.org files are intended to be unreadable for unauthorized users that's why a thumbnail for such files must not be generated. Instead of saving a thumbnail of the first page a replacement representation will be saved for encrypted OpenOffice.org files which makes obvious that the corresponding file is encrypted. The following table contains the replacement representations for the respective OpenOffice.org file formats.

Note: OpenOffice.org database files cannot be saved encryped.

OOo Document type	File Extension	Replacement representation for encrypted files (128x128)
Writer Document Writer Template Master Document	Sxw stw sxg odt ott odm	
Calc Document Calc Template	Sxc stc ods ots	
Impress Document Impress Template	Sxi sti odp otp	
Draw Document Draw Template	Sxd std odg otg	
Math Document	Sxm odf	

Table 1Replacement Representation for encrypted OpenOffice.org files

Signed Documents

With OOo 2.0 it will be possible to electronically sign documents. For more information regarding digital signatures and OpenOffice.org have a look at "Electronic Signatures and Security" with OOo. Respective thumbnail viewer are free to display this status of a document in a suitable form for instance by combining the thumbnail with a signet badge (see illustration 3). Information about how to detect if an OOo document is signed or not should be found in the aforementioned specification.

Illustration 3Thumbnails of OpenOffice.org file with Signed Badge

Displaying Thumbnails

A main use case of the saved thumbnails is to support the thumbnail view mode of the file system explorers on different desktops like Gnome, Windows Shell, KDE. A plug-in for the respective desktop must be provided which extracts the thumbnail out of an OpenOffice.org package for display. It's the task of this plug-in to supply the thumbnail in the format, size, and style requested by the respective desktop. This may imply for instance adding a border and/or additionally effects around the thumbnails etc.

Error Conditions

n.a.

Technical Dependencies

Platforms on which this Feature will work

Windows ME/2000/XP

Gnome 2.x / Nautilus

KDE 2.x / Konqueror

OpenOffice.org Template Dialog

The OpenOffice.org template dialog (see Illustration 4) supports a preview mode. Currently this preview will always be generated on-the-fly which has the drawback of being slow. That's why it would be desirable to use the thumbnail picture for this preview, too. Alternatively the template dialog may quickly display the thumbnail while rendering a sharper preview in the background which replaces the thumbnail then.

Illustration 4OpenOffice.org Template Dialog In Preview Mode Preview for Embedded OLE Objects

OLE objects embedded into a document must be displayed. Currently this is always accomplished by letting to OLE object draw itself. This has the disadvantage of being slow because the OLE must be activated for this. For OpenOffice.org 2.0 it is therefore planned to save an replacement representation of an OLE object. Displaying this replacement representation is much faster than activating the OLE object. The OLE object need to be activated only if this is explicitly requested by the user. The concrete handling of OLE replacement representation is out of scope of this specification. On the other hand it must be ensured that there are no name clashes between the specified name for the thumbnail picture and the potential names for OLE object replacement representations. Either OLE object replacement representations will be saved in a different place than the thumbnail picture (see ) or there exist a naming convention that avoids name clashes.

Notes

n.a.

References

OpenOffice.org XML Specification

Electronic Signatures and Security with OOo

Creating Shell Extension Handlers

Shell Interfaces

Thumbnail Managing Standard at www.freedesktop.org

KOffice

www.kde.org

Information about the Portable Network Graphics Format

For more information regarding the OpenOffice.org XML and package format have a look at xml.openoffice.org

Required - Give references to related documentation, such as engineering designs, technical specs, and other sources for related units. Also include links to documents that other sections in this spec need to refer to, such as user opinions usability test reports.

Integration into Gnome/Windows Desktop – OpenOffice.org File Thumbnails

Page 9

http://specs.openoffice.org/appwide/desktop_integration/ooo_file_thumbnails.sxw

Tino Rachui

2003-11-05T13:57:56