Commit f4580d22 authored by Igor.Zotov's avatar Igor.Zotov

http://bugzserver/show_bug.cgi?id=29012 - [AutoSave] Потеря формата фрагмента...

http://bugzserver/show_bug.cgi?id=29012 -  [AutoSave] Потеря формата фрагмента форматированной таблицы после drag&drop

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61860 954022d7-b5bf-4e40-9824-e11837661b57
parent e0520b9a
......@@ -6834,10 +6834,6 @@ var maxValRow = 100000;
if(copyRange)
{
this._cloneCtrlAutoFilters(arnTo, arnFrom);
//если не пересекаемся с форматированной таблицей arnTo, но пересекаемся arnFrom
var intersectionFromRange = this._intersectionRangeWithTableParts(arnFrom, aWs);
if(intersectionFromRange !== false && intersectionFromRange.length === 1 && this._intersectionRangeWithTableParts(arnTo, aWs) === false)
this._setStyleAfterMoveTablePart(arnTo, arnFrom);
}
else
{
......@@ -7410,13 +7406,17 @@ var maxValRow = 100000;
return result;
},
_preMoveAutoFilters: function(arnFrom, arnTo)
_preMoveAutoFilters: function(arnFrom, arnTo, copyRange)
{
var aWs = this._getCurrentWS();
var diffCol = arnTo.c1 - arnFrom.c1;
var diffRow = arnTo.r1 - arnFrom.r1;
var applyStyleByCells = true;
if(!copyRange)
{
var findFilters = this._searchFiltersInRange(arnFrom , aWs);
if(findFilters)
{
......@@ -7441,6 +7441,7 @@ var maxValRow = 100000;
this._openHiddenRows(findFilters[i]);
}
applyStyleByCells = false;
}
//TODO пока будем всегда чистить фильтры, которые будут в месте вставки. Позже сделать аналогично MS либо пересмотреть все возможные ситуации.
......@@ -7459,6 +7460,27 @@ var maxValRow = 100000;
else
this.isEmptyAutoFilters(ref, null, null, null, findFilters);
}
applyStyleByCells = false;
}
}
if(applyStyleByCells)
{
var intersectionRangeWithTablePartsFrom = this._intersectionRangeWithTableParts(arnFrom, aWs);
var intersectionRangeWithTablePartsTo = this._intersectionRangeWithTableParts(arnTo, aWs);
if(intersectionRangeWithTablePartsFrom && intersectionRangeWithTablePartsFrom.length === 1 && intersectionRangeWithTablePartsTo === false)
{
//проходимся по всем ячейкам
var cell;
for(var i = arnFrom.r1; i <= arnFrom.r2; i++)
{
for(var j = arnFrom.c1; j <= arnFrom.c2; j++)
{
cell = aWs._getCell(i, j);
cell.setStyle(cell.compiledXfs);
}
}
}
}
},
......
......@@ -7903,8 +7903,7 @@
History.SetSelectionRedo(arnTo.clone());
History.StartTransaction();
if(!copyRange)
t.autoFilters._preMoveAutoFilters(arnFrom, arnTo);
t.autoFilters._preMoveAutoFilters(arnFrom, arnTo, copyRange);
t.model._moveRange(arnFrom, arnTo, copyRange);
t.cellCommentator.moveRangeComments(arnFrom, arnTo);
......
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