Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / ui / dialogs / XFilePicker.idl
blob57201c0a8a03643e2fc688b6fe3556ad5e3831ce
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_ui_dialogs_XFilePicker_idl__
29 #define __com_sun_star_ui_dialogs_XFilePicker_idl__
31 #include <com/sun/star/lang/IllegalArgumentException.idl>
32 #include <com/sun/star/uno/XInterface.idl>
33 #include <com/sun/star/ui/dialogs/XExecutableDialog.idl>
35 //=============================================================================
37 module com { module sun { module star { module ui { module dialogs {
39 //=============================================================================
40 /** Specifies an interface for a FilePicker
43 published interface XFilePicker: com::sun::star::ui::dialogs::XExecutableDialog
46 //-------------------------------------------------------------------------
47 /** Enable/disable multi-selection mode
49 <p>If the multi-selection mode is enabled, multiple files
50 may be selected by the user else only one file selection at a time is possible</p>
52 @param bMode
53 <p>A value of <TRUE/> enables the multi-selection mode.</p>
54 <p>A value of <FALSE/> disables the multi-selection mode, this is the default.</p>
56 void setMultiSelectionMode( [in] boolean bMode );
58 //-------------------------------------------------------------------------
59 /** Sets the default string that appears in the file name box of a FilePicker.
61 @param aName
62 <p> Specifies the default file name, displayed when the FilePicker
63 is shown. The implementation may accept any string, and does not
64 have to check for a valid file name or if the file really exists.
65 </p>
67 void setDefaultName( [in] string aName );
69 //-------------------------------------------------------------------------
70 /** Sets the directory that the file dialog initially displays.
72 @param aDirectory
73 Specifies the initial directory in URL format. The given URL must be
74 conform to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>).
76 @throws com::sun::star::lang::IllegalArgumentException
77 if the URL is invalid (doesn't conform to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>).
79 void setDisplayDirectory( [in] string aDirectory )
80 raises( ::com::sun::star::lang::IllegalArgumentException );
82 //-------------------------------------------------------------------------
83 /** Returns the directory that the file dialog is currently showing or
84 was last showing before closing the dialog with Ok. If the user
85 did cancel the dialog, the returned value is undefined.
87 @returns
88 The directory in URL format, must be conform to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>.
90 string getDisplayDirectory();
92 //-------------------------------------------------------------------------
93 /** Returns a sequence of the selected files including path information in
94 URL format, conform to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>.
96 <p>If the user closed the dialog with cancel an empty sequence will be
97 returned.</p>
98 <br/>
99 <p>If the dialog is in execution mode and a single file is selected
100 the complete URL of this file will be returned.</p>
101 <p>If the dialog is in execution mode and multiple files are selected
102 an empty sequence will be returned.</p>
103 <p>If the dialog is in execution mode and the selected file name is false
104 or any other error occurs an empty sequence will be returned.</p>
106 @returns
107 <p> The complete path of the file or directory currently selected
108 in URL format. There are two different cases:
109 <ol>
110 <li>Multi-selection is disabled:
111 The first and only entry of the sequence contains the complete
112 path/filename in URL format.</li>
114 <li>Multi-selection is enabled:
115 If only one file is selected, the first entry
116 of the sequence contains the complete path/filename in URL format.
117 If multiple files are selected, the first entry of the sequence contains
118 the path in URL format, and the other entries contains the names of the selected
119 files without path information.</li>
120 </ol>
122 <br/>
124 <p><strong>Notes for the implementation of a FileSave dialog:</strong>If there exists
125 a checkbox "Automatic File Extension" which is checked and a valid filter is currently selected
126 the dialog may automatically add an extension to the selected file name.</p>
127 </p>
129 sequence< string > getFiles();
132 //=============================================================================
134 }; }; }; }; };
137 #endif
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */