xref: /AOO41X/main/offapi/com/sun/star/ui/dialogs/XFilterManager.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_ui_dialogs_XFilterManager_idl__
25#define __com_sun_star_ui_dialogs_XFilterManager_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
32#include <com/sun/star/lang/IllegalArgumentException.idl>
33#endif
34
35//=============================================================================
36
37module com { module sun { module star { module ui { module dialogs {
38
39//=============================================================================
40/** Specifies a filter manager interface for a FilePicker
41*/
42
43published interface XFilterManager: com::sun::star::uno::XInterface
44{
45
46    //-------------------------------------------------------------------------
47    /** Adds a filter identified by a title.
48
49        @param aTitle
50        Specifies the name of the filter as shown in the filter box of the
51        FilePicker dialog.
52
53        @param aFilter
54        Specifies the extensions of the filter. Multiple filters should be
55        semicolon separated. The semicolon may not be used as character in
56        a filter expresion. A typical filter is for instance '*.txt'.
57
58        @throws ::com::sun::star::lang::IllegalArgumentException
59        If a filter with the specified title already exists.
60
61    */
62    void appendFilter( [in] string aTitle, [in] string aFilter )
63        raises( ::com::sun::star::lang::IllegalArgumentException );
64
65    //-------------------------------------------------------------------------
66    /** Sets the current filter.
67
68        @param aTitle
69        Specifies the name of the filter to be set.
70
71        @throws com::sun::star::lang::IllegalArgumentException
72        If the specified filter was not found.
73    */
74    void setCurrentFilter( [in] string aTitle )
75        raises( ::com::sun::star::lang::IllegalArgumentException );
76
77    //-------------------------------------------------------------------------
78    /** Returns the currently selected filter.
79
80        @returns
81        The name of the selected filter or an empty string if
82        there is no filter or no filter is currently selected.
83    */
84    string getCurrentFilter( );
85};
86
87//=============================================================================
88
89}; }; }; }; };
90
91
92#endif
93
94