diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 59c2df39d..700c1babe 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -314,7 +314,6 @@ define([ options.asc_setTextParams(textParams); if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) { Common.UI.warning({ - closable: false, title: this.notcriticalErrorTitle, msg: (format == Asc.c_oAscFileType.TXT) ? this.warnDownloadAs : this.warnDownloadAsRTF, buttons: ['ok', 'cancel'], @@ -374,22 +373,17 @@ define([ } else if (format == Asc.c_oAscFileType.PDF || format == Asc.c_oAscFileType.PDFA) this._saveAsFormat(menu, format, ext); else { - (new Common.Views.OptionsDialog({ - width: 300, - title: this.titleConvertOptions, - label: this.textGroup, - items: [ - {caption: this.textChar, value: Asc.c_oAscTextAssociation.BlockChar, checked: true}, - {caption: this.textLine, value: Asc.c_oAscTextAssociation.BlockLine, checked: false}, - {caption: this.textParagraph, value: Asc.c_oAscTextAssociation.PlainLine, checked: false} - ], - handler: function (dlg, result) { - if (result=='ok') { - me._saveAsFormat(menu, format, ext, new AscCommon.asc_CTextParams(dlg.getSettings())); + Common.UI.warning({ + width: 600, + title: this.notcriticalErrorTitle, + msg: Common.Utils.String.format(this.warnDownloadAsPdf, fileType.toUpperCase()), + buttons: ['ok', 'cancel'], + callback: _.bind(function(btn){ + if (btn == 'ok') { + me._saveAsFormat(menu, format, ext, new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine)); } - Common.NotificationCenter.trigger('edit:complete', me.toolbar); - } - })).show(); + }, this) + }); } } else this._saveAsFormat(menu, format, ext); @@ -930,11 +924,7 @@ define([ warnDownloadAsRTF : 'If you continue saving in this format some of the formatting might be lost.
Are you sure you want to continue?', txtUntitled: 'Untitled', txtCompatible: 'The document will be saved to the new format. It will allow to use all the editor features, but might affect the document layout.
Use the \'Compatibility\' option of the advanced settings if you want to make the files compatible with older MS Word versions.', - titleConvertOptions: 'Grouping options', - textGroup: 'Group by', - textChar: 'Char', - textLine: 'Line', - textParagraph: 'Paragraph' + warnDownloadAsPdf: 'Your {0} will be converted to an editable format. This may take a while. The resulting document will be optimized to allow you to edit the text, so it might not look exactly like the original {0}, especially if the original file contained lots of graphics.' }, DE.Controllers.LeftMenu || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index ebd4a4137..d137d0c24 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -552,6 +552,7 @@ define([ this._state.isFromGatewayDownloadAs = true; var _format = (format && (typeof format == 'string')) ? Asc.c_oAscFileType[ format.toUpperCase() ] : null, _defaultFormat = null, + textParams, _supported = [ Asc.c_oAscFileType.TXT, Asc.c_oAscFileType.RTF, @@ -575,6 +576,7 @@ define([ else if (/^djvu$/.test(this.document.fileType)) { _supported = [Asc.c_oAscFileType.PDF]; } + textParams = new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine); } else { _supported = _supported.concat([Asc.c_oAscFileType.PDF, Asc.c_oAscFileType.PDFA]); _defaultFormat = Asc.c_oAscFileType.DOCX; @@ -584,7 +586,13 @@ define([ } if ( !_format || _supported.indexOf(_format) < 0 ) _format = _defaultFormat; - _format ? this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(_format, true)) : this.api.asc_DownloadOrigin(true); + if (_format) { + var options = new Asc.asc_CDownloadOptions(_format, true); + textParams && options.asc_setTextParams(textParams); + this.api.asc_DownloadAs(options); + } else { + this.api.asc_DownloadOrigin(true); + } }, onProcessMouse: function(data) { diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 170f30824..a66896dd9 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -1289,7 +1289,6 @@ define([ !Common.Utils.ModalWindow.isVisible() && Common.UI.warning({ width: 500, - closable: false, msg: this.confirmAddFontName, buttons: ['yes', 'no'], primary: 'yes', diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index bf17005a1..29c15f1eb 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -513,6 +513,7 @@ "DE.Controllers.LeftMenu.txtUntitled": "Untitled", "DE.Controllers.LeftMenu.warnDownloadAs": "If you continue saving in this format all features except the text will be lost.
Are you sure you want to continue?", "DE.Controllers.LeftMenu.warnDownloadAsRTF": "If you continue saving in this format some of the formatting might be lost.
Are you sure you want to continue?", + "DE.Controllers.LeftMenu.warnDownloadAsPdf": "Your {0} will be converted to an editable format. This may take a while. The resulting document will be optimized to allow you to edit the text, so it might not look exactly like the original {0}, especially if the original file contained lots of graphics.", "DE.Controllers.Main.applyChangesTextText": "Loading the changes...", "DE.Controllers.Main.applyChangesTitleText": "Loading the Changes", "DE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.", diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index a36e7b6ed..4d863cbf0 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -1272,7 +1272,6 @@ define([ !Common.Utils.ModalWindow.isVisible() && Common.UI.warning({ width: 500, - closable: false, msg: this.confirmAddFontName, buttons: ['yes', 'no'], primary: 'yes', diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index b85de925e..834cfd680 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1573,7 +1573,6 @@ define([ !Common.Utils.ModalWindow.isVisible() && Common.UI.warning({ width: 500, - closable: false, msg: this.confirmAddFontName, buttons: ['yes', 'no'], primary: 'yes',