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

1)при отсутствии chr в delimiter посылается -1

2)для корня поправлено совместное редактирование

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57084 954022d7-b5bf-4e40-9824-e11837661b57
parent 1412f4d0
...@@ -8412,7 +8412,8 @@ function Binary_oMathReader(stream) ...@@ -8412,7 +8412,8 @@ function Binary_oMathReader(stream)
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
oElem.SetRunEmptyToContent(true); if (oElem)
oElem.SetRunEmptyToContent(true);
return res; return res;
}; };
this.ReadMathArgPr = function(type, length, oElem) this.ReadMathArgPr = function(type, length, oElem)
...@@ -8746,8 +8747,11 @@ function Binary_oMathReader(stream) ...@@ -8746,8 +8747,11 @@ function Binary_oMathReader(stream)
var oThis = this; var oThis = this;
if (c_oSer_OMathBottomNodesValType.Val === type) if (c_oSer_OMathBottomNodesValType.Val === type)
{ {
var text = this.stream.GetString2LE(length).charCodeAt(0); var text = this.stream.GetString2LE(length);
props.chr = text; if (text == "")
props.chr = OPERATOR_EMPTY;
else
props.chr = text.charCodeAt(0);
} }
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
...@@ -8958,7 +8962,11 @@ function Binary_oMathReader(stream) ...@@ -8958,7 +8962,11 @@ function Binary_oMathReader(stream)
var oThis = this; var oThis = this;
if (c_oSer_OMathBottomNodesValType.Val === type) if (c_oSer_OMathBottomNodesValType.Val === type)
{ {
props.endChr = this.stream.GetString2LE(length).charCodeAt(0); var text = this.stream.GetString2LE(length);
if (text == "")
props.endChr = OPERATOR_EMPTY;
else
props.endChr = text.charCodeAt(0);
} }
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
...@@ -9931,7 +9939,7 @@ function Binary_oMathReader(stream) ...@@ -9931,7 +9939,7 @@ function Binary_oMathReader(stream)
{ {
if (oDeg.content && length == 0 && props.degHide !== true) if (oDeg.content && length == 0 && props.degHide !== true)
oDeg.content.fillPlaceholders(); oDeg.content.fillPlaceholders();
else if ( oDeg.content && length == 0 && props.degHide == true) if (props.degHide == true)
oRad.content.Iterator = null; oRad.content.Iterator = null;
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
...@@ -10026,7 +10034,11 @@ function Binary_oMathReader(stream) ...@@ -10026,7 +10034,11 @@ function Binary_oMathReader(stream)
var oThis = this; var oThis = this;
if (c_oSer_OMathBottomNodesValType.Val === type) if (c_oSer_OMathBottomNodesValType.Val === type)
{ {
props.sepChr = this.stream.GetString2LE(length).charCodeAt(0); var text = this.stream.GetString2LE(length);
if (text == "")
props.sepChr = OPERATOR_EMPTY;
else
props.sepChr = text.charCodeAt(0);
} }
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
......
...@@ -1371,17 +1371,17 @@ CRadical.prototype.Write_ToBinary2 = function( Writer ) ...@@ -1371,17 +1371,17 @@ CRadical.prototype.Write_ToBinary2 = function( Writer )
{ {
Writer.WriteLong( historyitem_type_rad ); Writer.WriteLong( historyitem_type_rad );
Writer.WriteString2( this.getBase().Id );
Writer.WriteString2( this.getDegree().Id ); Writer.WriteString2( this.getDegree().Id );
Writer.WriteString2( this.getBase().Id );
this.CtrPrp.Write_ToBinary(Writer); this.CtrPrp.Write_ToBinary(Writer);
var StartPos = Writer.GetCurPosition(); var StartPos = Writer.GetCurPosition();
Writer.Skip(4); Writer.Skip(4);
var Flags = 0; var Flags = 0;
if ( undefined != this.degHide ) if ( undefined != this.Pr.degHide )
{ {
Writer.WriteBool( this.degHide ); Writer.WriteBool( this.Pr.degHide );
Flags |= 1; Flags |= 1;
} }
var EndPos = Writer.GetCurPosition(); var EndPos = Writer.GetCurPosition();
...@@ -1403,6 +1403,9 @@ CRadical.prototype.Read_FromBinary2 = function( Reader ) ...@@ -1403,6 +1403,9 @@ CRadical.prototype.Read_FromBinary2 = function( Reader )
if ( Flags & 1 ) if ( Flags & 1 )
props.degHide = Reader.GetBool(); props.degHide = Reader.GetBool();
if (props.degHide == true)
this.Iterator = null;
this.fillMathComposition (props, arrElems); this.fillMathComposition (props, arrElems);
} }
CRadical.prototype.Get_Id = function() CRadical.prototype.Get_Id = function()
......
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