[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - dbaccess/source sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Dec 2 10:09:43 UTC 2018


 dbaccess/source/core/dataaccess/datasource.cxx |    2 +-
 dbaccess/source/filter/hsqldb/hsqlimport.cxx   |    7 +++++--
 dbaccess/source/filter/hsqldb/hsqlimport.hxx   |    7 ++++++-
 sw/source/uibase/dbui/dbmgr.cxx                |    2 +-
 4 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit d489e5fec01c1ae40713b1184042716f3d6ce988
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Dec 1 20:10:31 2018 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Dec 2 11:09:23 2018 +0100

    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 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 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);


More information about the Libreoffice-commits mailing list