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

Поправила баг : если в EqArray выставлены настройки текста normal для...

Поправила баг :  если в EqArray выставлены настройки текста normal для амперсанда, то он не должен становится точкой выравнивания в этом случае

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65955 954022d7-b5bf-4e40-9824-e11837661b57
parent 41cfbe7a
......@@ -9624,10 +9624,14 @@ ParaRun.prototype.Math_RecalculateContent = function(PRS)
if(this.bEqArray)
{
if(Type !== para_Math_Ampersand)
WidthPoints.UpdatePoint(WidthItem);
else
if(Type === para_Math_Ampersand && true === Item.IsAlignPoint())
{
WidthPoints.AddNewAlignRange();
}
else
{
WidthPoints.UpdatePoint(WidthItem);
}
}
}
......@@ -9883,10 +9887,11 @@ ParaRun.prototype.ApplyPoints = function(PointsInfo)
for(var Pos = 0; Pos < this.Content.length; Pos++)
{
if(this.Content[Pos].Type == para_Math_Ampersand)
var Item = this.Content[Pos];
if(Item.Type === para_Math_Ampersand && true === Item.IsAlignPoint())
{
PointsInfo.NextAlignRange();
this.Content[Pos].size.width = PointsInfo.GetAlign();
Item.size.width = PointsInfo.GetAlign();
}
this.size.width += this.Content[Pos].Get_WidthVisible(); // Get_Width => Get_WidthVisible
......
......@@ -974,7 +974,7 @@ function CMathAmp()
{
CMathAmp.superclass.constructor.call(this);
this.bEqArray = false;
this.bAlignPoint = false;
this.Type = para_Math_Ampersand;
this.value = 0x26;
......@@ -985,10 +985,10 @@ function CMathAmp()
Asc.extendClass(CMathAmp, CMathBaseText);
CMathAmp.prototype.Measure = function(oMeasure, TextPr, InfoMathText)
{
this.bEqArray = InfoMathText.bEqArray;
this.bAlignPoint = InfoMathText.bEqArray == true && InfoMathText.bNormalText == false;
this.AmpText.Measure(oMeasure, TextPr, InfoMathText);
if(this.bEqArray)
if(this.bAlignPoint)
{
this.size.width = 0;
this.size.ascent = 0;
......@@ -1013,21 +1013,21 @@ CMathAmp.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI)
CMathAmp.prototype.getCodeChr = function()
{
var code = null;
if(!this.bEqArray)
if(!this.bAlignPoint)
code = this.AmpText.getCodeChr();
return code;
};
CMathAmp.prototype.IsText = function()
{
return !this.bEqArray;
return !this.bAlignPoint;
};
CMathAmp.prototype.setPosition = function(pos)
{
this.pos.x = pos.x;
this.pos.y = pos.y;
if(this.bEqArray == false)
if(this.bAlignPoint == false)
this.AmpText.setPosition(pos);
};
CMathAmp.prototype.relate = function(Parent)
......@@ -1037,7 +1037,7 @@ CMathAmp.prototype.relate = function(Parent)
};
CMathAmp.prototype.Draw = function(x, y, pGraphics, InfoTextPr)
{
if(this.bEqArray==false)
if(this.bAlignPoint == false)
this.AmpText.Draw(x + this.GapLeft, y, pGraphics, InfoTextPr);
else if(editor.ShowParaMarks) // показать метки выравнивания, если включена отметка о знаках параграфа
{
......@@ -1054,7 +1054,7 @@ CMathAmp.prototype.Is_InclineLetter = function()
};
CMathAmp.prototype.IsAlignPoint = function()
{
return this.bEqArray;
return this.bAlignPoint;
};
CMathAmp.prototype.Copy = function()
{
......
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