Commit 7b9cb9e0 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

copy/paste форматированных таблиц через бинарник

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52180 954022d7-b5bf-4e40-9824-e11837661b57
parent bb4ec90d
......@@ -7055,7 +7055,7 @@
selectionRange = arn.clone(true);
//добавляем автофильтры и форматированные таблицы
if(isLocal && val.lStorage && val.lStorage.autoFilters && val.lStorage.autoFilters.length)
if(isLocal === true && val.lStorage && val.lStorage.autoFilters && val.lStorage.autoFilters.length)
{
var aFilters = val.lStorage.autoFilters;
var range;
......@@ -7069,6 +7069,27 @@
t.autoFilters.addAutoFilter(null, range.bbox, null, null, true);
}
}
else if(isLocal === 'binary' && val.TableParts && val.TableParts.length)
{
var aFilters = val.TableParts;
var range;
var tablePartRange;
var refInsertBinary = t.autoFilters._refToRange(val.activeRange);
var diffRow;
var diffCol;
for(var aF = 0; aF < aFilters.length; aF++)
{
tablePartRange = t.autoFilters._refToRange(aFilters[aF].Ref);
diffRow = tablePartRange.r1 - refInsertBinary.r1;
diffCol = tablePartRange.c1 - refInsertBinary.c1;
range = t.model.getRange3(diffRow + selectionRange.r1, diffCol + selectionRange.c1, diffRow + selectionRange.r1 + (tablePartRange.r2 - tablePartRange.r1), diffCol + selectionRange.c1 + (tablePartRange.c2 - tablePartRange.c1));
if(aFilters[aF].style)
range.cleanFormat();
t.autoFilters.addAutoFilter(aFilters[aF].TableStyleInfo.Name, range.bbox, null, null, true);
if(!aFilters[aF].AutoFilter)
t.autoFilters.addAutoFilter(null, range.bbox, null, null, true);
}
}
// Должны обновить больший range, т.к. мы продолжаем строки в ячейках...
arn.c1 = 0;
......
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