1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2/* 3 * This file is part of the LibreOffice project. 4 * 5 * This Source Code Form is subject to the terms of the Mozilla Public 6 * License, v. 2.0. If a copy of the MPL was not distributed with this 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 * 9 * This file incorporates work covered by the following license notice: 10 * 11 * Licensed to the Apache Software Foundation (ASF) under one or more 12 * contributor license agreements. See the NOTICE file distributed 13 * with this work for additional information regarding copyright 14 * ownership. The ASF licenses this file to you under the Apache 15 * License, Version 2.0 (the "License"); you may not use this file 16 * except in compliance with the License. You may obtain a copy of 17 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 18 */ 19#ifndef __com_sun_star_ui_dialogs_XFilePicker_idl__ 20#define __com_sun_star_ui_dialogs_XFilePicker_idl__ 21 22#include <com/sun/star/lang/IllegalArgumentException.idl> 23#include <com/sun/star/uno/XInterface.idl> 24#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> 25 26 27module com { module sun { module star { module ui { module dialogs { 28 29/** Specifies an interface for a FilePicker 30*/ 31 32published interface XFilePicker: com::sun::star::ui::dialogs::XExecutableDialog 33{ 34 35 /** Enable/disable multi-selection mode 36 37 <p>If the multi-selection mode is enabled, multiple files 38 may be selected by the user else only one file selection at a time is possible</p> 39 40 @param bMode 41 <p>A value of `TRUE` enables the multi-selection mode.</p> 42 <p>A value of `FALSE` disables the multi-selection mode, this is the default.</p> 43 */ 44 void setMultiSelectionMode( [in] boolean bMode ); 45 46 /** Sets the default string that appears in the file name box of a FilePicker. 47 48 @param aName 49 <p> Specifies the default file name, displayed when the FilePicker 50 is shown. The implementation may accept any string, and does not 51 have to check for a valid file name or if the file really exists. 52 </p> 53 */ 54 void setDefaultName( [in] string aName ); 55 56 /** Sets the directory that the file dialog initially displays. 57 58 @param aDirectory 59 Specifies the initial directory in URL format. The given URL must 60 conform to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>). 61 62 @throws com::sun::star::lang::IllegalArgumentException 63 if the URL is invalid (doesn't conform to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>). 64 */ 65 void setDisplayDirectory( [in] string aDirectory ) 66 raises( ::com::sun::star::lang::IllegalArgumentException ); 67 68 /** Returns the directory that the file dialog is currently showing or 69 was last showing before closing the dialog with Ok. If the user 70 did cancel the dialog, the returned value is undefined. 71 72 @returns 73 The directory in URL format, must conform to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>. 74 */ 75 string getDisplayDirectory(); 76 77 /** Returns a sequence of the selected files including path information in 78 URL format, conforming to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>. 79 80 <p>If the user closed the dialog with cancel an empty sequence will be 81 returned.</p> 82 <br/> 83 <p>If the dialog is in execution mode and a single file is selected 84 the complete URL of this file will be returned.</p> 85 <p>If the dialog is in execution mode and the selected file name is false 86 or any other error occurs an empty sequence will be returned.</p> 87 88 @returns 89 <p> The complete path of the file or directory currently selected 90 in URL format. This always returns only the first entry of the sequence. 91 <br/> 92 <p><strong>Notes for the implementation of a FileSave dialog:</strong>If there exists 93 a checkbox "Automatic File Extension" which is checked and a valid filter is currently selected 94 the dialog may automatically add an extension to the selected file name.</p> 95 </p> 96 @deprecated use com::sun::star::ui::dialogs::XFilePicker2::getSelectedFiles instead 97 */ 98 sequence< string > getFiles(); 99}; 100 101 102}; }; }; }; }; 103 104 105#endif 106 107/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 108
