diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-12-01 20:10:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-12-02 11:08:33 +0100 |
commit | e84d236a81af429e92f3da39a83cca02da8fe3aa (patch) | |
tree | bb2c3d9463d4a960b9189bb78dc6bed578cbb91c | |
parent | 9da741ce71539745e7a4c6f623b15f5279d0bcd6 (diff) |
Related: tdf#121810 pass suitable message dialog parent around
Change-Id: I1a27d82ef94f1052171f7a3f6c5c80c0ec66b547
Reviewed-on: https://gerrit.libreoffice.org/64408
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/hsqldb/hsqlimport.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/filter/hsqldb/hsqlimport.hxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 2 |
4 files changed, 13 insertions, 5 deletions
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index b653396e54e7..f970b9e95100 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -756,7 +756,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString m_pImpl->getDocumentSubStorageSupplier() ); dbahsql::HsqlImporter importer(xReturn, xDocSup->getDocumentSubStorage("database",ElementModes::READWRITE) ); - importer.importHsqlDatabase(); + importer.importHsqlDatabase(GetFrameWeld(m_pImpl->getModel_noCreate())); } #endif diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx b/dbaccess/source/filter/hsqldb/hsqlimport.cxx index 7a01045bfb37..49d6f978e6b6 100644 --- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx +++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx @@ -36,6 +36,8 @@ #include <connectivity/dbexception.hxx> #include <comphelper/processfactory.hxx> +#include <vcl/weld.hxx> + #include "hsqlimport.hxx" #include "parseschema.hxx" #include "rowinputbinary.hxx" @@ -293,7 +295,7 @@ void HsqlImporter::parseTableRows(const IndexVector& rIndexes, xInput->closeInput(); } -void HsqlImporter::importHsqlDatabase() +void HsqlImporter::importHsqlDatabase(weld::Window* pParent) { assert(m_xStorage); @@ -370,7 +372,8 @@ void HsqlImporter::importHsqlDatabase() if (pException) { SAL_WARN("dbaccess", "Error during migration"); - dbtools::showError(dbtools::SQLExceptionInfo{ *pException }, nullptr, + dbtools::showError(dbtools::SQLExceptionInfo{ *pException }, + pParent ? pParent->GetXWindow() : nullptr, ::comphelper::getProcessComponentContext()); } } diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.hxx b/dbaccess/source/filter/hsqldb/hsqlimport.hxx index 12d0489cb852..c4f4d1f24c18 100644 --- a/dbaccess/source/filter/hsqldb/hsqlimport.hxx +++ b/dbaccess/source/filter/hsqldb/hsqlimport.hxx @@ -17,6 +17,11 @@ #include "hsqlbinarynode.hxx" #include "columndef.hxx" +namespace weld +{ +class Window; +} + namespace dbahsql { class SAL_DLLPUBLIC_EXPORT HsqlImporter @@ -49,7 +54,7 @@ public: /** * Migrate a HSQL database to another. */ - void importHsqlDatabase(); + void importHsqlDatabase(weld::Window* pParent); }; } diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 97063bb78db2..d968221694a4 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -3208,7 +3208,7 @@ uno::Reference<sdbc::XResultSet> SwDBManager::createCursor(const OUString& _sDat if ( xRowSet.is() ) { weld::Window* pWindow = pView ? pView->GetFrameWeld() : nullptr; - uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(comphelper::getComponentContext(xMgr), pView ? pWindow->GetXWindow() : nullptr), uno::UNO_QUERY_THROW ); + uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(comphelper::getComponentContext(xMgr), pWindow ? pWindow->GetXWindow() : nullptr), uno::UNO_QUERY_THROW ); xRowSet->executeWithCompletion(xHandler); } xResultSet.set(xRowSet, uno::UNO_QUERY); |