Commit 812da9be authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

http://bugzserver/show_bug.cgi?id=27407 - [Drag&Drop] Потеря формата одной...

http://bugzserver/show_bug.cgi?id=27407 - [Drag&Drop] Потеря формата одной форматированной таблицы, перекрывающей старый диапазон другой таблицы после их переноса

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61460 954022d7-b5bf-4e40-9824-e11837661b57
parent a5784fc2
......@@ -2555,6 +2555,38 @@ var gUndoInsDelCellsFlag = true;
return false;
},
isCheckMoveRange: function(arnFrom)
{
var ws = this.worksheet;
var aWs = this._getCurrentWS();
var tableParts = aWs.TableParts;
var tablePart;
//1) если выделена часть форматированной таблицы и ещё часть(либо полностью)
var counterIntersection = 0;
var counterContains = 0;
for(var i = 0; i < tableParts.length; i++)
{
tablePart = tableParts[i];
if(tablePart.Ref.intersection(arnFrom))
{
if(arnFrom.containsRange(tablePart.Ref))
counterContains++;
else
counterIntersection++;
}
}
if((counterIntersection > 0 && counterContains > 0) || (counterIntersection > 1))
{
ws.model.workbook.handlers.trigger("asc_onError", c_oAscError.ID.AutoFilterDataRangeError, c_oAscError.Level.NoCritical);
return false;
}
return true;
},
_isIntersectionTableParts: function(range)
{
var ws = this.worksheet;
......
......@@ -7861,7 +7861,7 @@
WorksheetView.prototype.moveRangeHandle = function (arnFrom, arnTo, copyRange){
var t = this;
var onApplyMoveRangeHandleCallback = function (isSuccess) {
if (false === isSuccess) {
if (false === isSuccess || false === t.autoFilters.isCheckMoveRange(arnFrom)) {
t._cleanSelectionMoveRange();
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