From 9eb10478a18259d3ba47d5fc74395887f7a4f9d5 Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Fri, 21 Oct 2022 15:48:30 +0200 Subject: tdf#151073 - enable firebird for appstore build w/o experimental mode also don't default to hsqldb as embedded database when a build is done without java support. Mainly to hide an UI bug - apparently the dialog should show a non-supported message for known embedded drivers at least that is what 04d1e80ac7091ec2bf31c8617e832d5fe15350be suggests " // this indicates it's really a type which is known in general, but not supported on the current platform // show a message saying so // eSpecialMessage = smUnsupportedType; insertDatasourceTypeEntryData( m_eCurrentSelection, sDisplayName ); // remember this type so we can show the special message again if the user selects this // type again (without changing the data source) m_eNotSupportedKnownType = m_pCollection->determineType( m_eCurrentSelection ); " but that doesn't work, at least not anymore. m_eNotSupportedKnownType was since removed, no attempts are made in showing an error/warning message returning the hsqldb driver results in an empty (no display string) entry as the default element in the dropdown in the dialog, that still allows to create a database file (but of course one that you cannot add any actual database tables to) without any error message. At the very least it is inconsistent with the rest of the dialog's code that clears the input name for stuff that shouldn't be shown. Change-Id: I8419888018be2a556c49d32e40f02c0ac1801930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141631 Tested-by: Jenkins Reviewed-by: Christian Lohmaier (cherry picked from commit d0a20b67ae7ee1691409b4a1665853a182c46b7b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141704 Reviewed-by: Xisco Fauli --- dbaccess/source/core/misc/dsntypes.cxx | 3 ++- dbaccess/source/ui/dlg/generalpage.cxx | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 2758b0a6ed6a..3f040e0a5ea3 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include #include @@ -286,7 +287,7 @@ bool ODsnTypeCollection::isEmbeddedDatabase( std::u16string_view _sURL ) OUString ODsnTypeCollection::getEmbeddedDatabase() { - if (officecfg::Office::Common::Misc::ExperimentalMode::get()) + if (!HAVE_FEATURE_JAVA || officecfg::Office::Common::Misc::ExperimentalMode::get()) return "sdbc:embedded:firebird"; else return "sdbc:embedded:hsqldb"; diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index e3bacdefbc73..e2f51306152a 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include "dsnItem.hxx" #include "generalpage.hxx" @@ -154,9 +155,11 @@ namespace dbaui if (m_xEmbeddedDBType->find_text(sDisplayName) == -1 && dbaccess::ODsnTypeCollection::isEmbeddedDatabase(sURLPrefix)) { +#if !HAVE_FEATURE_MACOSX_SANDBOX if( !officecfg::Office::Common::Misc::ExperimentalMode::get() && sURLPrefix.startsWith("sdbc:embedded:firebird") ) continue; +#endif aDisplayedTypes.emplace_back( sURLPrefix, sDisplayName ); m_bIsDisplayedTypesEmpty = false; } -- cgit v1.2.3