lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 41e34bbe authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Избавились от гнета EqArray в ране.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59381 954022d7-b5bf-4e40-9824-e11837661b57
parent 1d94263c
...@@ -44,7 +44,6 @@ function ParaRun(Paragraph, bMathRun) ...@@ -44,7 +44,6 @@ function ParaRun(Paragraph, bMathRun)
this.Parent = null; this.Parent = null;
this.ArgSize = 0; this.ArgSize = 0;
this.bEqqArray = false; this.bEqqArray = false;
//this.UpdateMathPr = true;
this.size = new CMathSize(); this.size = new CMathSize();
this.MathPrp = new CMPrp(); this.MathPrp = new CMPrp();
} }
...@@ -673,6 +672,7 @@ ParaRun.prototype.Recalculate_CurPos = function(X, Y, CurrentRun, _CurRange, _Cu ...@@ -673,6 +672,7 @@ ParaRun.prototype.Recalculate_CurPos = function(X, Y, CurrentRun, _CurRange, _Cu
case para_NewLine: case para_NewLine:
case para_Math_Text: case para_Math_Text:
case para_Math_Placeholder: case para_Math_Placeholder:
case para_Math_Ampersand:
{ {
X += Item.Get_WidthVisible(); X += Item.Get_WidthVisible();
break; break;
...@@ -685,18 +685,6 @@ ParaRun.prototype.Recalculate_CurPos = function(X, Y, CurrentRun, _CurRange, _Cu ...@@ -685,18 +685,6 @@ ParaRun.prototype.Recalculate_CurPos = function(X, Y, CurrentRun, _CurRange, _Cu
X += Item.Get_WidthVisible(); X += Item.Get_WidthVisible();
break; break;
} }
case para_Math_Ampersand:
{
if(this.bEqqArray)
{
PointsInfo.NextAlignRange();
X += PointsInfo.GetAlign();
}
else
X += Item.Get_WidthVisible();
break;
}
} }
} }
...@@ -1507,13 +1495,6 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth) ...@@ -1507,13 +1495,6 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
if ( this.Paragraph !== PRS.Paragraph ) if ( this.Paragraph !== PRS.Paragraph )
{ {
this.Paragraph = PRS.Paragraph; this.Paragraph = PRS.Paragraph;
/*if(this.Type == para_Math_Run)
{
this.ArgSize = PRS.ArgSize.value;
this.bEqqArray = PRS.bEqqArray;
this.Parent = PRS.Parent;
}*/
this.RecalcInfo.TextPr = true; this.RecalcInfo.TextPr = true;
this.protected_UpdateSpellChecking(); this.protected_UpdateSpellChecking();
...@@ -3775,12 +3756,7 @@ ParaRun.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine, ...@@ -3775,12 +3756,7 @@ ParaRun.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine,
var TempDx = 0; var TempDx = 0;
if(para_Math_Ampersand === ItemType && this.bEqqArray && null !== SearchPos.EqArrayInfoPoints) if (para_Drawing != ItemType || true === Item.Is_Inline())
{
SearchPos.EqArrayInfoPoints.NextAlignRange();
TempDx = SearchPos.EqArrayInfoPoints.GetAlign();
}
else if (para_Drawing != ItemType || true === Item.Is_Inline())
{ {
TempDx = Item.Get_WidthVisible(); TempDx = Item.Get_WidthVisible();
} }
...@@ -4456,12 +4432,7 @@ ParaRun.prototype.Selection_DrawRange = function(_CurLine, _CurRange, SelectionD ...@@ -4456,12 +4432,7 @@ ParaRun.prototype.Selection_DrawRange = function(_CurLine, _CurRange, SelectionD
} }
else else
{ {
if(para_Math_Ampersand == ItemType && this.bEqqArray) if ( para_Drawing !== ItemType || true === Item.Is_Inline() )
{
PointsInfo.NextAlignRange();
SelectionDraw.StartX += PointsInfo.GetAlign();
}
else if ( para_Drawing !== ItemType || true === Item.Is_Inline() )
SelectionDraw.StartX += Item.Get_WidthVisible(); SelectionDraw.StartX += Item.Get_WidthVisible();
} }
} }
...@@ -4477,11 +4448,6 @@ ParaRun.prototype.Selection_DrawRange = function(_CurLine, _CurRange, SelectionD ...@@ -4477,11 +4448,6 @@ ParaRun.prototype.Selection_DrawRange = function(_CurLine, _CurRange, SelectionD
{ {
if (true === SelectionDraw.Draw && para_Drawing === ItemType && true !== Item.Is_Inline()) if (true === SelectionDraw.Draw && para_Drawing === ItemType && true !== Item.Is_Inline())
Item.Draw_Selection(); Item.Draw_Selection();
else if (para_Math_Ampersand === ItemType && this.bEqqArray)
{
PointsInfo.NextAlignRange();
SelectionDraw.W += PointsInfo.GetAlign();
}
else else
SelectionDraw.W += Item.Get_WidthVisible(); SelectionDraw.W += Item.Get_WidthVisible();
} }
...@@ -4519,7 +4485,7 @@ ParaRun.prototype.Selection_IsEmpty = function(CheckEnd) ...@@ -4519,7 +4485,7 @@ ParaRun.prototype.Selection_IsEmpty = function(CheckEnd)
for ( var CurPos = StartPos; CurPos < EndPos; CurPos++ ) for ( var CurPos = StartPos; CurPos < EndPos; CurPos++ )
{ {
var ItemType = this.Content[CurPos].Type; var ItemType = this.Content[CurPos].Type;
if (para_End !== ItemType && !(para_Math_Ampersand == ItemType && this.bEqqArray)) // para_math_Ampersand имеет нулевую ширину, поэтому чтобы не случилось так что не было ни селекта, ни курсора, не учитываем para_Math_Ampersand if (para_End !== ItemType)
return false; return 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