Commit 4e70b61e authored by Ilya Kirillov's avatar Ilya Kirillov

Added new class CParagraphBookmark. The ParaComment class was inherited from...

Added new class CParagraphBookmark. The ParaComment class was inherited from the CParagraphContentBase class. Most functions of the ParaComment class have been moved to CParagraphContentBase.
parent d91d0e85
......@@ -1120,6 +1120,7 @@
window['AscDFH'].historyitem_type_BlockLevelSdt = 59 << 16;
window['AscDFH'].historyitem_type_SdtPr = 60 << 16;
window['AscDFH'].historyitem_type_InlineLevelSdt = 61 << 16;
window['AscDFH'].historyitem_type_ParaBookmark = 62 << 16;
window['AscDFH'].historyitem_type_CommonShape = 1000 << 16; // Этот класс добавлен для элементов, у которых нет конкретного класса
......
......@@ -263,6 +263,7 @@
this.m_oFactoryClass[AscDFH.historyitem_type_deg] = AscCommonWord.CDegree;
this.m_oFactoryClass[AscDFH.historyitem_type_BlockLevelSdt] = AscCommonWord.CBlockLevelSdt;
this.m_oFactoryClass[AscDFH.historyitem_type_InlineLevelSdt] = AscCommonWord.CInlineLevelSdt;
this.m_oFactoryClass[AscDFH.historyitem_type_ParaBookmark] = AscCommonWord.CParagraphBookmark;
if (window['AscCommonSlide'])
......
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
"use strict";
/**
* User: Ilja.Kirillov
* Date: 11.10.2017
* Time: 13:47
*/
/**
*
* @constructor
* @extends {CParagraphContentBase}
*/
function CParagraphBookmark(isStart, sBookmarkId)
{
CParagraphContentBase.call(this);
this.Id = AscCommon.g_oIdCounter.Get_NewId();
this.Start = isStart ? true : false;
this.BookmarkId = sBookmarkId;
AscCommon.g_oTableId.Add(this, this.Id);
}
CParagraphBookmark.prototype = Object.create(CParagraphContentBase.prototype);
CParagraphBookmark.prototype.constructor = CParagraphBookmark;
CParagraphBookmark.prototype.Get_Id = function()
{
return this.Id;
};
CParagraphBookmark.prototype.GetId = function()
{
return this.Id;
};
//----------------------------------------------------------------------------------------------------------------------
// Функции совместного редактирования
//----------------------------------------------------------------------------------------------------------------------
CParagraphBookmark.Refresh_RecalcData = function()
{
};
CParagraphBookmark.Write_ToBinary2 = function(Writer)
{
Writer.WriteLong(AscDFH.historyitem_type_ParaBookmark);
// String : Id
// String : Id комментария
// Bool : Start
Writer.WriteString2("" + this.Id);
Writer.WriteString2("" + this.BookmarkId);
Writer.WriteBool(this.Start);
};
CParagraphBookmark.Read_FromBinary2 = function(Reader)
{
this.Id = Reader.GetString2();
this.BookmarkId = Reader.GetString2();
this.Start = Reader.GetBool();
};
//--------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].CParagraphBookmark = CParagraphBookmark;
......@@ -653,12 +653,14 @@ CComments.prototype.IsUseSolved = function()
return this.m_bUseSolved;
};
//----------------------------------------------------------------------------------------------------------------------
// Класс для работы внутри параграфа
//----------------------------------------------------------------------------------------------------------------------
/**
* Класс для элемента начала/конца комментария в параграфе
* @constructor
* @extends {CParagraphContentBase}
*/
function ParaComment(Start, Id)
{
CParagraphContentBase.call(this);
this.Id = AscCommon.g_oIdCounter.Get_NewId();
this.Paragraph = null;
......@@ -678,505 +680,131 @@ function ParaComment(Start, Id)
g_oTableId.Add( this, this.Id );
}
ParaComment.prototype =
ParaComment.prototype = Object.create(CParagraphContentBase.prototype);
ParaComment.prototype.constructor = ParaComment;
ParaComment.prototype.Get_Id = function()
{
Get_Id : function()
{
return this.Id;
},
return this.Id;
};
ParaComment.prototype.GetId = function()
{
return this.Get_Id();
};
ParaComment.prototype.Set_CommentId = function(NewCommentId)
{
if (this.CommentId !== NewCommentId)
{
History.Add(new CChangesParaCommentCommentId(this, this.CommentId, NewCommentId));
this.CommentId = NewCommentId;
}
};
ParaComment.prototype.Copy = function(Selected)
{
return new ParaComment(this.Start, this.CommentId);
};
ParaComment.prototype.Recalculate_Range_Spaces = function(PRSA, CurLine, CurRange, CurPage)
{
var Para = PRSA.Paragraph;
var DocumentComments = Para.LogicDocument.Comments;
var Comment = DocumentComments.Get_ById(this.CommentId);
if (null === Comment)
return;
var X = PRSA.X;
var Y = Para.Pages[CurPage].Y + Para.Lines[CurLine].Top;
var H = Para.Lines[CurLine].Bottom - Para.Lines[CurLine].Top;
var Page = Para.Get_StartPage_Absolute() + CurPage;
if (comment_type_HdrFtr === Comment.m_oTypeInfo.Type)
{
var HdrFtr = Comment.m_oTypeInfo.Data;
if (-1 !== HdrFtr.RecalcInfo.CurPage)
Page = HdrFtr.RecalcInfo.CurPage;
}
Set_CommentId : function(NewCommentId)
if (Para && Para === AscCommon.g_oTableId.Get_ById(Para.Get_Id()))
{
if (this.CommentId !== NewCommentId)
// Заглушка для повторяющегося заголовка в таблицах
if (true === this.Start)
{
History.Add(new CChangesParaCommentCommentId(this, this.CommentId, NewCommentId));
this.CommentId = NewCommentId;
Comment.Set_StartId(Para.Get_Id());
Comment.Set_StartInfo(Page, X, Y, H);
}
},
Is_Empty : function()
{
return true;
},
Is_CheckingNearestPos : function()
{
return false;
},
Get_CompiledTextPr : function()
{
return null;
},
Clear_TextPr : function()
{
},
Remove : function()
{
return false;
},
Get_DrawingObjectRun : function(Id)
{
return null;
},
Get_DrawingObjectContentPos : function(Id, ContentPos, Depth)
{
return false;
},
Get_Layout : function(DrawingLayout, UseContentPos, ContentPos, Depth)
{
},
Get_NextRunElements : function(RunElements, UseContentPos, Depth)
{
},
Get_PrevRunElements : function(RunElements, UseContentPos, Depth)
{
},
CollectDocumentStatistics : function(ParaStats)
{
},
Create_FontMap : function(Map)
{
},
Get_AllFontNames : function(AllFonts)
{
},
GetSelectedText : function(bAll, bClearText, oPr)
{
return "";
},
Get_SelectionDirection : function()
{
return 1;
},
Clear_TextFormatting : function( DefHyper )
{
},
Can_AddDropCap : function()
{
return null;
},
Get_TextForDropCap : function(DropCapText, UseContentPos, ContentPos, Depth)
{
},
Get_StartTabsCount : function(TabsCounter)
{
return true;
},
Remove_StartTabs : function(TabsCounter)
{
return true;
},
Copy : function(Selected)
{
return new ParaComment(this.Start, this.CommentId);
},
CopyContent : function(Selected)
{
return [];
},
Split : function()
{
return new ParaRun();
},
Apply_TextPr : function()
{
},
Check_RevisionsChanges : function(Checker, ContentPos, Depth)
{
},
Get_ParaPosByContentPos : function(ContentPos, Depth)
{
return new CParaPos(this.StartRange, this.StartLine, 0, 0);
},
//-----------------------------------------------------------------------------------
// Функции пересчета
//-----------------------------------------------------------------------------------
Recalculate_Reset : function(StartRange, StartLine)
{
this.StartLine = StartLine;
this.StartRange = StartRange;
},
Recalculate_Range : function(PRS, ParaPr)
{
},
Recalculate_Set_RangeEndPos : function(PRS, PRP, Depth)
{
},
Recalculate_LineMetrics : function(PRS, ParaPr, _CurLine, _CurRange)
{
},
Recalculate_Range_Width : function(PRSC, _CurLine, _CurRange)
{
},
Recalculate_Range_Spaces : function(PRSA, CurLine, CurRange, CurPage)
{
var Para = PRSA.Paragraph;
var DocumentComments = Para.LogicDocument.Comments;
var Comment = DocumentComments.Get_ById( this.CommentId );
if ( null === Comment )
return;
var X = PRSA.X;
var Y = Para.Pages[CurPage].Y + Para.Lines[CurLine].Top;
var H = Para.Lines[CurLine].Bottom - Para.Lines[CurLine].Top;
var Page = Para.Get_StartPage_Absolute() + CurPage;
if ( comment_type_HdrFtr === Comment.m_oTypeInfo.Type )
{
var HdrFtr = Comment.m_oTypeInfo.Data;
if (-1 !== HdrFtr.RecalcInfo.CurPage)
Page = HdrFtr.RecalcInfo.CurPage;
}
if (Para && Para === AscCommon.g_oTableId.Get_ById(Para.Get_Id()))
else
{
// Заглушка для повторяющегося заголовка в таблицах
if (true === this.Start)
{
Comment.Set_StartId(Para.Get_Id());
Comment.Set_StartInfo(Page, X, Y, H);
}
else
{
Comment.Set_EndId(Para.Get_Id());
}
Comment.Set_EndId(Para.Get_Id());
}
},
Recalculate_PageEndInfo : function(PRSI, _CurLine, _CurRange)
{
if ( true === this.Start )
PRSI.AddComment( this.CommentId );
else
PRSI.RemoveComment( this.CommentId );
},
SaveRecalculateObject : function(Copy)
{
var RecalcObj = new CRunRecalculateObject(this.StartLine, this.StartRange);
return RecalcObj;
},
LoadRecalculateObject : function(RecalcObj, Parent)
{
this.StartLine = RecalcObj.StartLine;
this.StartRange = RecalcObj.StartRange;
var PageNum = Parent.Get_StartPage_Absolute();
var DocumentComments = editor.WordControl.m_oLogicDocument.Comments;
var Comment = DocumentComments.Get_ById( this.CommentId );
Comment.m_oStartInfo.PageNum = PageNum;
},
PrepareRecalculateObject : function()
{
},
Is_EmptyRange : function(_CurLine, _CurRange)
{
return true;
},
Check_Range_OnlyMath : function(Checker, CurRange, CurLine)
{
},
Check_MathPara : function(Checker)
{
},
Check_PageBreak : function()
{
return false;
},
Check_BreakPageEnd : function(PBChecker)
{
return true;
},
Recalculate_CurPos : function(X, Y, CurrentRun, _CurRange, _CurLine, CurPage, UpdateCurPos, UpdateTarget, ReturnTarget)
{
return { X : X };
},
RecalculateMinMaxContentWidth : function()
{
},
Get_Range_VisibleWidth : function(RangeW, _CurLine, _CurRange)
{
},
Shift_Range : function(Dx, Dy, _CurLine, _CurRange)
{
var DocumentComments = editor.WordControl.m_oLogicDocument.Comments;
var Comment = DocumentComments.Get_ById( this.CommentId );
if ( null === Comment )
return;
if ( true === this.Start )
{
Comment.m_oStartInfo.X += Dx;
Comment.m_oStartInfo.Y += Dy;
}
},
//-----------------------------------------------------------------------------------
// Функции отрисовки
//-----------------------------------------------------------------------------------
Draw_HighLights : function(PDSH)
{
if ( true === this.Start )
PDSH.AddComment( this.CommentId );
else
PDSH.RemoveComment( this.CommentId );
},
Draw_Elements : function(PDSE)
{
},
Draw_Lines : function(PDSL)
{
},
//-----------------------------------------------------------------------------------
// Функции для работы с курсором
//-----------------------------------------------------------------------------------
Is_CursorPlaceable : function()
{
return false;
},
Cursor_Is_Start : function()
{
return true;
},
Cursor_Is_NeededCorrectPos : function()
{
return true;
},
Cursor_Is_End : function()
{
return true;
},
MoveCursorToStartPos : function()
{
},
MoveCursorToEndPos : function(SelectFromEnd)
{
},
Get_ParaContentPosByXY : function(SearchPos, Depth, _CurLine, _CurRange, StepEnd)
{
return false;
},
Get_ParaContentPos : function(bSelection, bStart, ContentPos, bUseCorrection)
{
},
Set_ParaContentPos : function(ContentPos, Depth)
{
},
Get_PosByElement : function(Class, ContentPos, Depth, UseRange, Range, Line)
{
if ( this === Class )
return true;
return false;
},
Get_ElementByPos : function(ContentPos, Depth)
{
return this;
},
Get_ClassesByPos : function(Classes, ContentPos, Depth)
{
Classes.push(this);
},
Get_PosByDrawing : function(Id, ContentPos, Depth)
{
return false;
},
Get_RunElementByPos : function(ContentPos, Depth)
{
return null;
},
Get_LastRunInRange : function(_CurLine, _CurRange)
{
return null;
},
Get_LeftPos : function(SearchPos, ContentPos, Depth, UseContentPos)
{
},
Get_RightPos : function(SearchPos, ContentPos, Depth, UseContentPos, StepEnd)
{
},
Get_WordStartPos : function(SearchPos, ContentPos, Depth, UseContentPos)
{
},
Get_WordEndPos : function(SearchPos, ContentPos, Depth, UseContentPos, StepEnd)
{
},
}
};
ParaComment.prototype.Recalculate_PageEndInfo = function(PRSI, _CurLine, _CurRange)
{
if (true === this.Start)
PRSI.AddComment(this.CommentId);
else
PRSI.RemoveComment(this.CommentId);
};
ParaComment.prototype.SaveRecalculateObject = function(Copy)
{
var RecalcObj = new CRunRecalculateObject(this.StartLine, this.StartRange);
return RecalcObj;
};
ParaComment.prototype.LoadRecalculateObject = function(RecalcObj, Parent)
{
this.StartLine = RecalcObj.StartLine;
this.StartRange = RecalcObj.StartRange;
Get_EndRangePos : function(_CurLine, _CurRange, SearchPos, Depth)
{
return false;
},
var PageNum = Parent.Get_StartPage_Absolute();
Get_StartRangePos : function(_CurLine, _CurRange, SearchPos, Depth)
{
return false;
},
var DocumentComments = editor.WordControl.m_oLogicDocument.Comments;
var Comment = DocumentComments.Get_ById(this.CommentId);
Get_StartRangePos2 : function(_CurLine, _CurRange, ContentPos, Depth)
{
},
Comment.m_oStartInfo.PageNum = PageNum;
};
ParaComment.prototype.PrepareRecalculateObject = function()
{
};
ParaComment.prototype.Shift_Range = function(Dx, Dy, _CurLine, _CurRange)
{
var DocumentComments = editor.WordControl.m_oLogicDocument.Comments;
var Comment = DocumentComments.Get_ById(this.CommentId);
if (null === Comment)
return;
Get_EndRangePos2 : function(_CurLine, _CurRange, ContentPos, Depth)
if (true === this.Start)
{
},
Get_StartPos : function(ContentPos, Depth)
{
},
Get_EndPos : function(BehindEnd, ContentPos, Depth)
{
},
//-----------------------------------------------------------------------------------
// Функции для работы с селектом
//-----------------------------------------------------------------------------------
Set_SelectionContentPos : function(StartContentPos, EndContentPos, Depth, StartFlag, EndFlag)
{
},
RemoveSelection : function()
{
},
SelectAll : function(Direction)
{
},
Selection_DrawRange : function(_CurLine, _CurRange, SelectionDraw)
{
},
IsSelectionEmpty : function(CheckEnd)
{
return true;
},
Selection_CheckParaEnd : function()
{
return false;
},
IsSelectedAll : function(Props)
{
return true;
},
Selection_CorrectLeftPos : function(Direction)
{
return true;
},
Selection_CheckParaContentPos : function(ContentPos)
{
return true;
},
//----------------------------------------------------------------------------------------------------------------------
// Функции совместного редактирования
//----------------------------------------------------------------------------------------------------------------------
Refresh_RecalcData : function()
{
},
Write_ToBinary2 : function(Writer)
{
Writer.WriteLong( AscDFH.historyitem_type_CommentMark );
// String : Id
// String : Id комментария
// Bool : Start
Writer.WriteString2( "" + this.Id );
Writer.WriteString2( "" + this.CommentId );
Writer.WriteBool( this.Start );
},
Read_FromBinary2 : function(Reader)
{
this.Id = Reader.GetString2();
this.CommentId = Reader.GetString2();
this.Start = Reader.GetBool();
}
Comment.m_oStartInfo.X += Dx;
Comment.m_oStartInfo.Y += Dy;
}
};
ParaComment.prototype.SetParagraph = function(Paragraph)
ParaComment.prototype.Draw_HighLights = function(PDSH)
{
this.Paragraph = Paragraph;
if (true === this.Start)
PDSH.AddComment(this.CommentId);
else
PDSH.RemoveComment(this.CommentId);
};
ParaComment.prototype.Get_CurrentParaPos = function()
ParaComment.prototype.Refresh_RecalcData = function()
{
return new CParaPos(this.StartRange, this.StartLine, 0, 0);
};
ParaComment.prototype.Get_TextPr = function(ContentPos, Depth)
ParaComment.prototype.Write_ToBinary2 = function(Writer)
{
return new CTextPr();
Writer.WriteLong(AscDFH.historyitem_type_CommentMark);
// String : Id
// String : Id комментария
// Bool : Start
Writer.WriteString2("" + this.Id);
Writer.WriteString2("" + this.CommentId);
Writer.WriteBool(this.Start);
};
ParaComment.prototype.CanSplit = function()
ParaComment.prototype.Read_FromBinary2 = function(Reader)
{
return false;
this.Id = Reader.GetString2();
this.CommentId = Reader.GetString2();
this.Start = Reader.GetBool();
};
ParaComment.prototype.SetCommentId = function(sCommentId)
{
......@@ -1190,21 +818,6 @@ ParaComment.prototype.IsCommentStart = function()
{
return this.Start;
};
ParaComment.prototype.IsStopCursorOnEntryExit = function()
{
return false;
};
ParaComment.prototype.PreDelete = function()
{
};
//----------------------------------------------------------------------------------------------------------------------
// Разное
//----------------------------------------------------------------------------------------------------------------------
ParaComment.prototype.Set_ReviewType = function(ReviewType, RemovePrChange){};
ParaComment.prototype.Set_ReviewTypeWithInfo = function(ReviewType, ReviewInfo){};
ParaComment.prototype.Check_RevisionsChanges = function(Checker, ContentPos, Depth){};
ParaComment.prototype.AcceptRevisionChanges = function(Type, bAll){};
ParaComment.prototype.RejectRevisionChanges = function(Type, bAll){};
//--------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
......
......@@ -33,6 +33,10 @@
"use strict";
function CParagraphContentBase()
{
this.Paragraph = null;
this.StartLine = -1;
this.StartRange = -1;
}
CParagraphContentBase.prototype.CanSplit = function()
{
......@@ -46,6 +50,343 @@ CParagraphContentBase.prototype.IsStopCursorOnEntryExit = function()
{
return false;
};
CParagraphContentBase.prototype.PreDelete = function()
{
};
CParagraphContentBase.prototype.SetParagraph = function(Paragraph)
{
this.Paragraph = Paragraph;
};
CParagraphContentBase.prototype.Is_Empty = function()
{
return true;
};
CParagraphContentBase.prototype.IsEmpty = function()
{
return this.Is_Empty();
};
CParagraphContentBase.prototype.Is_CheckingNearestPos = function()
{
return false;
};
CParagraphContentBase.prototype.Get_CompiledTextPr = function()
{
return null;
};
CParagraphContentBase.prototype.Clear_TextPr = function()
{
};
CParagraphContentBase.prototype.Remove = function()
{
return false;
};
CParagraphContentBase.prototype.Get_DrawingObjectRun = function(Id)
{
return null;
};
CParagraphContentBase.prototype.Get_DrawingObjectContentPos = function(Id, ContentPos, Depth)
{
return false;
};
CParagraphContentBase.prototype.Get_Layout = function(DrawingLayout, UseContentPos, ContentPos, Depth)
{
};
CParagraphContentBase.prototype.Get_NextRunElements = function(RunElements, UseContentPos, Depth)
{
};
CParagraphContentBase.prototype.Get_PrevRunElements = function(RunElements, UseContentPos, Depth)
{
};
CParagraphContentBase.prototype.CollectDocumentStatistics = function(ParaStats)
{
};
CParagraphContentBase.prototype.Create_FontMap = function(Map)
{
};
CParagraphContentBase.prototype.Get_AllFontNames = function(AllFonts)
{
};
CParagraphContentBase.prototype.GetSelectedText = function(bAll, bClearText, oPr)
{
return "";
};
CParagraphContentBase.prototype.Get_SelectionDirection = function()
{
return 1;
};
CParagraphContentBase.prototype.Clear_TextFormatting = function( DefHyper )
{
};
CParagraphContentBase.prototype.Can_AddDropCap = function()
{
return null;
};
CParagraphContentBase.prototype.Get_TextForDropCap = function(DropCapText, UseContentPos, ContentPos, Depth)
{
};
CParagraphContentBase.prototype.Get_StartTabsCount = function(TabsCounter)
{
return true;
};
CParagraphContentBase.prototype.Remove_StartTabs = function(TabsCounter)
{
return true;
};
CParagraphContentBase.prototype.Copy = function(Selected)
{
return new this.constructor();
};
CParagraphContentBase.prototype.CopyContent = function(Selected)
{
return [];
};
CParagraphContentBase.prototype.Split = function()
{
return new ParaRun();
};
CParagraphContentBase.prototype.Apply_TextPr = function()
{
};
CParagraphContentBase.prototype.Get_ParaPosByContentPos = function(ContentPos, Depth)
{
return new CParaPos(this.StartRange, this.StartLine, 0, 0);
};
//----------------------------------------------------------------------------------------------------------------------
// Функции пересчета
//----------------------------------------------------------------------------------------------------------------------
CParagraphContentBase.prototype.Recalculate_Reset = function(StartRange, StartLine)
{
this.StartLine = StartLine;
this.StartRange = StartRange;
};
CParagraphContentBase.prototype.Recalculate_Range = function(PRS, ParaPr)
{
};
CParagraphContentBase.prototype.Recalculate_Set_RangeEndPos = function(PRS, PRP, Depth)
{
};
CParagraphContentBase.prototype.Recalculate_LineMetrics = function(PRS, ParaPr, _CurLine, _CurRange)
{
};
CParagraphContentBase.prototype.Recalculate_Range_Width = function(PRSC, _CurLine, _CurRange)
{
};
CParagraphContentBase.prototype.Recalculate_Range_Spaces = function(PRSA, CurLine, CurRange, CurPage)
{
};
CParagraphContentBase.prototype.Recalculate_PageEndInfo = function(PRSI, _CurLine, _CurRange)
{
};
CParagraphContentBase.prototype.SaveRecalculateObject = function(Copy)
{
var RecalcObj = new CRunRecalculateObject(this.StartLine, this.StartRange);
return RecalcObj;
};
CParagraphContentBase.prototype.LoadRecalculateObject = function(RecalcObj, Parent)
{
this.StartLine = RecalcObj.StartLine;
this.StartRange = RecalcObj.StartRange;
};
CParagraphContentBase.prototype.PrepareRecalculateObject = function()
{
};
CParagraphContentBase.prototype.Is_EmptyRange = function(_CurLine, _CurRange)
{
return true;
};
CParagraphContentBase.prototype.Check_Range_OnlyMath = function(Checker, CurRange, CurLine)
{
};
CParagraphContentBase.prototype.Check_MathPara = function(Checker)
{
};
CParagraphContentBase.prototype.Check_PageBreak = function()
{
return false;
};
CParagraphContentBase.prototype.Check_BreakPageEnd = function(PBChecker)
{
return true;
};
CParagraphContentBase.prototype.Recalculate_CurPos = function(X, Y, CurrentRun, _CurRange, _CurLine, CurPage, UpdateCurPos, UpdateTarget, ReturnTarget)
{
return { X : X };
};
CParagraphContentBase.prototype.RecalculateMinMaxContentWidth = function(MinMax)
{
};
CParagraphContentBase.prototype.Get_Range_VisibleWidth = function(RangeW, _CurLine, _CurRange)
{
};
CParagraphContentBase.prototype.Shift_Range = function(Dx, Dy, _CurLine, _CurRange)
{
};
//----------------------------------------------------------------------------------------------------------------------
// Функции отрисовки
//----------------------------------------------------------------------------------------------------------------------
CParagraphContentBase.prototype.Draw_HighLights = function(PDSH)
{
};
CParagraphContentBase.prototype.Draw_Elements = function(PDSE)
{
};
CParagraphContentBase.prototype.Draw_Lines = function(PDSL)
{
};
//----------------------------------------------------------------------------------------------------------------------
// Функции для работы с курсором
//----------------------------------------------------------------------------------------------------------------------
CParagraphContentBase.prototype.Is_CursorPlaceable = function()
{
return false;
};
CParagraphContentBase.prototype.Cursor_Is_Start = function()
{
return true;
};
CParagraphContentBase.prototype.Cursor_Is_NeededCorrectPos = function()
{
return true;
};
CParagraphContentBase.prototype.Cursor_Is_End = function()
{
return true;
};
CParagraphContentBase.prototype.MoveCursorToStartPos = function()
{
};
CParagraphContentBase.prototype.MoveCursorToEndPos = function(SelectFromEnd)
{
};
CParagraphContentBase.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine, _CurRange, StepEnd)
{
return false;
};
CParagraphContentBase.prototype.Get_ParaContentPos = function(bSelection, bStart, ContentPos, bUseCorrection)
{
};
CParagraphContentBase.prototype.Set_ParaContentPos = function(ContentPos, Depth)
{
};
CParagraphContentBase.prototype.Get_PosByElement = function(Class, ContentPos, Depth, UseRange, Range, Line)
{
if (this === Class)
return true;
return false;
};
CParagraphContentBase.prototype.Get_ElementByPos = function(ContentPos, Depth)
{
return this;
};
CParagraphContentBase.prototype.Get_ClassesByPos = function(Classes, ContentPos, Depth)
{
Classes.push(this);
};
CParagraphContentBase.prototype.Get_PosByDrawing = function(Id, ContentPos, Depth)
{
return false;
};
CParagraphContentBase.prototype.Get_RunElementByPos = function(ContentPos, Depth)
{
return null;
};
CParagraphContentBase.prototype.Get_LastRunInRange = function(_CurLine, _CurRange)
{
return null;
};
CParagraphContentBase.prototype.Get_LeftPos = function(SearchPos, ContentPos, Depth, UseContentPos)
{
};
CParagraphContentBase.prototype.Get_RightPos = function(SearchPos, ContentPos, Depth, UseContentPos, StepEnd)
{
};
CParagraphContentBase.prototype.Get_WordStartPos = function(SearchPos, ContentPos, Depth, UseContentPos)
{
};
CParagraphContentBase.prototype.Get_WordEndPos = function(SearchPos, ContentPos, Depth, UseContentPos, StepEnd)
{
};
CParagraphContentBase.prototype.Get_EndRangePos = function(_CurLine, _CurRange, SearchPos, Depth)
{
return false;
};
CParagraphContentBase.prototype.Get_StartRangePos = function(_CurLine, _CurRange, SearchPos, Depth)
{
return false;
};
CParagraphContentBase.prototype.Get_StartRangePos2 = function(_CurLine, _CurRange, ContentPos, Depth)
{
};
CParagraphContentBase.prototype.Get_EndRangePos2 = function(_CurLine, _CurRange, ContentPos, Depth)
{
};
CParagraphContentBase.prototype.Get_StartPos = function(ContentPos, Depth)
{
};
CParagraphContentBase.prototype.Get_EndPos = function(BehindEnd, ContentPos, Depth)
{
};
//----------------------------------------------------------------------------------------------------------------------
// Функции для работы с селектом
//----------------------------------------------------------------------------------------------------------------------
CParagraphContentBase.prototype.Set_SelectionContentPos = function(StartContentPos, EndContentPos, Depth, StartFlag, EndFlag)
{
};
CParagraphContentBase.prototype.RemoveSelection = function()
{
};
CParagraphContentBase.prototype.SelectAll = function(Direction)
{
};
CParagraphContentBase.prototype.Selection_DrawRange = function(_CurLine, _CurRange, SelectionDraw)
{
};
CParagraphContentBase.prototype.IsSelectionEmpty = function(CheckEnd)
{
return true;
};
CParagraphContentBase.prototype.Selection_CheckParaEnd = function()
{
return false;
};
CParagraphContentBase.prototype.IsSelectedAll = function(Props)
{
return true;
};
CParagraphContentBase.prototype.Selection_CorrectLeftPos = function(Direction)
{
return true;
};
CParagraphContentBase.prototype.Selection_CheckParaContentPos = function(ContentPos)
{
return true;
};
//----------------------------------------------------------------------------------------------------------------------
CParagraphContentBase.prototype.Get_CurrentParaPos = function()
{
return new CParaPos(this.StartRange, this.StartLine, 0, 0);
};
CParagraphContentBase.prototype.Get_TextPr = function(ContentPos, Depth)
{
return new CTextPr();
};
CParagraphContentBase.prototype.Set_ReviewType = function(ReviewType, RemovePrChange)
{
};
CParagraphContentBase.prototype.Set_ReviewTypeWithInfo = function(ReviewType, ReviewInfo)
{
};
CParagraphContentBase.prototype.Check_RevisionsChanges = function(Checker, ContentPos, Depth)
{
};
CParagraphContentBase.prototype.AcceptRevisionChanges = function(Type, bAll)
{
};
CParagraphContentBase.prototype.RejectRevisionChanges = function(Type, bAll)
{
};
/**
* Это базовый класс для элементов содержимого(контент) параграфа, у которых есть свое содержимое.
......
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