Commit 41cff84a authored by Alexander.Trofimov's avatar Alexander.Trofimov

add clean cache on native calculate

parent 6b462bbf
......@@ -2353,7 +2353,7 @@
}
};
WorkbookView.prototype.calcPagesPrint = function(adjustPrint) {
WorkbookView.prototype.calcPagesPrint = function (adjustPrint) {
var ws = null;
var wb = this.model;
var activeWs;
......@@ -2361,17 +2361,15 @@
var printType = adjustPrint.asc_getPrintType();
if (printType === Asc.c_oAscPrintType.ActiveSheets) {
activeWs = wb.getActive();
ws = this.getWorksheet();
printPagesData.arrPages =
ws.calcPagesPrint(wb.getWorksheet(activeWs).PagePrintOptions, /*printOnlySelection*/false, /*indexWorksheet*/
activeWs);
ws = this.getWorksheet(activeWs);
printPagesData.arrPages = ws.calcPagesPrint(ws.PagePrintOptions, /*printOnlySelection*/false, /*indexWorksheet*/
activeWs);
} else if (printType === Asc.c_oAscPrintType.EntireWorkbook) {
// Колличество листов
var countWorksheets = this.model.getWorksheetCount();
for (var i = 0; i < countWorksheets; ++i) {
ws = this.getWorksheet(i);
var arrPages = ws.calcPagesPrint(wb.getWorksheet(i).PagePrintOptions, /*printOnlySelection*/false,
/*indexWorksheet*/i);
var arrPages = ws.calcPagesPrint(ws.PagePrintOptions, /*printOnlySelection*/false, /*indexWorksheet*/i);
if (null !== arrPages) {
if (null === printPagesData.arrPages) {
printPagesData.arrPages = [];
......@@ -2381,10 +2379,9 @@
}
} else if (printType === Asc.c_oAscPrintType.Selection) {
activeWs = wb.getActive();
ws = this.getWorksheet();
printPagesData.arrPages =
ws.calcPagesPrint(wb.getWorksheet(activeWs).PagePrintOptions, /*printOnlySelection*/true, /*indexWorksheet*/
activeWs);
ws = this.getWorksheet(activeWs);
printPagesData.arrPages = ws.calcPagesPrint(ws.PagePrintOptions, /*printOnlySelection*/true, /*indexWorksheet*/
activeWs);
}
return printPagesData;
......@@ -2395,6 +2392,7 @@
var item;
for (var i in this.wsViews) {
item = this.wsViews[i];
item._cleanCellsTextMetricsCache();
item._prepareDrawingObjects();
}
};
......
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