[SSE mobile] Fix Bug 50958
This commit is contained in:
parent
c5874e48ac
commit
b7d5babce1
|
@ -2,6 +2,7 @@ import React, { Component } from "react";
|
||||||
import { ApplicationSettings } from "../../view/settings/ApplicationSettings";
|
import { ApplicationSettings } from "../../view/settings/ApplicationSettings";
|
||||||
import {observer, inject} from "mobx-react";
|
import {observer, inject} from "mobx-react";
|
||||||
import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage';
|
import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage';
|
||||||
|
import {FunctionGroups} from '../../controller/add/AddFunction';
|
||||||
|
|
||||||
class ApplicationSettingsController extends Component {
|
class ApplicationSettingsController extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -16,11 +17,9 @@ class ApplicationSettingsController extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
initRegSettings() {
|
initRegSettings() {
|
||||||
this.props.storeApplicationSettings.getRegCode();
|
|
||||||
|
|
||||||
const info = new Asc.asc_CFormatCellsInfo();
|
const info = new Asc.asc_CFormatCellsInfo();
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
const regCode = this.props.storeApplicationSettings.regCode;
|
const regCode = this.props.storeApplicationSettings.getRegCode();
|
||||||
|
|
||||||
info.asc_setType(Asc.c_oAscNumFormatType.None);
|
info.asc_setType(Asc.c_oAscNumFormatType.None);
|
||||||
info.asc_setSymbol(regCode);
|
info.asc_setSymbol(regCode);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {makeObservable, action, observable} from 'mobx';
|
import {makeObservable, action, observable} from 'mobx';
|
||||||
|
import { LocalStorage } from '../../../../common/mobile/utils/LocalStorage';
|
||||||
|
|
||||||
export class storeApplicationSettings {
|
export class storeApplicationSettings {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -27,7 +28,7 @@ export class storeApplicationSettings {
|
||||||
|
|
||||||
unitMeasurement = Common.Utils.Metric.getCurrentMetric();
|
unitMeasurement = Common.Utils.Metric.getCurrentMetric();
|
||||||
macrosMode = 0;
|
macrosMode = 0;
|
||||||
formulaLang = Common.Locale.currentLang || dataLang[0].value;
|
formulaLang = LocalStorage.getItem('sse-settings-func-lang') || dataLang[0].value;
|
||||||
regCode = undefined;
|
regCode = undefined;
|
||||||
regExample = '';
|
regExample = '';
|
||||||
regData = [];
|
regData = [];
|
||||||
|
@ -70,7 +71,7 @@ export class storeApplicationSettings {
|
||||||
|
|
||||||
getRegCode() {
|
getRegCode() {
|
||||||
const regData = this.regData;
|
const regData = this.regData;
|
||||||
let value = Number(Common.localStorage.getItem('sse-settings-regional'));
|
let value = Number(LocalStorage.getItem('sse-settings-regional'));
|
||||||
|
|
||||||
regData.forEach(obj => {
|
regData.forEach(obj => {
|
||||||
if(obj.code === value) {
|
if(obj.code === value) {
|
||||||
|
@ -81,6 +82,8 @@ export class storeApplicationSettings {
|
||||||
if(!this.regCode) {
|
if(!this.regCode) {
|
||||||
this.regCode = 0x0409;
|
this.regCode = 0x0409;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return this.regCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
changeRegCode(value) {
|
changeRegCode(value) {
|
||||||
|
|
Loading…
Reference in a new issue