|
|
Line 8: |
Line 8: |
| }} | | }} |
| {{DISPLAYTITLE:Document API Filter Development}} | | {{DISPLAYTITLE:Document API Filter Development}} |
− | First, we provide an overview of the import and export process in {{PRODUCTNAME}}, and gain an understanding of the general concepts.
| |
| | | |
− | === Introduction ===
| |
− |
| |
− | Inside {{PRODUCTNAME}} 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.
| |
− |
| |
− | [[Image:import_export.png|none|thumb|300px|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 <idl>com.sun.star.document.ExportFilter</idl> or <idl>com.sun.star.document.ImportFilter</idl> service, or both in case the filter should support import and export. The filter will get a <idl>com.sun.star.document.MediaDescriptor</idl> that defines the stream the filter must use for its input or output.
| |
− |
| |
− | For a list of available document services, refer to the section [[Documentation/DevGuide/OfficeDev/Component/Models#Document Specific Features|Document Specific Features]].
| |
| | | |
| {{PDL1}} | | {{PDL1}} |
| | | |
| [[Category:Documentation/Developer's Guide/Office Development]] | | [[Category:Documentation/Developer's Guide/Office Development]] |