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