Kaydet (Commit) fcf953b8 authored tarafından xukai's avatar xukai Kaydeden (comit) Michael Meeks

make streamtimeout a config variable instead of an env. var.

Change-Id: I6c82142265a0a149206d15fbc267ad61e6b9cf3b
üst 11044cbf
...@@ -1807,5 +1807,17 @@ ...@@ -1807,5 +1807,17 @@
</prop> </prop>
</group> </group>
</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> </component>
</oor:component-schema> </oor:component-schema>
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include <documentlinkmgr.hxx> #include <documentlinkmgr.hxx>
#include <config_orcus.h> #include <config_orcus.h>
#include "officecfg/Office/Calc.hxx"
#if ENABLE_ORCUS #if ENABLE_ORCUS
#if defined WNT #if defined WNT
...@@ -501,17 +503,10 @@ void DataStream::MoveData() ...@@ -501,17 +503,10 @@ void DataStream::MoveData()
default: default:
; ;
} }
if(mbIsFirst && mbIsUpdate) if(mbIsFirst && mbIsUpdate)
{ {
int nImportTimeout = 0; sal_Int32 nStreamTimeout = officecfg::Office::Calc::DataStream::UpdateTimeout::get();
static char * cenv = getenv( "streamtimeout" ); maImportTimer.SetTimeout(nStreamTimeout);
if(cenv)
{
double nEnv = atof(cenv);
nImportTimeout = 1000 * nEnv;
}
maImportTimer.SetTimeout(nImportTimeout);
mbIsFirst = false; mbIsFirst = false;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment