Commit 353121c3 authored by konovalovsergey's avatar konovalovsergey

table thisRow ValueError, shift undo error, remove DefinedNamesChange,...

table thisRow ValueError, shift undo error, remove DefinedNamesChange, listening name3D, af_setStyleAfterOpen move to model
parent fdef5c51
...@@ -1716,20 +1716,20 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) { ...@@ -1716,20 +1716,20 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) {
this.colStartIndex = this.wb.getTableIndexColumnByName( this.tableName, this.colStart ); this.colStartIndex = this.wb.getTableIndexColumnByName( this.tableName, this.colStart );
this.colEndIndex = this.wb.getTableIndexColumnByName( this.tableName, this.colEnd ); this.colEndIndex = this.wb.getTableIndexColumnByName( this.tableName, this.colEnd );
if( !this.colStartIndex && !this.colEndIndex ){ if( !this.colStartIndex && !this.colEndIndex ){
return this.area = new cError( cErrorType.bad_reference ); return this._createAreaError(paramObj);
} }
} else { } else {
paramObj.startCol = this.oneColumn = val['oneColumn'].replace(/'#/g,"#"); paramObj.startCol = this.oneColumn = val['oneColumn'].replace(/'#/g,"#");
this.oneColumnIndex = this.wb.getTableIndexColumnByName( this.tableName, this.oneColumn ); this.oneColumnIndex = this.wb.getTableIndexColumnByName( this.tableName, this.oneColumn );
if( !this.oneColumnIndex ){ if( !this.oneColumnIndex ){
return this.area = new cError( cErrorType.bad_reference ); return this._createAreaError(paramObj);
} }
} }
var tableData = this.wb.getTableRangeForFormula( this.tableName, paramObj ); var tableData = this.wb.getTableRangeForFormula( this.tableName, paramObj );
if ( !tableData ) { if ( !tableData ) {
return this.area = new cError( cErrorType.bad_reference ); return this._createAreaError(paramObj);
} }
if( tableData.range ){ if( tableData.range ){
this.area = tableData.range.isOneCell() ? this.area = tableData.range.isOneCell() ?
...@@ -1747,7 +1747,7 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) { ...@@ -1747,7 +1747,7 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) {
tableData = this.wb.getTableRangeForFormula( this.tableName, paramObj ); tableData = this.wb.getTableRangeForFormula( this.tableName, paramObj );
if ( !tableData ) { if ( !tableData ) {
return this.area = new cError( cErrorType.bad_reference ); return this._createAreaError(paramObj);
} }
if( tableData.range ){ if( tableData.range ){
this.area = tableData.range.isOneCell() ? this.area = tableData.range.isOneCell() ?
...@@ -1771,7 +1771,7 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) { ...@@ -1771,7 +1771,7 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) {
data = this.wb.getTableRangeForFormula( this.tableName, paramObj ); data = this.wb.getTableRangeForFormula( this.tableName, paramObj );
if ( !data ) { if ( !data ) {
return this.area = new cError( cErrorType.bad_reference ); return this._createAreaError(paramObj);
} }
if ( range ) { if ( range ) {
...@@ -1789,7 +1789,7 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) { ...@@ -1789,7 +1789,7 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) {
this.hdtcstartIndex = this.wb.getTableIndexColumnByName( this.tableName, this.hdtcstart ); this.hdtcstartIndex = this.wb.getTableIndexColumnByName( this.tableName, this.hdtcstart );
if( !this.hdtcstartIndex ){ if( !this.hdtcstartIndex ){
return this.area = new cError( cErrorType.bad_reference ); return this._createAreaError(paramObj);
} }
if ( this.hdtcend ) { if ( this.hdtcend ) {
...@@ -1798,7 +1798,7 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) { ...@@ -1798,7 +1798,7 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) {
this.hdtcendIndex = this.wb.getTableIndexColumnByName( this.tableName, this.hdtcend ); this.hdtcendIndex = this.wb.getTableIndexColumnByName( this.tableName, this.hdtcend );
if( !this.hdtcendIndex ){ if( !this.hdtcendIndex ){
return this.area = new cError( cErrorType.bad_reference ); return this._createAreaError(paramObj);
} }
} }
...@@ -1811,7 +1811,7 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) { ...@@ -1811,7 +1811,7 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) {
data = this.wb.getTableRangeForFormula( this.tableName, paramObj ); data = this.wb.getTableRangeForFormula( this.tableName, paramObj );
if ( !data ) { if ( !data ) {
return this.area = new cError( cErrorType.bad_reference ); return this._createAreaError(paramObj);
} }
range = data.range; range = data.range;
} }
...@@ -1830,6 +1830,13 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) { ...@@ -1830,6 +1830,13 @@ cStrucTable.prototype._createArea = function ( val, opt_bbox ) {
!this.area ? this.area = new cError( cErrorType.bad_reference ) : null; !this.area ? this.area = new cError( cErrorType.bad_reference ) : null;
return this.area; return this.area;
}; };
cStrucTable.prototype._createAreaError = function (paramObj) {
if(AscCommon.FormulaTablePartInfo.thisRow == paramObj.param){
return this.area = new cError( cErrorType.wrong_value_type );
} else {
return this.area = new cError( cErrorType.bad_reference );
}
};
cStrucTable.prototype._buildLocalTableString = function (reservedColumn,local) { cStrucTable.prototype._buildLocalTableString = function (reservedColumn,local) {
return parserHelp.getColumnNameByType(reservedColumn, local); return parserHelp.getColumnNameByType(reservedColumn, local);
}; };
...@@ -4790,7 +4797,7 @@ parserFormula.prototype.calculate = function(opt_defName, opt_range) { ...@@ -4790,7 +4797,7 @@ parserFormula.prototype.calculate = function(opt_defName, opt_range) {
_cellsBbox = elem.getBBox0(); _cellsBbox = elem.getBBox0();
} }
} }
if (_cellsRange) { if (_cellsRange || _cellsBbox) {
var isIntersect; var isIntersect;
if (AscCommon.c_oNotifyType.Shift == notifyType) { if (AscCommon.c_oNotifyType.Shift == notifyType) {
isIntersect = bbox.isIntersectForShift(_cellsBbox, offset); isIntersect = bbox.isIntersectForShift(_cellsBbox, offset);
...@@ -4802,7 +4809,7 @@ parserFormula.prototype.calculate = function(opt_defName, opt_range) { ...@@ -4802,7 +4809,7 @@ parserFormula.prototype.calculate = function(opt_defName, opt_range) {
if (isIntersect) { if (isIntersect) {
var isNoDelete; var isNoDelete;
if (AscCommon.c_oNotifyType.Shift == notifyType) { if (AscCommon.c_oNotifyType.Shift == notifyType) {
isNoDelete = _cellsBbox.forShift(bbox, offset); isNoDelete = _cellsBbox.forShift(bbox, offset, this.wb.bUndoChanges);
} else if (AscCommon.c_oNotifyType.Move == notifyType) { } else if (AscCommon.c_oNotifyType.Move == notifyType) {
_cellsBbox.setOffset(offset); _cellsBbox.setOffset(offset);
isNoDelete = true; isNoDelete = true;
...@@ -4811,18 +4818,20 @@ parserFormula.prototype.calculate = function(opt_defName, opt_range) { ...@@ -4811,18 +4818,20 @@ parserFormula.prototype.calculate = function(opt_defName, opt_range) {
isNoDelete = false; isNoDelete = false;
} else { } else {
isNoDelete = true; isNoDelete = true;
var ltIn = bbox.contains(_cellsBbox.c1, _cellsBbox.r1); if (!this.wb.bUndoChanges) {
var rtIn = bbox.contains(_cellsBbox.c2, _cellsBbox.r1); var ltIn = bbox.contains(_cellsBbox.c1, _cellsBbox.r1);
var lbIn = bbox.contains(_cellsBbox.c1, _cellsBbox.r2); var rtIn = bbox.contains(_cellsBbox.c2, _cellsBbox.r1);
var rbIn = bbox.contains(_cellsBbox.c2, _cellsBbox.r2); var lbIn = bbox.contains(_cellsBbox.c1, _cellsBbox.r2);
if (ltIn && rtIn && bbox.r1 != _cellsBbox.r1) { var rbIn = bbox.contains(_cellsBbox.c2, _cellsBbox.r2);
_cellsBbox.setOffsetFirst({offsetCol: 0, offsetRow: bbox.r2 - _cellsBbox.r1 + 1}); if (ltIn && rtIn && bbox.r1 != _cellsBbox.r1) {
} else if (rtIn && rbIn && bbox.c2 != _cellsBbox.c2) { _cellsBbox.setOffsetFirst({offsetCol: 0, offsetRow: bbox.r2 - _cellsBbox.r1 + 1});
_cellsBbox.setOffsetLast({offsetCol: bbox.c1 - _cellsBbox.c2 - 1, offsetRow: 0}); } else if (rtIn && rbIn && bbox.c2 != _cellsBbox.c2) {
} else if (rbIn && lbIn && bbox.r2 != _cellsBbox.r2) { _cellsBbox.setOffsetLast({offsetCol: bbox.c1 - _cellsBbox.c2 - 1, offsetRow: 0});
_cellsBbox.setOffsetLast({offsetCol: 0, offsetRow: bbox.r1 - _cellsBbox.r2 - 1}); } else if (rbIn && lbIn && bbox.r2 != _cellsBbox.r2) {
} else if (lbIn && ltIn && bbox.c1 != _cellsBbox.c1) { _cellsBbox.setOffsetLast({offsetCol: 0, offsetRow: bbox.r1 - _cellsBbox.r2 - 1});
_cellsBbox.setOffsetFirst({offsetCol: bbox.c2 - _cellsBbox.c1 + 1, offsetRow: 0}); } else if (lbIn && ltIn && bbox.c1 != _cellsBbox.c1) {
_cellsBbox.setOffsetFirst({offsetCol: bbox.c2 - _cellsBbox.c1 + 1, offsetRow: 0});
}
} }
} }
} }
...@@ -5074,8 +5083,10 @@ parserFormula.prototype.assembleLocale = function(locale, digitDelim) { ...@@ -5074,8 +5083,10 @@ parserFormula.prototype.assembleLocale = function(locale, digitDelim) {
continue; continue;
} }
if (ref.type == cElementType.name || ref.type == cElementType.name3D) { if (ref.type == cElementType.name) {
this.wb.dependencyFormulas.startListeningDefName(ref.value, this); this.wb.dependencyFormulas.startListeningDefName(ref.value, this);
} else if (ref.type == cElementType.name3D) {
this.wb.dependencyFormulas.startListeningDefName(ref.value, this, ref.ws.getId());
} else if ((cElementType.cell === ref.type || cElementType.cell3D === ref.type || } else if ((cElementType.cell === ref.type || cElementType.cell3D === ref.type ||
cElementType.cellsRange === ref.type) && ref.isValid()) { cElementType.cellsRange === ref.type) && ref.isValid()) {
this.wb.dependencyFormulas.startListeningRange(ref.getWsId(), ref.getRange().getBBox0(), this); this.wb.dependencyFormulas.startListeningRange(ref.getWsId(), ref.getRange().getBBox0(), this);
...@@ -5114,8 +5125,10 @@ parserFormula.prototype.assembleLocale = function(locale, digitDelim) { ...@@ -5114,8 +5125,10 @@ parserFormula.prototype.assembleLocale = function(locale, digitDelim) {
continue; continue;
} }
if (ref.type == cElementType.name || ref.type == cElementType.name3D) { if (ref.type == cElementType.name) {
this.wb.dependencyFormulas.endListeningDefName(ref.value, this); this.wb.dependencyFormulas.endListeningDefName(ref.value, this);
} else if (ref.type == cElementType.name3D) {
this.wb.dependencyFormulas.endListeningDefName(ref.value, this, ref.ws.getId());
} else if ((cElementType.cell === ref.type || cElementType.cell3D === ref.type || } else if ((cElementType.cell === ref.type || cElementType.cell3D === ref.type ||
cElementType.cellsRange === ref.type) && ref.isValid()) { cElementType.cellsRange === ref.type) && ref.isValid()) {
this.wb.dependencyFormulas.endListeningRange(ref.getWsId(), ref.getRange().getBBox0(), this); this.wb.dependencyFormulas.endListeningRange(ref.getWsId(), ref.getRange().getBBox0(), this);
......
...@@ -417,8 +417,6 @@ var UndoRedoDataTypes = new function() { ...@@ -417,8 +417,6 @@ var UndoRedoDataTypes = new function() {
this.ColorFilter = 38; this.ColorFilter = 38;
this.DefinedName = 39; this.DefinedName = 39;
this.DefinedNamesChange = 40;
this.SheetViewSettings = 43; this.SheetViewSettings = 43;
this.GlobalTableIdAdd = 44; this.GlobalTableIdAdd = 44;
...@@ -521,8 +519,6 @@ var UndoRedoDataTypes = new function() { ...@@ -521,8 +519,6 @@ var UndoRedoDataTypes = new function() {
case this.ParagraphParaItemAdd: return new UndoRedoData_historyitem_Paragraph_AddItem(); case this.ParagraphParaItemAdd: return new UndoRedoData_historyitem_Paragraph_AddItem();
case this.DefinedName: return new UndoRedoData_DefinedNames(); case this.DefinedName: return new UndoRedoData_DefinedNames();
case this.DefinedNamesChange: return new UndoRedoData_DefinedNamesChange();
} }
return null; return null;
}; };
...@@ -1640,19 +1636,17 @@ UndoRedoData_SheetPositions.prototype = { ...@@ -1640,19 +1636,17 @@ UndoRedoData_SheetPositions.prototype = {
}; };
var g_oUndoRedoData_DefinedNamesProperties = { var g_oUndoRedoData_DefinedNamesProperties = {
Name: 0, name: 0,
Ref:1, ref:1,
LocalSheetId:2, sheetId:2,
slaveEdge:3,
isTable:4 isTable:4
}; };
function UndoRedoData_DefinedNames(name, ref, scope, isTable, slaveEdge){ function UndoRedoData_DefinedNames(name, ref, sheetId, isTable){
this.Properties = g_oUndoRedoData_DefinedNamesProperties; this.Properties = g_oUndoRedoData_DefinedNamesProperties;
this.Name = name; this.name = name;
this.Ref = ref; this.ref = ref;
this.LocalSheetId = scope; this.sheetId = sheetId;
this.isTable = isTable; this.isTable = isTable;
this.slaveEdge = slaveEdge;
} }
UndoRedoData_DefinedNames.prototype = { UndoRedoData_DefinedNames.prototype = {
getType : function() getType : function()
...@@ -1667,11 +1661,10 @@ UndoRedoData_DefinedNames.prototype = { ...@@ -1667,11 +1661,10 @@ UndoRedoData_DefinedNames.prototype = {
{ {
switch(nType) switch(nType)
{ {
case this.Properties.Name: return this.Name;break; case this.Properties.name: return this.name;break;
case this.Properties.Ref: return this.Ref;break; case this.Properties.ref: return this.ref;break;
case this.Properties.LocalSheetId: return this.LocalSheetId;break; case this.Properties.sheetId: return this.sheetId;break;
case this.Properties.isTable: return this.isTable;break; case this.Properties.isTable: return this.isTable;break;
case this.Properties.slaveEdge: return this.slaveEdge;break;
} }
return null; return null;
}, },
...@@ -1679,48 +1672,10 @@ UndoRedoData_DefinedNames.prototype = { ...@@ -1679,48 +1672,10 @@ UndoRedoData_DefinedNames.prototype = {
{ {
switch(nType) switch(nType)
{ {
case this.Properties.Name: this.Name = value;break; case this.Properties.name: this.name = value;break;
case this.Properties.Ref: this.Ref = value;break; case this.Properties.ref: this.ref = value;break;
case this.Properties.LocalSheetId: this.LocalSheetId = value;break; case this.Properties.sheetId: this.sheetId = value;break;
case this.Properties.isTable: this.isTable = value;break; case this.Properties.isTable: this.isTable = value;break;
case this.Properties.slaveEdge: this.slaveEdge = value;break;
}
}
};
var g_oUndoRedoData_DefinedNamesChangeProperties = {
oldName: 0,
newName:1
};
function UndoRedoData_DefinedNamesChange(oldName, newName){
this.Properties = g_oUndoRedoData_DefinedNamesChangeProperties;
this.oldName = oldName?new UndoRedoData_DefinedNames(oldName.Name, oldName.Ref, oldName.LocalSheetId, oldName.isTable, null):undefined;
this.newName = newName?new UndoRedoData_DefinedNames(newName.Name, newName.Ref, newName.LocalSheetId, newName.isTable, null):undefined;
}
UndoRedoData_DefinedNamesChange.prototype = {
getType : function()
{
return UndoRedoDataTypes.DefinedNamesChange;
},
getProperties : function()
{
return this.Properties;
},
getProperty : function(nType)
{
switch(nType)
{
case this.Properties.oldName: return this.oldName;break;
case this.Properties.newName: return this.newName;break;
}
return null;
},
setProperty : function(nType, value)
{
switch(nType)
{
case this.Properties.oldName: this.oldName = value;break;
case this.Properties.newName: this.newName = value;break;
} }
} }
}; };
...@@ -3013,21 +2968,21 @@ UndoRedoWorkbook.prototype = { ...@@ -3013,21 +2968,21 @@ UndoRedoWorkbook.prototype = {
else if (AscCH.historyitem_Workbook_DefinedNamesChange === Type || AscCH.historyitem_Workbook_DefinedNamesChangeUndo === Type) { else if (AscCH.historyitem_Workbook_DefinedNamesChange === Type || AscCH.historyitem_Workbook_DefinedNamesChangeUndo === Type) {
var oldName, newName; var oldName, newName;
if (bUndo) { if (bUndo) {
oldName = Data.newName; oldName = Data.to;
newName = Data.oldName; newName = Data.from;
} else { } else {
if (wb.bCollaborativeChanges) { if (wb.bCollaborativeChanges) {
wb.handlers.trigger("asc_onLockDefNameManager", Asc.c_oAscDefinedNameReason.OK); wb.handlers.trigger("asc_onLockDefNameManager", Asc.c_oAscDefinedNameReason.OK);
} }
oldName = Data.oldName; oldName = Data.from;
newName = Data.newName; newName = Data.to;
} }
if (bUndo || AscCH.historyitem_Workbook_DefinedNamesChangeUndo !== Type) { if (bUndo || AscCH.historyitem_Workbook_DefinedNamesChangeUndo !== Type) {
if (null == newName) { if (null == newName) {
wb.delDefinesNames(oldName); wb.delDefinesNamesUndoRedo(oldName);
wb.handlers.trigger("asc_onDelDefName") wb.handlers.trigger("asc_onDelDefName")
} else { } else {
wb.editDefinesNames(oldName, newName); wb.editDefinesNamesUndoRedo(oldName, newName);
wb.handlers.trigger("asc_onEditDefName", oldName, newName); wb.handlers.trigger("asc_onEditDefName", oldName, newName);
} }
} }
...@@ -3926,7 +3881,6 @@ UndoRedoAutoFilters.prototype = { ...@@ -3926,7 +3881,6 @@ UndoRedoAutoFilters.prototype = {
window['AscCommonExcel'].UndoRedoData_SheetRemove = UndoRedoData_SheetRemove; window['AscCommonExcel'].UndoRedoData_SheetRemove = UndoRedoData_SheetRemove;
window['AscCommonExcel'].UndoRedoData_SheetPositions = UndoRedoData_SheetPositions; window['AscCommonExcel'].UndoRedoData_SheetPositions = UndoRedoData_SheetPositions;
window['AscCommonExcel'].UndoRedoData_DefinedNames = UndoRedoData_DefinedNames; window['AscCommonExcel'].UndoRedoData_DefinedNames = UndoRedoData_DefinedNames;
window['AscCommonExcel'].UndoRedoData_DefinedNamesChange = UndoRedoData_DefinedNamesChange;
window['AscCommonExcel'].UndoRedoData_ClrScheme = UndoRedoData_ClrScheme; window['AscCommonExcel'].UndoRedoData_ClrScheme = UndoRedoData_ClrScheme;
window['AscCommonExcel'].UndoRedoData_AutoFilter = UndoRedoData_AutoFilter; window['AscCommonExcel'].UndoRedoData_AutoFilter = UndoRedoData_AutoFilter;
window['AscCommonExcel'].UndoRedoData_SingleProperty = UndoRedoData_SingleProperty; window['AscCommonExcel'].UndoRedoData_SingleProperty = UndoRedoData_SingleProperty;
......
This diff is collapsed.
...@@ -5203,7 +5203,10 @@ TablePart.prototype.getTableRangeForFormula = function(objectParam) ...@@ -5203,7 +5203,10 @@ TablePart.prototype.getTableRangeForFormula = function(objectParam)
} }
case FormulaTablePartInfo.headers: case FormulaTablePartInfo.headers:
{ {
res = new Asc.Range(this.Ref.c1, this.Ref.r1, this.Ref.c2, this.Ref.r1); if(this.HeaderRowCount === null)
{
res = new Asc.Range(this.Ref.c1, this.Ref.r1, this.Ref.c2, this.Ref.r1);
}
break; break;
} }
case FormulaTablePartInfo.totals: case FormulaTablePartInfo.totals:
......
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
} }
}; };
Range.prototype.forShift = function(bbox, offset) { Range.prototype.forShift = function(bbox, offset, bUndo) {
var isNoDelete = true; var isNoDelete = true;
var isHor = 0 != offset.offsetCol; var isHor = 0 != offset.offsetCol;
var toDelete = offset.offsetCol < 0 || offset.offsetRow < 0; var toDelete = offset.offsetCol < 0 || offset.offsetRow < 0;
...@@ -355,14 +355,16 @@ ...@@ -355,14 +355,16 @@
} }
} else if (this.c1 <= bbox.c2) { } else if (this.c1 <= bbox.c2) {
if (this.c2 <= bbox.c2) { if (this.c2 <= bbox.c2) {
var topIn = bbox.r1 <= this.r1 && this.r1 <= bbox.r2; if(!bUndo){
var bottomIn = bbox.r1 <= this.r2 && this.r2 <= bbox.r2; var topIn = bbox.r1 <= this.r1 && this.r1 <= bbox.r2;
if (topIn && bottomIn) { var bottomIn = bbox.r1 <= this.r2 && this.r2 <= bbox.r2;
isNoDelete = false; if (topIn && bottomIn) {
} else if (topIn) { isNoDelete = false;
this.setOffsetFirst({offsetCol: 0, offsetRow: bbox.r2 - this.r1 + 1}); } else if (topIn) {
} else if (bottomIn) { this.setOffsetFirst({offsetCol: 0, offsetRow: bbox.r2 - this.r1 + 1});
this.setOffsetLast({offsetCol: 0, offsetRow: bbox.r1 - this.r2 - 1}); } else if (bottomIn) {
this.setOffsetLast({offsetCol: 0, offsetRow: bbox.r1 - this.r2 - 1});
}
} }
} else { } else {
this.setOffsetFirst({offsetCol: bbox.c1 - this.c1, offsetRow: 0}); this.setOffsetFirst({offsetCol: bbox.c1 - this.c1, offsetRow: 0});
...@@ -388,14 +390,16 @@ ...@@ -388,14 +390,16 @@
} }
} else if (this.r1 <= bbox.r2) { } else if (this.r1 <= bbox.r2) {
if (this.r2 <= bbox.r2) { if (this.r2 <= bbox.r2) {
var leftIn = bbox.c1 <= this.c1 && this.c1 <= bbox.c2; if(!bUndo) {
var rightIn = bbox.c1 <= this.c2 && this.c2 <= bbox.c2; var leftIn = bbox.c1 <= this.c1 && this.c1 <= bbox.c2;
if (leftIn && rightIn) { var rightIn = bbox.c1 <= this.c2 && this.c2 <= bbox.c2;
isNoDelete = false; if (leftIn && rightIn) {
} else if (leftIn) { isNoDelete = false;
this.setOffsetFirst({offsetCol: bbox.c2 - this.c1 + 1, offsetRow: 0}); } else if (leftIn) {
} else if (rightIn) { this.setOffsetFirst({offsetCol: bbox.c2 - this.c1 + 1, offsetRow: 0});
this.setOffsetLast({offsetCol: bbox.c1 - this.c2 - 1, offsetRow: 0}); } else if (rightIn) {
this.setOffsetLast({offsetCol: bbox.c1 - this.c2 - 1, offsetRow: 0});
}
} }
} else { } else {
this.setOffsetFirst({offsetCol: 0, offsetRow: bbox.r1 - this.r1}); this.setOffsetFirst({offsetCol: 0, offsetRow: bbox.r1 - this.r1});
......
...@@ -1171,7 +1171,7 @@ ...@@ -1171,7 +1171,7 @@
this._initWorksheetDefaultWidth(); this._initWorksheetDefaultWidth();
this._initPane(); this._initPane();
this._initCellsArea( true ); this._initCellsArea( true );
this.af_setStyleAfterOpen(); this.model.setTableStyleAfterOpen();
this._cleanCellsTextMetricsCache(); this._cleanCellsTextMetricsCache();
this._prepareCellTextMetricsCache(); this._prepareCellTextMetricsCache();
......
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