[Libreoffice-commits] core.git: dbaccess/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Aug 24 07:20:52 UTC 2018
dbaccess/source/core/dataaccess/datasource.cxx | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
New commits:
commit 5fb4d80fd7c59c2e309992f9f09b5cd6fac9cc87
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 23 15:13:16 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Aug 24 09:20:23 2018 +0200
give the migration warn dialog a parent
Change-Id: Ie133c81464d87e5fbcfa9ff5d3c43f470b48d620
Reviewed-on: https://gerrit.libreoffice.org/59508
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 708bd917cb86..0a42896abbf1 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -576,6 +576,23 @@ void ODatabaseSource::disposing()
m_pImpl.clear();
}
+namespace
+{
+ weld::Window* GetFrameWeld(const Reference<XModel>& rModel)
+ {
+ if (!rModel.is())
+ return nullptr;
+ Reference<XController> xController(rModel->getCurrentController());
+ if (!xController.is())
+ return nullptr;
+ Reference<XFrame> xFrame(xController->getFrame());
+ if (!xFrame.is())
+ return nullptr;
+ Reference<css::awt::XWindow> xWindow(xFrame->getContainerWindow());
+ return Application::GetFrameWeld(xWindow);
+ }
+}
+
Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString& _rUid, const OUString& _rPwd)
{
Reference< XConnection > xReturn;
@@ -593,7 +610,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
bNeedMigration = true;
else
{
- MigrationWarnDialog aWarnDlg{nullptr};
+ MigrationWarnDialog aWarnDlg(GetFrameWeld(m_pImpl->getModel_noCreate()));
bNeedMigration = aWarnDlg.run() == RET_OK;
}
if (bNeedMigration)
More information about the Libreoffice-commits
mailing list