From b68805a896f9bb60d70edd1918bd7acacd56de73 Mon Sep 17 00:00:00 2001 From: Tamas Bunth Date: Sun, 17 Jun 2018 18:53:50 +0200 Subject: [PATCH] Back up content.xml when migrating database MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4eacbf689989d20142c04dc8fe586d0054c46350 Reviewed-on: https://gerrit.libreoffice.org/55962 Tested-by: Jenkins Reviewed-by: Tamás Bunth --- dbaccess/source/core/dataaccess/datasource.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 4f1bb6d477be..ffede28483a6 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -596,7 +596,14 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString bNeedMigration = aWarnDlg.run() == RET_OK; } if (bNeedMigration) + { + // back up content xml file if migration was successfull + Reference xRootStorage = m_pImpl->getOrCreateRootStorage(); + xRootStorage->copyElementTo("content.xml", xRootStorage, + "content_before_migration.xml"); + m_pImpl->m_sConnectURL = "sdbc:embedded:firebird"; + } } #endif