summaryrefslogtreecommitdiff
path: root/sc/source/ui/dataprovider/dataprovider.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-12 19:10:26 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-12 21:15:23 +0200
commit32708687dbb496e6b8d74c806126f0f28a3ac2a2 (patch)
tree68c40af197f252e4c301fe333825e9a38f6d68f5 /sc/source/ui/dataprovider/dataprovider.cxx
parentc88d4ddfcdbf3fcaf7eddbfc56ec9e15392ecf85 (diff)
external data: introduce a deterministic mode for the tests
Change-Id: I5804800216bd7d22b89a4e54d3f46cc3520f7c42 Reviewed-on: https://gerrit.libreoffice.org/41091 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/ui/dataprovider/dataprovider.cxx')
-rw-r--r--sc/source/ui/dataprovider/dataprovider.cxx15
1 files changed, 14 insertions, 1 deletions
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()
{
}