LibreOffice: ExportFilter Service Reference

LibreOffice LibreOffice 26.2 SDK API Reference

Loading...
Searching...
No Matches
ExportFilter Service Referencepublished

filter for exports More...

`import "ExportFilter.idl";`

Inheritance diagram for ExportFilter:

## Exported Interfaces
interface | XExporter
| set source(!) document for this filter
interface | XFilter
| filter interface
interface | com::sun::star::lang::XInitialization
| support initialization of filter with its own configuration
interface | com::sun::star::container::XNamed
| provides access to the internal name of this filter

## Additional Inherited Members
Public Member Functions inherited from XExporter
void | setSourceDocument ([in] com::sun::star::lang::XComponent Document) raises ( com::sun::star::lang::IllegalArgumentException )
| sets the source document for the exporter
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.
Public Member Functions inherited from XFilter
boolean | filter ([in] sequence< com::sun::star::beans::PropertyValue > aDescriptor)
| filter the document.
void | cancel ()
| cancel the process.
Protected Member Functions inherited from XInitialization
void | initialize ([in] sequence< any > aArguments) raises ( com::sun::star::uno::Exception )
| initializes the object.
Protected Member Functions inherited from XNamed
string | getName ()
void | setName ([in] string aName)
| sets the programmatic name of the object.

## Detailed Description

filter for exports

Such filters can be used for exporting a content. Of course it's possible to combine it with the service ImportFilter if import functionality should be available at same implementation too.

See also
  ImportFilter

Developers Guide
  Office Development - Integrating Import and Export Filters

## Exported Interfaces

## ◆ com::sun::star::container::XNamed

interface com::sun::star::container::XNamed
| optional

provides access to the internal name of this filter

This internal filter name can be used on service FilterFactory to get further information about it (e.g. his registration for mime types or extensions etc.) It's important that returned string is the "internal name" of the filter which must be unambiguous against all other registered filters in current installation.

Attention!
Supported method setName() should be ignored or forwarded to the FilterFactory. It's not allowed to set it directly to the configuration. Because it depends from real implementation of the FilterFactory if it will be allowed or not!

## ◆ com::sun::star::lang::XInitialization

interface com::sun::star::lang::XInitialization
| optional

support initialization of filter with its own configuration

A filter object must be created by global service FilterFactory. If filter supports this optional interface, he will be initialized by the factory directly after creation. The factory will pass the following information to this new instance:

- first item will be a set of configuration data of the filter
- after that will follow may given optional parameters of call com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments() of service FilterFactory.

See description of service FilterFactory::XNameContainer for a description of possible configuration data.

## ◆ XExporter

interface XExporter

set source(!) document for this filter

The document must be used as the source for following filter operation. Any content from there will be exported to another format.

## ◆ XFilter

interface XFilter

filter interface

It's used to filter a document at saving time. The source document should be already set by using another interface XExporter which is supported by this service too.

Tip:
If same implementation provides the service ImportFilter too, code must distinguish between filtering from a source document (for export) or filtering to a target document (for import). This can be recognized by saving state of used interfaces XExporter or XImporter! Otherwise it's not clear which action is required here.

The documentation for this service was generated from the following file:

- com/sun/star/document/ExportFilter.idl