summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2018-04-14 15:00:40 +0200
committerTamás Bunth <btomi96@gmail.com>2018-04-14 21:14:50 +0200
commit5b0ceb86c342754d8f4e83408c7ae0da0e3931d3 (patch)
treeab4be91c5c2f9753e2ffec249f0b9c0ef0bf097a /offapi
parentf7d155e71dec5024f2d06dcf3697d1dcf505716a (diff)
tdf#116944 Warn user before database migration
Warn user with a pop-up dialog before migration. To do that we have to know the database URL at UI level. In order to get that I updated XDataSource interface with getConnectionURL(). The dialog offers two options: proceed with or without migration. If the user choose "yes", we store that information in XDataSource. The migration itself will be made in buildLowConnection(). Change-Id: I1f0d03da6352f7a0a8d989da79c4b2fe60a03ca1 Reviewed-on: https://gerrit.libreoffice.org/52876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'offapi')
-rw-r--r--offapi/com/sun/star/sdbc/XDataSource.idl5
-rw-r--r--offapi/type_reference/offapi.idl2
2 files changed, 7 insertions, 0 deletions
diff --git a/offapi/com/sun/star/sdbc/XDataSource.idl b/offapi/com/sun/star/sdbc/XDataSource.idl
index c169b8972031..f8b5bda8b553 100644
--- a/offapi/com/sun/star/sdbc/XDataSource.idl
+++ b/offapi/com/sun/star/sdbc/XDataSource.idl
@@ -34,6 +34,11 @@
*/
published interface XDataSource: com::sun::star::uno::XInterface
{
+ /** indicates whether database migration is needed or not.
+ */
+ [attribute] boolean MigrationNeeded;
+
+ string getConnectionUrl();
/** attempts to establish a database connection.
@param user
diff --git a/offapi/type_reference/offapi.idl b/offapi/type_reference/offapi.idl
index eb20847723b9..99ad946e8f05 100644
--- a/offapi/type_reference/offapi.idl
+++ b/offapi/type_reference/offapi.idl
@@ -10212,6 +10212,8 @@ module com {
};
module sdbc {
published interface XDataSource {
+ [attribute] boolean MigrationNeeded;
+ string getConnectionUrl();
interface ::com::sun::star::uno::XInterface;
::com::sun::star::sdbc::XConnection getConnection([in] string user, [in] string password) raises (::com::sun::star::sdbc::SQLException);
void setLoginTimeout([in] long seconds) raises (::com::sun::star::sdbc::SQLException);