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

Исправлен баг с определением начальной и конечной позиций изменения в рецензировании.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65101 954022d7-b5bf-4e40-9824-e11837661b57
parent d9f84e72
......@@ -13208,8 +13208,11 @@ Paragraph.prototype.Check_RevisionsChanges = function(RevisionsManager)
var Checker = new CParagraphRevisionsChangesChecker(this, RevisionsManager);
var ContentPos = new CParagraphContentPos();
for (var CurPos = 0, Count = this.Content.length - 1; CurPos < Count; CurPos++)
for (var CurPos = 0, Count = this.Content.length; CurPos < Count; CurPos++)
{
if (CurPos === Count - 1)
Checker.Set_ParaEndRun();
ContentPos.Update(CurPos, 0);
this.Content[CurPos].Check_RevisionsChanges(Checker, ContentPos, 1);
}
......@@ -14392,6 +14395,7 @@ function CParagraphRevisionsChangesChecker(Para, RevisionsManager)
this.Paragraph = Para;
this.ParaId = Para.Get_Id();
this.RevisionsManager = RevisionsManager;
this.ParaEndRun = false;
// Блок информации для добавления/удаления текста
this.AddRemove =
......@@ -14527,4 +14531,12 @@ CParagraphRevisionsChangesChecker.prototype.Update_PrChangeReviewInfo = function
this.TextPr.DateTime = ReviewInfo.Get_DateTime();
}
};
CParagraphRevisionsChangesChecker.prototype.Is_ParaEndRun = function()
{
return this.ParaEndRun;
};
CParagraphRevisionsChangesChecker.prototype.Set_ParaEndRun = function()
{
this.ParaEndRun = true;
};
\ No newline at end of file
......@@ -9915,35 +9915,42 @@ ParaRun.prototype.Check_RevisionsChanges = function(Checker, ContentPos, Depth)
if (this.Is_Empty())
return;
var ReviewType = this.Get_ReviewType();
if (ReviewType !== Checker.Get_AddRemoveType())
if (true !== Checker.Is_ParaEndRun())
{
Checker.Flush_AddRemoveChange();
ContentPos.Update(0, Depth);
var ReviewType = this.Get_ReviewType();
if (ReviewType !== Checker.Get_AddRemoveType())
{
Checker.Flush_AddRemoveChange();
ContentPos.Update(0, Depth);
if (reviewtype_Add === ReviewType || reviewtype_Remove === ReviewType)
Checker.Start_AddRemove(ReviewType, ContentPos);
}
if (reviewtype_Add === ReviewType || reviewtype_Remove === ReviewType)
Checker.Start_AddRemove(ReviewType, ContentPos);
}
if (reviewtype_Add === ReviewType || reviewtype_Remove === ReviewType)
{
var Text = "";
var ContentLen = this.Content.length;
for (var CurPos = 0; CurPos < ContentLen; CurPos++)
if (reviewtype_Add === ReviewType || reviewtype_Remove === ReviewType)
{
var Item = this.Content[CurPos];
var ItemType = Item.Type;
switch (ItemType)
var Text = "";
var ContentLen = this.Content.length;
for (var CurPos = 0; CurPos < ContentLen; CurPos++)
{
case para_Text : Text += String.fromCharCode(Item.Value); break;
case para_Space:
case para_Tab : Text += " "; break;
var Item = this.Content[CurPos];
var ItemType = Item.Type;
switch (ItemType)
{
case para_Text :
Text += String.fromCharCode(Item.Value);
break;
case para_Space:
case para_Tab :
Text += " ";
break;
}
}
Checker.Add_Text(Text);
ContentPos.Update(this.Content.length, Depth);
Checker.Set_AddRemoveEndPos(ContentPos);
Checker.Update_AddRemoveReviewInfo(this.ReviewInfo);
}
Checker.Add_Text(Text);
ContentPos.Update(this.Content.length, Depth);
Checker.Set_AddRemoveEndPos(ContentPos);
Checker.Update_AddRemoveReviewInfo(this.ReviewInfo);
}
var HavePrChange = this.Have_PrChange();
......
......@@ -7229,7 +7229,7 @@ asc_docs_api.prototype.asc_HaveRevisionsChanges = function()
{
this.WordControl.m_oLogicDocument.Have_RevisionChanges();
};
asc_docs_api.prototype.asc_hasNewReviewChanges = function()
asc_docs_api.prototype.asc_HaveNewRevisionsChanges = function()
{
return this.asc_HaveRevisionsChanges();
};
......
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