1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_document_ExportFilter_idl__
28#define __com_sun_star_document_ExportFilter_idl__
29
30#ifndef __com_sun_star_document_XExporter_idl__
31#include <com/sun/star/document/XExporter.idl>
32#endif
33
34#ifndef __com_sun_star_document_XFilter_idl__
35#include <com/sun/star/document/XFilter.idl>
36#endif
37
38#ifndef __com_sun_star_lang_XInitialization_idl__
39#include <com/sun/star/lang/XInitialization.idl>
40#endif
41
42#ifndef __com_sun_star_container_XNamed_idl__
43#include <com/sun/star/container/XNamed.idl>
44#endif
45
46//=============================================================================
47
48module com { module sun { module star { module document {
49
50//=============================================================================
51/** filter for exports
52
53    <p>
54    Such filters can be used for exporting a content.
55    Of course it's possible to combine it with the service <type>ImportFilter</type>
56    if import functionality should be available at same implementation too.
57    </p>
58
59    @see ImportFilter
60 */
61published service ExportFilter
62{
63	//-------------------------------------------------------------------------
64    /** set source(!) document for this filter
65
66		<p>
67        The document must be used as the source for following filter operation.
68        Any content from there will be exported to another format.
69		</p>
70	 */
71    interface XExporter;
72
73	//-------------------------------------------------------------------------
74    /** filter interface
75
76		<p>
77        It's used to filter a document at saving time.
78        The source document should be already setted by using another interface
79        <type>XExporter</type> which is supported by this service too.
80        </p>
81
82        <p>
83        Tip:<br>
84        If same implementation provides the service <type>ImportFilter</type> too,
85        code must distinguish between filtering from a source document (for export) or
86        filtering to a target document (for import). This can be recognized by saving
87        state of used interfaces <type>XExporter</type> or <type>XImporter</type>!
88        Otherwise it's not clear which action is required here.
89 		</p>
90 	*/
91    interface XFilter;
92
93	//-------------------------------------------------------------------------
94    /** support initialization of filter with its own configuration
95
96		<p>
97        A filter object must be created by global service <type>FilterFactory</type>.
98        If filter supports this optional interface, he will be initialized by the factory directly
99        after creation. The factory will pass follow informations to this new instance:
100            <ul>
101                <li>first item will be a set of configuration data of the filter</li>
102                <li>after that will follow may given optional parameters of call
103                    <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments()</member>
104                    of service <type>FilterFactory</type>.
105                </li>
106            </ul>
107        See description of service <member>FilterFactory::XNameContainer</member> for a description of
108        possible configuration data.
109        </p>
110	 */
111	[optional] interface com::sun::star::lang::XInitialization;
112
113	//-------------------------------------------------------------------------
114    /** provides access to the internal name of this filter
115
116		<p>
117        This internal filter name can be used on service <type>FilterFactory</type>
118        to get further informations about it (e.g. his registration for mime types or extensions etc.)
119        It's important that returned string is the "internal name" of the filter which must be
120        unambigous against all other registered filter in current instalation.
121        </p>
122        <p>
123        <strong>Attention!</strong><br>
124        Supported method setName() sould be ignored or forwarded to the FilterFactory.
125        It's not allowed to set it directly to the configuration. Because it depends
126        from real implementation of the FilterFactory if it will be allowed or not!
127 		</p>
128 	*/
129    [optional] interface com::sun::star::container::XNamed;
130};
131
132//=============================================================================
133
134}; }; }; };
135
136#endif
137