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) {
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);
}
};
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 (
-
+
)
};