From 1f4f904829ed985916c4e9e215233b2030c05827 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Wed, 20 Apr 2022 11:14:46 +0300 Subject: [PATCH 1/2] [SSE] Bug 56326 --- apps/spreadsheeteditor/main/app/controller/Print.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index 3f3336442..319ef2aab 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -160,9 +160,6 @@ define([ comboSheetsChange: function(panel, combo, record) { var currentSheet = record.value; this.fillPageOptions(panel, this._changedProps[currentSheet] ? this._changedProps[currentSheet] : this.api.asc_getPageOptions(currentSheet, true), currentSheet); - if (!this._changedProps[currentSheet]) { - this._changedProps[currentSheet] = this.getPageOptions(this.printSettings, currentSheet); - } }, fillPageOptions: function(panel, props, sheet) { @@ -318,6 +315,7 @@ define([ }, onShowMainSettingsPrint: function() { + var me = this; this._changedProps = []; this.printSettings.$previewBox.removeClass('hidden'); @@ -325,6 +323,11 @@ define([ this.isFillSheets = true; this.updateSettings(this.printSettings); } + this.printSettings.cmbSheet.store.each(function (item) { + var sheetIndex = item.get('value'); + me._changedProps[sheetIndex] = me.api.asc_getPageOptions(sheetIndex, true, true); + }, this); + this.adjPrintParams.asc_setPageOptionsMap(this._changedProps); this.fillPrintOptions(this.adjPrintParams, false); From d8ea92fc4099dc23dcb69e14ec66e774c317a389 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Wed, 20 Apr 2022 16:46:48 +0300 Subject: [PATCH 2/2] [SSE] Bug 56326 --- apps/spreadsheeteditor/main/app/controller/Print.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index 319ef2aab..4bbaaedf4 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -130,6 +130,12 @@ define([ updateSheetsInfo: function() { if (this.printSettings.isVisible()) { this.updateSettings(this.printSettings); + this.printSettings.cmbSheet.store.each(function (item) { + var sheetIndex = item.get('value'); + if (!this._changedProps[sheetIndex]) { + this._changedProps[sheetIndex] = this.api.asc_getPageOptions(sheetIndex, true, true); + } + }, this); } else { this.isFillSheets = false; }