[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - dbaccess/source
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 7 21:27:58 UTC 2019
dbaccess/source/core/dataaccess/datasource.cxx | 16 +++++++++++++++-
dbaccess/source/ui/dlg/dbwizsetup.cxx | 1 +
2 files changed, 16 insertions(+), 1 deletion(-)
New commits:
commit 2b0d0863ebe39a964a927b3867aef277700f0066
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Jul 15 17:52:23 2019 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Aug 7 23:27:17 2019 +0200
tdf#121599, tdf#123099: ignore migration dialog when
1. a new HSQLDB database is created
2. the HSQLDB database is not opened interactively
Change-Id: I7287e467e06be5eec1e5c661123e1332cdaeef9b
Reviewed-on: https://gerrit.libreoffice.org/75643
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit 77ef0a92b3bd19f836d0fcb2a41af5e643129283)
Reviewed-on: https://gerrit.libreoffice.org/76843
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index c3b6214e7bc8..d2afd8cc78aa 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -602,8 +602,22 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
Reference< XDriverManager > xManager;
#if ENABLE_FIREBIRD_SDBC
+ bool bIgnoreMigration = false;
bool bNeedMigration = false;
- if(m_pImpl->m_sConnectURL == "sdbc:embedded:hsqldb")
+ Reference< XModel > xModel = m_pImpl->getModel_noCreate();
+ if ( xModel)
+ {
+ //See ODbTypeWizDialogSetup::SaveDatabaseDocument
+ ::comphelper::NamedValueCollection aArgs( xModel->getArgs() );
+ aArgs.get("IgnoreFirebirdMigration") >>= bIgnoreMigration;
+ }
+ else
+ {
+ //ignore when we don't have a model. E.g. Mailmerge, data sources, fields...
+ bIgnoreMigration = true;
+ }
+
+ if(!bIgnoreMigration && m_pImpl->m_sConnectURL == "sdbc:embedded:hsqldb")
{
Reference<XStorage> const xRootStorage = m_pImpl->getOrCreateRootStorage();
OUString sMigrEnvVal;
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 5076997c30ed..76405e537cfe 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -681,6 +681,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
aArgs.put( "Overwrite", true );
aArgs.put( "InteractionHandler", xHandler );
aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
+ aArgs.put( "IgnoreFirebirdMigration", true );
OUString sPath = ODbDataSourceAdministrationHelper::getDocumentUrl( *m_pOutSet );
xStore->storeAsURL( sPath, aArgs.getPropertyValues() );
More information about the Libreoffice-commits
mailing list