From 643b785dc820f1e68853330d5deb7ecfc4db7fe9 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 20 Dec 2024 12:08:04 +0300 Subject: [PATCH] For bug 72155 --- .../common/main/lib/view/AutoCorrectDialog.js | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/apps/common/main/lib/view/AutoCorrectDialog.js b/apps/common/main/lib/view/AutoCorrectDialog.js index 1c781151f0..45dd59e010 100644 --- a/apps/common/main/lib/view/AutoCorrectDialog.js +++ b/apps/common/main/lib/view/AutoCorrectDialog.js @@ -94,18 +94,6 @@ define([ this.arrAddExceptions = {}; this.arrRemExceptions = {}; - if (this.api) - _exciptionsLangs = this.api.asc_GetAutoCorrectSettings().get_FirstLetterExceptionManager().get_DefaultLangs() || []; - _exciptionsLangs.forEach(function(lang) { - path = me.appPrefix + "settings-letter-exception"; - - value = Common.Utils.InternalSettings.get(path + "-add-" + lang); - me.arrAddExceptions[lang] = value ? JSON.parse(value) : []; - - value = Common.Utils.InternalSettings.get(path + "-rem-" + lang); - me.arrRemExceptions[lang] = value ? JSON.parse(value) : []; - }); - Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options); }, @@ -337,8 +325,19 @@ define([ me.api.asc_SetAutoCorrectDoubleSpaceWithPeriod(checked); }); - // AutoCorrect + if (this.api) + _exciptionsLangs = this.api.asc_GetAutoCorrectSettings().get_FirstLetterExceptionManager().get_DefaultLangs() || []; + _exciptionsLangs.forEach(function(lang) { + var path = me.appPrefix + "settings-letter-exception"; + + var value = Common.Utils.InternalSettings.get(path + "-add-" + lang); + me.arrAddExceptions[lang] = value ? JSON.parse(value) : []; + + value = Common.Utils.InternalSettings.get(path + "-rem-" + lang); + me.arrRemExceptions[lang] = value ? JSON.parse(value) : []; + }); + var exciptionsActiveLang = Common.Utils.InternalSettings.get('settings-letter-exception-lang'); this.exceptionsLangCmb = new Common.UI.ComboBox({ el : $window.find('#auto-correct-exceptions-lang'),