[Libreoffice-commits] core.git: officecfg/registry sc/source

xukai xukai at multicorewareinc.com
Thu Oct 9 01:56:54 PDT 2014


 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   12 ++++++++++++
 sc/source/ui/docshell/datastream.cxx                     |   15 +++++----------
 2 files changed, 17 insertions(+), 10 deletions(-)

New commits:
commit fcf953b8ec8ef9652f12a2cc91e9edc6153c1bb1
Author: xukai <xukai at multicorewareinc.com>
Date:   Tue Sep 23 21:55:13 2014 -0400

    make streamtimeout a config variable instead of an env. var.
    
    Change-Id: I6c82142265a0a149206d15fbc267ad61e6b9cf3b

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 85fb9f9..cb16b9b 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 449a992..92f9519 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;
     }
 }
 


More information about the Libreoffice-commits mailing list