diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 347890b05..710aee5bb 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -132,7 +132,7 @@ reviewDisplay: 'original', spellcheck: true, compatibleFeatures: false, - units: 'cm' // cm, pt, inch + unit: 'cm' // cm, pt, inch }, plugins: { autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'], diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index b292f37da..45873fd59 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1316,7 +1316,7 @@ define([ } var value = Common.localStorage.getItem('de-settings-unit'); - value = (value!==null) ? parseInt(value) : (this.appOptions.customization && this.appOptions.customization.units ? Common.Utils.Metric.c_MetricUnits[this.appOptions.customization.units.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); + value = (value!==null) ? parseInt(value) : (this.appOptions.customization && this.appOptions.customization.unit ? Common.Utils.Metric.c_MetricUnits[this.appOptions.customization.unit.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); (value===undefined) && (value = Common.Utils.Metric.getDefaultMetric()); Common.Utils.Metric.setCurrentMetric(value); Common.Utils.InternalSettings.set("de-settings-unit", value); diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 21d5f0693..835009461 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -799,7 +799,7 @@ define([ var me = this; var value = Common.localStorage.getItem('de-mobile-settings-unit'); - value = (value!==null) ? parseInt(value) : (this.appOptions.customization && this.appOptions.customization.units ? Common.Utils.Metric.c_MetricUnits[this.appOptions.customization.units.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); + value = (value!==null) ? parseInt(value) : (this.appOptions.customization && this.appOptions.customization.unit ? Common.Utils.Metric.c_MetricUnits[this.appOptions.customization.unit.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); (value===undefined) && (value = Common.Utils.Metric.getDefaultMetric()); Common.Utils.Metric.setCurrentMetric(value); 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)); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index b420dda34..7487b620a 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1021,7 +1021,7 @@ define([ } var value = Common.localStorage.getItem('pe-settings-unit'); - value = (value!==null) ? parseInt(value) : (me.appOptions.customization && me.appOptions.customization.units ? Common.Utils.Metric.c_MetricUnits[me.appOptions.customization.units.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); + value = (value!==null) ? parseInt(value) : (me.appOptions.customization && me.appOptions.customization.unit ? Common.Utils.Metric.c_MetricUnits[me.appOptions.customization.unit.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); (value===undefined) && (value = Common.Utils.Metric.getDefaultMetric()); Common.Utils.Metric.setCurrentMetric(value); Common.Utils.InternalSettings.set("pe-settings-unit", value); diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 9e5e4ea3c..22f2ded06 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -726,7 +726,7 @@ define([ value; value = Common.localStorage.getItem('pe-mobile-settings-unit'); - value = (value!==null) ? parseInt(value) : (me.appOptions.customization && me.appOptions.customization.units ? Common.Utils.Metric.c_MetricUnits[me.appOptions.customization.units.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); + value = (value!==null) ? parseInt(value) : (me.appOptions.customization && me.appOptions.customization.unit ? Common.Utils.Metric.c_MetricUnits[me.appOptions.customization.unit.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); (value===undefined) && (value = Common.Utils.Metric.getDefaultMetric()); Common.Utils.Metric.setCurrentMetric(value); 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)); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 3954d4e93..773560c63 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1106,7 +1106,7 @@ define([ this.toolbarView = toolbarController.getView('Toolbar'); var value = Common.localStorage.getItem('sse-settings-unit'); - value = (value!==null) ? parseInt(value) : (me.appOptions.customization && me.appOptions.customization.units ? Common.Utils.Metric.c_MetricUnits[me.appOptions.customization.units.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); + value = (value!==null) ? parseInt(value) : (me.appOptions.customization && me.appOptions.customization.unit ? Common.Utils.Metric.c_MetricUnits[me.appOptions.customization.unit.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); (value===undefined) && (value = Common.Utils.Metric.getDefaultMetric()); Common.Utils.Metric.setCurrentMetric(value); Common.Utils.InternalSettings.set("sse-settings-unit", value); diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 3124deb3b..324d0ad13 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -753,7 +753,7 @@ define([ var me = this; var value = Common.localStorage.getItem('se-mobile-settings-unit'); - value = (value!==null) ? parseInt(value) : (me.appOptions.customization && me.appOptions.customization.units ? Common.Utils.Metric.c_MetricUnits[me.appOptions.customization.units.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); + value = (value!==null) ? parseInt(value) : (me.appOptions.customization && me.appOptions.customization.unit ? Common.Utils.Metric.c_MetricUnits[me.appOptions.customization.unit.toLocaleLowerCase()] : Common.Utils.Metric.getDefaultMetric()); (value===undefined) && (value = Common.Utils.Metric.getDefaultMetric()); Common.Utils.Metric.setCurrentMetric(value);