Commit d16ad6da 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@56899 954022d7-b5bf-4e40-9824-e11837661b57
parent 2b9aec87
......@@ -8365,8 +8365,9 @@ function Binary_oMathReader(stream)
{
var oContent = {};
var oDeg = {};
var oRad = {};
res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathRad(t,l,props,oElem,oContent,oDeg);
return oThis.ReadMathRad(t,l,props,oElem,oRad,oContent,oDeg);
});
}
else if (c_oSer_OMathContentType.SPre === type)
......@@ -9891,30 +9892,27 @@ function Binary_oMathReader(stream)
res = c_oSerConstants.ReadUnknown;
return res;
};
this.ReadMathRad = function(type, length, props, oParent, oContent, oDeg)
this.ReadMathRad = function(type, length, props, oParent, oRad, oContent, oDeg)
{
var res = c_oSerConstants.ReadOk;
var oThis = this;
if (c_oSer_OMathContentType.RadPr === type)
{
res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathRadPr(t,l,props,oRad);
return oThis.ReadMathRadPr(t,l,props);
});
var oRad = new CRadical(props);
oRad.content = new CRadical(props);
if (oParent)
oParent.addElementToContent(oRad);
oDeg.content = oRad.getDegree();
oContent.content = oRad.getBase();
oParent.addElementToContent(oRad.content);
oDeg.content = oRad.content.getDegree();
oContent.content = oRad.content.getBase();
}
else if (c_oSer_OMathContentType.Deg === type)
{
if (oDeg.content && length == 0 && props.degHide !== true)
oDeg.content.fillPlaceholders();
else if ( oDeg.content && length == 0 && props.degHide == true)
{
oDeg.content.degHide = true;
oDeg.content = null;
}
oRad.content.Iterator = null;
res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathArg(t,l,oDeg.content);
......
......@@ -7095,6 +7095,7 @@ CMathContent.prototype =
case 18: props = {ctrPrp: new CTextPr(), type:SQUARE_RADICAL, degHide:true};
var oRadical = new CRadical(props);
this.CreateRadical(oRadical, this, null, null);
oRadical.Iterator = null;
break;
case 19: props = {ctrPrp: new CTextPr(), type:DEGREE_RADICAL};
var oRadical = new CRadical(props);
......@@ -7123,9 +7124,7 @@ CMathContent.prototype =
var oRadical = new CRadical(props);
this.CreateElem(oRadical, oElemNum);
var oElem = oRadical.getBase();
var oDeg = oRadical.getDegree();
oDeg.degHide = true;
oDeg = null;
oRadical.Iterator = null;
props = {ctrPrp: new CTextPr(), type:DEGREE_SUPERSCRIPT};
var oDegree = new CDegree(props);
......@@ -7143,9 +7142,7 @@ CMathContent.prototype =
case 23: props = {ctrPrp: new CTextPr(), type:SQUARE_RADICAL, degHide:true};
var oRadical = new CRadical(props);
this.CreateElem(oRadical, this);
var oDeg = oRadical.getDegree();
oDeg.degHide = true;
oDeg = null;
oRadical.Iterator = null;
var oElem = oRadical.getBase();
props = {ctrPrp: new CTextPr(), type:DEGREE_SUPERSCRIPT};
......@@ -8768,13 +8765,7 @@ CMathContent.prototype =
this.AddText(oElem, sElemText);
var oDeg = oRad.getDegree();
if (oRad.Pr.degHide == true && sDegText == null)
{
oDeg.degHide = true;
oDeg = null;
}
else
this.AddText(oDeg, sDegText);
this.AddText(oDeg, sDegText);
},
CreateNary : function (oNary,oParentElem,sElemText,sSubText,sSupText)
......
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