summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc/dataprovider.hxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-09 13:59:42 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-09 14:53:09 +0200
commitd7e92ad0c828a237b16c4643a457c9bd41da6eff (patch)
treef784e413c6388124c20dd392a47a6928882cdb1e /sc/source/ui/inc/dataprovider.hxx
parent2b562f7531d097def1cf312f13df2fe9e9789ebe (diff)
external data: separate parsing with import and copying to final doc
We now use an Idle handler that will copy the data to the final document after the import. Change-Id: Ic4693dd928bc575775f28f2d0b896b3f31050062 Reviewed-on: https://gerrit.libreoffice.org/40918 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/ui/inc/dataprovider.hxx')
-rw-r--r--sc/source/ui/inc/dataprovider.hxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/ui/inc/dataprovider.hxx b/sc/source/ui/inc/dataprovider.hxx
index 7f50b2ddbc5f..b0a3b5d58273 100644
--- a/sc/source/ui/inc/dataprovider.hxx
+++ b/sc/source/ui/inc/dataprovider.hxx
@@ -20,6 +20,7 @@
#include <osl/conditn.hxx>
#include <dbdata.hxx>
#include <document.hxx>
+#include <vcl/idle.hxx>
#include "docsh.hxx"
#include "scdllapi.h"
@@ -84,9 +85,11 @@ class CSVFetchThread : public salhelper::Thread
orcus::csv::parser_config maConfig;
+ Idle* mpIdle;
+
public:
- CSVFetchThread(ScDocument& rDoc, const OUString&);
+ CSVFetchThread(ScDocument& rDoc, const OUString&, Idle* pIdle);
virtual ~CSVFetchThread() override;
void RequestTerminate();
@@ -126,6 +129,8 @@ class CSVDataProvider : public DataProvider
ScDBDataManager* mpDBDataManager;
LinesType* mpLines;
size_t mnLineCount;
+ std::unique_ptr<ScDocument> mpDoc;
+ Idle maIdle;
void Refresh();
Line GetLine();
@@ -139,6 +144,8 @@ public:
// TODO: this method should be moved to the ScDBDataManager
virtual void WriteToDoc(ScDocument& rDoc, ScDBData* pDBData) override;
const OUString& GetURL() const override { return maURL; }
+
+ DECL_LINK( ImportFinishedHdl, Timer*, void );
};