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