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

Исправлен баг с принятием чужих изменений и позиционированием курсора (баг 30890).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66228 954022d7-b5bf-4e40-9824-e11837661b57
parent 4b0ef67e
...@@ -13526,8 +13526,11 @@ Paragraph.prototype.Set_ContentSelection = function(StartDocPos, EndDocPos, Dept ...@@ -13526,8 +13526,11 @@ Paragraph.prototype.Set_ContentSelection = function(StartDocPos, EndDocPos, Dept
if (StartPos !== EndPos) if (StartPos !== EndPos)
{ {
this.Content[StartPos].Set_ContentSelection(_StartDocPos, null, Depth + 1, _StartFlag, StartPos > EndPos ? 1 : -1); if (this.Content[StartPos] && this.Content[StartPos].Set_ContentSelection)
this.Content[EndPos].Set_ContentSelection(null, _EndDocPos, Depth + 1, StartPos > EndPos ? -1 : 1, _EndFlag); this.Content[StartPos].Set_ContentSelection(_StartDocPos, null, Depth + 1, _StartFlag, StartPos > EndPos ? 1 : -1);
if (this.Content[EndPos] && this.Content[EndPos].Set_ContentSelection)
this.Content[EndPos].Set_ContentSelection(null, _EndDocPos, Depth + 1, StartPos > EndPos ? -1 : 1, _EndFlag);
var _StartPos = StartPos; var _StartPos = StartPos;
var _EndPos = EndPos; var _EndPos = EndPos;
...@@ -13547,7 +13550,8 @@ Paragraph.prototype.Set_ContentSelection = function(StartDocPos, EndDocPos, Dept ...@@ -13547,7 +13550,8 @@ Paragraph.prototype.Set_ContentSelection = function(StartDocPos, EndDocPos, Dept
} }
else else
{ {
this.Content[StartPos].Set_ContentSelection(_StartDocPos, _EndDocPos, Depth + 1, _StartFlag, _EndFlag); if (this.Content[StartPos] && this.Content[StartPos].Set_ContentSelection)
this.Content[StartPos].Set_ContentSelection(_StartDocPos, _EndDocPos, Depth + 1, _StartFlag, _EndFlag);
} }
}; };
Paragraph.prototype.Set_ContentPosition = function(DocPos, Depth, Flag) Paragraph.prototype.Set_ContentPosition = function(DocPos, Depth, Flag)
...@@ -13585,7 +13589,10 @@ Paragraph.prototype.Set_ContentPosition = function(DocPos, Depth, Flag) ...@@ -13585,7 +13589,10 @@ Paragraph.prototype.Set_ContentPosition = function(DocPos, Depth, Flag)
} }
this.CurPos.ContentPos = Pos; this.CurPos.ContentPos = Pos;
this.Content[Pos].Set_ContentPosition(_DocPos, Depth + 1, _Flag); if (this.Content[Pos] && this.Content[Pos].Set_ContentPosition)
this.Content[Pos].Set_ContentPosition(_DocPos, Depth + 1, _Flag);
else
this.Correct_ContentPos2();
}; };
Paragraph.prototype.Get_DocumentPositionFromObject = function(PosArray) Paragraph.prototype.Get_DocumentPositionFromObject = function(PosArray)
{ {
......
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