summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2019-04-02 09:27:29 +0200
committerHeiko Tietze <tietze.heiko@gmail.com>2019-04-15 15:18:01 +0200
commit2c84c14bd0baa09e134b6ad211492f730eaf6549 (patch)
treef5f3c84799613cac879e7435c8152afbc3aa7457
parented4cb70b6e46ad594f3cef80524e91f0621e09fd (diff)
Suppress migration dialog during unit test run
Change-Id: Ib148673235367081282c346d9b6d4ba9f795b877 Reviewed-on: https://gerrit.libreoffice.org/70120 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index f6a3decb4db1..0935fcf77bb5 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -616,7 +616,8 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
Reference<XPropertySet> const xPropSet(xRootStorage, UNO_QUERY_THROW);
sal_Int32 nOpenMode(0);
if ((xPropSet->getPropertyValue("OpenMode") >>= nOpenMode)
- && (nOpenMode & css::embed::ElementModes::WRITE))
+ && (nOpenMode & css::embed::ElementModes::WRITE)
+ && (!Application::IsHeadlessModeEnabled()))
{
MigrationWarnDialog aWarnDlg(GetFrameWeld(m_pImpl->getModel_noCreate()));
bNeedMigration = aWarnDlg.run() == RET_OK;