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,7 +12721,13 @@ ...@@ -12722,7 +12721,13 @@
if (val === false) { if (val === false) {
res = tablePart.Ref; res = tablePart.Ref;
} else { } else {
res = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r1, tablePart.Ref.c2, tablePart.Ref.r2 + 1); 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);
}
else{
res = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r2 + 1, tablePart.Ref.c2, gc_nMaxRow0);
}
} }
break; break;
} }
...@@ -12731,7 +12736,13 @@ ...@@ -12731,7 +12736,13 @@
if (val === false) { if (val === false) {
res = tablePart.Ref; res = tablePart.Ref;
} else { } else {
res = new Asc.Range(tablePart.Ref.c1, tablePart.Ref.r1 - 1, tablePart.Ref.c2, tablePart.Ref.r2); 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);
}
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