Difference between revisions of "Documentation/DevGuide/OfficeDev/Document API Filter Development"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 5: Line 5:
 
|ShowPrevNext=block
 
|ShowPrevNext=block
 
|PrevPage=Documentation/DevGuide/OfficeDev/Integrating Import and Export Filters
 
|PrevPage=Documentation/DevGuide/OfficeDev/Integrating Import and Export Filters
|NextPage=Documentation/DevGuide/OfficeDev/Filtering Process
+
|NextPage=Documentation/DevGuide/OfficeDev/XML_Based_Filter_Development
 
}}
 
}}
 
{{DISPLAYTITLE:Document API Filter Development}}
 
{{DISPLAYTITLE:Document API Filter Development}}

Revision as of 09:14, 30 September 2008



First, we provide an overview of the import and export process in OpenOffice.org, 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 dynamically generated output, for example, of a database statement. To generalize this and abstract from single disk files we just call it "content". The content is a serialization of a model, e.g. the ODF or the Word model. A filter component is used to convert between this model and the internal model defined by the document core model.

Import/Export Filter Process

In our API the three entities in the above diagram, content, model, and filter, are defined as UNO services. The services consist of several interfaces that map to a specific implementation, for example, using C++ or Java.

The filter implementer has to develop a class that implements the com.sun.star.document.ExportFilter or com.sun.star.document.ImportFilter service, or both in case the filter should support import and export. The filter will get a com.sun.star.document.MediaDescriptor that defines the stream the filter must use for its input or output.

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).
Personal tools