| Type | recommended |
| Title | FileDialogHelper: deprecated SetDisplayDirectory |
| Posted by | [EMAIL PROTECTED] |
| Affected | ,- |
| Effective from | CWS dba202a |
Summary
+ FileDialogHelper::SetDisplayFolder
+ FileDialogHelper::SetFileName
deprecated:
* FileDialogHelper::SetDisplayDirectory
Description
FileDialogHelper::SetDisplayDirectory has been deprecated. It
internally uses some magic which tries to determine whether the last
part of the given URL is a folder or a file name, and this magic is
prone to breakage - you can always construct scenarios where it fails.
Since the caller of the method usually knows better what's the purpose
of the URL, it can now express this using the new methods
SetDisplayFolder and SetFileName (which behave exactly as the
SetDisplayDirectory implementation does after it has ran its magic).
No code has been adjusted, and the old method is still present, but
declared as deprecated, so please use the new methods in new code, and
migrate old code if you have a chance ...
/** sets a new folder whose content is to be displayed in the file picker
@param _rURL
specifies the URL of the folder whose content is to be displayed.<br/>
If the URL doesn't denote a valid (existent and accessible) folder, the
request is silently dropped.
@throws ::com::sun::star::uno::RuntimeException
if the invocation of any of the file picker or UCB methods throws a
RuntimeException.
*/
void SetDisplayFolder( const String& _rURL );
/** sets an initial file name to display
This method is usually used in "save-as" contexts, where the application
should suggest an initial name for the file to save.
Calling this method is nearly equivalent to calling
<code>GetFilePicker().setDefaultName( _rFileName )</code>,
with the following differences:
- The FileDialogHelper remembers the given file name, and upon execution,
strips its extension if the dialog is set up for "automatic file name
extension".
- Exceptions thrown from the <code>XFilePicker</code> are caught and
silenced.
*/
void SetFileName( const String& _rFileName );
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
