From 5b0ceb86c342754d8f4e83408c7ae0da0e3931d3 Mon Sep 17 00:00:00 2001 From: Tamas Bunth Date: Sat, 14 Apr 2018 15:00:40 +0200 Subject: tdf#116944 Warn user before database migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tamás Bunth --- dbaccess/source/ui/inc/migrwarndlg.hxx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 dbaccess/source/ui/inc/migrwarndlg.hxx (limited to 'dbaccess/source/ui/inc/migrwarndlg.hxx') diff --git a/dbaccess/source/ui/inc/migrwarndlg.hxx b/dbaccess/source/ui/inc/migrwarndlg.hxx new file mode 100644 index 000000000000..7f18ad02f446 --- /dev/null +++ b/dbaccess/source/ui/inc/migrwarndlg.hxx @@ -0,0 +1,29 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef INCLUDED_DBACCESS_SOURCE_CORE_INC_WARNDLG_HXX +#define INCLUDED_DBACCESS_SOURCE_CORE_INC_WARNDLG_HXX + +#include + +namespace dbaui +{ +class MigrationWarnDialog : public weld::MessageDialogController +{ +private: + std::unique_ptr m_xOkBtn; + std::unique_ptr m_xLaterBtn; + +public: + MigrationWarnDialog(weld::Window* pParent); +}; +} + +#endif // INCLUDED_DBACCESS_SOURCE_CORE_INC_WARNDLG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit