Commit 9524a851 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Bug 24960 - [CoEdit] Второй пользователь не получает отправленный на сервер графический объект

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56945 954022d7-b5bf-4e40-9824-e11837661b57
parent 201f9752
......@@ -348,10 +348,11 @@ CHistory.prototype =
this.TurnOn();
bNeedOff = true;
}
this.Add(Class, Type, sheetid, range, Data, LocalChange);
if(Class)
this.Add(Class, Type, sheetid, range, Data, LocalChange);
if(bNeedOff)
this.TurnOff();
if(!Class.Load_Changes)
if(Class && !Class.Load_Changes)
{
Class.Redo( Type, Data, sheetid );
}
......@@ -361,8 +362,15 @@ CHistory.prototype =
Class.Redo(Data);
else
{
Data.oBinaryReader.Seek(Data.nPos);
Class.Load_Changes(Data.oBinaryReader, null, new CDocumentColor(255, 255, 255));
Data.oBinaryReader.Seek2(Data.nPos);
if(!Class)
{
Class = g_oTableId.Get_ById(Data.sChangedObjectId);
if(Class)
this.Add(Class, Type, sheetid, range, Data, LocalChange);
}
if(Class)
Class.Load_Changes(Data.oBinaryReader, null, new CDocumentColor(255, 255, 255));
}
}
this._addRedoObjectParam(oRedoObjectParam, this.CurPoint.Items[this.CurPoint.Items.length - 1]);
......
......@@ -19,6 +19,7 @@ function DrawingCollaborativeData()
this.oClass = null;
this.oBinaryReader = null;
this.nPos = null;
this.sChangedObjectId = null;
this.isDrawingCollaborativeData = true;
}
//главный обьект для пересылки изменений
......@@ -246,15 +247,13 @@ UndoRedoItemSerializable.prototype = {
{
var changedObjectId = oBinaryReader.GetString2();
var changedObject = g_oTableId.Get_ById(changedObjectId);
if(changedObject)
{
this.nActionType = 1;
this.oClass = changedObject;
this.oData = new DrawingCollaborativeData();
this.oData.oClass = changedObject;
this.oData.oBinaryReader = oBinaryReader;
this.oData.nPos = oBinaryReader.pos;
}
this.nActionType = 1;
this.oClass = changedObject;
this.oData = new DrawingCollaborativeData();
this.oData.oClass = changedObject;
this.oData.sChangedObjectId = changedObjectId;
this.oData.oBinaryReader = oBinaryReader;
this.oData.nPos = oBinaryReader.cur;
}
},
DeserializeData : function(oBinaryReader)
......
......@@ -1789,7 +1789,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){
for (var i = 0, length = aUndoRedoElems.length; i < length; ++i)
{
var item = aUndoRedoElems[i];
if (null != item.oClass && null != item.nActionType) {
if ((null != item.oClass || (item.oData && typeof item.oData.sChangedObjectId === "string")) && null != item.nActionType) {
if (g_oUndoRedoWorkbook == item.oClass && historyitem_Workbook_SheetPositions == item.nActionType)
oHistoryPositions = item;
else {
......
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