summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Calc.xcs12
-rw-r--r--sc/source/ui/docshell/datastream.cxx15
2 files changed, 17 insertions, 10 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 85fb9f96da73..cb16b9b7a823 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1807,5 +1807,17 @@
</prop>
</group>
</group>
+ <group oor:name="DataStream">
+ <info>
+ <desc>data stream</desc>
+ </info>
+ <prop oor:name="UpdateTimeout" oor:type="xs:int" oor:nillable="false">
+ <!-- UIHints: Tools - Options - Spreadsheet - Defaults -->
+ <info>
+ <desc>set the Timeout of DataStream updating </desc>
+ </info>
+ <value>2000</value>
+ </prop>
+ </group>
</component>
</oor:component-schema>
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index 449a992fd7a2..92f9519d93bc 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -27,6 +27,8 @@
#include <documentlinkmgr.hxx>
#include <config_orcus.h>
+#include "officecfg/Office/Calc.hxx"
+
#if ENABLE_ORCUS
#if defined WNT
@@ -501,18 +503,11 @@ void DataStream::MoveData()
default:
;
}
-
if(mbIsFirst && mbIsUpdate)
{
- int nImportTimeout = 0;
- static char * cenv = getenv( "streamtimeout" );
- if(cenv)
- {
- double nEnv = atof(cenv);
- nImportTimeout = 1000 * nEnv;
- }
- maImportTimer.SetTimeout(nImportTimeout);
- mbIsFirst = false;
+ sal_Int32 nStreamTimeout = officecfg::Office::Calc::DataStream::UpdateTimeout::get();
+ maImportTimer.SetTimeout(nStreamTimeout);
+ mbIsFirst = false;
}
}