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

Исправлен баг с выставлением текущей позиции и селекта в функции Concat_Paragraphs.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66324 954022d7-b5bf-4e40-9824-e11837661b57
parent 62eb9d61
......@@ -14652,24 +14652,19 @@ CDocument.prototype.Concat_Paragraphs = function(Pos)
var OldSelectionStartPos = this.Selection.StartPos;
var OldSelectionEndPos = this.Selection.EndPos;
var OldCurPos = this.CurPos.ContentPos;
Para1.Concat(Para2);
this.Remove_FromContent(Pos + 1, 1);
if (OldSelectionStartPos === Pos + 1 && OldSelectionEndPos === Pos + 1)
{
this.Selection_Remove();
this.CurPos.ContentPos = Pos;
Para1.Cursor_MoveToStartPos(false);
}
else if (OldSelectionStartPos <= Pos + 1 && Pos + 1 <= OldSelectionEndPos)
{
this.Selection.EndPos--;
}
else if (OldSelectionEndPos <= Pos + 1 && Pos + 1 <= OldSelectionStartPos)
{
this.Selection.StartPos--;
}
if (OldCurPos > Pos)
this.CurPos.ContentPos = OldCurPos - 1;
if (OldSelectionStartPos > Pos)
this.Selection.StartPos = OldSelectionStartPos - 1;
if (OldSelectionEndPos > Pos)
this.Selection.EndPos = OldSelectionEndPos - 1;
}
};
CDocument.prototype.Get_ElementsCount = function()
......
......@@ -1656,10 +1656,10 @@ CDocumentContent.prototype =
{
var Pos = ( true === this.Selection.Use && selectionflag_Numbering !== this.Selection.Flag ? this.Selection.EndPos : this.CurPos.ContentPos );
if (Pos >= 0 && Pos < this.Content.length)
{
return this.Content[Pos].Get_CurrentPage_Absolute();
}
}
return 0;
},
DocumentStatistics : function(Stats)
......@@ -9512,24 +9512,19 @@ CDocumentContent.prototype.Concat_Paragraphs = function(Pos)
var OldSelectionStartPos = this.Selection.StartPos;
var OldSelectionEndPos = this.Selection.EndPos;
var OldCurPos = this.CurPos.ContentPos;
Para1.Concat(Para2);
this.Remove_FromContent(Pos + 1, 1);
if (OldSelectionStartPos === Pos + 1 && OldSelectionEndPos === Pos + 1)
{
this.Selection_Remove();
this.CurPos.ContentPos = Pos;
Para1.Cursor_MoveToStartPos(false);
}
else if (OldSelectionStartPos <= Pos + 1 && Pos + 1 <= OldSelectionEndPos)
{
this.Selection.EndPos--;
}
else if (OldSelectionEndPos <= Pos + 1 && Pos + 1 <= OldSelectionStartPos)
{
this.Selection.StartPos--;
}
if (OldCurPos > Pos)
this.CurPos.ContentPos = OldCurPos - 1;
if (OldSelectionStartPos > Pos)
this.Selection.StartPos = OldSelectionStartPos - 1;
if (OldSelectionEndPos > Pos)
this.Selection.EndPos = OldSelectionEndPos - 1;
}
};
CDocumentContent.prototype.Get_ElementsCount = function()
......
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