diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2019-07-15 17:52:23 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-07-31 03:49:17 +0200 |
commit | 77ef0a92b3bd19f836d0fcb2a41af5e643129283 (patch) | |
tree | e590d6950b7e075c490c17aa46ea88b8012b2c0c | |
parent | 54028dc503fc08eb12e287919d5e2850cff05b73 (diff) |
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@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwizsetup.cxx | 1 |
2 files changed, 16 insertions, 1 deletions
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() ); |