Commit 39040ac3 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг с автосохранением и передвижением границы таблицы (баг 28972).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61718 954022d7-b5bf-4e40-9824-e11837661b57
parent ace1be81
......@@ -410,26 +410,60 @@ function CTableId()
// Long : SumIndex
// Long : DeletedIndex
// var FileCheckSum = Reader.GetLong();
// var FileSize = Reader.GetLong();
// var Description = Reader.GetLong();
// var ItemsCount = Reader.GetLong();
// var PointIndex = Reader.GetLong();
// var StartPoint = Reader.GetLong();
// var LastPoint = Reader.GetLong();
// var SumIndex = Reader.GetLong();
// var DeletedIndex = Reader.GetLong();
var FileCheckSum = Reader.GetLong();
var FileSize = Reader.GetLong();
var Description = Reader.GetLong();
var ItemsCount = Reader.GetLong();
var PointIndex = Reader.GetLong();
var StartPoint = Reader.GetLong();
var LastPoint = Reader.GetLong();
var SumIndex = Reader.GetLong();
var DeletedIndex = Reader.GetLong();
// // CollaborativeEditing LOG
// console.log("ItemsCount2 " + CollaborativeEditing.m_nErrorLog_PointChangesCount);
// if (CollaborativeEditing.m_nErrorLog_PointChangesCount !== CollaborativeEditing.m_nErrorLog_SavedPCC)
// console.log("========================= BAD Changes Count in Point =============================");
//
// if (CollaborativeEditing.m_nErrorLog_CurPointIndex + 1 !== PointIndex && 0 !== PointIndex)
// console.log("========================= BAD Point index ========================================");
//
// var bBadSumIndex = false;
// if (0 === PointIndex)
// {
// CollaborativeEditing.m_nErrorLog_SumIndex = 0;
// }
// else
// {
// CollaborativeEditing.m_nErrorLog_SumIndex += CollaborativeEditing.m_nErrorLog_SavedPCC + 1; // Потому что мы не учитываем данное изменение
// if (PointIndex === StartPoint)
// {
// if (CollaborativeEditing.m_nErrorLog_SumIndex !== SumIndex)
// bBadSumIndex = true;
//
// console.log("SumIndex2 " + CollaborativeEditing.m_nErrorLog_SumIndex);
// CollaborativeEditing.m_nErrorLog_SumIndex = SumIndex;
// }
// }
//
// console.log("----------------------------");
// console.log("FileCheckSum " + FileCheckSum);
// console.log("FileSize " + FileSize);
// console.log("Description " + Description + " " + Get_HistoryPointStringDescription(Description));
// console.log("ItemsCount " + ItemsCount);
// console.log("PointIndex " + PointIndex);
// console.log("StartPoint " + StartPoint);
// console.log("LastPoint " + LastPoint);
// console.log("ItemsCount " + ItemsCount);
// console.log("SumIndex " + SumIndex);
// console.log("DeletedIndex " + (-10 === DeletedIndex ? null : DeletedIndex));
//
// // -1 Чтобы не учитывалось данное изменение
// CollaborativeEditing.m_nErrorLog_SavedPCC = ItemsCount;
// CollaborativeEditing.m_nErrorLog_PointChangesCount = -1;
// CollaborativeEditing.m_nErrorLog_CurPointIndex = PointIndex;
//
// if (bBadSumIndex)
// console.log("========================= BAD Sum index ==========================================");
break;
}
......@@ -666,6 +700,12 @@ function CCollaborativeEditing()
this.m_oMemory = new CMemory(); // Глобальные класс для сохранения
// // CollaborativeEditing LOG
// this.m_nErrorLog_PointChangesCount = 0;
// this.m_nErrorLog_SavedPCC = 0;
// this.m_nErrorLog_CurPointIndex = -1;
// this.m_nErrorLog_SumIndex = 0;
var oThis = this;
this.Is_SingleUser = function()
......@@ -745,6 +785,8 @@ function CCollaborativeEditing()
var Changes = this.m_aChanges[i];
Changes.Apply_Data();
// // CollaborativeEditing LOG
// this.m_nErrorLog_PointChangesCount++;
}
this.m_aChanges = [];
......
......@@ -9291,10 +9291,10 @@ CDocument.prototype =
if ( e.KeyCode == 8 && false === editor.isViewMode ) // BackSpace
{
if ( false === this.Document_Is_SelectionLocked(changestype_Remove) )
if (false === this.Document_Is_SelectionLocked(changestype_Remove))
{
this.Create_NewHistoryPoint(historydescription_Document_BackSpaceButton);
this.Remove( -1, true );
this.Remove(-1, true);
}
bRetValue = true;
}
......@@ -10326,16 +10326,6 @@ CDocument.prototype =
if ( true === this.History.Is_ExtendDocumentToPos() )
this.Document_Undo();
// Если мы двигаем границу таблицы, тогда создаем новую точку для отката.
var Table = this.Is_TableBorder( X, Y, PageIndex );
if ( null != Table )
{
if ( true === editor.isViewMode || true === this.Document_Is_SelectionLocked(changestype_None, { Type : changestype_2_Element_and_Type, Element : Table, CheckType : changestype_Table_Properties } ) )
return;
this.Create_NewHistoryPoint(historydescription_Document_MoveTableBorder);
}
var OldCurPage = this.CurPage;
this.CurPage = PageIndex;
......@@ -14551,6 +14541,10 @@ CDocument.prototype.Get_EditingType = function()
{
return this.EditingType;
};
CDocument.prototype.Set_EditingType = function(EditingType)
{
this.EditingType = EditingType;
};
CDocument.prototype.Start_SilentMode = function()
{
this.TurnOff_Recalculate();
......
......@@ -403,12 +403,18 @@ Paragraph.prototype =
Get_Theme: function()
{
return this.Parent.Get_Theme();
if (this.Parent)
return this.Parent.Get_Theme();
return null;
},
Get_ColorMap: function()
{
return this.Parent.Get_ColorMap();
if (this.Parent)
return this.Parent.Get_ColorMap();
return null;
},
Reset : function (X,Y, XLimit, YLimit, PageNum)
......
This diff is collapsed.
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