From aad4424ed8d54cd9ca1a89447a4a20021be5cdfb Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Thu, 31 Mar 2022 18:15:58 +0300 Subject: [PATCH 1/2] [SSE] Fix bug 56380 --- apps/spreadsheeteditor/main/app/controller/Print.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index ff0c5c8e0..ae8eda435 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -456,8 +456,8 @@ define([ panel.spnMarginRight.on('change', _.bind(this.propertyChange, this, panel)); panel.chPrintGrid.on('change', _.bind(this.propertyChange, this, panel)); panel.chPrintRows.on('change', _.bind(this.propertyChange, this, panel)); - panel.txtRangeTop.on('changing', _.bind(this.propertyChange, this, panel)); - panel.txtRangeLeft.on('changing', _.bind(this.propertyChange, this, panel)); + panel.txtRangeTop.on('changed:after', _.bind(this.propertyChange, this, panel)); + panel.txtRangeLeft.on('changed:after', _.bind(this.propertyChange, this, panel)); panel.txtRangeTop.on('button:click', _.bind(this.onPresetSelect, this, panel, 'top', panel.btnPresetsTop.menu, {value: 'select'})); panel.txtRangeLeft.on('button:click', _.bind(this.onPresetSelect, this, panel, 'left', panel.btnPresetsLeft.menu, {value: 'select'})); panel.btnPresetsTop.menu.on('item:click', _.bind(this.onPresetSelect, this, panel, 'top')); @@ -521,7 +521,6 @@ define([ fillComponents: function(panel, selectdata) { var me = this; panel.txtRangeTop.validation = function(value) { - !me._noApply && me.propertyChange(panel); if (_.isEmpty(value)) { return true; } @@ -531,7 +530,6 @@ define([ selectdata && panel.txtRangeTop.updateBtnHint(this.textSelectRange); panel.txtRangeLeft.validation = function(value) { - !me._noApply && me.propertyChange(panel); if (_.isEmpty(value)) { return true; } From 9d0e5525a6708d2150352ac69a26b20304875583 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Thu, 31 Mar 2022 22:19:38 +0300 Subject: [PATCH 2/2] [SSE] Fix bug 56326 --- apps/spreadsheeteditor/main/app/controller/Print.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index ae8eda435..39bafbddd 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -115,6 +115,7 @@ define([ this.api = o; this.api.asc_registerCallback('asc_onSheetsChanged', _.bind(this.updateSheetsInfo, this)); this.api.asc_registerCallback('asc_onPrintPreviewSheetChanged', _.bind(this.onApiChangePreviewSheet, this)); + this.api.asc_registerCallback('asc_onUpdateDocumentProps', _.bind(this.updateDocumentProps, this)); }, updateSheetsInfo: function() { @@ -746,6 +747,13 @@ define([ this.printSettings.btnNextPage.setDisabled(curPage > pageCount - 2); }, + updateDocumentProps: function (index) { + if (this._isPreviewVisible) { + this._changedProps[index] = this.api.asc_getPageOptions(index); + this.updatePreview(); + } + }, + warnCheckMargings: 'Margins are incorrect', strAllSheets: 'All Sheets', textWarning: 'Warning',