[Libreoffice-commits] core.git: dbaccess/source

Tamas Bunth tamas.bunth at collabora.co.uk
Thu Apr 26 11:14:54 UTC 2018


 dbaccess/source/core/misc/dsntypes.cxx |   10 +++++++++-
 dbaccess/source/ui/dlg/generalpage.cxx |   11 +++++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)

New commits:
commit 60db3d2cc3bc4f124bd4d819fbd0285e7f19c8c4
Author: Tamas Bunth <tamas.bunth at collabora.co.uk>
Date:   Mon Apr 23 22:34:00 2018 +0200

    dbu: Set Firebird to default in wizard..
    
    ..in case experimental feature is checked in.
    
    Change-Id: I8a774d4e532ea2afc0e1fe528e98a5743c662888
    Reviewed-on: https://gerrit.libreoffice.org/53366
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tamás Bunth <btomi96 at gmail.com>

diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 34f3c5ace0e1..7e48dd90fbb7 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -25,6 +25,7 @@
 #include <stringconstants.hxx>
 #include <comphelper/documentconstants.hxx>
 #include <comphelper/string.hxx>
+#include <svtools/miscopt.hxx>
 
 namespace dbaccess
 {
@@ -295,7 +296,14 @@ OUString ODsnTypeCollection::getEmbeddedDatabase() const
         }
     }
     if ( sEmbeddedDatabaseURL.isEmpty() )
-        sEmbeddedDatabaseURL = "sdbc:embedded:hsqldb";
+    {
+        SvtMiscOptions aMiscOptions;
+        if( aMiscOptions.IsExperimentalMode() )
+            sEmbeddedDatabaseURL = "sdbc:embedded:firebird";
+        else
+            sEmbeddedDatabaseURL = "sdbc:embedded:hsqldb";
+
+    }
 
     return sEmbeddedDatabaseURL;
 }
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 12bfe24197b7..df4af30d4894 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -41,6 +41,7 @@
 #include <comphelper/processfactory.hxx>
 #include <unotools/confignode.hxx>
 #include <osl/diagnose.h>
+#include <svtools/miscopt.hxx>
 
 namespace dbaui
 {
@@ -586,9 +587,15 @@ namespace dbaui
 
     OUString OGeneralPageWizard::getDatasourceName(const SfxItemSet& _rSet)
     {
-        // Sets jdbc as the default selected database on startup.
+        // Sets the default selected database on startup.
         if (m_pRB_CreateDatabase->IsChecked() )
-            return m_pCollection->getTypeDisplayName( "jdbc:" );
+        {
+            SvtMiscOptions aMiscOptions;
+            if( aMiscOptions.IsExperimentalMode() )
+                return m_pCollection->getTypeDisplayName( "sdbc:embedded:firebird" );
+            else
+                return m_pCollection->getTypeDisplayName( "jdbc:" );
+        }
 
         return OGeneralPage::getDatasourceName( _rSet );
     }


More information about the Libreoffice-commits mailing list