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

Исправлен баг с локами в совместном редактировании.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51295 954022d7-b5bf-4e40-9824-e11837661b57
parent 77d17720
......@@ -636,6 +636,32 @@ function CCollaborativeEditing()
}
}
this.Release_Locks();
var UnlockCount2 = this.m_aNeedUnlock2.length;
for ( var Index = 0; Index < UnlockCount2; Index++ )
{
var Class = this.m_aNeedUnlock2[Index];
Class.Lock.Set_Type( locktype_None, false);
editor.CoAuthoringApi.releaseLocks( Class.Get_Id() );
}
this.m_aNeedUnlock.length = 0;
this.m_aNeedUnlock2.length = 0;
editor.CoAuthoringApi.saveChanges(aChanges);
// Чистим Undo/Redo
History.Clear();
editor.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
editor.WordControl.m_oLogicDocument.Document_UpdateUndoRedoState();
editor.WordControl.m_oLogicDocument.DrawingDocument.ClearCachePages();
editor.WordControl.m_oLogicDocument.DrawingDocument.FirePaint();
};
this.Release_Locks = function()
{
var UnlockCount = this.m_aNeedUnlock.length;
for ( var Index = 0; Index < UnlockCount; Index++ )
{
......@@ -658,27 +684,6 @@ function CCollaborativeEditing()
this.m_aNeedUnlock[Index].Lock.Set_Type( locktype_Other, false);
}
}
var UnlockCount2 = this.m_aNeedUnlock2.length;
for ( var Index = 0; Index < UnlockCount2; Index++ )
{
var Class = this.m_aNeedUnlock2[Index];
Class.Lock.Set_Type( locktype_None, false);
editor.CoAuthoringApi.releaseLocks( Class.Get_Id() );
}
this.m_aNeedUnlock.length = 0;
this.m_aNeedUnlock2.length = 0;
editor.CoAuthoringApi.saveChanges(aChanges);
// Чистим Undo/Redo
History.Clear();
editor.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
editor.WordControl.m_oLogicDocument.Document_UpdateUndoRedoState();
editor.WordControl.m_oLogicDocument.DrawingDocument.ClearCachePages();
editor.WordControl.m_oLogicDocument.DrawingDocument.FirePaint();
};
this.OnStart_Load_Objects = function()
......
......@@ -6120,6 +6120,7 @@ asc_docs_api.prototype.OpenDocumentEndCallback = function()
var Document = this.WordControl.m_oLogicDocument;
CollaborativeEditing.Apply_Changes();
CollaborativeEditing.Release_Locks();
//Recalculate HdrFtr
if(Document.HdrFtr && Document.HdrFtr.Content && Document.HdrFtr.Content.length > 0 && Document.HdrFtr.Content[0].Header)
......
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