Commit 1207aec9 authored by Ilya Kirillov's avatar Ilya Kirillov

Modified function which applying changes on the server side.

parent f38c35c7
...@@ -8209,11 +8209,10 @@ background-repeat: no-repeat;\ ...@@ -8209,11 +8209,10 @@ background-repeat: no-repeat;\
var stream = new AscCommon.FT_Stream2(data, data.length); var stream = new AscCommon.FT_Stream2(data, data.length);
stream.obj = null; stream.obj = null;
var Loader = {Reader : stream, Reader2 : null};
var _color = new AscCommonWord.CDocumentColor(191, 255, 199); var _color = new AscCommonWord.CDocumentColor(191, 255, 199);
// Применяем изменения, пока они есть // Применяем изменения, пока они есть
var _count = Loader.Reader.GetLong(); var _count = stream.GetLong();
var _pos = 4; var _pos = 4;
for (var i = 0; i < _count; i++) for (var i = 0; i < _count; i++)
...@@ -8224,30 +8223,41 @@ background-repeat: no-repeat;\ ...@@ -8224,30 +8223,41 @@ background-repeat: no-repeat;\
break; break;
} }
var _len = Loader.Reader.GetLong(); var nChangeLen = stream.GetLong();
_pos += 4; _pos += 4;
stream.size = _pos + _len; stream.size = _pos + nChangeLen;
var _id = Loader.Reader.GetString2(); var ClassId = stream.GetString2();
var _read_pos = Loader.Reader.GetCurPos(); var Class = AscCommon.g_oTableId.Get_ById(ClassId);
var Type = Loader.Reader.GetLong(); var nReaderPos = stream.GetCurPos();
var Class = null; var nChangeType = stream.GetLong();
if (AscDFH.historyitem_type_HdrFtr === Type) if (Class)
{ {
Class = editor.WordControl.m_oLogicDocument.HdrFtr; var fChangesClass = AscDFH.changesFactory[nChangeType];
} if (fChangesClass)
else {
Class = g_oTableId.Get_ById(_id); var oChange = new fChangesClass(Class);
oChange.ReadFromBinary(stream);
stream.Seek(_read_pos); if (true === AscCommon.CollaborativeEditing.private_AddOverallChange(oChange))
stream.Seek2(_read_pos); oChange.Load(_color);
if (null != Class) return true;
Class.Load_Changes(Loader.Reader, Loader.Reader2, _color); }
else
{
AscCommon.CollaborativeEditing.private_AddOverallChange(data);
stream.Seek(nReaderPos);
stream.Seek2(nReaderPos);
Class.Load_Changes(stream, null, _color);
}
}
_pos += _len; _pos += nChangeLen;
stream.Seek2(_pos); stream.Seek2(_pos);
stream.size = data.length; stream.size = data.length;
} }
......
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