diff --git a/apps/common/main/lib/template/AutoCorrectDialog.template b/apps/common/main/lib/template/AutoCorrectDialog.template
index 6bded0028..09167ce01 100644
--- a/apps/common/main/lib/template/AutoCorrectDialog.template
+++ b/apps/common/main/lib/template/AutoCorrectDialog.template
@@ -66,17 +66,18 @@
-
@@ -85,14 +86,14 @@
-
@@ -101,7 +102,7 @@
-
diff --git a/apps/common/main/lib/view/AutoCorrectDialog.js b/apps/common/main/lib/view/AutoCorrectDialog.js
index 4d813d42c..9e50b9825 100644
--- a/apps/common/main/lib/view/AutoCorrectDialog.js
+++ b/apps/common/main/lib/view/AutoCorrectDialog.js
@@ -325,6 +325,17 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-numbered", checked);
me.api.asc_SetAutomaticNumberedLists(checked);
});
+ this.chDoubleSpaces = new Common.UI.CheckBox({
+ el: panelAutoFormat.find('#id-autocorrect-dialog-chk-double-space'),
+ labelText: this.textDoubleSpaces,
+ value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-double-space")
+ }).on('change', function(field, newValue, oldValue, eOpts){
+ var checked = (field.getValue()==='checked');
+ Common.localStorage.setBool(me.appPrefix + "settings-autoformat-double-space", checked);
+ Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-double-space", checked);
+ me.api.asc_SetAutoCorrectDoubleSpaceWithPeriod(checked);
+ });
+ this.chDoubleSpaces.setVisible(this.appPrefix=='de-');
// AutoCorrect
this.chFLSentence = new Common.UI.CheckBox({
el: $window.find('#id-autocorrect-dialog-chk-fl-sentence'),
@@ -841,7 +852,8 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
textAutoCorrect: 'AutoCorrect',
textFLSentence: 'Capitalize first letter of sentences',
textHyperlink: 'Internet and network paths with hyperlinks',
- textFLCells: 'Capitalize first letter of table cells'
+ textFLCells: 'Capitalize first letter of table cells',
+ textDoubleSpaces: 'Add period with double-space'
}, Common.Views.AutoCorrectDialog || {}))
});
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index 1d2037829..2c6a6115c 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -2663,6 +2663,10 @@ define([
value = Common.localStorage.getBool("de-settings-autoformat-fl-cells", true);
Common.Utils.InternalSettings.set("de-settings-autoformat-fl-cells", value);
me.api.asc_SetAutoCorrectFirstLetterOfCells(value);
+
+ value = Common.localStorage.getBool("de-settings-autoformat-double-space", Common.Utils.isMac); // add period with double-space in MacOs by default
+ Common.Utils.InternalSettings.set("de-settings-autoformat-double-space", value);
+ me.api.asc_SetAutoCorrectDoubleSpaceWithPeriod(value);
},
showRenameUserDialog: function() {
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index 039aa5f8c..aaf79526c 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -234,6 +234,7 @@
"Common.Views.AutoCorrectDialog.warnReplace": "The autocorrect entry for %1 already exists. Do you want to replace it?",
"Common.Views.AutoCorrectDialog.warnReset": "Any autocorrect you added will be removed and the changed ones will be restored to their original values. Do you want to continue?",
"Common.Views.AutoCorrectDialog.warnRestore": "The autocorrect entry for %1 will be reset to its original value. Do you want to continue?",
+ "Common.Views.AutoCorrectDialog.textDoubleSpaces": "Add period with double-space",
"Common.Views.Chat.textSend": "Send",
"Common.Views.Comments.mniAuthorAsc": "Author A to Z",
"Common.Views.Comments.mniAuthorDesc": "Author Z to A",