Necessary Steps

From OpenOffice.org Wiki

Jump to: navigation, search
Image:Book.png


PAGE_TITLE: TmVjZXNzYXJ5IFN0ZXBz

To extend OpenOffice.org by new content formats, use the following steps:

  1. Implement a filter component. It must be able to load or save the type it is registered for. For access to the office, only the API of the document service or universal content provider keeps the filter compatible with new versions of OpenOffice.org.
  2. Provide an implementation of a com.sun.star.document.ExtendedTypeDetection service to analyze a given content. It must return an internal type name representing the type or an empty value for unknown formats.
  3. Add a filter options dialog if the implemented filter requires additional parameters. Keep it separate from the filter and change the given MediaDescriptor based on user input. Document the parameters so that an external script programmer can use this information to provide proper values to the MediaDescriptor.
  4. Register the component libraries as UNO services inside OpenOffice.org. This is done by the mechanism described in the chapter Deployment Options for Components.
  5. Adapt the configuration branch org.openoffice.Office.TypeDetection so that it knows these new components. Use OpenOffice.org Basic script regfilter.bas that is provided as an additional tool in this chapter. It requires an ini file that is specified inside the subroutine Main of the script and has to be adjusted for your own purposes. It is well documented, and uses the names and value types described in this manual.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools