diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-09-07 13:00:38 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-09-08 23:07:06 +0200 |
commit | 2129753120d8101f0f484571b6a8cd8eb4d4629c (patch) | |
tree | e06a410cf94d9815f6bf0710172bab7b6a235331 /fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx | |
parent | 025abb05385a1dc6219d48390cd4b783988cb409 (diff) |
tdf#119730 WIN switch to IFileDialog FOS_PICKFOLDERS
Citing SHBrowseForFolderW remarks: "For Windows Vista or later, it
is recommended that you use IFileDialog with the FOS_PICKFOLDERS
option rather than the SHBrowseForFolder function."
Since the minimum required Windows version is already 7 and we
already just provide the Vista file picker, this gets rid of the
Windows XP compatible folder picker code.
Change-Id: I85daae84d4eb36fc827cf20aa277ce6a2f63dd2c
Reviewed-on: https://gerrit.libreoffice.org/60144
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx')
-rw-r--r-- | fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx index 8f9314e990aa..cb7468c9f09b 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx @@ -109,6 +109,7 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex E_GET_CURRENT_FILTER, E_CREATE_OPEN_DIALOG, E_CREATE_SAVE_DIALOG, + E_CREATE_FOLDER_PICKER, E_SET_MULTISELECTION_MODE, E_SET_TITLE, E_SET_FILENAME, @@ -182,6 +183,10 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex void impl_sta_CreateSaveDialog(const RequestRef& rRequest); + /// implementation of request E_CREATE_FOLDER_PICKER + void impl_sta_CreateFolderPicker(const RequestRef& rRequest); + + /// implementation of request E_SET_MULTISELECTION_MODE void impl_sta_SetMultiSelectionMode(const RequestRef& rRequest); @@ -272,6 +277,14 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex void impl_SetDefaultExtension( const OUString& currentFilter ); private: + enum class PickerDialog + { + FileOpen, + FileSave, + Folder, + }; + + void impl_sta_CreateDialog(const RequestRef& rRequest, PickerDialog eType, DWORD nOrFlags); /// COM object representing a file open dialog @@ -282,6 +295,10 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex TFileSaveDialog m_iDialogSave; + /// COM object representing a folder picker dialog + TFolderPickerDialog m_iFolderPicker; + + /// knows the return state of the last COM call HRESULT m_hLastResult; |