diff options
author | Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> | 2019-11-21 17:16:28 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-11-26 23:24:22 +0100 |
commit | ffa636ba74b04b3258ec9a696bc4eac33581fa24 (patch) | |
tree | 577a9ef9739e6ae7b1a470d08a5067b4aec5c340 /xmlreader | |
parent | ec554ac30236fa7949e9866d01319d4e3e88c983 (diff) |
tdf#43021 WIN opt-out of OS recent folder usage
The Microsoft documentation for SetFolder explicitly mentiones
"In general, we do not recommended the use of this method. [...]
SetDefaultFolder is the better method." If SetDefaultFolder is
used the recently-used folder overwrites the value passed to
SetDefaultFolder, which is shared between all file pickers.
With this patch we rely on the LO internal mechanism to show the
last used directory in the file picker.
Regina's workaround basically does the same, as it just sets
oRegistryKeyContent.WorkPathChanged, which triggers the internal
path to use SetFolder instead of SetDefaultFolder.
If you're wondering about the GetFolder() handling, the MS API
docs have this: "Gets either the folder currently selected in the
dialog, or, if the dialog is not currently displayed, the folder
that is to be selected when the dialog is opened."
So the call to GetFolder(), after the dialog is closed, returns
the folder set by the SetFolder call, not the folder selected by
the user, in case of the save dialog at least.
Change-Id: Ia24f47848501df82727bfb2a99db723468bfe5b1
Reviewed-on: https://gerrit.libreoffice.org/83409
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Tested-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'xmlreader')
0 files changed, 0 insertions, 0 deletions