summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2019-05-15 20:12:23 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2019-05-17 10:51:28 +0200
commitdc17f247daeb281dda531ff335873d563db5b653 (patch)
tree11bbf355d006b6775e6011def9adf0640ac61142 /dbaccess
parent019c6ae2ee20a5923055c261abdd22575b69299b (diff)
tdf#125267: relax the requirement of fixed value of current filter
In a filepicker, user can select any file filter ('All files' for example) and still choose to open .odb file. Specific UIName of the current filter ('ODF Database' in this case) shouldn't therefore be a hard requirement, the correct file extension is enough. Change-Id: I641a267c545c66aa4d34954922783cc5ff7efd24 Reviewed-on: https://gerrit.libreoffice.org/72377 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 829333294d05..8f3fb2e79943 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -709,7 +709,10 @@ namespace dbaui
if ( aFileDlg.Execute() == ERRCODE_NONE )
{
OUString sPath = aFileDlg.GetPath();
- if ( aFileDlg.GetCurrentFilter() != pFilter->GetUIName() || !pFilter->GetWildcard().Matches(sPath) )
+ // check for aFileDlg.GetCurrentFilter used to be here but current fpicker filter
+ // can be set to anything, see tdf#125267 how this breaks if other value
+ // than 'ODF Database' is selected. Let's therefore check only if wildcard matches
+ if ( !pFilter->GetWildcard().Matches(sPath) )
{
OUString sMessage(DBA_RES(STR_ERR_USE_CONNECT_TO));
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),