summaryrefslogtreecommitdiffstats
path: root/offapi/com/sun/star/document/ImportFilter.idl
blob: a6079f4615f931ddc83f0a5ed4003bc58258d6bc (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
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */
#ifndef __com_sun_star_document_ImportFilter_idl__
#define __com_sun_star_document_ImportFilter_idl__

#include <com/sun/star/document/XImporter.idl>
#include <com/sun/star/document/XFilter.idl>
#include <com/sun/star/lang/XInitialization.idl>
#include <com/sun/star/container/XNamed.idl>


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

/** filter for imports

    <p>
    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.
    </p>

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

        <p>
        The document must be used as the target of the filter.
        Any external content will be written there.
        </p>
     */
    interface XImporter;

    /** filter interface

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

        <p>
        Tip:<br>
        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.
         </p>
     */
    interface XFilter;

    /** support initialization of filter with its own configuration

        <p>
        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 information 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
                    com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments()
                    of service FilterFactory.
                </li>
            </ul>
        See description of service FilterFactory::XNameContainer 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 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.
        </p>
        <p>
        <strong>Attention!</strong><br>
        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!
         </p>
     */
    [optional] interface com::sun::star::container::XNamed;
};


}; }; }; };

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */