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

ошибки при уделении строк/колонок и undo,если строки были изменены.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49799 954022d7-b5bf-4e40-9824-e11837661b57
parent 8dc2c623
......@@ -355,6 +355,7 @@ CHistory.prototype =
lockDraw(this.workbook);
this.workbook.handlers.trigger("lockDraw");
this.workbook.bUndoRedoChanges = true;
var isReInit = false;
var oCurWorksheet = this.workbook.getWorksheet(this.workbook.getActive());
......@@ -395,6 +396,7 @@ CHistory.prototype =
this._sendCanUndoRedo();
this.workbook.bUndoRedoChanges = false;
if (isReInit)
this.workbook.handlers.trigger("reInit");
this.workbook.handlers.trigger("drawWS");
......@@ -414,6 +416,7 @@ CHistory.prototype =
lockDraw(this.workbook);
this.workbook.handlers.trigger("lockDraw");
this.workbook.bUndoRedoChanges = true;
},
RedoAdd : function(oRedoObjectParam, Class, Type, sheetid, range, Data, LocalChange)
{
......@@ -485,6 +488,7 @@ CHistory.prototype =
this._sendCanUndoRedo();
this.workbook.bUndoRedoChanges = false;
if (oRedoObjectParam.bIsReInit)
this.workbook.handlers.trigger("reInit");
this.workbook.handlers.trigger("drawWS");
......
......@@ -1393,6 +1393,7 @@ function Workbook(sUrlPath, eventsHandlers, oApi){
this.startActionOn = false;
this.aCollaborativeActions = new Array();
this.bCollaborativeChanges = false;
this.bUndoRedoChanges = false;
this.aCollaborativeChangeElements = new Array();
};
Workbook.prototype.initGlobalObjects=function(){
......@@ -2658,19 +2659,20 @@ Woorksheet.prototype._insertRowsBefore=function(index, count){
var row = this.aGCells[nIndex];
if(false == row.isEmpty())
{
var oTargetRow = this._getRow(nIndex + count - 1);
var oTargetRow = this._getRow(nIndex + count);
oTargetRow.copyProperty(row);
}
for(var j in row.c)
this._moveCellVer(nIndex, j - 0, count);
delete this.aGCells[nIndex];
}
if(null != oPrevRow)
if(null != oPrevRow && false == this.workbook.bUndoRedoChanges)
{
for(var i = 0; i < count; ++i)
{
var row = this._getRow(index + i);
row.copyProperty(oPrevRow);
row.hd = null;
}
}
var res = this.renameDependencyNodes({offsetRow:count,offsetCol:0},oActualRange);
......@@ -2804,9 +2806,10 @@ Woorksheet.prototype._insertColsBefore=function(index, count){
for(var i = 0; i < count; ++i)
{
var oNewCol = null;
if(null != oPrevCol)
if(null != oPrevCol && false == this.workbook.bUndoRedoChanges)
{
oNewCol = oPrevCol.clone();
oNewCol.hd = null;
oNewCol.BestFit = null;
oNewCol.index = index + i;
}
......
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