Commit 13ce5ee6 authored by Alexander.Trofimov's avatar Alexander.Trofimov

printSheet -> printSheets

delete isEndPrint
parent 6eb74c33
......@@ -836,7 +836,7 @@ var editor;
if (c_oAscFileType.PDF === sFormat) {
var printPagesData = this.wb.calcPagesPrint(this.adjustPrint);
var pdf_writer = new AscCommonExcel.CPdfPrinter();
var isEndPrint = this.wb.printSheet(pdf_writer, printPagesData);
this.wb.printSheets(pdf_writer, printPagesData);
dataContainer.data = pdf_writer.DocumentRenderer.Memory.GetBase64Memory();
} else if (c_oAscFileType.CSV === sFormat && !options.CSVOptions) {
......@@ -3190,7 +3190,7 @@ var editor;
if (undefined === _printer && _page === undefined) {
var pdf_writer = new AscCommonExcel.CPdfPrinter();
var isEndPrint = this.wb.printSheet(pdf_writer, _printPagesData);
this.wb.printSheets(pdf_writer, _printPagesData);
if (undefined !== window["AscDesktopEditor"]) {
var pagescount = pdf_writer.DocumentRenderer.m_lPagesCount;
......@@ -3214,7 +3214,7 @@ var editor;
return pdf_writer.DocumentRenderer.Memory;
}
var isEndPrint = this.wb.printSheet(_printer, _printPagesData);
this.wb.printSheets(_printer, _printPagesData);
return _printer.DocumentRenderer.Memory;
};
......
......@@ -4282,7 +4282,7 @@ function OfflineEditor () {
var adjustPrint = asc_ReadAdjustPrint(s, p);
var pagesData = _api.wb.calcPagesPrint(adjustPrint);
var pdfWriter = new AscCommonExcel.CPdfPrinter();
var isEndPrint = _api.wb.printSheet(pdfWriter, pagesData);
_api.wb.printSheets(pdfWriter, pagesData);
return pdfWriter.DocumentRenderer.Memory.GetBase64Memory();
};
......
......@@ -2333,15 +2333,12 @@
};
// Печать
WorkbookView.prototype.printSheet = function(pdf_writer, printPagesData) {
WorkbookView.prototype.printSheets = function(pdf_writer, printPagesData) {
var ws;
// Закончили печать или нет
var isEndPrint = false;
if (null === printPagesData.arrPages || 0 === printPagesData.arrPages.length) {
// Печать пустой страницы
ws = this.getWorksheet();
ws.drawForPrint(pdf_writer, null);
isEndPrint = true;
} else {
var indexWorksheet = -1;
var indexWorksheetTmp = -1;
......@@ -2353,10 +2350,7 @@
}
ws.drawForPrint(pdf_writer, printPagesData.arrPages[i]);
}
isEndPrint = (i === printPagesData.arrPages.length);
}
return isEndPrint;
};
WorkbookView.prototype.calcPagesPrint = function(adjustPrint) {
......
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