Commit b0e8af77 authored by Ilya.Kirillov's avatar Ilya.Kirillov

Исправлен баг с хождением по стрелкам вверх/вниз при переходе через страницы....

Исправлен баг с хождением по стрелкам вверх/вниз при переходе через страницы. Исправлен баг с расположением курсора в EqArray.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59339 954022d7-b5bf-4e40-9824-e11837661b57
parent e8957186
......@@ -10491,6 +10491,7 @@ CDocument.prototype =
if ( "undefined" == typeof(NextObj) )
NextObj = null;
this.History.Add( this, { Type : historyitem_Document_AddItem, Pos : Position, Item : NewObject } );
this.Content.splice( Position, 0, NewObject );
NewObject.Set_Parent( this );
......@@ -12730,7 +12731,7 @@ CDocument.prototype =
if ( null != Element )
{
if ( Pos > 0 )
if (Pos > 0)
{
this.Content[Pos - 1].Next = Element;
Element.Prev = this.Content[Pos - 1];
......@@ -12738,7 +12739,7 @@ CDocument.prototype =
else
Element.Prev = null;
if ( Pos <= this.Content.length - 1 )
if (Pos <= this.Content.length - 1)
{
this.Content[Pos].Prev = Element;
Element.Next = this.Content[Pos];
......@@ -12773,7 +12774,7 @@ CDocument.prototype =
if ( false === Pos )
continue;
this.Content.splice( Pos, 1 );
this.Content.splice(Pos, 1);
if ( Pos > 0 )
{
......@@ -13837,8 +13838,8 @@ CDocument.prototype.private_MoveCursorDown = function(StartX, StartY, AddToSelec
else
{
this.CurPage++;
StartY = 0;
CurY = 0;
PageH = this.Pages[this.CurPage].Height;
}
}
......@@ -13871,6 +13872,7 @@ CDocument.prototype.private_MoveCursorUp = function(StartX, StartY, AddToSelect)
else
{
this.CurPage--;
StartY = this.Pages[this.CurPage].Height;
CurY = this.Pages[this.CurPage].Height;
}
}
......
......@@ -578,6 +578,7 @@ ParaMath.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
if(RPI.NeedResize)
{
this.Root.Set_Paragraph(Para);
this.Root.PreRecalc(null, this, ArgSize, RPI);
this.Root.Resize(g_oTextMeasurer, RPI/*recalculate properties info*/);
// когда формула будеат разбиваться на строки, Position придется перерасчитывать
......
......@@ -4655,7 +4655,7 @@ ParaRun.prototype.Internal_Compile_Pr = function ()
// чтобы не выпадало ошибок сгенерим дефолтовые настройки
var TextPr = new CTextPr();
TextPr.Init_Default();
return new CTextPr();
return TextPr;
}
// Получим настройки текста, для данного параграфа
......@@ -4677,7 +4677,7 @@ ParaRun.prototype.Internal_Compile_Pr = function ()
// чтобы не выпадало ошибок сгенерим дефолтовые настройки
var TextPr = new CTextPr();
TextPr.Init_Default();
return new CTextPr();
return TextPr;
}
// Not Apply ArgSize !
......
......@@ -5,7 +5,7 @@ function CMathBase(bInside)
this.Type = para_Math_Composition;
this.pos = new CMathPosition();
this.size = null;
this.size = new CMathSize();
// Properties
this.Parent = null;
......@@ -733,7 +733,7 @@ CMathBase.prototype =
}
//////////////////////////
};
CMathBase.prototype.Set_Paragraph = ParaHyperlink.prototype.Set_Paragraph;
CMathBase.prototype.Recalculate_Reset = function(StartRange, StartLine)
{
for (var nPos = 0, nCount = this.Content.length; nPos < nCount; nPos++)
......@@ -883,10 +883,13 @@ CMathBase.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine
return false;
var aBounds = [];
for (var nIndex = 0; nIndex < nCount; nIndex++)
{
aBounds.push(this.Content[nIndex].Get_Bounds());
var oBounds = this.Content[nIndex].Get_Bounds();
if (oBounds.W > 0.001 && oBounds.H > 0.001)
aBounds.push(oBounds);
else
aBounds.push(null);
}
var X = SearchPos.X;
......@@ -900,6 +903,9 @@ CMathBase.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine
while (nCurIndex < nCount)
{
var oBounds = aBounds[nCurIndex];
if (null !== oBounds)
{
if (oBounds.X <= X && X <= oBounds.X + oBounds.W && oBounds.Y <= Y && Y <= oBounds.Y + oBounds.H)
{
nFindIndex = nCurIndex;
......@@ -917,6 +923,7 @@ CMathBase.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine
nFindIndex = nCurIndex;
}
}
}
nCurIndex++;
}
......
......@@ -2016,7 +2016,7 @@ CMathContent.prototype =
this.Correct_ContentPos(-1);
}
};
CMathContent.prototype.Set_Paragraph = ParaHyperlink.prototype.Set_Paragraph;
CMathContent.prototype.Load_FromMenu = function(Type, Paragraph)
{
this.Paragraph = Paragraph;
......
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