From 70d6ecb6dc1b3c0c85d93378368e5f77d488786e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 28 Nov 2022 14:06:48 +0300 Subject: [PATCH] [DE][PE] Fix Bug 59911 --- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/documenteditor/main/app/view/FileMenuPanels.js | 1 + apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/view/FileMenuPanels.js | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index ea4d3dbec..52e3535d7 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -2466,7 +2466,7 @@ define([ this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter)); this.getApplication().getController('RightMenu').updateMetricUnit(); this.getApplication().getController('Toolbar').getView().updateMetricUnit(); - this.getApplication().getController('Print').getView('PrintWithPreview').updateMetricUnit(); + this.appOptions.canPreviewPrint && this.getApplication().getController('Print').getView('PrintWithPreview').updateMetricUnit(); }, onAdvancedOptions: function(type, advOptions, mode, formatOptions) { diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 76b6be72d..03336d599 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -2619,6 +2619,7 @@ define([ }, updateMetricUnit: function() { + if (!this.cmbPaperSize) return; var store = this.cmbPaperSize.store; for (var i=0; i