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