Commit 8db2fd76 authored by Ilya Kirillov's avatar Ilya Kirillov

Changes for CTableId were reworked into a new classes. File...

Changes for CTableId were reworked into a new classes. File "Format/Constants.js" was replaced with "HistoryCommon.js" in the parent "common" directory.
parent 208acf31
...@@ -16,12 +16,14 @@ ...@@ -16,12 +16,14 @@
"../common/downloaderfiles.js", "../common/downloaderfiles.js",
"../common/commonDefines.js", "../common/commonDefines.js",
"../common/editorscommon.js", "../common/editorscommon.js",
"../common/Private/editorscommon.js", "../common/HistoryCommon.js",
"../common/TableId.js",
"../common/TableIdChanges.js",
"../common/Private/editorscommon.js",
"../common/Shapes/Serialize.js", "../common/Shapes/Serialize.js",
"../common/Shapes/SerializeWriter.js", "../common/Shapes/SerializeWriter.js",
"../common/SerializeCommonWordExcel.js", "../common/SerializeCommonWordExcel.js",
"../common/SerializeChart.js", "../common/SerializeChart.js",
"../common/Drawings/Format/Constants.js",
"../common/Drawings/Format/Format.js", "../common/Drawings/Format/Format.js",
"../common/FontsFreeType/font_map.js", "../common/FontsFreeType/font_map.js",
......
...@@ -9,7 +9,10 @@ ...@@ -9,7 +9,10 @@
"../common/apiCommon.js", "../common/apiCommon.js",
"../common/SerializeCommonWordExcel.js", "../common/SerializeCommonWordExcel.js",
"../common/editorscommon.js", "../common/editorscommon.js",
"../common/AdvancedOptions.js", "../common/HistoryCommon.js",
"../common/TableId.js",
"../common/TableIdChanges.js",
"../common/AdvancedOptions.js",
"../cell/apiDefines.js", "../cell/apiDefines.js",
"../cell/utils/utils.js", "../cell/utils/utils.js",
"../cell/view/HandlerList.js", "../cell/view/HandlerList.js",
...@@ -42,7 +45,6 @@ ...@@ -42,7 +45,6 @@
"../common/Drawings/ArcTo.js", "../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js", "../common/Drawings/ColorArray.js",
"../common/Drawings/Format/Constants.js",
"../common/Drawings/CommonController.js", "../common/Drawings/CommonController.js",
"../common/Drawings/States.js", "../common/Drawings/States.js",
"../common/Drawings/Format/CreateGeometry.js", "../common/Drawings/Format/CreateGeometry.js",
......
...@@ -9,7 +9,10 @@ ...@@ -9,7 +9,10 @@
"../common/apiCommon.js", "../common/apiCommon.js",
"../common/SerializeCommonWordExcel.js", "../common/SerializeCommonWordExcel.js",
"../common/editorscommon.js", "../common/editorscommon.js",
"../common/AdvancedOptions.js", "../common/HistoryCommon.js",
"../common/TableId.js",
"../common/TableIdChanges.js",
"../common/AdvancedOptions.js",
"../slide/apiDefines.js", "../slide/apiDefines.js",
"../common/CollaborativeEditingBase.js", "../common/CollaborativeEditingBase.js",
"../slide/Editor/CollaborativeEditing.js", "../slide/Editor/CollaborativeEditing.js",
...@@ -41,7 +44,6 @@ ...@@ -41,7 +44,6 @@
"../common/Drawings/ArcTo.js", "../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js", "../common/Drawings/ColorArray.js",
"../common/Drawings/Format/Constants.js",
"../common/Drawings/CommonController.js", "../common/Drawings/CommonController.js",
"../common/Drawings/States.js", "../common/Drawings/States.js",
"../common/Drawings/Format/CreateGeometry.js", "../common/Drawings/Format/CreateGeometry.js",
......
...@@ -12,7 +12,10 @@ ...@@ -12,7 +12,10 @@
"../common/apiCommon.js", "../common/apiCommon.js",
"../common/SerializeCommonWordExcel.js", "../common/SerializeCommonWordExcel.js",
"../common/editorscommon.js", "../common/editorscommon.js",
"../common/AdvancedOptions.js", "../common/HistoryCommon.js",
"../common/TableId.js",
"../common/TableIdChanges.js",
"../common/AdvancedOptions.js",
"../word/apiDefines.js", "../word/apiDefines.js",
"../common/CollaborativeEditingBase.js", "../common/CollaborativeEditingBase.js",
"../word/Editor/CollaborativeEditing.js", "../word/Editor/CollaborativeEditing.js",
...@@ -44,7 +47,6 @@ ...@@ -44,7 +47,6 @@
"../common/Drawings/ArcTo.js", "../common/Drawings/ArcTo.js",
"../common/Drawings/ColorArray.js", "../common/Drawings/ColorArray.js",
"../common/Drawings/Format/Constants.js",
"../common/Drawings/CommonController.js", "../common/Drawings/CommonController.js",
"../word/Editor/GraphicObjects/DrawingStates.js", "../word/Editor/GraphicObjects/DrawingStates.js",
"../common/Drawings/Format/CreateGeometry.js", "../common/Drawings/Format/CreateGeometry.js",
......
/* /*
* (c) Copyright Ascensio System SIA 2010-2016 * (c) Copyright Ascensio System SIA 2010-2016
* *
* This program is a free software product. You can redistribute it and/or * This program is a free software product. You can redistribute it and/or
...@@ -32,6 +32,12 @@ ...@@ -32,6 +32,12 @@
"use strict"; "use strict";
/**
* User: Ilja.Kirillov
* Date: 27.10.2016
* Time: 12:11
*/
(/** (/**
* @param {Window} window * @param {Window} window
* @param {undefined} undefined * @param {undefined} undefined
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -105,58 +105,55 @@ CHistory.prototype = ...@@ -105,58 +105,55 @@ CHistory.prototype =
this.FileSize = nSize; this.FileSize = nSize;
}, },
Update_PointInfoItem : function(PointIndex, StartPoint, LastPoint, SumIndex, DeletedIndex) Update_PointInfoItem : function(PointIndex, StartPoint, LastPoint, SumIndex, DeletedIndex)
{ {
var Point = this.Points[PointIndex]; var Point = this.Points[PointIndex];
if (Point) if (Point)
{ {
// Проверяем первое изменение. Если оно уже нужного типа, тогда мы его удаляем. Добавляем специфическое // Проверяем первое изменение. Если оно уже нужного типа, тогда мы его удаляем. Добавляем специфическое
// первое изменение с описанием. // первое изменение с описанием.
var Class = AscCommon.g_oTableId; var Class = AscCommon.g_oTableId;
if (Point.Items.length > 0) if (Point.Items.length > 0)
{ {
var FirstItem = Point.Items[0]; var FirstItem = Point.Items[0];
if (FirstItem.Class === Class && AscDFH.historyitem_TableId_Description === FirstItem.Data.Type) if (FirstItem.Class === Class && AscDFH.historyitem_TableId_Description === FirstItem.Data.Type)
Point.Items.splice(0, 1); Point.Items.splice(0, 1);
} }
var Data = var Data = new AscCommon.CChangesTableIdDescription(Class,
{ this.FileCheckSum,
Type : AscDFH.historyitem_TableId_Description, this.FileSize,
FileCheckSum : this.FileCheckSum, Point.Description,
FileSize : this.FileSize, Point.Items.length,
Description : Point.Description, PointIndex,
ItemsCount : Point.Items.length, StartPoint,
PointIndex : PointIndex, LastPoint,
StartPoint : StartPoint, SumIndex,
LastPoint : LastPoint, DeletedIndex
SumIndex : SumIndex, );
DeletedIndex : DeletedIndex
}; var Binary_Pos = this.BinaryWriter.GetCurPosition();
this.BinaryWriter.WriteString2(Class.Get_Id());
var Binary_Pos = this.BinaryWriter.GetCurPosition(); this.BinaryWriter.WriteLong(Data.Type);
this.BinaryWriter.WriteString2(Class.Get_Id()); Data.WriteToBinary(this.BinaryWriter);
Class.Save_Changes(Data, this.BinaryWriter);
var Binary_Len = this.BinaryWriter.GetCurPosition() - Binary_Pos;
var Item =
{
Class : Class,
Data : Data,
Binary:
{
Pos : Binary_Pos,
Len : Binary_Len
},
NeedRecalc : false var Binary_Len = this.BinaryWriter.GetCurPosition() - Binary_Pos;
};
Point.Items.splice(0, 0, Item); var Item = {
} Class : Class,
}, Data : Data,
Binary : {
Pos : Binary_Pos,
Len : Binary_Len
},
NeedRecalc : false
};
Point.Items.splice(0, 0, Item);
}
},
Is_Clear : function() Is_Clear : 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