summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/document/ExportFilter.idl
blob: f8a4611feab70e3854aa29e450c8bd039c3904b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * Copyright 2000, 2010 Oracle and/or its affiliates.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * 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
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/
#ifndef __com_sun_star_document_ExportFilter_idl__
#define __com_sun_star_document_ExportFilter_idl__

#ifndef __com_sun_star_document_XExporter_idl__
#include <com/sun/star/document/XExporter.idl>
#endif

#ifndef __com_sun_star_document_XFilter_idl__
#include <com/sun/star/document/XFilter.idl>
#endif

#ifndef __com_sun_star_lang_XInitialization_idl__
#include <com/sun/star/lang/XInitialization.idl>
#endif

#ifndef __com_sun_star_container_XNamed_idl__
#include <com/sun/star/container/XNamed.idl>
#endif

//=============================================================================

module com { module sun { module star { module document {

//=============================================================================
/** filter for exports

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

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

        <p>
        The document must be used as the source for following filter operation.
        Any content from there will be exported to another format.
        </p>
     */
    interface XExporter;

    //-------------------------------------------------------------------------
    /** filter interface

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

        <p>
        Tip:<br>
        If same implementation provides the service <type>ImportFilter</type> 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 <type>XExporter</type> or <type>XImporter</type>!
        Otherwise it's not clear which action is required here.
         </p>
     */
    interface XFilter;

    //-------------------------------------------------------------------------
    /** support initialization of filter with its own configuration

        <p>
        A filter object must be created by global service <type>FilterFactory</type>.
        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:
            <ul>
                <li>first item will be a set of configuration data of the filter</li>
                <li>after that will follow may given optional parameters of call
                    <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments()</member>
                    of service <type>FilterFactory</type>.
                </li>
            </ul>
        See description of service <member>FilterFactory::XNameContainer</member> for a description of
        possible configuration data.
        </p>
     */
    [optional] interface com::sun::star::lang::XInitialization;

    //-------------------------------------------------------------------------
    /** provides access to the internal name of this filter

        <p>
        This internal filter name can be used on service <type>FilterFactory</type>
        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.
        </p>
        <p>
        <strong>Attention!</strong><br>
        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!
         </p>
     */
    [optional] interface com::sun::star::container::XNamed;
};

//=============================================================================

}; }; }; };

#endif