OpenOffice.org Mozilla Plug-in

OpenOffice 2.0 Mozilla plug-in

Document - ID	Specification Owner	Last Change	Status
	Robert Chen	09/06/2004	Draft
Conforms to	
Applies to	Mozilla Plug-in
Task ID(s)	117312, i20180, i31249, i31251, i31254, i31286, i31287, i31609
Category	Feature

Abstract

When an OpenOffice.org file is browsed in Mozilla, the display mode is like that of text/plain mime type, which is not the desired mode. On Windows, OpenOffice.org has already provided a plug-in for Internet Explorer (IE), which enables IE to embed an OpenOffice.org window to display the OpenOffice.org file, while this kind of support is missing for Mozilla. By providing a Mozilla plug-in, OpenOffice.org files can be displayed inside the Mozilla window just as the same way it is been browsed in the IE.

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

	Name	E-mail Address
User Experience	Falko Tesch (ft)	ft@openoffice.org
Development	Matthias Bauer (mba)	mba@openoffice.org
	Robert Chen (rchen)	rchen@openoffice.org
	James Meng (jmeng)	jmeng@openoffice.org
Quality Assurance	Uwe Luebbers (ul)	ul@openoffice.org
Documentation	Uwe Fischer	Uwe.fischer@sun.com

Approved for Implementation

	Approved by	Date
User Experience	Falko Tesch	07/09/2004
Development	Robert Chen	06/09/2004
Quality Assurance	Uwe Luebbers (ul)	06/09/2004
Documentation	Uwe Fischer	06/09/2004
String Review	Falko Tesch	07/09/2004

Document Change History

Rev. Level	Change	Initials	Date
1.0	Specification setup	rchen	06/07/2004
1.1	Add IE plugin pic, modify UI text, add Notes	rchen	06/10/2004
1.2	Apply William Wan's linguistic correction	rchen	06/23/2004
1.3	Add the platform of Solaris x86	rchen	07/08/2004
1.4	Added comments and some issues	FT	07/08/2004
1.5	Added and finalise spec according to Roberts remarks	FT	09/01/2004
1.6	Confirm FT's change and modify the "5.6 error condition"	rchen	09/06/2004
1.7	Finalize spec according ot Robert's input	FT	09/06/2004
1.8	Minor addition	FT	01/18/2005
2.0	Added Plug-in Mime Type Registration	FT	02/23/2005

Contents

Glossary	1

1	Motivation	1

2	Goals	1

3	Requirements and Dependencies	2

3.1	Requirements	2

3.2	Technical Dependencies	3

4	Competitive Analyses	3

5	Detailed Specification	3

5.1	Mozilla plug-in specification	3

5.2	Plug-in general working process	3

5.3	Plug-in detailed working process	3

5.4	Plug-in usability	4

5.5	Deployment	4

5.6	Error Conditions	5

6	Notes	5

7	References	6

Glossary

Term	Description
Mozilla	A open-sourced browser supporting Solaris Sparc/Solaris x86/Linux/Windows

Motivation

When an OpenOffice.org file is browsed in Mozilla, the display mode is like that of text/plain mime type, which is not the desired mode. On Windows, OpenOffice.org has already provided a plug-in for Internet Explorer(IE), which enables IE to embed an OpenOffice.org window to display the OpenOffice.org file, while this kind of support is missing for Mozilla. By providing a Mozilla plug-in, OpenOffice.org files can be displayed inside Mozilla window just as the same way it is been browsed in the IE.

Figure 1 Internet Explorer holding an OpenOffice.org window

Goals

On each of the 4 platforms - Solaris Sparc, Solaris x86, Linux and Windows - Mozilla will be able to browse OpenOffice.org files within the browsers main window (see also Figure 2 on page 2 for details). The user will be able to

Save

Edit

Send as e-mail

Export to PDF

Print

Search

Navigate (-> open Navigator)

and Zoom

the document.

In case a presentation (Impress or PowerPoint) is opened another option is available:

Slide show

All of the above functionality will work as if the user would have opened the document in OpenOffice.org itself in “Edit only” mode.

Activating the “Edit” button in the embedded OpenOffice.Org file a standalone and fully functional OpenOffice.org will show up, containing the content of the current file.

Figure 2 Mozilla holding an OpenOffice.org window

Requirements and Dependencies

Requirements

To enable Mozilla to display OpenOffice.org files, OpenOffice 2.0 will provide a Mozilla compliant plug-in for it, which helps Mozilla to embed an OpenOffice.org window to display OpenOffice.org files.

Technical Dependencies

This feature will work with the following platforms:

Windows ME/2000/XP

Solaris Sparc/Solaris x86/Linux

Mozilla 1.x/Netscape 6.*/Netscape 7.*

Competitive Analyses

Existing competitive office suites and browsers, like Microsoft Office/Internet Explorer already support the embedding display function. OpenOffice.org has also provided support for IE on Windows with an ActiveX control/plug-in.

Detailed Specification

Mozilla plug-in specification

Mozilla will try to find all its plug-ins and register them during startup process. When it accesses files via HTTP protocol, the server will send out the mime type in HTTP header. Mozilla recognizes the mime type and checks if any plug-in registers this mime type, if no, it will use text/plain type to display the content. If yes, it will call the function, which is implemented by the corresponding plug-in.

Pay attention:

IE does it almost the same way, with one difference: it will guess the mime type according to the content of the file, it is not conforming to the W3C specification, and sometimes dangerous for some web sites.

Mozilla provides two kinds of plug-in APIs, one is written in C, the other in C++. According to Mozilla developers, the preferable way is to use Mozilla's C plug-in APIs to implement this. So we choose C plug-in APIs.

