Commit 9c962f1d authored by Anna.Pavlova's avatar Anna.Pavlova

Правки свойства у класса CDelimiters : chr to Unicode

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56898 954022d7-b5bf-4e40-9824-e11837661b57
parent 66846be4
...@@ -7583,7 +7583,7 @@ CMathContent.prototype = ...@@ -7583,7 +7583,7 @@ CMathContent.prototype =
var oSSub0 = new CDegree(props); var oSSub0 = new CDegree(props);
this.CreateDegree(oSSub0, delimiterBase, "X", null, "n"); this.CreateDegree(oSSub0, delimiterBase, "X", null, "n");
sChar = String.fromCharCode(8898); var sChar = String.fromCharCode(8898);
this.AddText(delimiterBase, sChar); this.AddText(delimiterBase, sChar);
props = {ctrPrp: new CTextPr(), type:DEGREE_SUBSCRIPT}; props = {ctrPrp: new CTextPr(), type:DEGREE_SUBSCRIPT};
......
...@@ -2952,24 +2952,37 @@ COperator.prototype.getProps = function(props, defaultProps) ...@@ -2952,24 +2952,37 @@ COperator.prototype.getProps = function(props, defaultProps)
chr = props.chr, chr = props.chr,
type = props.type; type = props.type;
var code = props.chr;
this.defaultType = defaultProps.type; this.defaultType = defaultProps.type;
var bDelimiter = this.type == OPER_DELIMITER || this.type == OPER_SEPARATOR, var bDelimiter = this.type == OPER_DELIMITER || this.type == OPER_SEPARATOR,
bNotType = typeof(props.type) == "undefined" || props.type == null, bNotType = typeof(props.type) == "undefined" || props.type == null,
bStr = typeof(chr) === "string", bUnicodeChr = props.chr !== null && props.chr+0 == props.chr;
bEmptyStr = bStr && chr.length == 0, //bStr = typeof(chr) === "string",
bCode = typeof(chr) === "string" && chr.length > 0; //bEmptyStr = bStr && chr.length == 0,
//bCode = typeof(chr) === "string" && chr.length > 0;
//var code = bCode ? chr.charCodeAt(0) : null;
if(bDelimiter && bUnicodeChr == -1) // empty operator
{
type = OPERATOR_EMPTY;
}
else if(bNotType && !bUnicodeChr) // default operator
{
type = defaultProps.type;
}
var code = bCode ? chr.charCodeAt(0) : null;
var bDPrpDelim = bDelimiter && bNotType && !bStr, /*var bDPrpDelim = bDelimiter && bNotType && !bStr,
bDPrpOther = !bDelimiter && bNotType && !bCode; bDPrpOther = !bDelimiter && bNotType && !bCode;
var bDefault = bDPrpDelim || bDPrpOther, var bDefault = bDPrpDelim || bDPrpOther,
bEmpty = bDelimiter && bEmptyStr; bEmpty = bDelimiter && bEmptyStr;
var bLoc = props.loc !== null && typeof(props.loc)!== "undefined";
var bDefaultLoc = defaultProps.loc !== null && typeof(defaultProps.loc)!== "undefined";
if(bDefault) if(bDefault)
{ {
...@@ -2978,7 +2991,10 @@ COperator.prototype.getProps = function(props, defaultProps) ...@@ -2978,7 +2991,10 @@ COperator.prototype.getProps = function(props, defaultProps)
else if(bEmpty) else if(bEmpty)
{ {
type = OPERATOR_EMPTY; type = OPERATOR_EMPTY;
} }*/
var bLoc = props.loc !== null && typeof(props.loc)!== "undefined";
var bDefaultLoc = defaultProps.loc !== null && typeof(defaultProps.loc)!== "undefined";
if(!bLoc && bDefaultLoc) if(!bLoc && bDefaultLoc)
...@@ -3905,7 +3921,7 @@ CDelimiter.prototype.getBase = function(numb) ...@@ -3905,7 +3921,7 @@ CDelimiter.prototype.getBase = function(numb)
} }
CDelimiter.prototype.getPropsForWrite = function() CDelimiter.prototype.getPropsForWrite = function()
{ {
var props = /*var props =
{ {
grow: this.Pr.grow, grow: this.Pr.grow,
column: this.nCol, column: this.nCol,
...@@ -3915,7 +3931,9 @@ CDelimiter.prototype.getPropsForWrite = function() ...@@ -3915,7 +3931,9 @@ CDelimiter.prototype.getPropsForWrite = function()
sepChr: this.sepOper.getChr() // default: DELIMITER_LINE sepChr: this.sepOper.getChr() // default: DELIMITER_LINE
}; };
return props; return props;*/
return this.Pr;
} }
CDelimiter.prototype.Save_Changes = function(Data, Writer) CDelimiter.prototype.Save_Changes = function(Data, Writer)
{ {
...@@ -4227,9 +4245,6 @@ CGroupCharacter.prototype.Resize = function(Parent, ParaMath, oMeasure) ...@@ -4227,9 +4245,6 @@ CGroupCharacter.prototype.Resize = function(Parent, ParaMath, oMeasure)
this.setCharacter(operProps, operDefaultPrp); this.setCharacter(operProps, operDefaultPrp);
this.Pr.chrType = this.operator.typeOper;
this.Pr.chr = String.fromCharCode(this.operator.code);
this.RecalcInfo.bProps = false; this.RecalcInfo.bProps = false;
} }
......
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