[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - dbaccess/source

Katarina Behrens (via logerrit) logerrit at kemper.freedesktop.org
Fri May 17 22:26:38 UTC 2019


 dbaccess/source/ui/dlg/generalpage.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 21e1aa9d6b13b39b87435f8998c7ea6123a069fd
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Wed May 15 20:12:23 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sat May 18 00:25:51 2019 +0200

    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 at cib.de>
    (cherry picked from commit dc17f247daeb281dda531ff335873d563db5b653)
    Reviewed-on: https://gerrit.libreoffice.org/72453
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 9f1c2c6f58a6..06a6e7d8b720 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -701,7 +701,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(),


More information about the Libreoffice-commits mailing list