Commit 22066ff0 authored by Alexander.Trofimov's avatar Alexander.Trofimov

move paragraph to common

parent 412e6788
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"../cell/model/History.js", "../cell/model/History.js",
"../common/editor/document.js", "../common/editor/document.js",
"../common/editor/documentContent.js", "../common/editor/documentContent.js",
"../common/editor/paragraph.js",
"../common/Shapes/EditorSettings.js", "../common/Shapes/EditorSettings.js",
"../common/Shapes/Serialize.js", "../common/Shapes/Serialize.js",
...@@ -132,7 +133,6 @@ ...@@ -132,7 +133,6 @@
"../word/Editor/Field.js", "../word/Editor/Field.js",
"../word/Editor/Run.js", "../word/Editor/Run.js",
"../word/Editor/Math.js", "../word/Editor/Math.js",
"../word/Editor/Paragraph.js",
"../word/Editor/Paragraph_Recalculate.js", "../word/Editor/Paragraph_Recalculate.js",
"../word/Editor/Sections.js", "../word/Editor/Sections.js",
"../word/Editor/Numbering.js", "../word/Editor/Numbering.js",
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"../word/Editor/History.js", "../word/Editor/History.js",
"../common/editor/document.js", "../common/editor/document.js",
"../common/editor/documentContent.js", "../common/editor/documentContent.js",
"../common/editor/paragraph.js",
"../common/Shapes/EditorSettings.js", "../common/Shapes/EditorSettings.js",
"../common/Shapes/Serialize.js", "../common/Shapes/Serialize.js",
...@@ -136,7 +137,6 @@ ...@@ -136,7 +137,6 @@
"../word/Math/accent.js", "../word/Math/accent.js",
"../word/Math/borderBox.js", "../word/Math/borderBox.js",
"../word/Editor/FlowObjects.js", "../word/Editor/FlowObjects.js",
"../word/Editor/Paragraph.js",
"../word/Editor/Paragraph_Recalculate.js", "../word/Editor/Paragraph_Recalculate.js",
"../word/Editor/HeaderFooter.js", "../word/Editor/HeaderFooter.js",
"../word/Editor/Math.js", "../word/Editor/Math.js",
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
"../word/Editor/History.js", "../word/Editor/History.js",
"../common/editor/document.js", "../common/editor/document.js",
"../common/editor/documentContent.js", "../common/editor/documentContent.js",
"../common/editor/paragraph.js",
"../common/Shapes/EditorSettings.js", "../common/Shapes/EditorSettings.js",
"../common/Shapes/Serialize.js", "../common/Shapes/Serialize.js",
...@@ -106,7 +107,6 @@ ...@@ -106,7 +107,6 @@
"../word/Editor/Field.js", "../word/Editor/Field.js",
"../word/Editor/Run.js", "../word/Editor/Run.js",
"../word/Editor/Math.js", "../word/Editor/Math.js",
"../word/Editor/Paragraph.js",
"../word/Editor/Paragraph_Recalculate.js", "../word/Editor/Paragraph_Recalculate.js",
"../word/Editor/Sections.js", "../word/Editor/Sections.js",
"../word/Editor/Numbering.js", "../word/Editor/Numbering.js",
......
...@@ -921,6 +921,10 @@ var changestype_2_Element_and_Type = 4; // Проверяем возмож ...@@ -921,6 +921,10 @@ var changestype_2_Element_and_Type = 4; // Проверяем возмож
var changestype_2_ElementsArray_and_Type = 5; // Аналогично предыдущему, только идет массив элементов var changestype_2_ElementsArray_and_Type = 5; // Аналогично предыдущему, только идет массив элементов
var changestype_2_AdditionalTypes = 6; // Дополнительные проверки типа 1 var changestype_2_AdditionalTypes = 6; // Дополнительные проверки типа 1
var comments_NoComment = 0;
var comments_NonActiveComment = 1;
var comments_ActiveComment = 2;
var contentchanges_Add = 1; var contentchanges_Add = 1;
var contentchanges_Remove = 2; var contentchanges_Remove = 2;
...@@ -1466,5 +1470,9 @@ var offlineMode = '_offline_'; ...@@ -1466,5 +1470,9 @@ var offlineMode = '_offline_';
window["AscCommon"].contentchanges_Add = contentchanges_Add; window["AscCommon"].contentchanges_Add = contentchanges_Add;
window["AscCommon"].contentchanges_Remove = contentchanges_Remove; window["AscCommon"].contentchanges_Remove = contentchanges_Remove;
window["AscCommon"].comments_NoComment = comments_NoComment;
window["AscCommon"].comments_NonActiveComment = comments_NonActiveComment;
window["AscCommon"].comments_ActiveComment = comments_ActiveComment;
window["AscCommon"].offlineMode = offlineMode; window["AscCommon"].offlineMode = offlineMode;
})(window); })(window);
...@@ -14344,7 +14344,7 @@ function CParagraphDrawStateHightlights() ...@@ -14344,7 +14344,7 @@ function CParagraphDrawStateHightlights()
this.DrawComments = true; this.DrawComments = true;
this.Comments = []; this.Comments = [];
this.CommentsFlag = comments_NoComment; this.CommentsFlag = AscCommon.comments_NoComment;
this.SearchCounter = 0; this.SearchCounter = 0;
...@@ -14437,14 +14437,14 @@ CParagraphDrawStateHightlights.prototype = ...@@ -14437,14 +14437,14 @@ CParagraphDrawStateHightlights.prototype =
var CommLen = this.Comments.length; var CommLen = this.Comments.length;
// Сначала проверим есть ли вообще комментарии // Сначала проверим есть ли вообще комментарии
this.CommentsFlag = ( CommLen > 0 ? comments_NonActiveComment : comments_NoComment ); this.CommentsFlag = ( CommLen > 0 ? AscCommon.comments_NonActiveComment : AscCommon.comments_NoComment );
// Проверим является ли какой-либо комментарий активным // Проверим является ли какой-либо комментарий активным
for ( var CurPos = 0; CurPos < CommLen; CurPos++ ) for ( var CurPos = 0; CurPos < CommLen; CurPos++ )
{ {
if ( CurComment === this.Comments[CurPos] ) if ( CurComment === this.Comments[CurPos] )
{ {
this.CommentsFlag = comments_ActiveComment; this.CommentsFlag = AscCommon.comments_ActiveComment;
break break
} }
} }
......
...@@ -34,10 +34,6 @@ ...@@ -34,10 +34,6 @@
var g_oTableId = AscCommon.g_oTableId; var g_oTableId = AscCommon.g_oTableId;
var History = AscCommon.History; var History = AscCommon.History;
var comments_NoComment = 0;
var comments_NonActiveComment = 1;
var comments_ActiveComment = 2;
function ParaComment(Start, Id) function ParaComment(Start, Id)
{ {
this.Id = AscCommon.g_oIdCounter.Get_NewId(); this.Id = AscCommon.g_oIdCounter.Get_NewId();
......
...@@ -559,10 +559,6 @@ function CComment(Parent, Data) ...@@ -559,10 +559,6 @@ function CComment(Parent, Data)
g_oTableId.Add( this, this.Id ); g_oTableId.Add( this, this.Id );
} }
var comments_NoComment = 0;
var comments_NonActiveComment = 1;
var comments_ActiveComment = 2;
function CComments() function CComments()
{ {
this.Id = AscCommon.g_oIdCounter.Get_NewId(); this.Id = AscCommon.g_oIdCounter.Get_NewId();
......
...@@ -2672,7 +2672,7 @@ ParaMath.prototype.Draw_HighLights = function(PDSH) ...@@ -2672,7 +2672,7 @@ ParaMath.prototype.Draw_HighLights = function(PDSH)
var CommentsFlag = PDSH.CommentsFlag; var CommentsFlag = PDSH.CommentsFlag;
var Bounds = this.Root.Get_LineBound(PDSH.Line, PDSH.Range); var Bounds = this.Root.Get_LineBound(PDSH.Line, PDSH.Range);
Comm.Add(Bounds.Y, Bounds.Y + Bounds.H, Bounds.X, Bounds.X + Bounds.W, 0, 0, 0, 0, { Active : CommentsFlag === comments_ActiveComment ? true : false, CommentId : CommentId } ); Comm.Add(Bounds.Y, Bounds.Y + Bounds.H, Bounds.X, Bounds.X + Bounds.W, 0, 0, 0, 0, { Active : CommentsFlag === AscCommon.comments_ActiveComment ? true : false, CommentId : CommentId } );
} }
if (null !== CollFirst) if (null !== CollFirst)
......
...@@ -4283,8 +4283,8 @@ ParaRun.prototype.Draw_HighLights = function(PDSH) ...@@ -4283,8 +4283,8 @@ ParaRun.prototype.Draw_HighLights = function(PDSH)
if ( para_Drawing === ItemType && !Item.Is_Inline() ) if ( para_Drawing === ItemType && !Item.Is_Inline() )
break; break;
if ( CommentsFlag != comments_NoComment ) if ( CommentsFlag != AscCommon.comments_NoComment )
aComm.Add( Y0, Y1, X, X + ItemWidthVisible, 0, 0, 0, 0, { Active : CommentsFlag === comments_ActiveComment ? true : false, CommentId : CommentId } ); aComm.Add( Y0, Y1, X, X + ItemWidthVisible, 0, 0, 0, 0, { Active : CommentsFlag === AscCommon.comments_ActiveComment ? true : false, CommentId : CommentId } );
else if ( highlight_None != HighLight ) else if ( highlight_None != HighLight )
aHigh.Add( Y0, Y1, X, X + ItemWidthVisible, 0, HighLight.r, HighLight.g, HighLight.b, undefined, HighLight ); aHigh.Add( Y0, Y1, X, X + ItemWidthVisible, 0, HighLight.r, HighLight.g, HighLight.b, undefined, HighLight );
...@@ -4303,8 +4303,8 @@ ParaRun.prototype.Draw_HighLights = function(PDSH) ...@@ -4303,8 +4303,8 @@ ParaRun.prototype.Draw_HighLights = function(PDSH)
// Пробелы в конце строки (и строку состоящую из пробелов) не подчеркиваем, не зачеркиваем и не выделяем // Пробелы в конце строки (и строку состоящую из пробелов) не подчеркиваем, не зачеркиваем и не выделяем
if ( PDSH.Spaces > 0 ) if ( PDSH.Spaces > 0 )
{ {
if ( CommentsFlag != comments_NoComment ) if ( CommentsFlag != AscCommon.comments_NoComment )
aComm.Add( Y0, Y1, X, X + ItemWidthVisible, 0, 0, 0, 0, { Active : CommentsFlag === comments_ActiveComment ? true : false, CommentId : CommentId } ); aComm.Add( Y0, Y1, X, X + ItemWidthVisible, 0, 0, 0, 0, { Active : CommentsFlag === AscCommon.comments_ActiveComment ? true : false, CommentId : CommentId } );
else if ( highlight_None != HighLight ) else if ( highlight_None != HighLight )
aHigh.Add( Y0, Y1, X, X + ItemWidthVisible, 0, HighLight.r, HighLight.g, HighLight.b, undefined, HighLight ); aHigh.Add( Y0, Y1, X, X + ItemWidthVisible, 0, HighLight.r, HighLight.g, HighLight.b, undefined, HighLight );
......
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