diff --git a/apps/spreadsheeteditor/mobile/src/controller/edit/EditCell.jsx b/apps/spreadsheeteditor/mobile/src/controller/edit/EditCell.jsx index 3ea369759f..c1835a3212 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/edit/EditCell.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/edit/EditCell.jsx @@ -80,6 +80,11 @@ class EditCellController extends Component { api.asc_setCellUnderline(value); } + toggleStrikethrough(value) { + const api = Common.EditorApi.get(); + api.asc_setCellStrikeout(value); + } + onStyleClick(type) { const api = Common.EditorApi.get(); api.asc_setCellStyle(type); @@ -238,6 +243,7 @@ class EditCellController extends Component { toggleBold={this.toggleBold} toggleItalic={this.toggleItalic} toggleUnderline={this.toggleUnderline} + toggleStrikethrough={this.toggleStrikethrough} onStyleClick={this.onStyleClick} onTextColor={this.onTextColor} onFillColor={this.onFillColor} diff --git a/apps/spreadsheeteditor/mobile/src/store/cellSettings.js b/apps/spreadsheeteditor/mobile/src/store/cellSettings.js index c7e8410c3d..4fdb295122 100644 --- a/apps/spreadsheeteditor/mobile/src/store/cellSettings.js +++ b/apps/spreadsheeteditor/mobile/src/store/cellSettings.js @@ -15,6 +15,7 @@ export class storeCellSettings { isBold: observable, isItalic: observable, isUnderline: observable, + isStrikethrough: observable, hAlignStr: observable, vAlignStr: observable, isWrapText: observable, @@ -62,6 +63,7 @@ export class storeCellSettings { isBold = false; isItalic = false; isUnderline = false; + isStrikethrough = false; hAlignStr = 'left'; vAlignStr = 'bottom'; @@ -146,6 +148,7 @@ export class storeCellSettings { this.isBold = xfs.asc_getFontBold(); this.isItalic = xfs.asc_getFontItalic(); this.isUnderline = xfs.asc_getFontUnderline(); + this.isStrikethrough = xfs.asc_getFontStrikeout(); } initEditorFonts(fonts, select) { diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx index 424a565d6b..249b6b3931 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx @@ -73,6 +73,7 @@ const EditCell = props => { const isBold = storeCellSettings.isBold; const isItalic = storeCellSettings.isItalic; const isUnderline = storeCellSettings.isUnderline; + const isStrikethrough = storeCellSettings.isStrikethrough; const fontColorPreview = fontColor !== 'auto' ? : @@ -98,6 +99,7 @@ const EditCell = props => { {props.toggleBold(!isBold)}}>B {props.toggleItalic(!isItalic)}}>I {props.toggleUnderline(!isUnderline)}} style={{textDecoration: "underline"}}>U + {props.toggleStrikethrough(!isStrikethrough)}} style={{textDecoration: "line-through"}}>S