Plug-in general working process

According to Mozilla developers, the preferable way is to use Mozilla's C plug-in APIs to implement the the plug-in. This plug-in tries to take advantage of our SDK and utilizes the client/server UNO bridge to do this.

In fact, our plug-in consists of three parts:

1. library part, one library file, which can be found by Mozilla when Mozilla starts-up.

2. proxy part, one executable file, which acts as the proxy of library part and listening soffice process.

3. listening part, soffice.bin itself, which starts up in listening mode.

Plug-in detailed working process

When Mozilla launches, it will find this plug-in and register the mime type with this plug-in. When server tells Mozilla there will be an OpenOffice.org file, Mozilla stores the file in temp dir and calls the function which is implemented by our plug-in, this function resides in our library part.

The library part launches the proxy part, the proxy part launches the listening part.

The library part sends the local location of the OpenOffice.org file to the proxy part, the proxy part uses the LoadCompnentFromURL to display the file content.

Plug-in usability

The plug-in works only if a working OpenOffice.org installation is found on the system (see also 5.6 Error Conditions for more details).

The plug-in works in read-only mode. The document can be printed, content can be copied from it to the clipboard.

The UI equalizes to OpenOffice.org's “Edit only” view. Pressing the “Edit” icon will invoke an instance of OpenOffice.org 2.0 module in editing mode opening the current document.

The tool bar displayed must be locked and must not be un-lockable by the user.

Plug-in Mime Type Registration

The plug-in will register for all available OpenOffice.org and legacy StarOffice file format.

It will not register itself for MS Office file formats, even if the OpenOffice.org 2.0 itself was registered to these file types within the OS.

Deployment

As above mentioned, this plug-in consists of 2 files, both will reside in $OO/program/. This is easily deployed by modifying SCP/SCP2.

The most critical thing is to let Mozilla find our plug-in.

On Windows, we modify the registry table.

On Linux/Solaris Sparc/Solaris x86, we add a link file to $HOME/.mozilla/plug-ins, which points to the library file in $OO/program/.

Why we need GUI? This will allow OpenOffice.org user to choose to install the plug-in or uninstall the plug-in. So there is a need for GUI. In fact, GUI will not remove the 2 files. It just modifies registry on Windows, and handles the link file in $HOME/.mozilla/plug-ins on the other 3 platforms.

Mozilla to view OpenOffice.org and MS Office documents Note: please check String List below for final strings! Figure 3New Mozilla Plug-in dialogue/tab page

String list

Item	English	German	Comments
New Tab Page	Mozilla/Netscape Plug-in	Mozilla/Netscape Plug-in	To be found at “Tools -Options - Internet”
Explanatory text	Mozilla/Netscape plug-in support	Unterstützung für Mozilla/Netscape Plug-in	
Checkbox	~Viewing of %PRODUCTNAME and MS Office documents in Mozilla/Netscape enabled	~Anzeige von %PRODUCTNAME und MS Office Dokumenten in Mozilla/Netscape aktiviert	

Error Conditions

In case the user deletes intentionally an existing office installation and left over the Mozilla plug-in files,the plug-in will plain not work.

Even displaying available plug-ins in Mozilla via “about:plugins” will display the OpenOffice.org plug-ins as it was installed and working.

To date there are no working mechanisms to add “intelligence” to the plug-in to determine if an working OpenOffice.org installations exists or not.

Notes

RCHEN: The deployment methods on 4 platforms.

RCHEN: About UI confirmation

RCHEN: About QA testing

RCHEN: About Locale

RCHEN: About if shutdown background SO process when Mozilla quits

RCHEN: WEB Server should send out correct mime type.

FT: What would be the default setting? Enabled or disabled.

RCHEN: To FT, disabled is default

FT: What is the plug-in capable of? Read-only, print, edit files???

RCHEN: To FT, capable of this: Read, print. If user want to edit it, we have provided a button to launch another stand-alone SO to deal with it.

FT: I changed strings. Plugin -> plug-in etc.

RCHEN: To FT, we have modified UI accordingly. In your String list, why in English “Checkbox”, there is a ~ before Enable, while no ~ before Aktivieren.

FT: A few questions I need to have them answered before I will approved the spec:

What happens if the Edit mode is activated?

Can the plug-in stand alone (without having a OpenOffice.org installed)?

If yes, are there any limitations, like no edit mode etc.?

Please check my addition in point 3. Goals. Are there any other modes the user can activate within the plugin?

RCHEN: Answers for FT's questions:

If a user clicks the “Edit” button inside the embedded OpenOffice.org window, a standalone and fully functional OpenOffice.org will show up, containing the content of the current file.

No. this Plug-in works just like the way of OpenOffice.org plug-in for IE, that is, a full OpenOffice.org must exist, or it fails?

Yeah, it is a pure read only mode. Let me say, user cannot change anything or do anything except those functions provided by the tool bar.

I have revised the Goals in point 3, please refer to it. The only addition is there is an extra button: slide show for .sxi and .ppt.

References

Netscape Plug-in Guide

http://developer.netscape.com/docs/manuals/communicator/plug-in/index.htm

Mozillazine Forum

http://forums.Mozillazine.org/

Mozilla.org plug-in Specification

http://Mozilla.org/projects/plug-ins/

Openoffice.org SDK Developer's guide

Openoffice.org SDK idl and CPP reference

Openoffice.org Source Code

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.

Mozilla plug-in For Openoffice.org

Page 7

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

Tino Rachui

2003-11-05T13:57:56

Falko Tesch