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 = ...@@ -348,10 +348,11 @@ CHistory.prototype =
this.TurnOn(); this.TurnOn();
bNeedOff = true; bNeedOff = true;
} }
if(Class)
this.Add(Class, Type, sheetid, range, Data, LocalChange); this.Add(Class, Type, sheetid, range, Data, LocalChange);
if(bNeedOff) if(bNeedOff)
this.TurnOff(); this.TurnOff();
if(!Class.Load_Changes) if(Class && !Class.Load_Changes)
{ {
Class.Redo( Type, Data, sheetid ); Class.Redo( Type, Data, sheetid );
} }
...@@ -361,7 +362,14 @@ CHistory.prototype = ...@@ -361,7 +362,14 @@ CHistory.prototype =
Class.Redo(Data); Class.Redo(Data);
else else
{ {
Data.oBinaryReader.Seek(Data.nPos); 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)); Class.Load_Changes(Data.oBinaryReader, null, new CDocumentColor(255, 255, 255));
} }
} }
......
...@@ -19,6 +19,7 @@ function DrawingCollaborativeData() ...@@ -19,6 +19,7 @@ function DrawingCollaborativeData()
this.oClass = null; this.oClass = null;
this.oBinaryReader = null; this.oBinaryReader = null;
this.nPos = null; this.nPos = null;
this.sChangedObjectId = null;
this.isDrawingCollaborativeData = true; this.isDrawingCollaborativeData = true;
} }
//главный обьект для пересылки изменений //главный обьект для пересылки изменений
...@@ -246,15 +247,13 @@ UndoRedoItemSerializable.prototype = { ...@@ -246,15 +247,13 @@ UndoRedoItemSerializable.prototype = {
{ {
var changedObjectId = oBinaryReader.GetString2(); var changedObjectId = oBinaryReader.GetString2();
var changedObject = g_oTableId.Get_ById(changedObjectId); var changedObject = g_oTableId.Get_ById(changedObjectId);
if(changedObject)
{
this.nActionType = 1; this.nActionType = 1;
this.oClass = changedObject; this.oClass = changedObject;
this.oData = new DrawingCollaborativeData(); this.oData = new DrawingCollaborativeData();
this.oData.oClass = changedObject; this.oData.oClass = changedObject;
this.oData.sChangedObjectId = changedObjectId;
this.oData.oBinaryReader = oBinaryReader; this.oData.oBinaryReader = oBinaryReader;
this.oData.nPos = oBinaryReader.pos; this.oData.nPos = oBinaryReader.cur;
}
} }
}, },
DeserializeData : function(oBinaryReader) DeserializeData : function(oBinaryReader)
......
...@@ -1789,7 +1789,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){ ...@@ -1789,7 +1789,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){
for (var i = 0, length = aUndoRedoElems.length; i < length; ++i) for (var i = 0, length = aUndoRedoElems.length; i < length; ++i)
{ {
var item = aUndoRedoElems[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) if (g_oUndoRedoWorkbook == item.oClass && historyitem_Workbook_SheetPositions == item.nActionType)
oHistoryPositions = item; oHistoryPositions = item;
else { 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