Commit 3ebdb1ad authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

1. Поправила баг : при вставке формулы добавлялись пустые Run с MathPrp со...

1. Поправила баг : при вставке формулы добавлялись пустые Run с MathPrp со стилем plain, из-за этого в пустых Run были неправильные текстовые настройки и не было italic при merge тестовых настроек => не было italic Cambria Math у добавляемого в пустые Run текста
2. Не учитывались Gaps у Accent и GroupCharacters при Resize и поиске позиций (из-за этого поиск позиций осуществлялся неправильно для данных элементов)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58384 954022d7-b5bf-4e40-9824-e11837661b57
parent fff2d093
......@@ -560,7 +560,6 @@ ParaMath.prototype =
if(PRS.NewRange == false)
this.Root.Recalculate_Reset(PRS.Range, PRS.Line);
this.Root.Resize(g_oTextMeasurer, null, this, RPI/*recalculate properties info*/, ArgSize, TextPr);
//this.Root.Resize(null, this, g_oTextMeasurer, RPI/*recalculate properties info*/, TextPr);
......
......@@ -1559,12 +1559,12 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
{
this.Paragraph = PRS.Paragraph;
if(this.Type == para_Math_Run)
/*if(this.Type == para_Math_Run)
{
this.ArgSize = PRS.ArgSize.value;
this.bEqqArray = PRS.bEqqArray;
this.Parent = PRS.Parent;
}
}*/
this.RecalcInfo.TextPr = true;
this.Paragraph.RecalcInfo.Set_Type_0_Spell( pararecalc_0_Spell_All );
......
......@@ -1151,6 +1151,8 @@ CAccent.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
height = base.size.height + this.operator.size.height + this.gap,
ascent = this.operator.size.height + this.gap + this.elements[0][0].size.ascent;
width += this.GapLeft + this.GapRight;
this.size = {height: height, width: width, ascent: ascent};
}
......
......@@ -712,12 +712,6 @@ CMathBase.prototype =
}
}
/*if(this.constructor.name == "CDegreeSubSup")
{
console.log("startX " + startX + " startY " + startY + "; " + "endX " + endX + " endY " + endY);
}*/
this.bSelectionUse = true;
},
......
......@@ -112,7 +112,6 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
}
if(RPI.bInline == true && RPI.bMathFunc == true)
{
this.elements[0][0].Resize(oMeasure, this, ParaMath, RPI, ArgSize);
......
......@@ -853,8 +853,10 @@ CMPrp.prototype =
this.sty = STY_ITALIC;
else if(Bold == true)
this.sty = STY_BOLD;
else
else if(Bold == false && Italic == false)
this.sty = STY_PLAIN;
else
this.sty = undefined;
}
}
......@@ -4797,6 +4799,7 @@ CMathContent.prototype =
ctrPrp = current.Get_CtrPrp();
mathPrp = new CMPrp();
mathPrp.SetStyle(ctrPrp.Bold, ctrPrp.Italic);
emptyRun.Set_MathPr(mathPrp);
......
......@@ -3941,6 +3941,7 @@ CCharacter.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
height = base.size.height + this.operator.size.height,
ascent = this.getAscent(oMeasure);
width += this.GapLeft + this.GapRight;
this.size = {height: height, width: width, ascent: ascent};
}
......@@ -3984,7 +3985,7 @@ CCharacter.prototype.setPosition = function(pos, PosInfo)
}
CCharacter.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine, _CurRange, StepEnd)
{
var align = (this.size.width - this.elements[0][0].size.width)/2;
var align = (this.size.width - this.elements[0][0].size.width - this.GapLeft - this.GapRight)/2;
SearchPos.CurX += this.GapLeft + align;
......
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