[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - dbaccess/qa dbaccess/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 6 11:02:33 UTC 2019
dbaccess/qa/unit/hsql_binary_import.cxx | 6 ++++++
dbaccess/qa/unit/tdf119625.cxx | 7 +++++++
dbaccess/qa/unit/tdf126268.cxx | 7 +++++++
dbaccess/source/core/dataaccess/datasource.cxx | 5 +++++
dbaccess/source/core/misc/dsntypes.cxx | 7 ++++++-
5 files changed, 31 insertions(+), 1 deletion(-)
New commits:
commit 463419f3f415061db443d7b98b603f9f24a11c3d
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Aug 28 22:13:13 2019 +0200
Commit: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Fri Sep 6 13:01:44 2019 +0200
tdf#127180: Propose migration + Firebird by default only in experimental
See:
http://document-foundation-mail-archive.969070.n3.nabble.com/About-putting-back-Firebird-experimental-td4265392.html#a4265519
Change-Id: I651baa78d345ce56e8d38d56aba096d04a225c5c
Reviewed-on: https://gerrit.libreoffice.org/78240
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 2252aba08121566e834dc530f31339e15bd94dec)
Reviewed-on: https://gerrit.libreoffice.org/78597
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/dbaccess/qa/unit/hsql_binary_import.cxx b/dbaccess/qa/unit/hsql_binary_import.cxx
index 2c1c332629cb..5b0249a9497f 100644
--- a/dbaccess/qa/unit/hsql_binary_import.cxx
+++ b/dbaccess/qa/unit/hsql_binary_import.cxx
@@ -45,6 +45,10 @@ void HsqlBinaryImportTest::setUp()
void HsqlBinaryImportTest::testBinaryImport()
{
+ SvtMiscOptions aMiscOptions;
+ bool oldValue = aMiscOptions.IsExperimentalMode();
+
+ aMiscOptions.SetExperimentalMode(true);
// the migration requires the file to be writable
utl::TempFile const temp(createTempCopy("hsqldb_migration_test.odb"));
uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
@@ -87,6 +91,8 @@ void HsqlBinaryImportTest::testBinaryImport()
CPPUNIT_ASSERT_EQUAL(sal_Int16{ 1998 }, date.Year);
closeDocument(uno::Reference<lang::XComponent>(xDocument, uno::UNO_QUERY));
+ if (!oldValue)
+ aMiscOptions.SetExperimentalMode(false);
}
CPPUNIT_TEST_SUITE_REGISTRATION(HsqlBinaryImportTest);
diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index d38e85bb75a3..e1bb46b087f7 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -63,6 +63,11 @@ static const expect_t expect[]
void Tdf119625Test::testTime()
{
+ SvtMiscOptions aMiscOptions;
+ bool oldValue = aMiscOptions.IsExperimentalMode();
+
+ aMiscOptions.SetExperimentalMode(true);
+
// the migration requires the file to be writable
utl::TempFile const temp(createTempCopy("tdf119625.odb"));
uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
@@ -106,6 +111,8 @@ void Tdf119625Test::testTime()
CPPUNIT_ASSERT(!xRes->next());
closeDocument(uno::Reference<lang::XComponent>(xDocument, uno::UNO_QUERY));
+ if (!oldValue)
+ aMiscOptions.SetExperimentalMode(false);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Tdf119625Test);
diff --git a/dbaccess/qa/unit/tdf126268.cxx b/dbaccess/qa/unit/tdf126268.cxx
index ffbe6361a231..9d41b95809aa 100644
--- a/dbaccess/qa/unit/tdf126268.cxx
+++ b/dbaccess/qa/unit/tdf126268.cxx
@@ -56,6 +56,11 @@ static const expect_t expect[] = {
void Tdf126268Test::testNumbers()
{
+ SvtMiscOptions aMiscOptions;
+ bool oldValue = aMiscOptions.IsExperimentalMode();
+
+ aMiscOptions.SetExperimentalMode(true);
+
// the migration requires the file to be writable
utl::TempFile const temp(createTempCopy("tdf126268.odb"));
uno::Reference<XOfficeDatabaseDocument> const xDocument = getDocumentForUrl(temp.GetURL());
@@ -80,6 +85,8 @@ void Tdf126268Test::testNumbers()
CPPUNIT_ASSERT(!xRes->next());
closeDocument(uno::Reference<lang::XComponent>(xDocument, uno::UNO_QUERY));
+ if (!oldValue)
+ aMiscOptions.SetExperimentalMode(false);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Tdf126268Test);
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index f25a11bfdf91..5632c8ad9218 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -63,6 +63,7 @@
#include <osl/diagnose.h>
#include <osl/process.h>
#include <sal/log.hxx>
+#include <svtools/miscopt.hxx>
#include <tools/urlobj.hxx>
#include <typelib/typedescription.hxx>
#include <unotools/confignode.hxx>
@@ -615,6 +616,10 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
//ignore when we don't have a model. E.g. Mailmerge, data sources, fields...
bIgnoreMigration = true;
}
+ SvtMiscOptions aMiscOptions;
+
+ if (!aMiscOptions.IsExperimentalMode())
+ bIgnoreMigration = true;
if(!bIgnoreMigration && m_pImpl->m_sConnectURL == "sdbc:embedded:hsqldb")
{
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 7332ccffa196..86aedb385245 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -20,6 +20,7 @@
#include <dsntypes.hxx>
#include <unotools/confignode.hxx>
#include <osl/diagnose.h>
+#include <svtools/miscopt.hxx>
#include <tools/wldcrd.hxx>
#include <osl/file.hxx>
#include <stringconstants.hxx>
@@ -286,7 +287,11 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const OUString& _sURL )
OUString ODsnTypeCollection::getEmbeddedDatabase()
{
- return "sdbc:embedded:firebird";
+ SvtMiscOptions aMiscOptions;
+ if (aMiscOptions.IsExperimentalMode())
+ return "sdbc:embedded:firebird";
+ else
+ return "sdbc:embedded:hsqldb";
}
More information about the Libreoffice-commits
mailing list