summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-12-01 20:10:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-12-02 11:09:23 +0100
commitd489e5fec01c1ae40713b1184042716f3d6ce988 (patch)
treea1d32e89ab5ef69e5bb582dfeafe09189c8b2d0e
parent0aaebad112a2d877450133b737c5b08bf8b2387d (diff)
Related: tdf#121810 pass suitable message dialog parent around
Change-Id: I1a27d82ef94f1052171f7a3f6c5c80c0ec66b547 Reviewed-on: https://gerrit.libreoffice.org/64410 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.cxx2
-rw-r--r--dbaccess/source/filter/hsqldb/hsqlimport.cxx7
-rw-r--r--dbaccess/source/filter/hsqldb/hsqlimport.hxx7
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx2
4 files changed, 13 insertions, 5 deletions
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index adb35b93b4f9..c6c851313707 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -759,7 +759,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);