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

fix Bug #32324

parent 4049637a
...@@ -12920,7 +12920,7 @@ ...@@ -12920,7 +12920,7 @@
var insertCellsAndShiftDownRight = function(arn, displayName, type) var insertCellsAndShiftDownRight = function(arn, displayName, type)
{ {
var range = t.model.getRange3( arn.r1, arn.c1, arn.r2, arn.c2 ); 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 ) { if ( isCheckChangeAutoFilter === false ) {
return; return;
} }
...@@ -13014,7 +13014,7 @@ ...@@ -13014,7 +13014,7 @@
var deleteCellsAndShiftLeftTop = function(arn, type) var deleteCellsAndShiftLeftTop = function(arn, type)
{ {
var range = t.model.getRange3( arn.r1, arn.c1, arn.r2, arn.c2 ); 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 ) { if ( isCheckChangeAutoFilter === false ) {
return; return;
} }
...@@ -13116,7 +13116,7 @@ ...@@ -13116,7 +13116,7 @@
this.model.autoFilters.changeDisplayNameTable(tableName, newName); 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 t = this;
var ws = this.model; var ws = this.model;
...@@ -13132,15 +13132,33 @@ ...@@ -13132,15 +13132,33 @@
switch(val) switch(val)
{ {
case c_oAscInsertOptions.InsertCellsAndShiftDown: case c_oAscInsertOptions.InsertCellsAndShiftDown:
{ {
//если внизу находится часть форматированной таблицы или это часть форматированной таблицы if(isFromFormatTable)
if(isPartTablePartsUnderRange)
{ {
res = false; //если внизу находится часть форматированной таблицы или это часть форматированной таблицы
if(isPartTablePartsUnderRange)
{
res = false;
}
else if(isOneTableIntersection !== null && !(isOneTableIntersection.Ref.c1 === activeRange.c1 && isOneTableIntersection.Ref.c2 === activeRange.c2))
{
res = false;
}
} }
else if(isOneTableIntersection !== null && !(isOneTableIntersection.Ref.c1 === activeRange.c1 && isOneTableIntersection.Ref.c2 === activeRange.c2)) else
{ {
res = false; if(isPartTablePartsUnderRange)
{
res = false;
}
else if(!isOneTableIntersection)
{
res = false;
}
else if(isOneTableIntersection && !isOneTableIntersection.Ref.isEqual(activeRange))
{
res = false;
}
} }
break; break;
...@@ -13148,9 +13166,27 @@ ...@@ -13148,9 +13166,27 @@
case c_oAscInsertOptions.InsertCellsAndShiftRight: case c_oAscInsertOptions.InsertCellsAndShiftRight:
{ {
//если справа находится часть форматированной таблицы или это часть форматированной таблицы //если справа находится часть форматированной таблицы или это часть форматированной таблицы
if(isPartTablePartsRightRange) if(isFromFormatTable)
{
if(isPartTablePartsRightRange)
{
res = false;
}
}
else
{ {
res = false; if(isPartTablePartsRightRange)
{
res = false;
}
else if(!isOneTableIntersection)
{
res = false;
}
else if(isOneTableIntersection && !isOneTableIntersection.Ref.isEqual(activeRange))
{
res = false;
}
} }
break; break;
...@@ -13174,18 +13210,54 @@ ...@@ -13174,18 +13210,54 @@
{ {
case c_oAscDeleteOptions.DeleteCellsAndShiftTop: case c_oAscDeleteOptions.DeleteCellsAndShiftTop:
{ {
if(isPartTablePartsUnderRange) if(isFromFormatTable)
{
if(isPartTablePartsUnderRange)
{
res = false;
}
}
else
{ {
res = false; if(isPartTablePartsUnderRange)
{
res = false;
}
else if(!isOneTableIntersection)
{
res = false;
}
else if(isOneTableIntersection && !isOneTableIntersection.Ref.isEqual(activeRange))
{
res = false;
}
} }
break; break;
} }
case c_oAscDeleteOptions.DeleteCellsAndShiftLeft: case c_oAscDeleteOptions.DeleteCellsAndShiftLeft:
{ {
if(isPartTablePartsRightRange) if(isFromFormatTable)
{ {
res = false; if(isPartTablePartsRightRange)
{
res = false;
}
}
else
{
if(isPartTablePartsRightRange)
{
res = false;
}
else if(!isOneTableIntersection)
{
res = false;
}
else if(isOneTableIntersection && !isOneTableIntersection.Ref.isEqual(activeRange))
{
res = false;
}
} }
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