diff options
author | xukai <xukai@multicorewareinc.com> | 2014-09-23 21:55:13 -0400 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2014-10-09 09:54:30 +0100 |
commit | fcf953b8ec8ef9652f12a2cc91e9edc6153c1bb1 (patch) | |
tree | d2111ff21975156dc6e9158e919eee8b04f677f2 | |
parent | 11044cbf0d92fea3cb55ba46d81f8fe51b1ec0ab (diff) |
make streamtimeout a config variable instead of an env. var.
Change-Id: I6c82142265a0a149206d15fbc267ad61e6b9cf3b
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 12 | ||||
-rw-r--r-- | sc/source/ui/docshell/datastream.cxx | 15 |
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; } } |