Commit a293eda5 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

в SerializeHistory в конце каждого History.Point пишем historyitem_Workbook_SheetPositions

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62049 954022d7-b5bf-4e40-9824-e11837661b57
parent e2f1f2ca
......@@ -189,7 +189,7 @@ CHistory.prototype.UndoRedoPrepare = function (oRedoObjectParam, bUndo) {
if (wsViews[i] && wsViews[i].objectRender && wsViews[i].objectRender.controller) {
wsViews[i].objectRender.controller.resetSelection();
}
if ( wsViews[i].isChartAreaEditMode ) {
if (wsViews[i] && wsViews[i].isChartAreaEditMode ) {
wsViews[i].isChartAreaEditMode = false;
wsViews[i].arrActiveChartsRanges = [];
}
......
......@@ -2687,6 +2687,7 @@ UndoRedoWorkbook.prototype = {
}
else if(historyitem_Workbook_SheetPositions == Type)
{
if(Data.positions){
var wsActive = this.wb.getActiveWs();
//делаем вспомогательным map из sheetid
var oTempSheetMap = {};
......@@ -2749,6 +2750,7 @@ UndoRedoWorkbook.prototype = {
this.wb._updateWorksheetIndexes(wsActive);
this.wb.handlers.trigger("updateWorksheetByModel");
}
}
else if(historyitem_Workbook_ChangeColorScheme == Type)
{
bNeedTrigger = false;
......
......@@ -1850,14 +1850,18 @@ Workbook.prototype.SerializeHistory = function(){
}
this._SerializeHistoryBase64(oMemory, item, aPointChangesBase64);
}
var oUndoRedoData_SheetPositions;
if (bChangeSheetPlace) {
//создаем еще один элемент в undo/redo - взаимное расположение Sheet, чтобы не запутываться в add, move событиях
//добавляем не после конца aActions, чтобы можно было делать undo/redo и просто удалять хвост изменений.
var oSheetPlaceData = [];
for (var j = 0, length2 = this.aWorksheets.length; j < length2; ++j)
oSheetPlaceData.push(this.aWorksheets[j].getId());
this._SerializeHistoryBase64(oMemory, new UndoRedoItemSerializable(g_oUndoRedoWorkbook, historyitem_Workbook_SheetPositions, null, null, new UndoRedoData_SheetPositions(oSheetPlaceData)), aPointChangesBase64);
oUndoRedoData_SheetPositions = new UndoRedoData_SheetPositions(oSheetPlaceData);
}
else
oUndoRedoData_SheetPositions = new UndoRedoData_SheetPositions();
this._SerializeHistoryBase64(oMemory, new UndoRedoItemSerializable(g_oUndoRedoWorkbook, historyitem_Workbook_SheetPositions, null, null, oUndoRedoData_SheetPositions), aPointChangesBase64);
aRes.push(aPointChangesBase64);
}
this.aCollaborativeActions = [];
......
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