Commit cabad702 authored by GoshaZotov's avatar GoshaZotov

for specialFilteringMode

parent 1d9eb47e
...@@ -8548,10 +8548,12 @@ ...@@ -8548,10 +8548,12 @@
t.model.excludeHiddenRows(false); t.model.excludeHiddenRows(false);
// Если нужно удалить автофильтры - удаляем // Если нужно удалить автофильтры - удаляем
if (val === c_oAscCleanOptions.All || val === c_oAscCleanOptions.Text) { if(true !== window['AscCommonExcel'].specialFilteringMode){
t.model.autoFilters.isEmptyAutoFilters(arn); if (val === c_oAscCleanOptions.All || val === c_oAscCleanOptions.Text) {
} else if (val === c_oAscCleanOptions.Format) { t.model.autoFilters.isEmptyAutoFilters(arn);
t.model.autoFilters.cleanFormat(arn); } else if (val === c_oAscCleanOptions.Format) {
t.model.autoFilters.cleanFormat(arn);
}
} }
// Вызываем функцию пересчета для заголовков форматированной таблицы // Вызываем функцию пересчета для заголовков форматированной таблицы
...@@ -10362,6 +10364,12 @@ ...@@ -10362,6 +10364,12 @@
t.handlers.trigger("selectionMathInfoChanged", t.getSelectionMathInfo()); t.handlers.trigger("selectionMathInfoChanged", t.getSelectionMathInfo());
}; };
var checkLocalChange = function(val){
if(true === window['AscCommonExcel'].specialFilteringMode) {
History.LocalChange = val;
}
};
switch (prop) { switch (prop) {
case "colWidth": case "colWidth":
functionModelAction = function () { functionModelAction = function () {
...@@ -10375,19 +10383,23 @@ ...@@ -10375,19 +10383,23 @@
break; break;
case "showCols": case "showCols":
functionModelAction = function () { functionModelAction = function () {
checkLocalChange(true);
t.model.setColHidden(false, arn.c1, arn.c2); t.model.setColHidden(false, arn.c1, arn.c2);
oRecalcType = AscCommonExcel.recalcType.full; oRecalcType = AscCommonExcel.recalcType.full;
reinitRanges = true; reinitRanges = true;
updateDrawingObjectsInfo = {target: c_oTargetType.ColumnResize, col: arn.c1}; updateDrawingObjectsInfo = {target: c_oTargetType.ColumnResize, col: arn.c1};
checkLocalChange(false);
}; };
this._isLockedAll(onChangeWorksheetCallback); this._isLockedAll(onChangeWorksheetCallback);
break; break;
case "hideCols": case "hideCols":
functionModelAction = function () { functionModelAction = function () {
checkLocalChange(true);
t.model.setColHidden(true, arn.c1, arn.c2); t.model.setColHidden(true, arn.c1, arn.c2);
oRecalcType = AscCommonExcel.recalcType.full; oRecalcType = AscCommonExcel.recalcType.full;
reinitRanges = true; reinitRanges = true;
updateDrawingObjectsInfo = {target: c_oTargetType.ColumnResize, col: arn.c1}; updateDrawingObjectsInfo = {target: c_oTargetType.ColumnResize, col: arn.c1};
checkLocalChange(false);
}; };
this._isLockedAll(onChangeWorksheetCallback); this._isLockedAll(onChangeWorksheetCallback);
break; break;
...@@ -10405,25 +10417,36 @@ ...@@ -10405,25 +10417,36 @@
return this._isLockedAll(onChangeWorksheetCallback); return this._isLockedAll(onChangeWorksheetCallback);
case "showRows": case "showRows":
functionModelAction = function () { functionModelAction = function () {
checkLocalChange(true);
t.model.setRowHidden(false, arn.r1, arn.r2); t.model.setRowHidden(false, arn.r1, arn.r2);
t.model.autoFilters.reDrawFilter(arn); t.model.autoFilters.reDrawFilter(arn);
oRecalcType = AscCommonExcel.recalcType.full; oRecalcType = AscCommonExcel.recalcType.full;
reinitRanges = true; reinitRanges = true;
updateDrawingObjectsInfo = {target: c_oTargetType.RowResize, row: arn.r1}; updateDrawingObjectsInfo = {target: c_oTargetType.RowResize, row: arn.r1};
checkLocalChange(false);
}; };
this._isLockedAll(onChangeWorksheetCallback); this._isLockedAll(onChangeWorksheetCallback);
break; break;
case "hideRows": case "hideRows":
functionModelAction = function () { functionModelAction = function () {
checkLocalChange(true);
t.model.setRowHidden(true, arn.r1, arn.r2); t.model.setRowHidden(true, arn.r1, arn.r2);
t.model.autoFilters.reDrawFilter(arn); t.model.autoFilters.reDrawFilter(arn);
oRecalcType = AscCommonExcel.recalcType.full; oRecalcType = AscCommonExcel.recalcType.full;
reinitRanges = true; reinitRanges = true;
updateDrawingObjectsInfo = {target: c_oTargetType.RowResize, row: arn.r1}; updateDrawingObjectsInfo = {target: c_oTargetType.RowResize, row: arn.r1};
checkLocalChange(false);
}; };
this._isLockedAll(onChangeWorksheetCallback); this._isLockedAll(onChangeWorksheetCallback);
break; break;
case "insCell": case "insCell":
if(true === window['AscCommonExcel'].specialFilteringMode){
if(val === c_oAscInsertOptions.InsertCellsAndShiftRight || val === c_oAscInsertOptions.InsertColumns){
return;
}
}
range = t.model.getRange3(arn.r1, arn.c1, arn.r2, arn.c2); range = t.model.getRange3(arn.r1, arn.c1, arn.r2, arn.c2);
switch (val) { switch (val) {
case c_oAscInsertOptions.InsertCellsAndShiftRight: case c_oAscInsertOptions.InsertCellsAndShiftRight:
...@@ -10533,6 +10556,13 @@ ...@@ -10533,6 +10556,13 @@
} }
break; break;
case "delCell": case "delCell":
if(true === window['AscCommonExcel'].specialFilteringMode){
if(val === c_oAscDeleteOptions.DeleteCellsAndShiftLeft || val === c_oAscDeleteOptions.DeleteColumns){
return;
}
}
range = t.model.getRange3(checkRange.r1, checkRange.c1, checkRange.r2, checkRange.c2); range = t.model.getRange3(checkRange.r1, checkRange.c1, checkRange.r2, checkRange.c2);
switch (val) { switch (val) {
case c_oAscDeleteOptions.DeleteCellsAndShiftLeft: case c_oAscDeleteOptions.DeleteCellsAndShiftLeft:
...@@ -13427,7 +13457,7 @@ ...@@ -13427,7 +13457,7 @@
} }
if(true === window['AscCommonExcel'].specialFilteringMode){ if(true === window['AscCommonExcel'].specialFilteringMode){
return; return false;
} }
var isChangeTableInfo = this.af_checkChangeTableInfo(tablePart, optionType); var isChangeTableInfo = this.af_checkChangeTableInfo(tablePart, optionType);
...@@ -13685,6 +13715,10 @@ ...@@ -13685,6 +13715,10 @@
var deleteTableCallback = function (ref) { var deleteTableCallback = function (ref) {
if(true === window['AscCommonExcel'].specialFilteringMode){
return false;
}
var callback = function (isSuccess) { var callback = function (isSuccess) {
if (false === isSuccess) { if (false === isSuccess) {
return; return;
...@@ -13745,6 +13779,14 @@ ...@@ -13745,6 +13779,14 @@
var ws = this.model; var ws = this.model;
var res = true; var res = true;
if(true === window['AscCommonExcel'].specialFilteringMode){
if(val === c_oAscInsertOptions.InsertCellsAndShiftRight || val === c_oAscInsertOptions.InsertColumns){
return false;
}else if(val === c_oAscDeleteOptions.DeleteCellsAndShiftLeft || val === c_oAscDeleteOptions.DeleteColumns){
return false;
}
}
var intersectionTableParts = ws.autoFilters.getTableIntersectionRange(activeRange); var intersectionTableParts = ws.autoFilters.getTableIntersectionRange(activeRange);
var isPartTablePartsUnderRange = ws.autoFilters._isPartTablePartsUnderRange(activeRange); var isPartTablePartsUnderRange = ws.autoFilters._isPartTablePartsUnderRange(activeRange);
var isPartTablePartsRightRange = ws.autoFilters.isPartTablePartsRightRange(activeRange); var isPartTablePartsRightRange = ws.autoFilters.isPartTablePartsRightRange(activeRange);
...@@ -13909,11 +13951,22 @@ ...@@ -13909,11 +13951,22 @@
formatTableInfo.isDeleteColumn = true; formatTableInfo.isDeleteColumn = true;
formatTableInfo.isDeleteTable = true; formatTableInfo.isDeleteTable = true;
if(true === window['AscCommonExcel'].specialFilteringMode){
formatTableInfo.isDeleteColumn = false;
formatTableInfo.isInsertColumnRight = false;
formatTableInfo.isInsertColumnLeft = false;
}
}; };
WorksheetView.prototype.af_convertTableToRange = function (tableName) { WorksheetView.prototype.af_convertTableToRange = function (tableName) {
var t = this; var t = this;
if(true === window['AscCommonExcel'].specialFilteringMode){
return;
}
var callback = function (isSuccess) { var callback = function (isSuccess) {
if (false === isSuccess) { if (false === isSuccess) {
return; return;
...@@ -13955,6 +14008,10 @@ ...@@ -13955,6 +14008,10 @@
var t = this; var t = this;
range = AscCommonExcel.g_oRangeCache.getAscRange(range); range = AscCommonExcel.g_oRangeCache.getAscRange(range);
if(true === window['AscCommonExcel'].specialFilteringMode){
return;
}
var callback = function (isSuccess) { var callback = function (isSuccess) {
if (false === isSuccess) { if (false === isSuccess) {
return; return;
......
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