Document API Filter Development
- Filtering Process
- Filters
- Type Detection and its Configuration
- Properties of a Type
- Properties of a Filter
- Filter Options
- Properties of a FrameLoader
- Document API Filter Development
First, we provide an overview of the import and export process using a document API, and gain an understanding of the general concepts.
Introduction
Inside OpenOffice.org a document is represented by its document service, called model. On disk, the same document is represented as a file or possibly as a dynamic generated output, for example, of a database statement. We cannot assign it to a file on disk, so we call it content to describe it. A filter component is used to convert between these different formats.
If you make use of UNO, this above diagram can be turned into programming reality quite easily. The three entities in the diagram, content, model, and filter, all have direct counterparts in UNO services. The services consist of several interfaces that map to a specific implementation, for example, using C++ or Java.
The filter writer creates a class that implements the com.sun.star.document.ExportFilter or com.sun.star.document.ImportFilter services, or both. To achieve this, the corresponding stream or URL is obtained from the com.sun.star.document.MediaDescriptor. The incoming data is then interpreted and the model is used by calling the appropriate methods. The available methods depend on the type of document as described by the document service.
For a list of available document services, refer to the section Document Specific Features.
Content on this page is licensed under the Public Documentation License (PDL). |