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/controller/edit/EditText.jsx b/apps/spreadsheeteditor/mobile/src/controller/edit/EditText.jsx
index d0c1588298..25d148f066 100644
--- a/apps/spreadsheeteditor/mobile/src/controller/edit/EditText.jsx
+++ b/apps/spreadsheeteditor/mobile/src/controller/edit/EditText.jsx
@@ -24,6 +24,11 @@ class EditTextController extends Component {
api.asc_setCellUnderline(value);
};
+ toggleStrikethrough(value) {
+ const api = Common.EditorApi.get();
+ api.asc_setCellStrikeout(value);
+ }
+
onParagraphAlign(type) {
const api = Common.EditorApi.get();
let value = AscCommon.align_Left;
@@ -103,6 +108,7 @@ class EditTextController extends Component {
toggleBold={this.toggleBold}
toggleItalic={this.toggleItalic}
toggleUnderline={this.toggleUnderline}
+ toggleStrikethrough={this.toggleStrikethrough}
onParagraphAlign={this.onParagraphAlign}
onParagraphValign={this.onParagraphValign}
changeFontSize={this.changeFontSize}
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/store/textSettings.js b/apps/spreadsheeteditor/mobile/src/store/textSettings.js
index 942d1b571c..a24eb5de31 100644
--- a/apps/spreadsheeteditor/mobile/src/store/textSettings.js
+++ b/apps/spreadsheeteditor/mobile/src/store/textSettings.js
@@ -12,6 +12,7 @@ export class storeTextSettings {
isBold: observable,
isItalic: observable,
isUnderline: observable,
+ isStrikethrough: observable,
textColor: observable,
customTextColors: observable,
paragraphAlign: observable,
@@ -53,6 +54,7 @@ export class storeTextSettings {
isBold = false;
isItalic = false;
isUnderline = false;
+ isStrikethrough = false;
textColor = undefined;
customTextColors = [];
paragraphAlign = undefined;
@@ -79,6 +81,7 @@ export class storeTextSettings {
this.isBold = xfs.asc_getFontBold();
this.isItalic = xfs.asc_getFontItalic();
this.isUnderline = xfs.asc_getFontUnderline();
+ this.isStrikethrough = xfs.asc_getFontStrikeout();
let color = xfs.asc_getFontColor();
// console.log(color);
diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx
index 424a565d6b..df5b79ec1f 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
{
const isBold = storeTextSettings.isBold;
const isItalic = storeTextSettings.isItalic;
const isUnderline = storeTextSettings.isUnderline;
+ const isStrikethrough = storeTextSettings.isStrikethrough;
const paragraphAlign = storeTextSettings.paragraphAlign;
const paragraphValign = storeTextSettings.paragraphValign;
@@ -58,6 +59,7 @@ const EditText = props => {
{props.toggleBold(!isBold)}}>B
{props.toggleItalic(!isItalic)}}>I
{props.toggleUnderline(!isUnderline)}} style={{textDecoration: "underline"}}>U
+ {props.toggleStrikethrough(!isStrikethrough)}} style={{textDecoration: "line-through"}}>S