Commit 6f332e1a authored by GoshaZotov's avatar GoshaZotov Committed by Alexander.Trofimov

fix Bug #32324

parent 4049637a
......@@ -12920,7 +12920,7 @@
var insertCellsAndShiftDownRight = function(arn, displayName, type)
{
var range = t.model.getRange3( arn.r1, arn.c1, arn.r2, arn.c2 );
var isCheckChangeAutoFilter = t.af_checkInsDelCells( arn, type, "insCell" );
var isCheckChangeAutoFilter = t.af_checkInsDelCells( arn, type, "insCell", true );
if ( isCheckChangeAutoFilter === false ) {
return;
}
......@@ -13014,7 +13014,7 @@
var deleteCellsAndShiftLeftTop = function(arn, type)
{
var range = t.model.getRange3( arn.r1, arn.c1, arn.r2, arn.c2 );
var isCheckChangeAutoFilter = t.af_checkInsDelCells( arn, type, "delCell" );
var isCheckChangeAutoFilter = t.af_checkInsDelCells( arn, type, "delCell", true );
if ( isCheckChangeAutoFilter === false ) {
return;
}
......@@ -13116,7 +13116,7 @@
this.model.autoFilters.changeDisplayNameTable(tableName, newName);
};
WorksheetView.prototype.af_checkInsDelCells = function(activeRange, val, prop)
WorksheetView.prototype.af_checkInsDelCells = function(activeRange, val, prop, isFromFormatTable)
{
var t = this;
var ws = this.model;
......@@ -13132,6 +13132,8 @@
switch(val)
{
case c_oAscInsertOptions.InsertCellsAndShiftDown:
{
if(isFromFormatTable)
{
//если внизу находится часть форматированной таблицы или это часть форматированной таблицы
if(isPartTablePartsUnderRange)
......@@ -13142,16 +13144,50 @@
{
res = false;
}
}
else
{
if(isPartTablePartsUnderRange)
{
res = false;
}
else if(!isOneTableIntersection)
{
res = false;
}
else if(isOneTableIntersection && !isOneTableIntersection.Ref.isEqual(activeRange))
{
res = false;
}
}
break;
}
case c_oAscInsertOptions.InsertCellsAndShiftRight:
{
//если справа находится часть форматированной таблицы или это часть форматированной таблицы
if(isFromFormatTable)
{
if(isPartTablePartsRightRange)
{
res = false;
}
}
else
{
if(isPartTablePartsRightRange)
{
res = false;
}
else if(!isOneTableIntersection)
{
res = false;
}
else if(isOneTableIntersection && !isOneTableIntersection.Ref.isEqual(activeRange))
{
res = false;
}
}
break;
}
......@@ -13173,20 +13209,56 @@
switch(val)
{
case c_oAscDeleteOptions.DeleteCellsAndShiftTop:
{
if(isFromFormatTable)
{
if(isPartTablePartsUnderRange)
{
res = false;
}
}
else
{
if(isPartTablePartsUnderRange)
{
res = false;
}
else if(!isOneTableIntersection)
{
res = false;
}
else if(isOneTableIntersection && !isOneTableIntersection.Ref.isEqual(activeRange))
{
res = false;
}
}
break;
}
case c_oAscDeleteOptions.DeleteCellsAndShiftLeft:
{
if(isFromFormatTable)
{
if(isPartTablePartsRightRange)
{
res = false;
}
}
else
{
if(isPartTablePartsRightRange)
{
res = false;
}
else if(!isOneTableIntersection)
{
res = false;
}
else if(isOneTableIntersection && !isOneTableIntersection.Ref.isEqual(activeRange))
{
res = false;
}
}
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