Commit 3317530a authored by Ilya.Kirillov's avatar Ilya.Kirillov

Сделано, чтобы стрелками влево/вправо всегда можно было встать перед/за...

Сделано, чтобы стрелками влево/вправо всегда можно было встать перед/за формулой. Исправлен баг с добавлением PageBreak в формулу (баг 26937).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59092 954022d7-b5bf-4e40-9824-e11837661b57
parent 78e83d14
...@@ -3269,7 +3269,7 @@ Paragraph.prototype = ...@@ -3269,7 +3269,7 @@ Paragraph.prototype =
} }
} }
while ( CurPos > 0 && true === this.Content[CurPos].Cursor_Is_NeededCorrectPos() ) while (CurPos > 0 && true === this.Content[CurPos].Cursor_Is_NeededCorrectPos() && para_Run === this.Content[CurPos - 1].Type)
{ {
CurPos--; CurPos--;
this.Content[CurPos].Cursor_MoveToEndPos(); this.Content[CurPos].Cursor_MoveToEndPos();
...@@ -3964,6 +3964,15 @@ Paragraph.prototype = ...@@ -3964,6 +3964,15 @@ Paragraph.prototype =
CurPos--; CurPos--;
if (CurPos >= 0 && para_Math === this.Content[CurPos + 1].Type)
{
// При выходе из формулы встаем в конец рана
this.Content[CurPos].Get_EndPos(false, SearchPos.Pos, Depth + 1);
SearchPos.Pos.Update(CurPos, Depth);
SearchPos.Found = true;
return true;
}
while ( CurPos >= 0 ) while ( CurPos >= 0 )
{ {
this.Content[CurPos].Get_LeftPos(SearchPos, ContentPos, Depth + 1, false); this.Content[CurPos].Get_LeftPos(SearchPos, ContentPos, Depth + 1, false);
...@@ -3992,7 +4001,16 @@ Paragraph.prototype = ...@@ -3992,7 +4001,16 @@ Paragraph.prototype =
CurPos++; CurPos++;
var Count = this.Content.length; var Count = this.Content.length;
while ( CurPos < this.Content.length ) if (CurPos < Count && para_Math === this.Content[CurPos - 1].Type)
{
// При выходе из формулы встаем в конец рана
this.Content[CurPos].Get_StartPos(SearchPos.Pos, Depth + 1);
SearchPos.Pos.Update(CurPos, Depth);
SearchPos.Found = true;
return true;
}
while (CurPos < Count)
{ {
this.Content[CurPos].Get_RightPos(SearchPos, ContentPos, Depth + 1, false, StepEnd); this.Content[CurPos].Get_RightPos(SearchPos, ContentPos, Depth + 1, false, StepEnd);
SearchPos.Pos.Update( CurPos, Depth ); SearchPos.Pos.Update( CurPos, Depth );
...@@ -9398,6 +9416,7 @@ Paragraph.prototype = ...@@ -9398,6 +9416,7 @@ Paragraph.prototype =
NewParagraph.Internal_Content_Remove2( 0, NewParagraph.Content.length ); NewParagraph.Internal_Content_Remove2( 0, NewParagraph.Content.length );
NewParagraph.Internal_Content_Concat( NewContent ); NewParagraph.Internal_Content_Concat( NewContent );
NewParagraph.Internal_Content_Add( 0, NewElement ); NewParagraph.Internal_Content_Add( 0, NewElement );
NewParagraph.Correct_Content();
// Копируем все настройки в новый параграф. Делаем это после того как определили контент параграфов. // Копируем все настройки в новый параграф. Делаем это после того как определили контент параграфов.
NewParagraph.TextPr.Value = this.TextPr.Value.Copy(); NewParagraph.TextPr.Value = this.TextPr.Value.Copy();
...@@ -9470,6 +9489,7 @@ Paragraph.prototype = ...@@ -9470,6 +9489,7 @@ Paragraph.prototype =
NewRun.Set_Pr( TextPr ); NewRun.Set_Pr( TextPr );
NewParagraph.Internal_Content_Add( 0, NewRun ); NewParagraph.Internal_Content_Add( 0, NewRun );
NewParagraph.Correct_Content();
NewParagraph.Cursor_MoveToStartPos( false ); NewParagraph.Cursor_MoveToStartPos( 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