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

Поправлен баг с заменой неправильно набранного слова (баг 25158). Исправлен...

Поправлен баг с заменой неправильно набранного слова (баг 25158). Исправлен баг с подсветкой изменений после обновления страницы (баг 25156). Сделана возможность отключать подстветку изменений (баг 25155).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57092 954022d7-b5bf-4e40-9824-e11837661b57
parent dd8ab7f9
......@@ -12530,7 +12530,7 @@ Paragraph.prototype =
var Len = Word.length;
for ( var Pos = 0; Pos < Len; Pos++ )
{
Class.Add_ToContent( RunPos + Pos, new ParaText(Word[Pos]) );
Class.Add_ToContent( RunPos + Pos, ( 0x0020 === Word.charCodeAt(Pos) ? new ParaSpace() : new ParaText(Word[Pos]) ) );
}
// Удалим старое слово
......
......@@ -6278,13 +6278,16 @@ ParaRun.prototype =
var Element = ParagraphContent_Read_FromBinary(Reader);
if ( null != Element )
{
if (null !== Color)
{
this.CollaborativeMarks.Update_OnAdd( Pos );
this.CollaborativeMarks.Add( Pos, Pos + 1, Color );
this.Content.splice( Pos, 0, Element );
CollaborativeEditing.Add_ChangedClass(this);
}
this.Content.splice( Pos, 0, Element );
}
}
this.RecalcInfo.Measure = true;
......
......@@ -716,7 +716,15 @@ asc_docs_api.prototype.LoadFontsFromServer = function(_fonts)
asc_docs_api.prototype.SetCollaborativeMarksShowType = function(Type)
{
if (c_oAscCollaborativeMarksShowType.None !== this.CollaborativeMarksShowType && c_oAscCollaborativeMarksShowType.None === Type)
{
this.CollaborativeMarksShowType = Type;
CollaborativeEditing.Clear_CollaborativeMarks(true);
}
else
{
this.CollaborativeMarksShowType = Type;
}
};
asc_docs_api.prototype.GetCollaborativeMarksShowType = function(Type)
......@@ -1553,11 +1561,14 @@ asc_docs_api.prototype._coAuthoringInit = function()
CollaborativeEditing.Remove_NeedLock(Id);
}
};
this.CoAuthoringApi.onSaveChanges = function (e, userId, bSendEvent)
this.CoAuthoringApi.onSaveChanges = function (e, userId, bSendEvent, bUseColor)
{
if (editor.CollaborativeMarksShowType === c_oAscCollaborativeMarksShowType.None)
bUseColor = false;
var oUser = t.CoAuthoringApi.getUser(userId);
var nColor = oUser ? oUser.asc_getColorValue() : null;
var oColor = null !== nColor ? new CDocumentColor( (nColor >> 16) & 0xFF, (nColor >> 8) & 0xFF, nColor & 0xFF ) : new CDocumentColor( 191, 255, 199 );
var oColor = false === bUseColor ? null : (null !== nColor ? new CDocumentColor( (nColor >> 16) & 0xFF, (nColor >> 8) & 0xFF, nColor & 0xFF ) : new CDocumentColor( 191, 255, 199 ));
t._coAuthoringSetChanges(e, oColor);
var Count = e.length;
......@@ -1567,7 +1578,7 @@ asc_docs_api.prototype._coAuthoringInit = function()
};
this.CoAuthoringApi.onFirstLoadChanges = function (e, userId)
{
t.CoAuthoringApi.onSaveChanges(e, userId, false);
t.CoAuthoringApi.onSaveChanges(e, userId, false, (-1 === CollaborativeEditing.m_nUseType ? true : false));
//CollaborativeEditing.Apply_Changes();
};
this.CoAuthoringApi.onFirstLoadChangesEnd = function () {
......@@ -2748,7 +2759,8 @@ function OnSave_Callback2(e)
CollaborativeEditing.Clear_CollaborativeMarks();
// Принимаем чужие изменения
safe_Apply_Changes();
//safe_Apply_Changes();
CollaborativeEditing.Apply_Changes();
// Пересылаем свои изменения
CollaborativeEditing.Send_Changes();
......@@ -2758,7 +2770,7 @@ function OnSave_Callback2(e)
editor.canSave = true;
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save);
editor.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.Save);
// Снимаем лок с функции сохранения на сервере
editor.CoAuthoringApi.unSaveChanges();
......
......@@ -212,6 +212,7 @@ var c_oAscMouseMoveLockedObjectType = {
};
var c_oAscCollaborativeMarksShowType = {
None : -1,
All : 0,
LastChanges : 1
};
......
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