From 065cb196463bc1a4347263fef4eb92342c7cff53 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 24 Aug 2021 16:34:30 +0300 Subject: [PATCH 1/3] [SSE mobile] Fix Bug 52115 --- .../mobile/src/view/edit/Edit.jsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx index 2115c773d..17ca519c0 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx @@ -328,7 +328,6 @@ const EditLayoutContent = ({ editors }) => { const EditTabs = props => { const { t } = useTranslation(); const _t = t('View.Edit', {returnObjects: true}); - const store = props.storeFocusObjects; const settings = !store.focusOn ? [] : (store.focusOn === 'obj' ? store.objects : store.selections); let editors = []; @@ -374,7 +373,7 @@ const EditTabs = props => { component: }) } - if (settings.indexOf('hyperlink') > -1) { + if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) { editors.push({ caption: _t.textHyperlink, id: 'edit-link', @@ -404,10 +403,10 @@ const EditView = props => { return ( show_popover ? props.onClosed()}> - + : props.onClosed()}> - + ) }; @@ -428,8 +427,13 @@ const EditOptions = props => { props.onclosed(); }; + const api = Common.EditorApi.get(); + const cellinfo = api.asc_getCellInfo(); + const hyperinfo = cellinfo.asc_getHyperlink(); + const isAddShapeHyperlink = api.asc_canAddShapeHyperlink(); + return ( - + ) }; From e343a3a4f661d38f4f7eb5a08a72ae36f5aa84b8 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 24 Aug 2021 20:18:40 +0300 Subject: [PATCH 2/3] [PE mobile] Fix Bug 47072 --- apps/presentationeditor/mobile/src/controller/edit/EditText.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx b/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx index 46dae3c2a..af17d99a8 100644 --- a/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/controller/edit/EditText.jsx @@ -138,7 +138,7 @@ class EditTextController extends Component { } else { typeof size === 'undefined' || size == '' ? api.FontSizeIn() : size = Math.min(300, ++size); } - if (typeof size !== 'undefined' || size == '') { + if (typeof size !== 'undefined' && size !== '') { api.put_TextPrFontSize(size); } }; From 6ae57c93119c98c9c1f4582ba22c95a9eb6c8d23 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 25 Aug 2021 16:00:51 +0300 Subject: [PATCH 3/3] [DE mobile] Bug 47403 --- .../src/view/settings/DocumentSettings.jsx | 46 ++++++++----------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/settings/DocumentSettings.jsx b/apps/documenteditor/mobile/src/view/settings/DocumentSettings.jsx index e9430a4f8..dd620d449 100644 --- a/apps/documenteditor/mobile/src/view/settings/DocumentSettings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/DocumentSettings.jsx @@ -12,29 +12,7 @@ const PageDocumentFormats = props => { const pageSizesIndex = storeSettings.pageSizesIndex; const pageSizes = storeSettings.getPageSizesList(); const textMetric = Common.Utils.Metric.getCurrentMetricName(); - const margins = props.getMargins(); - const maxMarginsW = margins.maxMarginsW; - const maxMarginsH = margins.maxMarginsH; - - // console.log(margins.left, margins.right, margins.top, margins.bottom); - // console.log(maxMarginsW, maxMarginsH); - - const onFormatChange = (value) => { - let errorMsg; - - if (margins.left + margins.right > maxMarginsW) { - errorMsg = _t.textMarginsW; - } else if (margins.top + margins.bottom > maxMarginsH) { - errorMsg = _t.textMarginsH; - } - - if(errorMsg) { - f7.dialog.alert(errorMsg, _t.notcriticalErrorTitle); - } else { - props.onFormatChange(value); - } - } - + return ( @@ -45,7 +23,7 @@ const PageDocumentFormats = props => { subtitle={parseFloat(Common.Utils.Metric.fnRecalcFromMM(item.value[0]).toFixed(2)) + ' ' + textMetric + ' x ' + parseFloat(Common.Utils.Metric.fnRecalcFromMM(item.value[1]).toFixed(2)) + ' ' + textMetric} name="format-size-checkbox" checked={pageSizesIndex === index} - onClick={e => onFormatChange(item.value)} + onClick={e => props.onFormatChange(item.value)} >)} @@ -58,6 +36,8 @@ const PageDocumentMargins = props => { const _t = t('Settings', {returnObjects: true}); const metricText = Common.Utils.Metric.getMetricName(Common.Utils.Metric.getCurrentMetric()); const margins = props.getMargins(); + const maxMarginsW = margins.maxMarginsW; + const maxMarginsH = margins.maxMarginsH; const [stateTop, setTop] = useState(margins.top); const [stateBottom, setBottom] = useState(margins.bottom); const [stateLeft, setLeft] = useState(margins.left); @@ -65,7 +45,7 @@ const PageDocumentMargins = props => { const onChangeMargins = (align, isDecrement) => { const step = Common.Utils.Metric.fnRecalcToMM(Common.Utils.Metric.getCurrentMetric() === Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1); - let marginValue; + let marginValue, errorMsg; switch (align) { case 'left': marginValue = stateLeft; break; @@ -77,7 +57,21 @@ const PageDocumentMargins = props => { if (isDecrement) { marginValue = Math.max(0, marginValue - step); } else { - marginValue = Math.min((align == 'left' || align == 'right') ? margins.maxMarginsW : margins.maxMarginsH, marginValue + step); + if(align == 'left' || align == 'right') { + marginValue = Math.min(maxMarginsW, marginValue + step); + if(stateLeft + stateRight + step > maxMarginsW) + errorMsg = _t.textMarginsW; + + } else { + marginValue = Math.min(maxMarginsH, marginValue + step); + if(stateTop + stateBottom + step > maxMarginsH) + errorMsg = _t.textMarginsH; + } + + if(errorMsg) { + f7.dialog.alert(errorMsg, _t.notcriticalErrorTitle); + return; + } } switch (align) {