Commit 5b2c3016 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

+ к rev.64403

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64413 954022d7-b5bf-4e40-9824-e11837661b57
parent 1980b8a9
...@@ -3852,7 +3852,7 @@ Woorksheet.prototype.setRowHidden=function(bHidden, start, stop){ ...@@ -3852,7 +3852,7 @@ Woorksheet.prototype.setRowHidden=function(bHidden, start, stop){
stop = start; stop = start;
History.Create_NewPoint(); History.Create_NewPoint();
var oThis = this, i; var oThis = this, i;
var startIndex = start, isAddPrevBlock = false; var startIndex = null, endIndex = null, updateRange;
var fProcessRow = function(row){ var fProcessRow = function(row){
if(row && bHidden != (0 != (g_nRowFlag_hd & row.flags))) if(row && bHidden != (0 != (g_nRowFlag_hd & row.flags)))
...@@ -3862,27 +3862,21 @@ Woorksheet.prototype.setRowHidden=function(bHidden, start, stop){ ...@@ -3862,27 +3862,21 @@ Woorksheet.prototype.setRowHidden=function(bHidden, start, stop){
else else
row.flags &= ~g_nRowFlag_hd; row.flags &= ~g_nRowFlag_hd;
if(row.index === stop)
{ if(row.index === endIndex + 1 && startIndex !== null)
if(isAddPrevBlock) endIndex++;
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowHide, oThis.getId(), row._getUpdateRange(), new UndoRedoData_FromToRowCol(bHidden, startIndex, row.index)); else
else
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowHide, oThis.getId(), row._getUpdateRange(), new UndoRedoData_FromToRowCol(bHidden, row.index, row.index));
isAddPrevBlock = false;
}
else if(!isAddPrevBlock)
{ {
if(startIndex !== null)
{
updateRange = new Asc.Range(0, startIndex, gc_nMaxCol0, endIndex);
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowHide, oThis.getId(), updateRange, new UndoRedoData_FromToRowCol(bHidden, startIndex, endIndex));
}
startIndex = row.index; startIndex = row.index;
isAddPrevBlock = true; endIndex = row.index;
} }
} }
else
{
if(isAddPrevBlock)//заносим предыдущие строки
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowHide, oThis.getId(), row._getUpdateRange(), new UndoRedoData_FromToRowCol(bHidden, startIndex, row.index - 1));
isAddPrevBlock = false;
}
}; };
if(0 == start && gc_nMaxRow0 == stop) if(0 == start && gc_nMaxRow0 == stop)
{ {
...@@ -3892,6 +3886,12 @@ Woorksheet.prototype.setRowHidden=function(bHidden, start, stop){ ...@@ -3892,6 +3886,12 @@ Woorksheet.prototype.setRowHidden=function(bHidden, start, stop){
{ {
for(i = start; i <= stop; ++i) for(i = start; i <= stop; ++i)
fProcessRow(false == bHidden ? this._getRowNoEmpty(i) : this._getRow(i)); fProcessRow(false == bHidden ? this._getRowNoEmpty(i) : this._getRow(i));
if(startIndex !== null)//заносим последние строки
{
updateRange = new Asc.Range(0, startIndex, gc_nMaxCol0, endIndex);
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_RowHide, oThis.getId(),updateRange, new UndoRedoData_FromToRowCol(bHidden, startIndex, endIndex));
}
} }
}; };
Woorksheet.prototype.setRowBestFit=function(bBestFit, height, start, stop){ Woorksheet.prototype.setRowBestFit=function(bBestFit, height, start, stop){
......
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