Commit 85d670ca authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Классы CMathContent и ParaMath тоже вышли из под гнёта EqArray. Исправлен баг...

Классы CMathContent и ParaMath тоже вышли из под гнёта EqArray. Исправлен баг с добавлением новых строк внутри формулы.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59383 954022d7-b5bf-4e40-9824-e11837661b57
parent dba14bb4
......@@ -1673,13 +1673,6 @@ ParaMath.prototype.Get_ContentSelection = function()
var X = oContent.pos.x + this.X;
var Y = oContent.pos.y + this.Y;
if(oContent.RecalcInfo.bEqqArray)
{
var PointInfo = new CMathPointInfo();
PointInfo.SetInfoPoints(oContent.InfoPoints);
X += PointInfo.GetAlign();
}
return {X : X, Y : Y, W : oContent.size.width, H : oContent.size.height};
};
......@@ -1719,6 +1712,8 @@ ParaMath.prototype.Handle_AddNewLine = function()
NewContent.Correct_Content(true);
CurrContent.Correct_Content(true);
NewContent.Cursor_MoveToStartPos();
NeedRecalculate = true;
}
else if(MATH_MATRIX !== CurrContent.ParentElement.kind)
......
......@@ -12836,8 +12836,6 @@ function CParagraphSearchPosXY()
this.DiffX = 1000000; // километра для ограничения должно хватить
this.NumberingDiffX = 1000000; // километра для ограничения должно хватить
this.EqArrayInfoPoints = null; // Специальный параметр для EqArray в формулах
this.Line = 0;
this.Range = 0;
......
......@@ -3069,13 +3069,6 @@ CMathContent.prototype.Get_Bounds = function()
Y = this.ParaMath.Y + this.pos.y;
W = this.size.width;
H = this.size.height;
if (this.RecalcInfo.bEqqArray)
{
var PointInfo = new CMathPointInfo();
PointInfo.SetInfoPoints(this.InfoPoints);
X += PointInfo.GetAlign();
}
}
return {X : X, Y : Y, W : W, H : H};
......@@ -3087,14 +3080,10 @@ CMathContent.prototype.Recalculate_CurPos = function(_X, _Y, CurrentRun, _CurRan
if(this.RecalcInfo.bEqqArray)
{
var PointInfo = new CMathPointInfo();
PointInfo.SetInfoPoints(this.InfoPoints);
X += PointInfo.GetAlign();
for(var nPos = 0; nPos < this.CurPos; nPos++)
{
if(para_Math_Run === this.Content[nPos].Type)
X = this.Content[nPos].Recalculate_CurPos(X, Y, false, _CurRange, _CurLine, _CurPage, UpdateCurPos, UpdateTarget, ReturnTarget, PointInfo).X;
X = this.Content[nPos].Recalculate_CurPos(X, Y, false, _CurRange, _CurLine, _CurPage, UpdateCurPos, UpdateTarget, ReturnTarget).X;
else
X += this.Content[nPos].size.width;
}
......@@ -3102,7 +3091,7 @@ CMathContent.prototype.Recalculate_CurPos = function(_X, _Y, CurrentRun, _CurRan
else
X += this.WidthToElement[this.CurPos];
return this.Content[this.CurPos].Recalculate_CurPos(X, Y, CurrentRun, _CurRange, _CurLine, _CurPage, UpdateCurPos, UpdateTarget, ReturnTarget, PointInfo);
return this.Content[this.CurPos].Recalculate_CurPos(X, Y, CurrentRun, _CurRange, _CurLine, _CurPage, UpdateCurPos, UpdateTarget, ReturnTarget);
};
CMathContent.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine, _CurRange, StepEnd)
{
......@@ -3111,14 +3100,6 @@ CMathContent.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurL
if (nLength <= 0)
return false;
if (this.RecalcInfo.bEqqArray)
{
SearchPos.EqArrayInfoPoints = new CMathPointInfo();
SearchPos.EqArrayInfoPoints.SetInfoPoints(this.InfoPoints);
}
else
SearchPos.EqArrayInfoPoints = null;
var bResult = false;
for (var nPos = 0; nPos < nLength; nPos++)
{
......@@ -3580,13 +3561,6 @@ CMathContent.prototype.Draw_HighLights = function(PDSH, bAll)
{
PDSH.X = this.ParaMath.X + this.pos.x;
var PointsInfo = new CMathPointInfo();
PointsInfo.SetInfoPoints(this.InfoPoints);
/*if(this.RecalcInfo.bEqqArray)
PDSH.X += PointsInfo.GetAlign();*/
var len = this.Content.length;
for ( var CurPos = 0; CurPos < len; CurPos++ )
......@@ -3652,14 +3626,6 @@ CMathContent.prototype.Selection_DrawRange = function(_CurLine, _CurRange, Selec
var PointsInfo = new CMathPointInfo();
PointsInfo.SetInfoPoints(this.InfoPoints);
if(this.RecalcInfo.bEqqArray)
{
if(SelectionDraw.FindStart == true)
SelectionDraw.StartX += PointsInfo.GetAlign();
else
SelectionDraw.W += PointsInfo.GetAlign();
}
var bDrawSelection = false;
for(var nPos = 0, nCount = this.Content.length; nPos < nCount; nPos++)
{
......
......@@ -687,6 +687,7 @@ CEqArray.prototype.addRow = function()
{
var NewContent = new CMathContent();
this.protected_AddToContent(this.CurPos + 1, [NewContent], true);
this.CurPos++;
return NewContent;
}
......
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