From ed909d24b9bae92cadd9c33a3465d22de54ede5d Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 21 Nov 2022 22:57:12 +0300 Subject: [PATCH] [SSE] By bug 59219 (make PDF settings) --- .../main/app/controller/Print.js | 5 +- .../main/app/template/PrintSettings.template | 7 ++- .../main/app/view/PrintSettings.js | 47 +++++++++++++++++-- apps/spreadsheeteditor/main/locale/en.json | 3 ++ .../resources/less/advanced-settings.less | 12 +++++ 5 files changed, 67 insertions(+), 7 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index 988bd9690..07166cb0e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -274,7 +274,7 @@ define([ menu.cmbSheet.setValue(item.get('value')); this.comboSheetsChange(menu, menu.cmbSheet, item.toJSON()); } - //menu.cmbSheet.setDisabled(printtype !== Asc.c_oAscPrintType.EntireWorkbook); + menu.cmbSheet.setDisabled(printtype === Asc.c_oAscPrintType.Selection || printtype === Asc.c_oAscPrintType.ActiveSheets && menu.cmbSheet.store.length < 2); menu.chIgnorePrintArea.setDisabled(printtype == Asc.c_oAscPrintType.Selection); if (!isDlg) { @@ -406,6 +406,9 @@ define([ this.adjPrintParams.asc_setPrintType(printtype); this.adjPrintParams.asc_setPageOptionsMap(this._changedProps); this.adjPrintParams.asc_setIgnorePrintArea(this.printSettingsDlg.getIgnorePrintArea()); + this.adjPrintParams.asc_setActiveSheetsArray(SSE.getController('Statusbar').getSelectTabs()); + this.adjPrintParams.asc_setStartPageIndex(this.printSettingsDlg.getPagesFrom() - 1); + this.adjPrintParams.asc_setEndPageIndex(this.printSettingsDlg.getPagesTo() - 1); Common.localStorage.setItem("sse-print-settings-range", printtype); if ( this.printSettingsDlg.type=='print' ) { diff --git a/apps/spreadsheeteditor/main/app/template/PrintSettings.template b/apps/spreadsheeteditor/main/app/template/PrintSettings.template index f64b909a1..da93aaeb0 100644 --- a/apps/spreadsheeteditor/main/app/template/PrintSettings.template +++ b/apps/spreadsheeteditor/main/app/template/PrintSettings.template @@ -2,8 +2,13 @@
+
+ +
+ +
+
-
diff --git a/apps/spreadsheeteditor/main/app/view/PrintSettings.js b/apps/spreadsheeteditor/main/app/view/PrintSettings.js index 2a6ce5442..69f4fdb29 100644 --- a/apps/spreadsheeteditor/main/app/view/PrintSettings.js +++ b/apps/spreadsheeteditor/main/app/view/PrintSettings.js @@ -62,7 +62,7 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template', template: [ '
', '