summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2018-06-17 18:53:50 +0200
committerTamás Bunth <btomi96@gmail.com>2018-06-18 10:36:45 +0200
commitb68805a896f9bb60d70edd1918bd7acacd56de73 (patch)
tree6b5a2af21db7c67f023fba57232ebd3b9493dbb3 /dbaccess
parent276a0f01f626193ac572a2ab8e7d5f2610aa372d (diff)
Back up content.xml when migrating database
Change-Id: I4eacbf689989d20142c04dc8fe586d0054c46350 Reviewed-on: https://gerrit.libreoffice.org/55962 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx7
1 files changed, 7 insertions, 0 deletions
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<XStorage> xRootStorage = m_pImpl->getOrCreateRootStorage();
+ xRootStorage->copyElementTo("content.xml", xRootStorage,
+ "content_before_migration.xml");
+
m_pImpl->m_sConnectURL = "sdbc:embedded:firebird";
+ }
}
#endif