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();
else {
oCurRow = this.aGCells[row];
if (!oCurRow) {
if (null != this.oSheetFormatPr.oAllRow)
oCurRow = this.oSheetFormatPr.oAllRow.clone(this); oCurRow = this.oSheetFormatPr.oAllRow.clone(this);
else else
oCurRow = new Row(this); oCurRow = new Row(this);
oCurRow.create(row + 1); oCurRow.create(row + 1);
this.aGCells[row] = oCurRow; this.aGCells[row] = oCurRow;
this.nRowsCount = row > this.nRowsCount ? row : this.nRowsCount ; this.nRowsCount = row > this.nRowsCount ? row : this.nRowsCount;
//History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_CreateRow, this.getId(), null, new UndoRedoData_SingleProperty(row)); //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));
} }
} }
} }
......
This diff is collapsed.
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