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

Bug 26070 - Примененные в XLSX книге границы отменяются не полностью после Undo.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57908 954022d7-b5bf-4e40-9824-e11837661b57
parent baff7363
...@@ -5246,8 +5246,7 @@ ...@@ -5246,8 +5246,7 @@
if(gc_nMaxCol == oLast.Max) if(gc_nMaxCol == oLast.Max)
{ {
oAllCol = oLast; oAllCol = oLast;
oWorksheet.oAllCol = new Col(oWorksheet, 0); fInitCol(oAllCol, oWorksheet.getAllCol());
fInitCol(oAllCol, oWorksheet.oAllCol);
} }
} }
for(var i = 0, length = aTempCols.length; i < length; ++i) for(var i = 0, length = aTempCols.length; i < length; ++i)
......
...@@ -7,6 +7,7 @@ var gc_dDefaultRowHeightAttribute;//определяется в WorksheetView.js ...@@ -7,6 +7,7 @@ var gc_dDefaultRowHeightAttribute;//определяется в WorksheetView.js
var g_sNewSheetNamePattern = "Sheet"; var g_sNewSheetNamePattern = "Sheet";
var g_nSheetNameMaxLength = 31; var g_nSheetNameMaxLength = 31;
var g_nAllColIndex = -1; var g_nAllColIndex = -1;
var g_nAllRowIndex = -1;
var History; var History;
var aStandartNumFormats; var aStandartNumFormats;
var aStandartNumFormatsId; var aStandartNumFormatsId;
...@@ -2450,7 +2451,7 @@ Woorksheet.prototype._removeRows=function(start, stop){ ...@@ -2450,7 +2451,7 @@ Woorksheet.prototype._removeRows=function(start, stop){
{ {
var oOldProps = row.getHeightProp(); var oOldProps = row.getHeightProp();
if(false == Asc.isEqual(oOldProps, oDefRowPr)) 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)); History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, this.getId(), row._getUpdateRange(), new UndoRedoData_IndexSimpleProp(nIndex, true, oOldProps, oDefRowPr));
row.setStyle(null); row.setStyle(null);
for(var j in row.c) for(var j in row.c)
{ {
...@@ -2911,7 +2912,7 @@ Woorksheet.prototype.setRowHeight=function(height, start, stop){ ...@@ -2911,7 +2912,7 @@ Woorksheet.prototype.setRowHeight=function(height, start, stop){
row.hd = null; row.hd = null;
var oNewProps = row.getHeightProp(); var oNewProps = row.getHeightProp();
if(false == Asc.isEqual(oOldProps, oNewProps)) if(false == Asc.isEqual(oOldProps, oNewProps))
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, oThis.getId(), new Asc.Range(0, i, gc_nMaxCol0, i), new UndoRedoData_IndexSimpleProp(i, true, oOldProps, oNewProps)); History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, oThis.getId(), row._getUpdateRange(), new UndoRedoData_IndexSimpleProp(row.index, true, oOldProps, oNewProps));
} }
}; };
if(0 == start && gc_nMaxRow0 == stop) if(0 == start && gc_nMaxRow0 == stop)
...@@ -2949,7 +2950,7 @@ Woorksheet.prototype.setRowHidden=function(bHidden, start, stop){ ...@@ -2949,7 +2950,7 @@ Woorksheet.prototype.setRowHidden=function(bHidden, start, stop){
row.hd = null; row.hd = null;
var oNewProps = row.getHeightProp(); var oNewProps = row.getHeightProp();
if(false == Asc.isEqual(oOldProps, oNewProps)) if(false == Asc.isEqual(oOldProps, oNewProps))
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, oThis.getId(), new Asc.Range(0, i, gc_nMaxCol0, i), new UndoRedoData_IndexSimpleProp(i, true, oOldProps, oNewProps)); History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, oThis.getId(), row._getUpdateRange(), new UndoRedoData_IndexSimpleProp(row.index, true, oOldProps, oNewProps));
} }
}; };
if(0 == start && gc_nMaxRow0 == stop) if(0 == start && gc_nMaxRow0 == stop)
...@@ -2997,7 +2998,7 @@ Woorksheet.prototype.setRowBestFit=function(bBestFit, height, start, stop){ ...@@ -2997,7 +2998,7 @@ Woorksheet.prototype.setRowBestFit=function(bBestFit, height, start, stop){
row.height = height; row.height = height;
var oNewProps = row.getHeightProp(); var oNewProps = row.getHeightProp();
if(false == Asc.isEqual(oOldProps, oNewProps)) if(false == Asc.isEqual(oOldProps, oNewProps))
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, oThis.getId(), new Asc.Range(0, i, gc_nMaxCol0, i), new UndoRedoData_IndexSimpleProp(i, true, oOldProps, oNewProps)); History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, oThis.getId(), row._getUpdateRange(), new UndoRedoData_IndexSimpleProp(row.index, true, oOldProps, oNewProps));
} }
}; };
if(0 == start && gc_nMaxRow0 == stop) if(0 == start && gc_nMaxRow0 == stop)
...@@ -3171,17 +3172,22 @@ Woorksheet.prototype._getColNoEmptyWithAll=function(col){ ...@@ -3171,17 +3172,22 @@ Woorksheet.prototype._getColNoEmptyWithAll=function(col){
}; };
Woorksheet.prototype._getRow=function(row){ Woorksheet.prototype._getRow=function(row){
//0-based //0-based
var oCurRow = this.aGCells[row]; var oCurRow = null;
if(!oCurRow){ if (g_nAllRowIndex == row)
if(null != this.oSheetFormatPr.oAllRow) oCurRow = this.getAllRow();
oCurRow = this.oSheetFormatPr.oAllRow.clone(this); else {
else oCurRow = this.aGCells[row];
oCurRow = new Row(this); if (!oCurRow) {
oCurRow.create(row + 1); if (null != this.oSheetFormatPr.oAllRow)
this.aGCells[row] = oCurRow; oCurRow = this.oSheetFormatPr.oAllRow.clone(this);
this.nRowsCount = row > this.nRowsCount ? row : this.nRowsCount ; else
//History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_CreateRow, this.getId(), null, new UndoRedoData_SingleProperty(row)); oCurRow = new Row(this);
} oCurRow.create(row + 1);
this.aGCells[row] = oCurRow;
this.nRowsCount = row > this.nRowsCount ? row : this.nRowsCount;
//History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_CreateRow, this.getId(), null, new UndoRedoData_SingleProperty(row));
}
}
return oCurRow; return oCurRow;
}; };
Woorksheet.prototype._removeRow=function(index){ Woorksheet.prototype._removeRow=function(index){
...@@ -3886,8 +3892,10 @@ Woorksheet.prototype.getAllCol = function(){ ...@@ -3886,8 +3892,10 @@ Woorksheet.prototype.getAllCol = function(){
return this.oAllCol; return this.oAllCol;
}; };
Woorksheet.prototype.getAllRow = function(){ Woorksheet.prototype.getAllRow = function(){
if(null == this.oSheetFormatPr.oAllRow) if (null == this.oSheetFormatPr.oAllRow) {
this.oSheetFormatPr.oAllRow = new Row(this); this.oSheetFormatPr.oAllRow = new Row(this);
this.oSheetFormatPr.oAllRow.create(g_nAllRowIndex + 1);
}
return this.oSheetFormatPr.oAllRow; return this.oSheetFormatPr.oAllRow;
}; };
Woorksheet.prototype.getHyperlinkByCell = function(row, col){ Woorksheet.prototype.getHyperlinkByCell = function(row, col){
...@@ -7506,7 +7514,7 @@ Range.prototype._promoteFromTo=function(from, to, bIsPromote, oCanPromote, bCtrl ...@@ -7506,7 +7514,7 @@ Range.prototype._promoteFromTo=function(from, to, bIsPromote, oCanPromote, bCtrl
var oOldProps = row.getHeightProp(); var oOldProps = row.getHeightProp();
if (false == Asc.isEqual(oOldProps, oNewProps)) { if (false == Asc.isEqual(oOldProps, oNewProps)) {
row.setHeightProp(oNewProps); row.setHeightProp(oNewProps);
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, this.worksheet.getId(), new Asc.Range(0, nCurIndex, gc_nMaxCol0, nCurIndex), new UndoRedoData_IndexSimpleProp(nCurIndex, true, oOldProps, oNewProps)); History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowProp, this.worksheet.getId(), row._getUpdateRange(), new UndoRedoData_IndexSimpleProp(nCurIndex, true, oOldProps, oNewProps));
} }
} }
} }
......
...@@ -2510,6 +2510,12 @@ Row.prototype = ...@@ -2510,6 +2510,12 @@ Row.prototype =
{ {
return this.xfs; return this.xfs;
}, },
_getUpdateRange: function () {
if (g_nAllRowIndex == this.index)
return new Asc.Range(0, 0, gc_nMaxCol0, gc_nMaxRow0);
else
return new Asc.Range(0, this.index, gc_nMaxCol0, this.index);
},
setStyle : function(xfs) setStyle : function(xfs)
{ {
var oldVal = this.xfs; var oldVal = this.xfs;
...@@ -2526,7 +2532,7 @@ Row.prototype = ...@@ -2526,7 +2532,7 @@ Row.prototype =
oldVal = oldVal.clone(); oldVal = oldVal.clone();
if(null != newVal) if(null != newVal)
newVal = newVal.clone(); newVal = newVal.clone();
History.Add(g_oUndoRedoRow, historyitem_RowCol_SetStyle, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oldVal, newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_SetStyle, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oldVal, newVal));
} }
}, },
setCellStyle : function(val) setCellStyle : function(val)
...@@ -2535,7 +2541,7 @@ Row.prototype = ...@@ -2535,7 +2541,7 @@ Row.prototype =
var oRes = this.sm.setCellStyle(this, newVal); var oRes = this.sm.setCellStyle(this, newVal);
if(History.Is_On() && oRes.oldVal != oRes.newVal) { if(History.Is_On() && oRes.oldVal != oRes.newVal) {
var oldStyleName = this.cs.getStyleNameByXfId(oRes.oldVal); 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)); History.Add(g_oUndoRedoRow, historyitem_RowCol_SetCellStyle, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oldStyleName, val));
// Выставляем стиль // Выставляем стиль
var oStyle = this.cs.getStyleByXfId(oRes.newVal); var oStyle = this.cs.getStyleByXfId(oRes.newVal);
...@@ -2553,7 +2559,7 @@ Row.prototype = ...@@ -2553,7 +2559,7 @@ Row.prototype =
{ {
var oRes = this.sm.setNumFormat(this, val); var oRes = this.sm.setNumFormat(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_NumFormat, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_NumFormat, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setFont : function(val) setFont : function(val)
{ {
...@@ -2566,74 +2572,74 @@ Row.prototype = ...@@ -2566,74 +2572,74 @@ Row.prototype =
var newVal = null; var newVal = null;
if(null != oRes.newVal) if(null != oRes.newVal)
newVal = oRes.newVal.clone(); newVal = oRes.newVal.clone();
History.Add(g_oUndoRedoRow, historyitem_RowCol_SetFont, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oldVal, newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_SetFont, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oldVal, newVal));
} }
}, },
setFontname : function(val) setFontname : function(val)
{ {
var oRes = this.sm.setFontname(this, val); var oRes = this.sm.setFontname(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Fontname, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Fontname, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setFontsize : function(val) setFontsize : function(val)
{ {
var oRes = this.sm.setFontsize(this, val); var oRes = this.sm.setFontsize(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Fontsize, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Fontsize, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setFontcolor : function(val) setFontcolor : function(val)
{ {
var oRes = this.sm.setFontcolor(this, val); var oRes = this.sm.setFontcolor(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Fontcolor, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Fontcolor, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setBold : function(val) setBold : function(val)
{ {
var oRes = this.sm.setBold(this, val); var oRes = this.sm.setBold(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Bold, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Bold, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setItalic : function(val) setItalic : function(val)
{ {
var oRes = this.sm.setItalic(this, val); var oRes = this.sm.setItalic(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Italic, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Italic, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setUnderline : function(val) setUnderline : function(val)
{ {
var oRes = this.sm.setUnderline(this, val); var oRes = this.sm.setUnderline(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Underline, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Underline, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setStrikeout : function(val) setStrikeout : function(val)
{ {
var oRes = this.sm.setStrikeout(this, val); var oRes = this.sm.setStrikeout(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Strikeout, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Strikeout, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setFontAlign : function(val) setFontAlign : function(val)
{ {
var oRes = this.sm.setFontAlign(this, val); var oRes = this.sm.setFontAlign(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_FontAlign, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_FontAlign, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setAlignVertical : function(val) setAlignVertical : function(val)
{ {
var oRes = this.sm.setAlignVertical(this, val); var oRes = this.sm.setAlignVertical(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_AlignVertical, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_AlignVertical, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setAlignHorizontal : function(val) setAlignHorizontal : function(val)
{ {
var oRes = this.sm.setAlignHorizontal(this, val); var oRes = this.sm.setAlignHorizontal(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_AlignHorizontal, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_AlignHorizontal, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setFill : function(val) setFill : function(val)
{ {
var oRes = this.sm.setFill(this, val); var oRes = this.sm.setFill(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Fill, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Fill, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setBorder : function(val) setBorder : function(val)
{ {
...@@ -2646,32 +2652,32 @@ Row.prototype = ...@@ -2646,32 +2652,32 @@ Row.prototype =
var newVal = null; var newVal = null;
if(null != oRes.newVal) if(null != oRes.newVal)
newVal = oRes.newVal.clone(); newVal = oRes.newVal.clone();
History.Add(g_oUndoRedoRow, historyitem_RowCol_Border, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oldVal, newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Border, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oldVal, newVal));
} }
}, },
setShrinkToFit : function(val) setShrinkToFit : function(val)
{ {
var oRes = this.sm.setShrinkToFit(this, val); var oRes = this.sm.setShrinkToFit(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_ShrinkToFit, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_ShrinkToFit, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setWrap : function(val) setWrap : function(val)
{ {
var oRes = this.sm.setShrinkToFit(this, val); var oRes = this.sm.setShrinkToFit(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Wrap, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Wrap, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setAngle: function(val) setAngle: function(val)
{ {
var oRes = this.sm.setFontname(this, val); var oRes = this.sm.setFontname(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Angle, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Angle, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
}, },
setVerticalText : function(val) setVerticalText : function(val)
{ {
var oRes = this.sm.setVerticalText(this, val); var oRes = this.sm.setVerticalText(this, val);
if(History.Is_On() && oRes.oldVal != oRes.newVal) if(History.Is_On() && oRes.oldVal != oRes.newVal)
History.Add(g_oUndoRedoRow, historyitem_RowCol_Angle, this.ws.getId(), new Asc.Range(0, this.index, gc_nMaxCol0, this.index), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal)); History.Add(g_oUndoRedoRow, historyitem_RowCol_Angle, this.ws.getId(), this._getUpdateRange(), new UndoRedoData_IndexSimpleProp(this.index, true, oRes.oldVal, oRes.newVal));
} }
}; };
function CCellValueMultiText() function CCellValueMultiText()
......
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