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

Сохраняем в историю свойства удаленных строк/колонок

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49767 954022d7-b5bf-4e40-9824-e11837661b57
parent 1a203d67
......@@ -2587,6 +2587,7 @@ Woorksheet.prototype._removeRows=function(start, stop){
}
//По возрастанию
aIndexes.sort(fSortAscending);
var oDefRowPr = new UndoRedoData_RowProp();
for(var i = 0, length = aIndexes.length; i < length; ++i)
{
var nIndex = aIndexes[i];
......@@ -2603,6 +2604,10 @@ Woorksheet.prototype._removeRows=function(start, stop){
}
else
{
var oOldProps = row.getHeightProp();
if(false == Asc.isEqual(oOldProps, oDefRowPr))
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, this.getId(), new Asc.Range(0, nIndex, gc_nMaxCol0, nIndex), new UndoRedoData_IndexSimpleProp(nIndex, true, oOldProps, oDefRowPr));
row.setStyle(null);
for(var j in row.c)
{
var nColIndex = j - 0;
......@@ -2729,6 +2734,18 @@ Woorksheet.prototype._removeCols=function(start, stop){
buildRecalc(this.workbook);
unLockDraw(this.workbook);
var oDefColPr = new UndoRedoData_ColProp();
for(var i = start; i <= stop; ++i)
{
var col = this.aCols[i];
if(null != col)
{
var oOldProps = col.getWidthProp();
if(false == Asc.isEqual(oOldProps, oDefColPr))
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_ColProp, this.getId(), new Asc.Range(0, 0, gc_nMaxCol0, gc_nMaxRow0), new UndoRedoData_IndexSimpleProp(i, false, oOldProps, oDefColPr));
col.setStyle(null);
}
}
this.aCols.splice(start, stop - start + 1);
for(var i = start, length = this.aCols.length; i < length; ++i)
{
......
......@@ -1992,6 +1992,8 @@ Col.prototype =
return new UndoRedoData_ColProp(this);
},
setWidthProp : function(prop)
{
if(null != prop)
{
if(null != prop.width)
this.width = prop.width;
......@@ -2009,6 +2011,7 @@ Col.prototype =
this.BestFit = prop.BestFit;
else
this.BestFit = null;
}
},
getMerged : function()
{
......@@ -2257,6 +2260,8 @@ Row.prototype =
return new UndoRedoData_RowProp(this);
},
setHeightProp : function(prop)
{
if(null != prop)
{
if(null != prop.h)
this.h = prop.h;
......@@ -2270,6 +2275,7 @@ Row.prototype =
this.CustomHeight = prop.CustomHeight;
else
this.CustomHeight = null;
}
},
copyProperty : function(otherRow)
{
......
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