diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index cb02cb556..a4cc1af8e 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -1787,6 +1787,9 @@ define([
this.showTips([this.scriptLoadError]);
this.tooltip && this.tooltip.getBSTip().$tip.css('z-index', 10000);
return;
+ } else if (id == Asc.c_oAscError.ID.CanNotPasteImage) {
+ this.showTips([this.errorCannotPasteImg], {timeout: 7000, hideCloseTip: true});
+ return;
}
this.hidePreloader();
@@ -3322,7 +3325,8 @@ define([
errorInconsistentExtXlsx: 'An error has occurred while opening the file.
The file content corresponds to spreadsheets (e.g. xlsx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPptx: 'An error has occurred while opening the file.
The file content corresponds to presentations (e.g. pptx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPdf: 'An error has occurred while opening the file.
The file content corresponds to one of the following formats: pdf/djvu/xps/oxps, but the file has the inconsistent extension: %1.',
- errorInconsistentExt: 'An error has occurred while opening the file.
The file content does not match the file extension.'
+ errorInconsistentExt: 'An error has occurred while opening the file.
The file content does not match the file extension.',
+ errorCannotPasteImg: 'We can\'t paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the document.'
}
})(), DE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index ceeff19ba..de9d479cb 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -771,6 +771,7 @@
"DE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.",
"DE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded",
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,
but will not be able to download or print it until the connection is restored and page is reloaded.",
+ "DE.Controllers.Main.errorCannotPasteImg": "We can't paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the document.",
"DE.Controllers.Main.leavePageText": "You have unsaved changes in this document. Click \"Stay on This Page\", then \"Save\" to save them. Click \"Leave This Page\" to discard all the unsaved changes.",
"DE.Controllers.Main.leavePageTextOnClose": "All unsaved changes in this document will be lost.
Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",
"DE.Controllers.Main.loadFontsTextText": "Loading data...",
diff --git a/apps/presentationeditor/main/app/controller/DocumentHolder.js b/apps/presentationeditor/main/app/controller/DocumentHolder.js
index ece6868f3..c909e3ff4 100644
--- a/apps/presentationeditor/main/app/controller/DocumentHolder.js
+++ b/apps/presentationeditor/main/app/controller/DocumentHolder.js
@@ -2163,7 +2163,7 @@ define([
onGuidesClick: function(menu, item) {
if (item.value == 'del-guide' && item.options.guideId)
- this.api.asc_deleteGuide(item.options.guideId);
+ this.documentHolder.fireEvent('guides:delete', [item.options.guideId]);
else if (item.value === 'add-vert' || item.value === 'add-hor')
this.documentHolder.fireEvent('guides:add', [item.value]);
else if (item.value === 'clear')
@@ -2398,7 +2398,7 @@ define([
},
onLockViewProps: function(lock) {
- this.documentHolder && (this.documentHolder._state.viewPropsLock = lock);
+ Common.Utils.InternalSettings.set("pe-lock-view-props", lock);
var me = this,
currentMenu = me.documentHolder.currentMenu;
diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js
index 70bacdbda..e0160cb03 100644
--- a/apps/presentationeditor/main/app/controller/Main.js
+++ b/apps/presentationeditor/main/app/controller/Main.js
@@ -1428,6 +1428,9 @@ define([
this.showTips([this.scriptLoadError]);
this.tooltip && this.tooltip.getBSTip().$tip.css('z-index', 10000);
return;
+ } else if (id == Asc.c_oAscError.ID.CanNotPasteImage) {
+ this.showTips([this.errorCannotPasteImg], {timeout: 7000, hideCloseTip: true});
+ return;
}
this.hidePreloader();
@@ -3052,7 +3055,8 @@ define([
errorInconsistentExtXlsx: 'An error has occurred while opening the file.
The file content corresponds to spreadsheets (e.g. xlsx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPptx: 'An error has occurred while opening the file.
The file content corresponds to presentations (e.g. pptx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPdf: 'An error has occurred while opening the file.
The file content corresponds to one of the following formats: pdf/djvu/xps/oxps, but the file has the inconsistent extension: %1.',
- errorInconsistentExt: 'An error has occurred while opening the file.
The file content does not match the file extension.'
+ errorInconsistentExt: 'An error has occurred while opening the file.
The file content does not match the file extension.',
+ errorCannotPasteImg: 'We can\'t paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the presentation.'
}
})(), PE.Controllers.Main || {}))
});
diff --git a/apps/presentationeditor/main/app/controller/ViewTab.js b/apps/presentationeditor/main/app/controller/ViewTab.js
index 57cb07fd2..9cc92668f 100644
--- a/apps/presentationeditor/main/app/controller/ViewTab.js
+++ b/apps/presentationeditor/main/app/controller/ViewTab.js
@@ -123,6 +123,7 @@ define([
'DocumentHolder': {
'guides:show': _.bind(this.onGuidesShow, this),
'guides:add': _.bind(this.onGuidesAdd, this),
+ 'guides:delete': _.bind(this.onGuidesDelete, this),
'guides:clear': _.bind(this.onGuidesClear, this),
'guides:smart': _.bind(this.onGuidesSmartShow, this),
'gridlines:show': _.bind(this.onGridlinesShow, this),
@@ -277,8 +278,17 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.view);
},
+ onGuidesDelete: function(id) {
+ this.api.asc_deleteGuide(id);
+ this.api.asc_getShowGuides() && (this.api.asc_getGuidesCount()<1) && this.onGuidesShow(false);
+
+ Common.NotificationCenter.trigger('edit:complete', this.view);
+ },
+
onGuidesClear: function() {
this.api.asc_clearGuides();
+ this.api.asc_getShowGuides() && this.onGuidesShow(false);
+
Common.NotificationCenter.trigger('edit:complete', this.view);
},
@@ -365,6 +375,7 @@ define([
onLockViewProps: function(lock) {
this._state.lock_viewProps = lock;
+ Common.Utils.InternalSettings.set("pe-lock-view-props", lock);
if (this.view) {
if (this.view.btnGridlines && (typeof this.view.btnGridlines.menu === 'object') && this.view.btnGridlines.menu.isVisible())
this.onGridlinesAfterShow();
diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js
index 3bb73ee7b..00508b82a 100644
--- a/apps/presentationeditor/main/app/view/DocumentHolder.js
+++ b/apps/presentationeditor/main/app/view/DocumentHolder.js
@@ -1036,10 +1036,11 @@ define([
}
me.mnuGuides.menu.items[6].setChecked(me.api.asc_getShowSmartGuides(), true);
- me.mnuGuides.menu.items[2].setDisabled(me._state.viewPropsLock);
- me.mnuGuides.menu.items[3].setDisabled(me._state.viewPropsLock);
- me.mnuGuides.menu.items[4].setDisabled(me._state.viewPropsLock);
- me.mnuGuides.menu.items[7].setDisabled(me._state.viewPropsLock || !me.api.asc_canClearGuides());
+ var viewPropsLock = !!Common.Utils.InternalSettings.get("pe-lock-view-props");
+ me.mnuGuides.menu.items[2].setDisabled(viewPropsLock);
+ me.mnuGuides.menu.items[3].setDisabled(viewPropsLock);
+ me.mnuGuides.menu.items[4].setDisabled(viewPropsLock);
+ me.mnuGuides.menu.items[7].setDisabled(viewPropsLock || !me.api.asc_canClearGuides());
me.mnuGridlines.menu.items[0].setChecked(me.api.asc_getShowGridlines(), true);
me.mnuGridlines.menu.items[1].setChecked(me.api.asc_getSnapToGrid(), true);
@@ -1072,10 +1073,10 @@ define([
item.setChecked(true);
else
item.setChecked(false);
- item.setDisabled(me._state.viewPropsLock);
+ item.setDisabled(viewPropsLock);
}
- me.mnuGridlines.menu.items[1].setDisabled(me._state.viewPropsLock);
- me.mnuGridlines.menu.items[items.length-1].setDisabled(me._state.viewPropsLock);
+ me.mnuGridlines.menu.items[1].setDisabled(viewPropsLock);
+ me.mnuGridlines.menu.items[items.length-1].setDisabled(viewPropsLock);
me.mnuRulers.setChecked(!Common.Utils.InternalSettings.get("pe-hidden-rulers"));
}
diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json
index 0edde656e..365015f58 100644
--- a/apps/presentationeditor/main/locale/en.json
+++ b/apps/presentationeditor/main/locale/en.json
@@ -843,6 +843,7 @@
"PE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.",
"PE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded",
"PE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,
but will not be able to download or print it until the connection is restored and page is reloaded.",
+ "PE.Controllers.Main.errorCannotPasteImg": "We can't paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the presentation.",
"PE.Controllers.Main.leavePageText": "You have unsaved changes in this presentation. Click \"Stay on This Page\", then \"Save\" to save them. Click \"Leave This Page\" to discard all the unsaved changes.",
"PE.Controllers.Main.leavePageTextOnClose": "All unsaved changes in this presentation will be lost.
Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",
"PE.Controllers.Main.loadFontsTextText": "Loading data...",
diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js
index fc184abe5..42eb0500e 100644
--- a/apps/spreadsheeteditor/main/app/controller/Main.js
+++ b/apps/spreadsheeteditor/main/app/controller/Main.js
@@ -1572,6 +1572,9 @@ define([
this.showTips([this.scriptLoadError]);
this.tooltip && this.tooltip.getBSTip().$tip.css('z-index', 10000);
return;
+ } else if (id == Asc.c_oAscError.ID.CanNotPasteImage) {
+ this.showTips([this.errorCannotPasteImg], {timeout: 7000, hideCloseTip: true});
+ return;
}
this.hidePreloader();
@@ -3716,7 +3719,8 @@ define([
errorInconsistentExtXlsx: 'An error has occurred while opening the file.
The file content corresponds to spreadsheets (e.g. xlsx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPptx: 'An error has occurred while opening the file.
The file content corresponds to presentations (e.g. pptx), but the file has the inconsistent extension: %1.',
errorInconsistentExtPdf: 'An error has occurred while opening the file.
The file content corresponds to one of the following formats: pdf/djvu/xps/oxps, but the file has the inconsistent extension: %1.',
- errorInconsistentExt: 'An error has occurred while opening the file.
The file content does not match the file extension.'
+ errorInconsistentExt: 'An error has occurred while opening the file.
The file content does not match the file extension.',
+ errorCannotPasteImg: 'We can\'t paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the spreadsheet.'
}
})(), SSE.Controllers.Main || {}))
});
diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json
index d56275437..26297cc59 100644
--- a/apps/spreadsheeteditor/main/locale/en.json
+++ b/apps/spreadsheeteditor/main/locale/en.json
@@ -959,6 +959,7 @@
"SSE.Controllers.Main.errorWrongBracketsCount": "An error in the entered formula.
Wrong number of brackets is used.",
"SSE.Controllers.Main.errorWrongOperator": "An error in the entered formula. Wrong operator is used.
Please correct the error.",
"SSE.Controllers.Main.errorWrongPassword": "The password you supplied is not correct.",
+ "SSE.Controllers.Main.errorCannotPasteImg": "We can't paste this image from the Clipboard, but you can save it to your device and \ninsert it from there, or you can copy the image without text and paste it into the spreadsheet.",
"SSE.Controllers.Main.errRemDuplicates": "Duplicate values found and deleted: {0}, unique values left: {1}.",
"SSE.Controllers.Main.leavePageText": "You have unsaved changes in this spreadsheet. Click 'Stay on this Page' then 'Save' to save them. Click 'Leave this Page' to discard all the unsaved changes.",
"SSE.Controllers.Main.leavePageTextOnClose": "All unsaved changes in this spreadsheet will be lost.
Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",