API Project

Project Owner: Michael Hoennig

The OpenOffice.org API is based on the OpenOffice.org component technology and consists of a wide range of interfaces defined in a CORBA-like IDL. While the component technology determines how the components or applications communicate with each other, the OpenOffice.org API defines the interface for accessing office functionality from different programming languages. The OpenOffice API reference manual is available online from the here. You can download archives with the complete ODK (Office Development Kit) (currently not available).

The API has to be seen more like an independend specification than being dependend on a preexisting implementation. Therefor it is our to keep all component APIs in this project and to keep all implementation code out of this project.

Modules in API Project
Module Function
api (outdated) Contained all interfaces of the API.
udkapi Contains the part of the API which belongs to the UNO Development Kit.
These interfaces are written in the IDL language.
offapi Contains the part of the API which is special to OpenOffice components.
These interfaces are written in the IDL language.
drafts(outdated)< See offapi/drafts for upcoiming interfaces.
offuh Generates UNO headers for C++. For each new code-generting file in one of the API modules, these makefiles must be updated.
unoil Generates Java class files. For each new code-generting file in one of the API modules, these makefiles must be updated.

Main Design Goals

This API is version independent, scalable, durable, and reuseable. And because it is implemented using the OpenOffice.org component technology, it is programming language independent as well.

Its version independence and durability results from the fact that we limit changes to the API. You can add interfaces, services, and so on to the OpenOffice.org API. However, other changes are rather limited:

Its scalability and reuseability results from our design pattern, to approach an orthogonal architecture rather than having specialized interfaces for certain requirements. For example does each interfaces only cover exaclty one ascpect of the behaviour of an object.

Documentation

A JavaDoc like reference manual to the specification is generated directly from the IDL files. A guideline to the IDL-embedded documentation can be found in the OpenOffice API Documentation Guide. Please ignore formatting and layout problems in the current HTML tree, we will use a new tool for generating the HTML version from the IDLs. (The tool for generating the HTML pages from the IDL files is not yet open source, but will follow soon.)

FAQ

Some frequently asked questions about the API are answered in our FAQ. And more general information on the API is found in the Technical Overview.

Integration OpenOffice.org/StarOffice and NetBeans/Forte for Java

If you need an integrated development environment (IDE), you should take NetBeans / Forte for Java into account. NetBeans is an open source, modular IDE, written in the Java programming language. Currently it supports Java development, but its architecture lends itself to supporting other languages as well. Since it's written in the Java language, it will run on any platform with a virtual machine.

Both, the Office API reference from the Office Development Kit (ODK currently not available) and the integrated development environment NetBeans/Forte are capable tools. In order to benefit from both tools, you can integrate the Office API reference into the integrated development environment. It is also possible to integrate the Office API reference to other Java IDEs, for example JBuilder or Kawa.

Classes can have a lot of data members (sometimes called fields), and member functions (typically called methods). To keep track of all fields and methods of your classes, you can use Netbeans/Forte's Java code completion for your own classes and Java Archives.

Furthermore, in order to compile and execute your programs, you can profit by makefiles.

For more information please have a look to OfficeNetBeansIntegration.

OpenOffice.org API examples

A continuous growing number of examples provide an insight into the programming of the OpenOffice.org API. The examples demonstrate how to benefit from the included word processor, spreadsheet, presentation software, graphics program, and database software. Further on, you can take advantage of several example components, which extend the functional range of the OpenOffice.org.

The examples are written in different programming languages. All examples are ready to compile.

ToDos:

Some ideas where we think, help would be useful. There are actually two larger areas where almost no interfaces are specified:

Another point is the module naming. The modules are still named "com.sun.star" instead of "org.openoffice". We are willing to change although the community should know that it is not only much work for us, it additionally will be much work for some external users of this API who have already build big project on top of this API. Additionally, we cannot get completely rid of the old names, because many service names are stored in file formats. Whether we change the namig or not, we have to discuss.

Documents

Documents
Document Description
Reference Manual (online) This online HTML-Reference Manual is automatically generated from the IDL files. You can browse this version online.
Reference Manual (tar.gz) This HTML-Reference Manual is automatically generated from the IDL files. This is the same as above, just in a downloadable archive.
StarOffice 5.2 SDK 1.0 Extend, port, and integrate with StarOffice Programmer's Tutorial and Sample JavaTM and StarOffice Basic programs that illustrate accessing StarOffice API functionality.   (Version for StarOffice 5.2)
Programmer's Tutorial This PDF document presents the basic concepts of the OpenOffice API, the document models (including some UML diagrams) and a bunch of examples in StarBASIC as well. (Version for StarOffice 5.2)
Design Guide This HTML document contains a guideline for designing OpenOffice APIs.
Documentation Guide This HTML document contains a guideline for writing IDL embedded documentation.