/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ImportFilter.idl,v $ * $Revision: 1.9 $ * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef __com_sun_star_document_ImportFilter_idl__ #define __com_sun_star_document_ImportFilter_idl__ #ifndef __com_sun_star_document_XImporter_idl__ #include #endif #ifndef __com_sun_star_document_XFilter_idl__ #include #endif #ifndef __com_sun_star_lang_XInitialization_idl__ #include #endif #ifndef __com_sun_star_container_XNamed_idl__ #include #endif //============================================================================= module com { module sun { module star { module document { //============================================================================= /** filter for imports

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

@see ExportFilter */ published service ImportFilter { //------------------------------------------------------------------------- /** set target(!) document for this filter

The document must be used as the target of the filter. Any external content will be written there.

*/ interface XImporter; //------------------------------------------------------------------------- /** filter interface

It's used to filter a document at loading time. The target document should be already setted by using another interface ImportFilter::XImporter which is supported by this service too.

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

*/ interface XFilter; //------------------------------------------------------------------------- /** 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 follow informations 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 XMultiServiceFactory::createInstanceWithArguments() of service FilterFactory.
See description of service FilterFactory::XNameContainer for a description of possible configuration data.

*/ [optional] interface com::sun::star::lang::XInitialization; //------------------------------------------------------------------------- /** provides access to the internal name of this filter

This internal filter name can be used on service FilterFactory to get further informations 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 unambigous against all other registered filter in current instalation.

Attention!
Supported method setName() sould 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!

*/ [optional] interface com::sun::star::container::XNamed; }; //============================================================================= }; }; }; }; #endif