diff --git a/apps/common/main/lib/template/AutoCorrectDialog.template b/apps/common/main/lib/template/AutoCorrectDialog.template index bd9fc515b..872521c14 100644 --- a/apps/common/main/lib/template/AutoCorrectDialog.template +++ b/apps/common/main/lib/template/AutoCorrectDialog.template @@ -79,3 +79,13 @@ +
+
+
+ +
+
+
+
+
+
diff --git a/apps/common/main/lib/view/AutoCorrectDialog.js b/apps/common/main/lib/view/AutoCorrectDialog.js index b9b8b08a4..9651fa4fa 100644 --- a/apps/common/main/lib/view/AutoCorrectDialog.js +++ b/apps/common/main/lib/view/AutoCorrectDialog.js @@ -64,6 +64,8 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template', ]; if (this.appPrefix=='de-') items.push({panelId: 'id-autocorrect-dialog-settings-de-autoformat', panelCaption: this.textAutoFormat}); + else if (this.appPrefix=='sse-') + items.push({panelId: 'id-autocorrect-dialog-settings-sse-autoformat', panelCaption: this.textAutoFormat}); _.extend(this.options, { title: this.textTitle, @@ -129,6 +131,16 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template', me.api.asc_SetAutoCorrectHyphensWithDash(value); } }; + } else if (this.appPrefix=='sse-') { + var me = this; + this.options.handler = function(result, value) { + if ( result == 'ok' ) { + var value = me.chNewRows.getValue()==='checked'; + Common.localStorage.setBool("sse-settings-autoformat-new-rows", value); + Common.Utils.InternalSettings.set("sse-settings-autoformat-new-rows", value); + me.api.asc_setIncludeNewRowColTable(value); + } + }; } Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options); @@ -325,6 +337,12 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template', labelText: this.textNumbered, value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-numbered") }); + } else if (this.appPrefix=='sse-') { + this.chNewRows = new Common.UI.CheckBox({ + el: $('#id-autocorrect-dialog-chk-new-rows'), + labelText: this.textNewRowCol, + value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-new-rows") + }); } this.applyButtons = $window.find('.dlg-btn.can-apply'); @@ -777,7 +795,9 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template', textQuotes: '"Straight quotes" with "smart quotes"', textHyphens: 'Hyphens (--) with dash (—)', textBulleted: 'Automatic bulleted lists', - textNumbered: 'Automatic numbered lists' + textNumbered: 'Automatic numbered lists', + textApplyAsWork: 'Apply as you work', + textNewRowCol: 'Include new rows and columns in table' }, Common.Views.AutoCorrectDialog || {})) }); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 17dc7ab34..9d4018993 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -2267,6 +2267,10 @@ define([ Common.Utils.InternalSettings.set("sse-settings-rec-functions-rem", value); arrRem = value ? JSON.parse(value) : []; me.api.asc_refreshOnStartAutoCorrectMathFunctions(arrRem, arrAdd); + + value = Common.localStorage.getBool("sse-settings-autoformat-new-rows", true); + Common.Utils.InternalSettings.set("sse-settings-autoformat-new-rows", value); + me.api.asc_setIncludeNewRowColTable(value); }, 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.', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index db5b751cd..394aba288 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -76,6 +76,9 @@ "Common.Views.AutoCorrectDialog.textRecognizedDesc": "The following expressions are recognized math expressions. They will not be automatically italicized.", "Common.Views.AutoCorrectDialog.textWarnAddRec": "Recognized functions must contain only the letters A through Z, uppercase or lowercase.", "Common.Views.AutoCorrectDialog.textWarnResetRec": "Any expression you added will be removed and the removed ones will be restored. Do you want to continue?", + "Common.Views.AutoCorrectDialog.textAutoFormat": "AutoFormat As You Type", + "Common.Views.AutoCorrectDialog.textApplyAsWork": "Apply as you work", + "Common.Views.AutoCorrectDialog.textNewRowCol": "Include new rows and columns in table", "Common.Views.Chat.textSend": "Send", "Common.Views.Comments.textAdd": "Add", "Common.Views.Comments.textAddComment": "Add Comment",