From 367fdab1309878bc607b027af8935ad7125b4fdf Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 29 Aug 2022 22:37:59 +0300 Subject: [PATCH] [DE mobile] For Bug 58670 --- apps/documenteditor/mobile/src/controller/ContextMenu.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx index 843fe3fe09..4bc118a2b8 100644 --- a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx @@ -265,12 +265,13 @@ class ContextMenu extends ContextMenuController { } else { const { t } = this.props; const _t = t("ContextMenu", {returnObjects: true}); - const { canViewComments, canCoAuthoring, canComments } = this.props; + const { canViewComments, canCoAuthoring, canComments, dataDoc } = this.props; const api = Common.EditorApi.get(); const inToc = api.asc_GetTableOfContentsPr(true); const stack = api.getSelectedElements(); const canCopy = api.can_CopyCut(); + const docExt = dataDoc ? dataDoc.fileType : ''; let isText = false, isObject = false, @@ -306,14 +307,14 @@ class ContextMenu extends ContextMenuController { } if (!isDisconnected) { - if (canFillForms && canCopy && !locked && !isViewer) { + if (canFillForms && canCopy && !locked && (!isViewer || docExt === 'oform')) { itemsIcon.push({ event: 'cut', icon: 'icon-cut' }); } - if (canFillForms && canCopy && !locked && !isViewer) { + if (canFillForms && canCopy && !locked && (!isViewer || docExt === 'oform')) { itemsIcon.push({ event: 'paste', icon: 'icon-paste'