summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs/dataproviderdlg.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-07-08 05:50:25 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-07-12 14:31:20 +0200
commitd157c1bd70d630a58db33910d550bb8dee9fe62e (patch)
tree6a7d4a63cc524fcbbdcdfd8c4271fcbb7cd3c983 /sc/source/ui/miscdlgs/dataproviderdlg.cxx
parentc62bb20032cef7479e9293e84a8d57a2c74399d0 (diff)
tdf#126665 Remember last used file picker directory
This introduces internal tracking of last used directories. Each caller of the file picker can pass a "context". The selected directory will then be saved & restored when opening the file picker with the same context again. After ffa636ba74b04b3258ec9a696bc4eac33581fa24 , the Windows file picker no longer tracks the last used directory itself. This is a replacement and an improvement at the same time, since there is not one global last used directory, but one per context. Change-Id: I10650cfb9359922690954fa65c89b4e47477e2c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118597 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sc/source/ui/miscdlgs/dataproviderdlg.cxx')
-rw-r--r--sc/source/ui/miscdlgs/dataproviderdlg.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
index 40186b65ccd4..8ad7dd2177aa 100644
--- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx
+++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
@@ -785,6 +785,7 @@ IMPL_LINK_NOARG(ScDataProviderDlg, ApplyBtnHdl, weld::Button&, void)
IMPL_LINK_NOARG(ScDataProviderDlg, BrowseBtnHdl, weld::Button&, void)
{
sfx2::FileDialogHelper aFileDialog(0, FileDialogFlags::NONE, m_xDialog.get());
+ aFileDialog.SetContext(sfx2::FileDialogHelper::CalcDataProvider);
if (aFileDialog.Execute() != ERRCODE_NONE)
return;