Commit 0508e317 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #33841

parent d49b06c7
......@@ -1975,12 +1975,39 @@ CLock.prototype.Set_Type = function(NewType, Redraw)
this.Type = NewType;
if ( false != Redraw )
var oApi = editor;
var oLogicDocument = oApi.WordControl.m_oLogicDocument;
if (false != Redraw && oLogicDocument)
{
// TODO: переделать перерисовку тут
var DrawingDocument = editor.WordControl.m_oLogicDocument.DrawingDocument;
DrawingDocument.ClearCachePages();
DrawingDocument.FirePaint();
var oDrawingDocument = oLogicDocument.DrawingDocument;
oDrawingDocument.ClearCachePages();
oDrawingDocument.FirePaint();
// TODO: Обновлять интерфейс нужно, потому что мы можем стоять изначально в незалоченном объекте, а тут он
// может быть залочен.
var oRevisionsStack = oApi.asc_GetRevisionsChangesStack();
var arrParagraphs = [];
for (var nIndex = 0, nCount = oRevisionsStack.length; nIndex < nCount; ++nIndex)
{
arrParagraphs.push(oRevisionsStack[nIndex].get_Paragraph())
}
var bNeedUpdate = false;
for (var nIndex = 0, nCount = arrParagraphs.length; nIndex < nCount; ++nIndex)
{
if (arrParagraphs[nIndex].Get_Lock() === this)
{
bNeedUpdate = true;
break;
}
}
if (bNeedUpdate)
{
oLogicDocument.TrackRevisionsManager.Clear_VisibleChanges();
oLogicDocument.Document_UpdateInterfaceState(false);
}
}
};
CLock.prototype.Check = function(Id)
......
......@@ -8073,7 +8073,7 @@ CDocument.prototype.Document_UpdateInterfaceState = function(bSaveCurRevisionCha
this.Api.ClearPropObjCallback();
this.Controller.UpdateInterfaceState();
this.TrackRevisionsManager.End_CollectChanges(editor);
this.TrackRevisionsManager.End_CollectChanges(this.Api);
// Сообщаем, что список составлен
this.Api.sync_EndCatchSelectedElements();
......
......@@ -55,6 +55,10 @@ Asc['asc_docs_api'].prototype.sync_EndCatchRevisionsChanges = function()
{
this.sendEvent("asc_onShowRevisionsChange", this.RevisionChangesStack);
};
Asc['asc_docs_api'].prototype.asc_GetRevisionsChangesStack = function()
{
return this.RevisionChangesStack;
};
Asc['asc_docs_api'].prototype.sync_AddRevisionsChange = function(Change)
{
this.RevisionChangesStack.push(Change);
......
......@@ -1011,6 +1011,9 @@ background-repeat: no-repeat;\
{
var Lock = Class.Lock;
// Выставляем ID пользователя, залочившего данный элемент
Lock.Set_UserId(e["user"]);
var OldType = Class.Lock.Get_Type();
if (locktype_Other2 === OldType || locktype_Other3 === OldType)
{
......@@ -1021,9 +1024,6 @@ background-repeat: no-repeat;\
Lock.Set_Type(locktype_Other, true);
}
// Выставляем ID пользователя, залочившего данный элемент
Lock.Set_UserId(e["user"]);
if (Class instanceof AscCommonWord.CHeaderFooterController)
{
t.sync_LockHeaderFooters();
......@@ -6686,6 +6686,9 @@ background-repeat: no-repeat;\
asc_docs_api.prototype.sync_EndCatchRevisionsChanges = function()
{
};
asc_docs_api.prototype.asc_GetRevisionsChangesStack = function()
{
};
asc_docs_api.prototype.sync_AddRevisionsChange = function(Change)
{
};
......@@ -7828,6 +7831,7 @@ background-repeat: no-repeat;\
asc_docs_api.prototype['asc_IsTrackRevisions'] = asc_docs_api.prototype.asc_IsTrackRevisions;
asc_docs_api.prototype['sync_BeginCatchRevisionsChanges'] = asc_docs_api.prototype.sync_BeginCatchRevisionsChanges;
asc_docs_api.prototype['sync_EndCatchRevisionsChanges'] = asc_docs_api.prototype.sync_EndCatchRevisionsChanges;
asc_docs_api.prototype['asc_GetRevisionsChangesStack'] = asc_docs_api.prototype.asc_GetRevisionsChangesStack;
asc_docs_api.prototype['sync_AddRevisionsChange'] = asc_docs_api.prototype.sync_AddRevisionsChange;
asc_docs_api.prototype['asc_AcceptChanges'] = asc_docs_api.prototype.asc_AcceptChanges;
asc_docs_api.prototype['asc_RejectChanges'] = asc_docs_api.prototype.asc_RejectChanges;
......
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