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>
This commit is contained in:
Tamas Bunth
2018-06-17 18:53:50 +02:00
committed by Tamás Bunth
parent 276a0f01f6
commit b68805a896

View File

@@ -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