Commit 3b96d147 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Реализовал выставление стиля для строки/столбца

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48012 954022d7-b5bf-4e40-9824-e11837661b57
parent e87a8f06
......@@ -48,6 +48,7 @@ var historyitem_RowCol_NumFormat = 15;
var historyitem_RowCol_SetFont = 16;
var historyitem_RowCol_Angle = 17;
var historyitem_RowCol_SetStyle = 18;
var historyitem_RowCol_SetCellStyle = 19;
var historyitem_Cell_Fontname = 1;
var historyitem_Cell_Fontsize = 2;
......
......@@ -2923,6 +2923,8 @@ UndoRedoRowCol.prototype = {
row.setAngle(Val);
else if(historyitem_RowCol_SetStyle == Type)
row.setStyle(Val);
else if (historyitem_RowCol_SetCellStyle == Type)
row.setCellStyle(Val);
}
}
......
......@@ -2067,7 +2067,18 @@ Col.prototype =
},
setCellStyle : function(val)
{
// ToDo add code here
var newVal = this.cs._prepareCellStyle(val);
var oRes = this.sm.setCellStyle(this, newVal);
if(History.Is_On() && oRes.oldVal != oRes.newVal) {
var oldStyleName = this.cs.getStyleNameByXfId(oRes.oldVal);
History.Add(g_oUndoRedoCol, historyitem_RowCol_SetCellStyle, this.ws.getId(), new Asc.Range(0, 0, gc_nMaxCol0, gc_nMaxRow0), new UndoRedoData_IndexSimpleProp(this.index, false, oldStyleName, val));
// Выставляем стиль
var oStyle = this.cs.getStyleByXfId(oRes.newVal);
this.setFont(oStyle.getFont());
this.setFill(oStyle.getFill());
this.setBorder(oStyle.getBorder());
}
},
setNumFormat : function(val)
{
......@@ -2330,7 +2341,18 @@ Row.prototype =
},
setCellStyle : function(val)
{
// ToDo add code here
var newVal = this.cs._prepareCellStyle(val);
var oRes = this.sm.setCellStyle(this, newVal);
if(History.Is_On() && oRes.oldVal != oRes.newVal) {
var oldStyleName = this.cs.getStyleNameByXfId(oRes.oldVal);
History.Add(g_oUndoRedoRow, historyitem_RowCol_SetCellStyle, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oldStyleName, val));
// Выставляем стиль
var oStyle = this.cs.getStyleByXfId(oRes.newVal);
this.setFont(oStyle.getFont());
this.setFill(oStyle.getFill());
this.setBorder(oStyle.getBorder());
}
},
setNumFormat : function(val)
{
......
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