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)
{
......
......@@ -1993,22 +1993,25 @@ Col.prototype =
},
setWidthProp : function(prop)
{
if(null != prop.width)
this.width = prop.width;
else
this.width = null;
if(null != prop.hd)
this.hd = prop.hd;
else
this.hd = null;
if(null != prop.CustomWidth)
this.CustomWidth = prop.CustomWidth;
else
this.CustomWidth = null;
if(null != prop.BestFit)
this.BestFit = prop.BestFit;
else
this.BestFit = null;
if(null != prop)
{
if(null != prop.width)
this.width = prop.width;
else
this.width = null;
if(null != prop.hd)
this.hd = prop.hd;
else
this.hd = null;
if(null != prop.CustomWidth)
this.CustomWidth = prop.CustomWidth;
else
this.CustomWidth = null;
if(null != prop.BestFit)
this.BestFit = prop.BestFit;
else
this.BestFit = null;
}
},
getMerged : function()
{
......@@ -2258,18 +2261,21 @@ Row.prototype =
},
setHeightProp : function(prop)
{
if(null != prop.h)
this.h = prop.h;
else
this.h = null;
if(null != prop.hd)
this.hd = prop.hd;
else
this.hd = null;
if(null != prop.CustomHeight)
this.CustomHeight = prop.CustomHeight;
else
this.CustomHeight = null;
if(null != prop)
{
if(null != prop.h)
this.h = prop.h;
else
this.h = null;
if(null != prop.hd)
this.hd = prop.hd;
else
this.hd = null;
if(null != prop.CustomHeight)
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