Commit 1a28c5c0 authored by Ilya.Kirillov's avatar Ilya.Kirillov

Изменена схема отдачи изменений рецензирования в интерфейс. Исправлены баги с...

Изменена схема отдачи изменений рецензирования в интерфейс. Исправлены баги с положением окна с текущими изменениями. Сделано, чтобы при поиске следующего/предыдущего изменения заходили в автофигуры.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65152 954022d7-b5bf-4e40-9824-e11837661b57
parent 825a9e2f
...@@ -995,6 +995,15 @@ ParaComment.prototype = ...@@ -995,6 +995,15 @@ ParaComment.prototype =
Apply_TextPr : function() Apply_TextPr : function()
{ {
}, },
Check_RevisionsChanges : function(Checker, ContentPos, Depth)
{
},
Get_ParaPosByContentPos : function(ContentPos, Depth)
{
return new CParaPos(StartRange, StartLine, 0, 0);
},
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
// Функции пересчета // Функции пересчета
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
......
This diff is collapsed.
...@@ -327,15 +327,15 @@ Paragraph.prototype = ...@@ -327,15 +327,15 @@ Paragraph.prototype =
Get_AllDrawingObjects : function(DrawingObjs) Get_AllDrawingObjects : function(DrawingObjs)
{ {
if ( undefined === DrawingObjs ) if (undefined === DrawingObjs)
DrawingObjs = []; DrawingObjs = [];
var Count = this.Content.length; var Count = this.Content.length;
for ( var Pos = 0; Pos < Count; Pos++ ) for (var Pos = 0; Pos < Count; Pos++)
{ {
var Item = this.Content[Pos]; var Item = this.Content[Pos];
if ( para_Hyperlink === Item.Type || para_Run === Item.Type ) if (Item.Get_AllDrawingObjects)
Item.Get_AllDrawingObjects( DrawingObjs ); Item.Get_AllDrawingObjects(DrawingObjs);
} }
return DrawingObjs; return DrawingObjs;
...@@ -9289,43 +9289,32 @@ Paragraph.prototype = ...@@ -9289,43 +9289,32 @@ Paragraph.prototype =
if (this.Is_TrackRevisions() && editor && this.bFromDocument) if (this.Is_TrackRevisions() && editor && this.bFromDocument)
{ {
var TrackManager = this.LogicDocument.Get_TrackRevisionsManager(); var TrackManager = this.LogicDocument.Get_TrackRevisionsManager();
if (this === TrackManager.Get_CurrentChangeParagraph()) var TextTransform = this.Get_ParentTextTransform();
{
var TextTransform = this.Get_ParentTextTransform();
var PageIndex = 0;
var _X = this.Pages[PageIndex].XLimit;
var _Y = this.Pages[PageIndex].Y;
var Coords = this.DrawingDocument.ConvertCoordsToCursorWR( _X, _Y, this.Get_StartPage_Absolute() + (PageIndex - this.PageNum), TextTransform);
var X = Coords.X + 20; var ContentPos = this.Get_ParaContentPos(this.Selection.Use, true);
var Y = Coords.Y; var ParaPos = this.Get_ParaPosByContentPos(ContentPos);
var Page_abs = this.Get_StartPage_Absolute() + ParaPos.Page;
var _Y = this.Pages[ParaPos.Page].Y + this.Lines[ParaPos.Line].Top;
var _X = (this.LogicDocument ? this.LogicDocument.Get_PageLimits(Page_abs).XLimit : 0);
var Coords = this.DrawingDocument.ConvertCoordsToCursorWR(_X, _Y, Page_abs, TextTransform);
if (this === TrackManager.Get_CurrentChangeParagraph())
{
var Change = TrackManager.Get_CurrentChange(); var Change = TrackManager.Get_CurrentChange();
if (null !== Change) if (null !== Change)
{ {
var Type = Change.get_Type(); Change.put_InternalPos(_X, _Y, Page_abs);
Change.put_XY(X, Y); TrackManager.Add_VisibleChange(Change);
editor.sync_AddRevisionsChange(Change);
} }
} }
else if (false === this.Selection.Use) else if (false === this.Selection.Use)
{ {
var TextTransform = this.Get_ParentTextTransform();
var PageIndex = 0;
var _X = this.Pages[PageIndex].XLimit;
var _Y = this.Pages[PageIndex].Y;
var Coords = this.DrawingDocument.ConvertCoordsToCursorWR( _X, _Y, this.Get_StartPage_Absolute() + (PageIndex - this.PageNum), TextTransform);
var X = Coords.X + 20;
var Y = Coords.Y;
var Changes = TrackManager.Get_ParagraphChanges(this.Get_Id()); var Changes = TrackManager.Get_ParagraphChanges(this.Get_Id());
if (Changes.length > 0) if (Changes.length > 0)
{ {
for (var ChangeIndex = 0, ChangesCount = Changes.length; ChangeIndex < ChangesCount; ChangeIndex++) for (var ChangeIndex = 0, ChangesCount = Changes.length; ChangeIndex < ChangesCount; ChangeIndex++)
{ {
var Change = Changes[ChangeIndex]; var Change = Changes[ChangeIndex];
var Type = Change.get_Type(); var Type = Change.get_Type();
if ((c_oAscRevisionsChangeType.TextAdd !== Type if ((c_oAscRevisionsChangeType.TextAdd !== Type
&& c_oAscRevisionsChangeType.TextRem !== Type && c_oAscRevisionsChangeType.TextRem !== Type
...@@ -9333,8 +9322,8 @@ Paragraph.prototype = ...@@ -9333,8 +9322,8 @@ Paragraph.prototype =
|| (StartPos.Compare(Change.get_StartPos()) >= 0 || (StartPos.Compare(Change.get_StartPos()) >= 0
&& StartPos.Compare(Change.get_EndPos()) <= 0)) && StartPos.Compare(Change.get_EndPos()) <= 0))
{ {
Change.put_XY(X, Y); Change.put_InternalPos(_X, _Y, Page_abs);
editor.sync_AddRevisionsChange(Change); TrackManager.Add_VisibleChange(Change);
} }
} }
} }
...@@ -13352,13 +13341,48 @@ Paragraph.prototype.Get_RevisionsChangeParagraph = function(SearchEngine) ...@@ -13352,13 +13341,48 @@ Paragraph.prototype.Get_RevisionsChangeParagraph = function(SearchEngine)
if (true !== SearchEngine.Is_CurrentFound()) if (true !== SearchEngine.Is_CurrentFound())
{ {
if (this !== SearchEngine.Get_CurrentParagraph()) if (this !== SearchEngine.Get_CurrentParagraph())
SearchEngine.Set_FoundedParagraph(this); {
// Возможно текущий параграф находится в одной из автофигур
var DrawingObjects = this.Get_AllDrawingObjects();
for (var DrawingIndex = 0, Count = DrawingObjects.length; DrawingIndex < Count; DrawingIndex++)
{
DrawingObjects[DrawingIndex].Get_RevisionsChangeParagraph(SearchEngine);
if (true === SearchEngine.Is_Found())
return;
}
// Если все еще не нашли текущий параграф, тогда данный выставляем текущим
if (true !== SearchEngine.Is_CurrentFound())
SearchEngine.Set_CurrentFound();
}
else else
{
SearchEngine.Set_CurrentFound(); SearchEngine.Set_CurrentFound();
}
} }
else else
{ {
SearchEngine.Set_FoundedParagraph(this); var Direction = SearchEngine.Get_Direction();
if (Direction < 0)
{
SearchEngine.Set_FoundedParagraph(this);
if (true === SearchEngine.Is_Found())
return;
}
if (true === SearchEngine.Is_Found())
return;
var DrawingObjects = this.Get_AllDrawingObjects();
for (var DrawingIndex = 0, Count = DrawingObjects.length; DrawingIndex < Count; DrawingIndex++)
{
DrawingObjects[DrawingIndex].Get_RevisionsChangeParagraph(SearchEngine);
if (true === SearchEngine.Is_Found())
return;
}
if (Direction > 0)
SearchEngine.Set_FoundedParagraph(this);
} }
}; };
Paragraph.prototype.Is_SelectedAll = function() Paragraph.prototype.Is_SelectedAll = function()
......
...@@ -6755,6 +6755,11 @@ ParaDrawing.prototype = ...@@ -6755,6 +6755,11 @@ ParaDrawing.prototype =
LogicDocument.Document_UpdateSelectionState(); LogicDocument.Document_UpdateSelectionState();
LogicDocument.Document_UpdateInterfaceState(); LogicDocument.Document_UpdateInterfaceState();
} }
},
Get_RevisionsChangeParagraph : function(SearchEngine)
{
console.log("Drawing revisions change");
} }
}; };
......
...@@ -10474,7 +10474,7 @@ CParaPr.prototype = ...@@ -10474,7 +10474,7 @@ CParaPr.prototype =
delete this.PrChange; delete this.PrChange;
delete this.ReviewInfo; delete this.ReviewInfo;
} }
} };
function Copy_Bounds(Bounds) function Copy_Bounds(Bounds)
{ {
...@@ -10499,7 +10499,7 @@ function asc_CStyle() ...@@ -10499,7 +10499,7 @@ function asc_CStyle()
this.TextPr = new CTextPr(); this.TextPr = new CTextPr();
this.ParaPr = new CParaPr(); this.ParaPr = new CParaPr();
}; }
asc_CStyle.prototype.get_Name = function() asc_CStyle.prototype.get_Name = function()
{ {
return this.Name; return this.Name;
......
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