summaryrefslogtreecommitdiff
path: root/sc/source/ui/dataprovider
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/dataprovider')
-rw-r--r--sc/source/ui/dataprovider/csvdataprovider.cxx6
-rw-r--r--sc/source/ui/dataprovider/dataprovider.cxx15
2 files changed, 20 insertions, 1 deletions
diff --git a/sc/source/ui/dataprovider/csvdataprovider.cxx b/sc/source/ui/dataprovider/csvdataprovider.cxx
index cd87d21c3de4..4e2aea9cffa9 100644
--- a/sc/source/ui/dataprovider/csvdataprovider.cxx
+++ b/sc/source/ui/dataprovider/csvdataprovider.cxx
@@ -202,6 +202,12 @@ void CSVDataProvider::Import()
mpDoc->ResetClip(mpDocument, (SCTAB)0);
mxCSVFetchThread = new CSVFetchThread(*mpDoc, maURL, &maIdle);
mxCSVFetchThread->launch();
+
+ if (mbDeterministic)
+ {
+ SolarMutexReleaser aReleaser;
+ mxCSVFetchThread->join();
+ }
}
IMPL_LINK_NOARG(CSVDataProvider, ImportFinishedHdl, Timer*, void)
diff --git a/sc/source/ui/dataprovider/dataprovider.cxx b/sc/source/ui/dataprovider/dataprovider.cxx
index 119dbdd18e9b..79b936f5d704 100644
--- a/sc/source/ui/dataprovider/dataprovider.cxx
+++ b/sc/source/ui/dataprovider/dataprovider.cxx
@@ -107,7 +107,7 @@ double ExternalDataSource::getUpdateFrequency() const
return mnUpdateFrequency;
}
-void ExternalDataSource::refresh(ScDocument* pDoc)
+void ExternalDataSource::refresh(ScDocument* pDoc, bool bDeterministic)
{
// no DB data available
if (!mpDBDataManager)
@@ -121,6 +121,9 @@ void ExternalDataSource::refresh(ScDocument* pDoc)
if (!mpDataProvider)
return;
+ if (bDeterministic)
+ mpDataProvider->setDeterministic();
+
mpDataProvider->Import();
}
@@ -148,6 +151,16 @@ std::vector<sc::ExternalDataSource>& ExternalDataMapper::getDataSources()
return maDataSources;
}
+DataProvider::DataProvider():
+ mbDeterministic(false)
+{
+}
+
+void DataProvider::setDeterministic()
+{
+ mbDeterministic = true;
+}
+
DataProvider::~DataProvider()
{
}