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

сохранение формул в xml поправлены баги

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53270 954022d7-b5bf-4e40-9824-e11837661b57
parent d1a368bb
This diff is collapsed.
...@@ -72,7 +72,7 @@ CMathMatrix.prototype.init = function(props) ...@@ -72,7 +72,7 @@ CMathMatrix.prototype.init = function(props)
this.setRuleGap(this.spaceColumn, props.cGpRule, props.cGp, props.cSp); this.setRuleGap(this.spaceColumn, props.cGpRule, props.cGp, props.cSp);
this.setRuleGap(this.spaceRow, props.rSpRule, props.rSp); this.setRuleGap(this.spaceRow, props.rSpRule, props.rSp);
if(props.plcHide === true) if(props.plcHide === true || props.plcHide === 1)
{ {
this.plcHide = true; this.plcHide = true;
this.hidePlaceholder(true); this.hidePlaceholder(true);
......
...@@ -20,7 +20,7 @@ function CNary() ...@@ -20,7 +20,7 @@ function CNary()
this.grow = false; this.grow = false;
this.supHide = false; this.supHide = false;
this.subHide = false; this.subHide = false;
this.limLoc = NARY_SubSup; this.limLoc = NARY_UndOvr;
CSubMathBase.call(this); CSubMathBase.call(this);
} }
extend(CNary, CSubMathBase); extend(CNary, CSubMathBase);
......
...@@ -2966,7 +2966,9 @@ COperator.prototype.getChr = function() ...@@ -2966,7 +2966,9 @@ COperator.prototype.getChr = function()
var chr = null; //если operator не определен, то this.code = null var chr = null; //если operator не определен, то this.code = null
if(this.code !== null) if(this.code !== null)
chr = this.typeOper == this.defaultType ? "" : String.fromCharCode(this.code); chr = this.typeOper == this.defaultType ? null : String.fromCharCode(this.code);
if (this.operator == OPERATOR_EMPTY)
chr = "";
return chr; return chr;
} }
...@@ -3527,7 +3529,13 @@ CDelimiter.prototype.getPropsForWrite = function() ...@@ -3527,7 +3529,13 @@ CDelimiter.prototype.getPropsForWrite = function()
props.grow = this.grow == true ? 1 : 0; props.grow = this.grow == true ? 1 : 0;
props.column = this.nCol; props.column = this.nCol;
props.shp = this.shape;
var shp = null
if ( this.shape == DELIMITER_SHAPE_MATH)
shp = 0;
else if ( this.shape == DELIMITER_SHAPE_CENTERED )
shp = 1;
props.shp = shp;
props.begChr = this.begOper.getChr(); // default: PARENTHESIS_LEFT props.begChr = this.begOper.getChr(); // default: PARENTHESIS_LEFT
props.endChr = this.endOper.getChr(); // default: PARENTHESIS_RIGHT props.endChr = this.endOper.getChr(); // default: PARENTHESIS_RIGHT
...@@ -3886,10 +3894,10 @@ CGroupCharacter.prototype.old_getGlyph = function(code, type) ...@@ -3886,10 +3894,10 @@ CGroupCharacter.prototype.old_getGlyph = function(code, type)
CGroupCharacter.prototype.getPropsForWrite = function() CGroupCharacter.prototype.getPropsForWrite = function()
{ {
var vertJc = null; var vertJc = null;
if (this.vertJc == VJUST_BOT) if (this.vertJc == VJUST_TOP)
vertJc = 0;
else if ( this.vertJc == VJUST_TOP)
vertJc = 1; vertJc = 1;
else
vertJc = 0;
var pos = null; var pos = null;
if (this.loc == LOCATION_BOT) if (this.loc == LOCATION_BOT)
......
...@@ -8838,7 +8838,7 @@ asc_docs_api.prototype.asc_AddMath = function(Type) ...@@ -8838,7 +8838,7 @@ asc_docs_api.prototype.asc_AddMath = function(Type)
var oDegree2 = new CDegree(); var oDegree2 = new CDegree();
MathElement.CreateDegree(oDegree2, oElem, props, "c", "2", null); MathElement.CreateDegree(oDegree2, oElem, props, "c", "2", null);
break; break;
case 175: props = {pos:"top"}; case 175: props = {pos:LOCATION_TOP};
var oBar = new CBar(); var oBar = new CBar();
MathElement.CreateElem(oBar,MathElement.Math.Root,props); MathElement.CreateElem(oBar,MathElement.Math.Root,props);
oBar.fillPlaceholders(); oBar.fillPlaceholders();
...@@ -8847,19 +8847,19 @@ asc_docs_api.prototype.asc_AddMath = function(Type) ...@@ -8847,19 +8847,19 @@ asc_docs_api.prototype.asc_AddMath = function(Type)
MathElement.CreateElem(oBar,MathElement.Math.Root,props); MathElement.CreateElem(oBar,MathElement.Math.Root,props);
oBar.fillPlaceholders(); oBar.fillPlaceholders();
break; break;
case 177: props = {pos:"top"}; case 177: props = {pos:LOCATION_TOP};
var oBar = new CBar(); var oBar = new CBar();
MathElement.CreateElem(oBar,MathElement.Math.Root,props); MathElement.CreateElem(oBar,MathElement.Math.Root,props);
oElem = oBar.getBase(); oElem = oBar.getBase();
MathElement.AddText(oElem, "A"); MathElement.AddText(oElem, "A");
break; break;
case 178: props = {pos:"top"}; case 178: props = {pos:LOCATION_TOP};
var oBar = new CBar(); var oBar = new CBar();
MathElement.CreateElem(oBar,MathElement.Math.Root,props); MathElement.CreateElem(oBar,MathElement.Math.Root,props);
oElem = oBar.getBase(); oElem = oBar.getBase();
MathElement.AddText(oElem, "ABC"); MathElement.AddText(oElem, "ABC");
break; break;
case 179: props = {pos:"top"}; case 179: props = {pos:LOCATION_TOP};
var oBar = new CBar(); var oBar = new CBar();
MathElement.CreateElem(oBar,MathElement.Math.Root,props); MathElement.CreateElem(oBar,MathElement.Math.Root,props);
oElem = oBar.getBase(); oElem = oBar.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