Commit 199dc9b3 authored by GoshaZotov's avatar GoshaZotov

fix bug - add total/header row in table(change lock range)

parent 5ca6ec55
...@@ -8317,7 +8317,6 @@ ...@@ -8317,7 +8317,6 @@
WorksheetView.prototype.moveRangeHandle = function (arnFrom, arnTo, copyRange) { WorksheetView.prototype.moveRangeHandle = function (arnFrom, arnTo, copyRange) {
var t = this; var t = this;
var oTables = t.model.autoFilters._searchFiltersInRange(arnFrom, true);
var onApplyMoveRangeHandleCallback = function (isSuccess) { var onApplyMoveRangeHandleCallback = function (isSuccess) {
if (false === isSuccess) { if (false === isSuccess) {
t.model.workbook.handlers.trigger("asc_onError", c_oAscError.ID.LockedAllError, c_oAscError.Level.NoCritical); t.model.workbook.handlers.trigger("asc_onError", c_oAscError.ID.LockedAllError, c_oAscError.Level.NoCritical);
...@@ -12722,8 +12721,14 @@ ...@@ -12722,8 +12721,14 @@
if (val === false) { if (val === false) {
res = tablePart.Ref; res = tablePart.Ref;
} else { } else {
var rangeUpTable = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r2 + 1, tablePart.Ref.c2, tablePart.Ref.r2 + 1);
if(this.model.autoFilters._isEmptyRange(rangeUpTable, 0) && this.model.autoFilters.searchRangeInTableParts(rangeUpTable) === -1){
res = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r1, tablePart.Ref.c2, tablePart.Ref.r2 + 1); res = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r1, tablePart.Ref.c2, tablePart.Ref.r2 + 1);
} }
else{
res = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r2 + 1, tablePart.Ref.c2, gc_nMaxRow0);
}
}
break; break;
} }
case c_oAscChangeTableStyleInfo.rowHeader: case c_oAscChangeTableStyleInfo.rowHeader:
...@@ -12731,8 +12736,14 @@ ...@@ -12731,8 +12736,14 @@
if (val === false) { if (val === false) {
res = tablePart.Ref; res = tablePart.Ref;
} else { } else {
var rangeUpTable = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r1 - 1, tablePart.Ref.c2, tablePart.Ref.r1 - 1);
if(this.model.autoFilters._isEmptyRange(rangeUpTable, 0) && this.model.autoFilters.searchRangeInTableParts(rangeUpTable) === -1){
res = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r1 - 1, tablePart.Ref.c2, tablePart.Ref.r2); res = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r1 - 1, tablePart.Ref.c2, tablePart.Ref.r2);
} }
else{
res = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r1 - 1, tablePart.Ref.c2, gc_nMaxRow0);
}
}
break; break;
} }
} }
......
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