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

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51560 954022d7-b5bf-4e40-9824-e11837661b57
parent 2ca16c05
......@@ -412,8 +412,6 @@ CHistory.prototype =
var oSelectRange = null;
if(null != Point.SelectRange)
oSelectRange = Point.SelectRange;
for(var i in Point.Triggers)
this.workbook.handlers.trigger.apply(this.workbook.handlers, Point.Triggers[i]);
for(var i in Point.UpdateRigions)
{
this.workbook.handlers.trigger("cleanCellCache", i, Point.UpdateRigions[i]);
......@@ -507,8 +505,6 @@ CHistory.prototype =
}
if(null == Point)
return;
for(var i in Point.Triggers)
this.workbook.handlers.trigger.apply(this.workbook.handlers, Point.Triggers[i]);
var oSelectRange = null;
if(null != Point.SelectRangeRedo)
oSelectRange = Point.SelectRangeRedo;
......@@ -567,7 +563,6 @@ CHistory.prototype =
var Time = new Date().getTime();
this.CurPoint = {
Items : Items, // Массив изменений, начиная с текущего момента
Triggers : new Array(),
UpdateRigions : UpdateRigions,
nLastSheetId : null,
SelectRange : null,
......@@ -617,26 +612,7 @@ CHistory.prototype =
if(1 == oCurPoint.Items.length)
this._sendCanUndoRedo();
},
AddTrigger : function(aArgs)
{
if ( 0 !== this.TurnOffHistory )
return;
if ( null == this.CurPoint )
return;
var bEqual = false;
for(var i = 0, length = this.CurPoint.Triggers.length; i < length; ++i)
{
if(Asc.isEqual(aArgs, this.CurPoint.Triggers[i]))
{
bEqual = true;
break;
}
}
if(false == bEqual)
this.CurPoint.Triggers.push(aArgs);
},
_sendCanUndoRedo : function()
{
this.workbook.handlers.trigger("setCanUndo", this.Can_Undo());
......
......@@ -3003,6 +3003,7 @@ UndoRedoWoorksheet.prototype = {
col.setWidthProp(Data.oOldVal);
else
col.setWidthProp(Data.oNewVal);
this.wb.handlers.trigger("changeWorksheetUpdate", nSheetId);
}
else if(historyitem_Worksheet_RowProp == Type)
{
......@@ -3021,6 +3022,7 @@ UndoRedoWoorksheet.prototype = {
row.setHeightProp(Data.oOldVal);
else
row.setHeightProp(Data.oNewVal);
this.wb.handlers.trigger("changeWorksheetUpdate", nSheetId);
}
else if(historyitem_Worksheet_AddRows == Type || historyitem_Worksheet_RemoveRows == Type)
{
......
......@@ -2971,10 +2971,7 @@ Woorksheet.prototype.setColWidth=function(width, start, stop){
col.hd = null;
var oNewProps = col.getWidthProp();
if(false == oOldProps.isEqual(oNewProps))
{
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_ColProp, oThis.getId(), new Asc.Range(0, 0, gc_nMaxCol0, gc_nMaxRow0), new UndoRedoData_IndexSimpleProp(col.index, false, oOldProps, oNewProps));
History.AddTrigger(["changeWorksheetUpdate", oThis.getId()]);
}
}
};
if(0 == start && gc_nMaxCol0 == stop)
......@@ -3019,10 +3016,7 @@ Woorksheet.prototype.setColHidden=function(bHidden, start, stop){
}
var oNewProps = col.getWidthProp();
if(false == oOldProps.isEqual(oNewProps))
{
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_ColProp, oThis.getId(), new Asc.Range(0, 0, gc_nMaxCol0, gc_nMaxRow0), new UndoRedoData_IndexSimpleProp(col.index, false, oOldProps, oNewProps));
History.AddTrigger(["changeWorksheetUpdate", oThis.getId()]);
}
}
};
if(0 != start && gc_nMaxCol0 == stop)
......@@ -3069,10 +3063,7 @@ Woorksheet.prototype.setColBestFit=function(bBestFit, width, start, stop){
col.width = width;
var oNewProps = col.getWidthProp();
if(false == oOldProps.isEqual(oNewProps))
{
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_ColProp, oThis.getId(), new Asc.Range(0, 0, gc_nMaxCol0, gc_nMaxRow0), new UndoRedoData_IndexSimpleProp(col.index, false, oOldProps, oNewProps));
History.AddTrigger(["changeWorksheetUpdate", oThis.getId()]);
}
};
if(0 != start && gc_nMaxCol0 == stop)
{
......@@ -3128,10 +3119,7 @@ Woorksheet.prototype.setRowHeight=function(height, start, stop){
oCurRow.hd = null;
var oNewProps = oCurRow.getHeightProp();
if(false == Asc.isEqual(oOldProps, oNewProps))
{
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, this.getId(), new Asc.Range(0, i, gc_nMaxCol0, i), new UndoRedoData_IndexSimpleProp(i, true, oOldProps, oNewProps));
History.AddTrigger(["changeWorksheetUpdate", this.getId()]);
}
}
}
};
......@@ -3158,10 +3146,7 @@ Woorksheet.prototype.setRowHidden=function(bHidden, start, stop){
oCurRow.hd = null;
var oNewProps = oCurRow.getHeightProp();
if(false == Asc.isEqual(oOldProps, oNewProps))
{
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, this.getId(), new Asc.Range(0, i, gc_nMaxCol0, i), new UndoRedoData_IndexSimpleProp(i, true, oOldProps, oNewProps));
History.AddTrigger(["changeWorksheetUpdate", this.getId()]);
}
}
}
};
......@@ -3189,10 +3174,7 @@ Woorksheet.prototype.setRowBestFit=function(bBestFit, height, start, stop){
oCurRow.height = height;
var oNewProps = oCurRow.getHeightProp();
if(false == oOldProps.isEqual(oNewProps))
{
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, this.getId(), new Asc.Range(0, i, gc_nMaxCol0, i), new UndoRedoData_IndexSimpleProp(i, true, oOldProps, oNewProps));
History.AddTrigger(["changeWorksheetUpdate", this.getId()]);
}
}
}
};
......
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