[Libreoffice-commits] core.git: sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Tue Jul 3 06:03:38 UTC 2018


 sc/source/ui/inc/dataproviderdlg.hxx      |    2 +-
 sc/source/ui/miscdlgs/dataproviderdlg.cxx |    8 ++++----
 sc/source/ui/view/cellsh2.cxx             |    3 ++-
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit bb1d5780226bb1b9156580972eea9aa849178742
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Jul 2 02:41:32 2018 +0200

    store the data provider settings in the document
    
    Change-Id: I049187432437a4bf2539fae54d44ad1266c54149
    Reviewed-on: https://gerrit.libreoffice.org/56787
    Tested-by: Jenkins
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/inc/dataproviderdlg.hxx b/sc/source/ui/inc/dataproviderdlg.hxx
index 5a45fb7cce39..a56f4f612b45 100644
--- a/sc/source/ui/inc/dataproviderdlg.hxx
+++ b/sc/source/ui/inc/dataproviderdlg.hxx
@@ -61,7 +61,7 @@ public:
     void splitColumn();
     void mergeColumns();
 
-    void import();
+    void import(ScDocument* pDoc);
 };
 
 #endif
diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
index 78953cb3d4fd..8e07d04b8145 100644
--- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx
+++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
@@ -481,7 +481,7 @@ IMPL_LINK(ScDataProviderDlg, ImportHdl, Window*, pCtrl, void)
 {
     if (pCtrl == mpDataProviderCtrl.get())
     {
-        import();
+        import(mpDoc.get());
     }
 }
 
@@ -521,9 +521,9 @@ void ScDataProviderDlg::mergeColumns()
     mpList->addEntry(pMergeColumnEntry);
 }
 
-void ScDataProviderDlg::import()
+void ScDataProviderDlg::import(ScDocument* pDoc)
 {
-    sc::ExternalDataSource aSource = mpDataProviderCtrl->getDataSource(mpDoc.get());
+    sc::ExternalDataSource aSource = mpDataProviderCtrl->getDataSource(pDoc);
     std::vector<VclPtr<vcl::Window>> aListEntries = mpList->getEntries();
     for (size_t i = 1; i < aListEntries.size(); ++i)
     {
@@ -536,7 +536,7 @@ void ScDataProviderDlg::import()
         aSource.AddDataTransformation(pTransformationCtrl->getTransformation());
     }
     aSource.setDBData(pDBData);
-    aSource.refresh(mpDoc.get(), true);
+    aSource.refresh(pDoc, true);
     mpTable->Invalidate();
 }
 
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 59d2466d420a..b8b64d869880 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -790,7 +790,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
             ScopedVclPtrInstance< ScDataProviderDlg > aDialog( pTabViewShell->GetDialogParent(), xDoc);
             if (aDialog->Execute() == RET_OK)
             {
-                // handle the import here
+                ScDocument* pDoc = GetViewData()->GetDocument();
+                aDialog->import(pDoc);
             }
         }
         break;


More information about the Libreoffice-commits mailing list