summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-07-02 02:41:32 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-07-03 08:03:16 +0200
commitbb1d5780226bb1b9156580972eea9aa849178742 (patch)
treec1e62554e0caca5bd6e727bed38adac6b798cea7 /sc/source/ui
parent5fce97a58b8f764e35bf98128591c9a89537da05 (diff)
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@googlemail.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/inc/dataproviderdlg.hxx2
-rw-r--r--sc/source/ui/miscdlgs/dataproviderdlg.cxx8
-rw-r--r--sc/source/ui/view/cellsh2.cxx3
3 files changed, 7 insertions, 6 deletions
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;