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

выставление null для степени дроби

настройки для мастрицы передаются для каждого столбца

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56799 954022d7-b5bf-4e40-9824-e11837661b57
parent 6752e45b
...@@ -8163,6 +8163,7 @@ function Binary_oMathReader(stream) ...@@ -8163,6 +8163,7 @@ function Binary_oMathReader(stream)
return oThis.ReadMathAccPr(t,l,props); return oThis.ReadMathAccPr(t,l,props);
}); });
var oMathAcc = new CAccent(props); var oMathAcc = new CAccent(props);
if (oParent)
oParent.addElementToContent(oMathAcc); oParent.addElementToContent(oMathAcc);
oContent.content = oMathAcc.getBase(); oContent.content = oMathAcc.getBase();
} }
...@@ -8327,6 +8328,7 @@ function Binary_oMathReader(stream) ...@@ -8327,6 +8328,7 @@ function Binary_oMathReader(stream)
{ {
var oMatrix = {}; var oMatrix = {};
var arrContent = []; var arrContent = [];
props.mc = [];
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathMatrix(t,l,props,oElem,oMatrix,arrContent); return oThis.ReadMathMatrix(t,l,props,oElem,oMatrix,arrContent);
}); });
...@@ -8455,6 +8457,7 @@ function Binary_oMathReader(stream) ...@@ -8455,6 +8457,7 @@ function Binary_oMathReader(stream)
return oThis.ReadMathBarPr(t,l,props,oBar); return oThis.ReadMathBarPr(t,l,props,oBar);
}); });
var oBar = new CBar(props); var oBar = new CBar(props);
if (oParent)
oParent.addElementToContent(oBar); oParent.addElementToContent(oBar);
oContent.content = oBar.getBase(); oContent.content = oBar.getBase();
} }
...@@ -8519,6 +8522,7 @@ function Binary_oMathReader(stream) ...@@ -8519,6 +8522,7 @@ function Binary_oMathReader(stream)
return oThis.ReadMathBorderBoxPr(t,l,props); return oThis.ReadMathBorderBoxPr(t,l,props);
}); });
var oBorderBox = new CBorderBox(props); var oBorderBox = new CBorderBox(props);
if (oParent)
oParent.addElementToContent(oBorderBox); oParent.addElementToContent(oBorderBox);
oContent.content = oBorderBox.getBase(); oContent.content = oBorderBox.getBase();
} }
...@@ -8606,6 +8610,7 @@ function Binary_oMathReader(stream) ...@@ -8606,6 +8610,7 @@ function Binary_oMathReader(stream)
return oThis.ReadMathBoxPr(t,l,props); return oThis.ReadMathBoxPr(t,l,props);
}); });
var oBox = new CBox(props); var oBox = new CBox(props);
if (oParent)
oParent.addElementToContent(oBox); oParent.addElementToContent(oBox);
oContent.content = oBox.getBase(); oContent.content = oBox.getBase();
} }
...@@ -8952,6 +8957,7 @@ function Binary_oMathReader(stream) ...@@ -8952,6 +8957,7 @@ function Binary_oMathReader(stream)
return oThis.ReadMathFPr(t,l,props); return oThis.ReadMathFPr(t,l,props);
}); });
var oFraction = new CFraction(props); var oFraction = new CFraction(props);
if (oParent)
oParent.addElementToContent(oFraction); oParent.addElementToContent(oFraction);
oElemDen.content = oFraction.getDenominator(); oElemDen.content = oFraction.getDenominator();
oElemNum.content = oFraction.getNumerator(); oElemNum.content = oFraction.getNumerator();
...@@ -9006,6 +9012,7 @@ function Binary_oMathReader(stream) ...@@ -9006,6 +9012,7 @@ function Binary_oMathReader(stream)
return oThis.ReadMathFuncPr(t,l,props); return oThis.ReadMathFuncPr(t,l,props);
}); });
var oFunc = new CMathFunc(props); var oFunc = new CMathFunc(props);
if (oParent)
oParent.addElementToContent(oFunc); oParent.addElementToContent(oFunc);
oContent.content = oFunc.getArgument(); oContent.content = oFunc.getArgument();
oName.content = oFunc.getFName(); oName.content = oFunc.getFName();
...@@ -9066,6 +9073,7 @@ function Binary_oMathReader(stream) ...@@ -9066,6 +9073,7 @@ function Binary_oMathReader(stream)
return oThis.ReadMathGroupChrPr(t,l,props); return oThis.ReadMathGroupChrPr(t,l,props);
}); });
var oGroupChr = new CGroupCharacter(props); var oGroupChr = new CGroupCharacter(props);
if (oParent)
oParent.addElementToContent(oGroupChr); oParent.addElementToContent(oGroupChr);
oContent.content = oGroupChr.getBase(); oContent.content = oGroupChr.getBase();
} }
...@@ -9190,6 +9198,7 @@ function Binary_oMathReader(stream) ...@@ -9190,6 +9198,7 @@ function Binary_oMathReader(stream)
}); });
props.type = LIMIT_LOW; props.type = LIMIT_LOW;
var oLimLow = new CLimit(props); var oLimLow = new CLimit(props);
if (oParent)
oParent.addElementToContent(oLimLow); oParent.addElementToContent(oLimLow);
oContent.content = oLimLow.getFName(); oContent.content = oLimLow.getFName();
oLim.content = oLimLow.getIterator(); oLim.content = oLimLow.getIterator();
...@@ -9239,6 +9248,7 @@ function Binary_oMathReader(stream) ...@@ -9239,6 +9248,7 @@ function Binary_oMathReader(stream)
}); });
props.type = LIMIT_UP; props.type = LIMIT_UP;
var oLimUpp = new CLimit(props); var oLimUpp = new CLimit(props);
if (oParent)
oParent.addElementToContent(oLimUpp); oParent.addElementToContent(oLimUpp);
oContent.content = oLimUpp.getFName(); oContent.content = oLimUpp.getFName();
oLim.content = oLimUpp.getIterator(); oLim.content = oLimUpp.getIterator();
...@@ -9301,6 +9311,7 @@ function Binary_oMathReader(stream) ...@@ -9301,6 +9311,7 @@ function Binary_oMathReader(stream)
oMatr.row = 0; oMatr.row = 0;
oMatr.column = 0; oMatr.column = 0;
var oMatrix = new CMathMatrix(props); var oMatrix = new CMathMatrix(props);
if (oParent)
oParent.addElementToContent(oMatrix); oParent.addElementToContent(oMatrix);
oMatr.content = oMatrix; oMatr.content = oMatrix;
...@@ -9384,9 +9395,11 @@ function Binary_oMathReader(stream) ...@@ -9384,9 +9395,11 @@ function Binary_oMathReader(stream)
var oThis = this; var oThis = this;
if (c_oSer_OMathContentType.Mc === type) if (c_oSer_OMathContentType.Mc === type)
{ {
var mc = {};
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathMc(t,l,props); return oThis.ReadMathMc(t,l,mc);
}); });
props.mc.push(mc);
} }
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
...@@ -9540,6 +9553,7 @@ function Binary_oMathReader(stream) ...@@ -9540,6 +9553,7 @@ function Binary_oMathReader(stream)
} }
oMRun.Set_MathPrp(props); oMRun.Set_MathPrp(props);
if (oParent)
oParent.addElementToContent(oMRun); oParent.addElementToContent(oMRun);
} }
else if (c_oSer_OMathContentType.MRPr === type) else if (c_oSer_OMathContentType.MRPr === type)
...@@ -9614,6 +9628,7 @@ function Binary_oMathReader(stream) ...@@ -9614,6 +9628,7 @@ function Binary_oMathReader(stream)
return oThis.ReadMathNaryPr(t,l,props); return oThis.ReadMathNaryPr(t,l,props);
}); });
var oNary = new CNary(props); var oNary = new CNary(props);
if (oParent)
oParent.addElementToContent(oNary); oParent.addElementToContent(oNary);
oSub.content = oNary.getLowerIterator(); oSub.content = oNary.getLowerIterator();
oSup.content = oNary.getUpperIterator(); oSup.content = oNary.getUpperIterator();
...@@ -9786,6 +9801,7 @@ function Binary_oMathReader(stream) ...@@ -9786,6 +9801,7 @@ function Binary_oMathReader(stream)
return oThis.ReadMathPhantPr(t,l,props); return oThis.ReadMathPhantPr(t,l,props);
}); });
var oPhant = new CPhantom(props); var oPhant = new CPhantom(props);
if (oParent)
oParent.addElementToContent(oPhant); oParent.addElementToContent(oPhant);
oContent.content = oPhant.getBase(); oContent.content = oPhant.getBase();
} }
...@@ -9885,6 +9901,7 @@ function Binary_oMathReader(stream) ...@@ -9885,6 +9901,7 @@ function Binary_oMathReader(stream)
return oThis.ReadMathRadPr(t,l,props,oRad); return oThis.ReadMathRadPr(t,l,props,oRad);
}); });
var oRad = new CRadical(props); var oRad = new CRadical(props);
if (oParent)
oParent.addElementToContent(oRad); oParent.addElementToContent(oRad);
oDeg.content = oRad.getDegree(); oDeg.content = oRad.getDegree();
oContent.content = oRad.getBase(); oContent.content = oRad.getBase();
...@@ -9893,6 +9910,9 @@ function Binary_oMathReader(stream) ...@@ -9893,6 +9910,9 @@ 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)
oDeg.content = null;
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathArg(t,l,oDeg.content); return oThis.ReadMathArg(t,l,oDeg.content);
}); });
...@@ -10032,6 +10052,7 @@ function Binary_oMathReader(stream) ...@@ -10032,6 +10052,7 @@ function Binary_oMathReader(stream)
}); });
props.type = DEGREE_PreSubSup; props.type = DEGREE_PreSubSup;
var oSPre = new CDegreeSubSup(props); var oSPre = new CDegreeSubSup(props);
if (oParent)
oParent.addElementToContent(oSPre); oParent.addElementToContent(oSPre);
oSub.content = oSPre.getLowerIterator(); oSub.content = oSPre.getLowerIterator();
oSup.content = oSPre.getUpperIterator(); oSup.content = oSPre.getUpperIterator();
...@@ -10090,6 +10111,7 @@ function Binary_oMathReader(stream) ...@@ -10090,6 +10111,7 @@ function Binary_oMathReader(stream)
}); });
props.type = DEGREE_SUBSCRIPT; props.type = DEGREE_SUBSCRIPT;
var oSSub = new CDegree(props); var oSSub = new CDegree(props);
if (oParent)
oParent.addElementToContent(oSSub); oParent.addElementToContent(oSSub);
oSub.content = oSSub.getLowerIterator(); oSub.content = oSSub.getLowerIterator();
oContent.content = oSSub.getBase(); oContent.content = oSSub.getBase();
...@@ -10139,6 +10161,7 @@ function Binary_oMathReader(stream) ...@@ -10139,6 +10161,7 @@ function Binary_oMathReader(stream)
}); });
props.type = DEGREE_SubSup; props.type = DEGREE_SubSup;
var oSSubSup = new CDegreeSubSup(props); var oSSubSup = new CDegreeSubSup(props);
if (oParent)
oParent.addElementToContent(oSSubSup); oParent.addElementToContent(oSSubSup);
oSub.content = oSSubSup.getLowerIterator(); oSub.content = oSSubSup.getLowerIterator();
oSup.content = oSSubSup.getUpperIterator(); oSup.content = oSSubSup.getUpperIterator();
...@@ -10203,6 +10226,7 @@ function Binary_oMathReader(stream) ...@@ -10203,6 +10226,7 @@ function Binary_oMathReader(stream)
}); });
props.type = DEGREE_SUPERSCRIPT; props.type = DEGREE_SUPERSCRIPT;
var oSSup = new CDegree(props); var oSSup = new CDegree(props);
if (oParent)
oParent.addElementToContent(oSSup); oParent.addElementToContent(oSSup);
oSup.conten = oSSup.getUpperIterator(); oSup.conten = oSSup.getUpperIterator();
oContent.content = oSSup.getBase(); oContent.content = oSSup.getBase();
......
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