Commit 10b0f5d5 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

Bug 24537 - Ошибка в консоли при Undo/Redo применения Merge & Center после Select All

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56462 954022d7-b5bf-4e40-9824-e11837661b57
parent ee0ef3e0
...@@ -2964,11 +2964,18 @@ UndoRedoWoorksheet.prototype = { ...@@ -2964,11 +2964,18 @@ UndoRedoWoorksheet.prototype = {
index = Data.index; index = Data.index;
if(false != this.wb.bCollaborativeChanges) if(false != this.wb.bCollaborativeChanges)
{ {
var range;
if (g_nAllColIndex == index) {
range = new Asc.Range(0, 0, gc_nMaxCol0, gc_nMaxRow0);
}
else {
index = collaborativeEditing.getLockOtherColumn2(nSheetId, index); index = collaborativeEditing.getLockOtherColumn2(nSheetId, index);
range = new Asc.Range(index, 0, index, gc_nMaxRow0);
}
oLockInfo = new Asc.asc_CLockInfo(); oLockInfo = new Asc.asc_CLockInfo();
oLockInfo["sheetId"] = nSheetId; oLockInfo["sheetId"] = nSheetId;
oLockInfo["type"] = c_oAscLockTypeElem.Range; oLockInfo["type"] = c_oAscLockTypeElem.Range;
oLockInfo["rangeOrObjectId"] = new Asc.Range(index, 0, index, gc_nMaxRow0); oLockInfo["rangeOrObjectId"] = range;
this.wb.aCollaborativeChangeElements.push(oLockInfo); this.wb.aCollaborativeChangeElements.push(oLockInfo);
} }
var col = ws._getCol(index); var col = ws._getCol(index);
...@@ -3388,9 +3395,14 @@ UndoRedoRowCol.prototype = { ...@@ -3388,9 +3395,14 @@ UndoRedoRowCol.prototype = {
} }
else else
{ {
if (g_nAllColIndex == nIndex) {
oLockInfo["rangeOrObjectId"] = new Asc.Range(0, 0, gc_nMaxCol0, gc_nMaxRow0);
}
else{
nIndex = collaborativeEditing.getLockOtherColumn2(nSheetId, nIndex); nIndex = collaborativeEditing.getLockOtherColumn2(nSheetId, nIndex);
oLockInfo["rangeOrObjectId"] = new Asc.Range(nIndex, 0, nIndex, gc_nMaxRow0); oLockInfo["rangeOrObjectId"] = new Asc.Range(nIndex, 0, nIndex, gc_nMaxRow0);
} }
}
this.wb.aCollaborativeChangeElements.push(oLockInfo); this.wb.aCollaborativeChangeElements.push(oLockInfo);
} }
var Val; var Val;
......
...@@ -2528,7 +2528,7 @@ Woorksheet.prototype.setColWidth=function(width, start, stop){ ...@@ -2528,7 +2528,7 @@ Woorksheet.prototype.setColWidth=function(width, start, stop){
var oNewProps = col.getWidthProp(); var oNewProps = col.getWidthProp();
if(false == oOldProps.isEqual(oNewProps)) if(false == oOldProps.isEqual(oNewProps))
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_ColProp, oThis.getId(), History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_ColProp, oThis.getId(),
new Asc.Range(col.index, 0, col.index, gc_nMaxRow0), col._getUpdateRange(),
new UndoRedoData_IndexSimpleProp(col.index, false, oOldProps, oNewProps)); new UndoRedoData_IndexSimpleProp(col.index, false, oOldProps, oNewProps));
} }
}; };
...@@ -2578,7 +2578,7 @@ Woorksheet.prototype.setColHidden=function(bHidden, start, stop){ ...@@ -2578,7 +2578,7 @@ Woorksheet.prototype.setColHidden=function(bHidden, start, stop){
var oNewProps = col.getWidthProp(); var oNewProps = col.getWidthProp();
if(false == oOldProps.isEqual(oNewProps)) if(false == oOldProps.isEqual(oNewProps))
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_ColProp, oThis.getId(), History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_ColProp, oThis.getId(),
new Asc.Range(col.index, 0, col.index, gc_nMaxRow0), col._getUpdateRange(),
new UndoRedoData_IndexSimpleProp(col.index, false, oOldProps, oNewProps)); new UndoRedoData_IndexSimpleProp(col.index, false, oOldProps, oNewProps));
} }
}; };
...@@ -2630,7 +2630,7 @@ Woorksheet.prototype.setColBestFit=function(bBestFit, width, start, stop){ ...@@ -2630,7 +2630,7 @@ Woorksheet.prototype.setColBestFit=function(bBestFit, width, start, stop){
var oNewProps = col.getWidthProp(); var oNewProps = col.getWidthProp();
if(false == oOldProps.isEqual(oNewProps)) if(false == oOldProps.isEqual(oNewProps))
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_ColProp, oThis.getId(), History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_ColProp, oThis.getId(),
new Asc.Range(col.index, 0, col.index, gc_nMaxRow0), col._getUpdateRange(),
new UndoRedoData_IndexSimpleProp(col.index, false, oOldProps, oNewProps)); new UndoRedoData_IndexSimpleProp(col.index, false, oOldProps, oNewProps));
}; };
if(0 != start && gc_nMaxCol0 == stop) if(0 != start && gc_nMaxCol0 == stop)
...@@ -2979,7 +2979,7 @@ Woorksheet.prototype._removeRow=function(index){ ...@@ -2979,7 +2979,7 @@ Woorksheet.prototype._removeRow=function(index){
Woorksheet.prototype._getCol=function(index){ Woorksheet.prototype._getCol=function(index){
//0-based //0-based
var oCurCol; var oCurCol;
if(-1 == index) if (g_nAllColIndex == index)
oCurCol = this.getAllCol(); oCurCol = this.getAllCol();
else else
{ {
......
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