diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 1b7cdc0a4..85ae7ecc5 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1050,7 +1050,7 @@ define([ var value = Common.localStorage.getItem('de-settings-unit'); value = (value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm; Common.Utils.Metric.setCurrentMetric(value); - me.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? c_oAscDocumentUnits.Point : c_oAscDocumentUnits.Millimeter)); + me.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)); value = Common.localStorage.getItem('de-hidden-rulers'); me.api.asc_SetViewRulers(value===null || parseInt(value) === 0); @@ -1589,7 +1589,7 @@ define([ var value = Common.localStorage.getItem("de-settings-unit"); value = (value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm; Common.Utils.Metric.setCurrentMetric(value); - this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? c_oAscDocumentUnits.Point : c_oAscDocumentUnits.Millimeter)); + 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('Toolbar').updateMetricUnit(); }, diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 44c52d14d..3b4dd3f3f 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -818,7 +818,7 @@ define([ var value = Common.localStorage.getItem('pe-settings-unit'); value = (value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm; Common.Utils.Metric.setCurrentMetric(value); - me.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? c_oAscDocumentUnits.Point : c_oAscDocumentUnits.Millimeter)); + me.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)); value = Common.localStorage.getItem('pe-hidden-rulers'); if (me.api.asc_SetViewRulers) me.api.asc_SetViewRulers(value===null || parseInt(value) === 0); @@ -1260,7 +1260,7 @@ define([ var value = Common.localStorage.getItem("pe-settings-unit"); value = (value!==null) ? parseInt(value) : Common.Utils.Metric.c_MetricUnits.cm; Common.Utils.Metric.setCurrentMetric(value); - this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? c_oAscDocumentUnits.Point : c_oAscDocumentUnits.Millimeter)); + 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(); },