Commit fb523266 authored by Sergey.Tsarkov's avatar Sergey.Tsarkov Committed by Alexander.Trofimov

ускорение для формул. следим за последним элементом в контенте

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57373 954022d7-b5bf-4e40-9824-e11837661b57
parent ee45a568
...@@ -353,9 +353,12 @@ Binary_CommonReader.prototype.Read1 = function(stLen, fRead) ...@@ -353,9 +353,12 @@ Binary_CommonReader.prototype.Read1 = function(stLen, fRead)
var stCurPos = 0; var stCurPos = 0;
while(stCurPos < stLen) while(stCurPos < stLen)
{ {
this.stream.bLast = false;
//stItem //stItem
var type = this.stream.GetUChar(); var type = this.stream.GetUChar();
var length = this.stream.GetULongLE(); var length = this.stream.GetULongLE();
if (stCurPos + length + 5 >= stLen)
this.stream.bLast = true;
res = fRead(type, length); res = fRead(type, length);
if(res === c_oSerConstants.ReadUnknown) if(res === c_oSerConstants.ReadUnknown)
{ {
...@@ -518,6 +521,7 @@ function FT_Stream2(data, size) { ...@@ -518,6 +521,7 @@ function FT_Stream2(data, size) {
this.size = size; this.size = size;
this.pos = 0; this.pos = 0;
this.cur = 0; this.cur = 0;
this.bLast = false;
} }
FT_Stream2.prototype.Seek = function(_pos) { FT_Stream2.prototype.Seek = function(_pos) {
......
...@@ -8235,6 +8235,8 @@ function Binary_oMathReader(stream) ...@@ -8235,6 +8235,8 @@ function Binary_oMathReader(stream)
}; };
this.ReadMathArg = function(type, length, oElem) this.ReadMathArg = function(type, length, oElem)
{ {
var bLast = this.bcr.stream.bLast;
var res = c_oSerConstants.ReadOk; var res = c_oSerConstants.ReadOk;
var oThis = this; var oThis = this;
var props = {}; var props = {};
...@@ -8417,8 +8419,9 @@ function Binary_oMathReader(stream) ...@@ -8417,8 +8419,9 @@ function Binary_oMathReader(stream)
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
if (oElem) if (oElem && bLast)
oElem.SetRunEmptyToContent(true); oElem.SetRunEmptyToContent(true);
return res; return res;
}; };
this.ReadMathArgPr = function(type, length, oElem) this.ReadMathArgPr = function(type, length, oElem)
......
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