From 5229b93eebd964e86586a5d11b3c69b9c3e8484a Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 23 Jun 2021 00:34:35 +0300 Subject: [PATCH 1/3] [PE mobile] Bug 50789 --- apps/spreadsheeteditor/mobile/src/store/textSettings.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/spreadsheeteditor/mobile/src/store/textSettings.js b/apps/spreadsheeteditor/mobile/src/store/textSettings.js index e9b3e5e6d..b17cb0ca7 100644 --- a/apps/spreadsheeteditor/mobile/src/store/textSettings.js +++ b/apps/spreadsheeteditor/mobile/src/store/textSettings.js @@ -16,6 +16,7 @@ export class storeTextSettings { paragraphValign: observable, textIn: observable, initTextSettings: action, + initFontSettings: action, initEditorFonts: action, initFontInfo: action, changeTextColor: action, @@ -46,6 +47,10 @@ export class storeTextSettings { default: this.textIn = 0; } + this.initFontSettings(xfs); + } + + initFontSettings(xfs) { this.fontName = xfs.asc_getFontName(); this.fontSize = xfs.asc_getFontSize(); From c5874e48ac0a6b21b2bc8ff7ff77791c07700232 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 23 Jun 2021 01:38:47 +0300 Subject: [PATCH 2/3] [PE mobile] Fix Bug 47072 --- .../mobile/src/controller/edit/EditText.jsx | 6 +++--- apps/presentationeditor/mobile/src/view/edit/EditText.jsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx b/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx index c81767977..46dae3c2a 100644 --- a/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx @@ -134,11 +134,11 @@ class EditTextController extends Component { let size = curSize; if (isDecrement) { - typeof size === 'undefined' ? api.FontSizeOut() : size = Math.max(1, --size); + typeof size === 'undefined' || size == '' ? api.FontSizeOut() : size = Math.max(1, --size); } else { - typeof size === 'undefined' ? api.FontSizeIn : size = Math.min(300, ++size); + typeof size === 'undefined' || size == '' ? api.FontSizeIn() : size = Math.min(300, ++size); } - if (typeof size !== 'undefined') { + if (typeof size !== 'undefined' || size == '') { api.put_TextPrFontSize(size); } }; diff --git a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx index d7bd881f5..cb78c4800 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx @@ -15,7 +15,7 @@ const EditText = props => { const fontName = storeTextSettings.fontName || _t.textFonts; const fontSize = storeTextSettings.fontSize; const fontColor = storeTextSettings.textColor; - const displaySize = typeof fontSize === 'undefined' ? _t.textAuto : fontSize + ' ' + _t.textPt; + const displaySize = typeof fontSize === 'undefined' || fontSize == '' ? _t.textAuto : fontSize + ' ' + _t.textPt; const isBold = storeTextSettings.isBold; const isItalic = storeTextSettings.isItalic; const isUnderline = storeTextSettings.isUnderline; @@ -173,7 +173,7 @@ const PageFonts = props => { const _t = t('View.Edit', {returnObjects: true}); const storeTextSettings = props.storeTextSettings; const size = storeTextSettings.fontSize; - const displaySize = typeof size === 'undefined' ? _t.textAuto : size + ' ' + _t.textPt; + const displaySize = typeof size === 'undefined' || size == '' ? _t.textAuto : size + ' ' + _t.textPt; const curFontName = storeTextSettings.fontName; const fonts = storeTextSettings.fontsArray; From b7d5babce10a08ba737d645ffcd916380b1caf9a Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 23 Jun 2021 16:08:12 +0300 Subject: [PATCH 3/3] [SSE mobile] Fix Bug 50958 --- .../mobile/src/controller/settings/ApplicationSettings.jsx | 5 ++--- .../mobile/src/store/applicationSettings.js | 7 +++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/src/controller/settings/ApplicationSettings.jsx b/apps/spreadsheeteditor/mobile/src/controller/settings/ApplicationSettings.jsx index f2abdf87a..df4028e75 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/settings/ApplicationSettings.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/settings/ApplicationSettings.jsx @@ -2,6 +2,7 @@ import React, { Component } from "react"; import { ApplicationSettings } from "../../view/settings/ApplicationSettings"; import {observer, inject} from "mobx-react"; import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage'; +import {FunctionGroups} from '../../controller/add/AddFunction'; class ApplicationSettingsController extends Component { constructor(props) { @@ -16,11 +17,9 @@ class ApplicationSettingsController extends Component { } initRegSettings() { - this.props.storeApplicationSettings.getRegCode(); - const info = new Asc.asc_CFormatCellsInfo(); 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_setSymbol(regCode); diff --git a/apps/spreadsheeteditor/mobile/src/store/applicationSettings.js b/apps/spreadsheeteditor/mobile/src/store/applicationSettings.js index faea20f77..d18e04d2e 100644 --- a/apps/spreadsheeteditor/mobile/src/store/applicationSettings.js +++ b/apps/spreadsheeteditor/mobile/src/store/applicationSettings.js @@ -1,4 +1,5 @@ import {makeObservable, action, observable} from 'mobx'; +import { LocalStorage } from '../../../../common/mobile/utils/LocalStorage'; export class storeApplicationSettings { constructor() { @@ -27,7 +28,7 @@ export class storeApplicationSettings { unitMeasurement = Common.Utils.Metric.getCurrentMetric(); macrosMode = 0; - formulaLang = Common.Locale.currentLang || dataLang[0].value; + formulaLang = LocalStorage.getItem('sse-settings-func-lang') || dataLang[0].value; regCode = undefined; regExample = ''; regData = []; @@ -70,7 +71,7 @@ export class storeApplicationSettings { getRegCode() { const regData = this.regData; - let value = Number(Common.localStorage.getItem('sse-settings-regional')); + let value = Number(LocalStorage.getItem('sse-settings-regional')); regData.forEach(obj => { if(obj.code === value) { @@ -81,6 +82,8 @@ export class storeApplicationSettings { if(!this.regCode) { this.regCode = 0x0409; } + + return this.regCode; } changeRegCode(value) {