Commit b99391c5 authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 34259

parent ea76739c
......@@ -948,6 +948,7 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
var mapRuns = {};
var mapTables = {};
var mapGrObjects = {};
var mapSlides = {};
for (var nIndex = 0, nCount = arrReverseChanges.length; nIndex < nCount; ++nIndex)
{
var oChange = arrReverseChanges[nIndex];
......@@ -970,12 +971,20 @@ CCollaborativeEditingBase.prototype.private_RestoreDocumentState = function(DocS
mapTables[oClass.Get_Id()] = oClass;
else if(oClass instanceof AscFormat.CShape || oClass instanceof AscFormat.CImageShape || oClass instanceof AscFormat.CChartSpace || oClass instanceof AscFormat.CGroupShape || oClass instanceof AscFormat.CGraphicFrame)
mapGrObjects[oClass.Get_Id()] = oClass;
else if(typeof AscCommonSlide !== "undefined" && AscCommonSlide.Slide && oClass instanceof AscCommonSlide.Slide){
mapSlides[oClass.Get_Id()] = oClass;
}
}
// Создаем точку в истории. Делаем действия через обычные функции (с отключенным пересчетом), которые пишут в
// историю. Сохраняем список изменений в новой точке, удаляем данную точку.
var oHistory = AscCommon.History;
oHistory.CreateNewPointForCollectChanges();
for(var sId in mapSlides){
if(mapSlides.hasOwnProperty(sId)){
mapSlides[sId].correctContent();
}
}
for(var sId in mapGrObjects){
var oShape = mapGrObjects[sId];
if(!oShape.checkCorrect()){
......
......@@ -415,13 +415,25 @@
}
else{
for (var nIndex = 0, nCount = this.Items.length; nIndex < nCount; ++nIndex) {
var Pos = this.Class.m_oContentChanges.Check(AscCommon.contentchanges_Remove, true !== this.UseArray ? this.Pos : this.PosArray[nIndex]);
for(var j = 0; j < aContent.length; ++j){
if(aContent[j] === this.Items[nIndex]){
aContent.splice(j, 1);
break;
}
}
}
}
};
if (false === Pos)
continue;
aContent.splice(Pos, 1);
CChangesDrawingsContentPresentation.prototype.CheckCorrect = function(){
if(!this.IsAdd()){
for(var nIndex = 0; nIndex < this.Items.length; ++nIndex){
if(this.Items[nIndex].CheckCorrect && !this.Items[nIndex].CheckCorrect()){
return false;
}
}
}
return true;
};
window['AscDFH'].CChangesDrawingsContentPresentation = CChangesDrawingsContentPresentation;
......
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