Commit 48e7ac13 authored by Alexander.Trofimov's avatar Alexander.Trofimov

common/spellCheckLanguage to function-closure

common/spellCheckLanguagesAll to function-closure
common/spellcheckapi to function-closure
parent 2a9837a9
......@@ -8,15 +8,16 @@
"../common/downloaderfiles.js",
"../common/docscoapicommon.js",
"../common/docscoapi.js",
"../common/spellcheckapi.js",
"../common/spellCheckLanguage.js",
"../common/spellCheckLanguagesAll.js",
"../common/apiCommon.js",
"../common/editorscommon.js",
"../common/NumFormat.js",
"../word/apiDefines.js",
"../common/spellcheckapi.js",
"../common/wordcopypaste.js",
"../common/spellCheckLanguage.js",
"../common/spellCheckLanguagesAll.js",
"../common/Shapes/Serialize.js",
"../common/Shapes/SerializeWriter.js",
"../common/SerializeCommonWordExcel.js",
......
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"use strict";
/* spellCheckLanguages.js
*
* Author: Alexander.Trofimov
* Date: 24.06.13
*/
( /**
* @param {Window} window
* @param {undefined} undefined
......@@ -38,7 +33,6 @@
* Import
* -----------------------------------------------------------------------------
*/
var asc = window["Asc"] ? window["Asc"] : (window["Asc"] = {});
var prot;
/**
......@@ -51,10 +45,6 @@
* @return {*}
*/
function asc_CLanguage (name, id) {
if ( !(this instanceof asc_CLanguage) ) {
return new asc_CLanguage(name, id);
}
this.name = name; // имя языка
this.id = id; // уникальный id языка
......@@ -69,15 +59,13 @@
asc_setName: function (val) { this.name = val; }
};
/*
* Export
* -----------------------------------------------------------------------------
*/
window["Asc"]["asc_CLanguage"] = window["Asc"].asc_CLanguage = asc_CLanguage;
//---------------------------------------------------------export---------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window["AscCommon"].asc_CLanguage = asc_CLanguage;
prot = asc_CLanguage.prototype;
prot["asc_getId"] = prot.asc_getId;
prot["asc_getName"] = prot.asc_getName;
prot["asc_setId"] = prot.asc_setId;
prot["asc_setName"] = prot.asc_setName;
}
)(window);
\ No newline at end of file
)(window);
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"use strict";
/* spellCheckLanguages.js
*
* Author: Alexander.Trofimov
* Date: 24.06.13
( /**
* @param {Window} window
* @param {undefined} undefined
*/
function (window, undefined) {
var g_spellCheckLanguages = [];
//{ "ar", 0x0001 },
//{ "bg", 0x0002 },
......@@ -147,48 +147,48 @@ var g_spellCheckLanguages = [];
//{ "gd", 0x0091 },
//{ "ar-SA", 0x0401 },
//{ "bg-BG", 0x0402 },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("ca-ES", 0x0403));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("ca-ES", 0x0403));
//{ "zh-TW", 0x0404 },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("cs-CZ", 0x0405));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("da-DK", 0x0406));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("de-DE", 0x0407));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("el-GR", 0x0408));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("en-US", 0x0409));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("cs-CZ", 0x0405));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("da-DK", 0x0406));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("de-DE", 0x0407));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("el-GR", 0x0408));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("en-US", 0x0409));
//{ "es-ES_tradnl", 0x040a },
//{ "fi-FI", 0x040b },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("fr-FR", 0x040c));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("fr-FR", 0x040c));
//{ "he-IL", 0x040d },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("hu-HU", 0x040e));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("hu-HU", 0x040e));
//{ "is-IS", 0x040f },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("it-IT", 0x0410));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("it-IT", 0x0410));
//{ "ja-JP", 0x0411 },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("ko-KR", 0x0412));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("nl-NL", 0x0413));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("nb-NO", 0x0414));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("pl-PL", 0x0415));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("pt-BR", 0x0416));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("ko-KR", 0x0412));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("nl-NL", 0x0413));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("nb-NO", 0x0414));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("pl-PL", 0x0415));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("pt-BR", 0x0416));
//{ "rm-CH", 0x0417 },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("ro-RO", 0x0418));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("ru-RU", 0x0419));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("ro-RO", 0x0418));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("ru-RU", 0x0419));
//{ "hr-HR", 0x041a },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("sk-SK", 0x041b));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("sk-SK", 0x041b));
//{ "sq-AL", 0x041c },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("sv-SE", 0x041d));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("sv-SE", 0x041d));
//{ "th-TH", 0x041e },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("tr-TR", 0x041f));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("tr-TR", 0x041f));
//{ "ur-PK", 0x0420 },
//{ "id-ID", 0x0421 },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("uk-UA", 0x0422));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("uk-UA", 0x0422));
//{ "be-BY", 0x0423 },
//{ "sl-SI", 0x0424 },
//{ "et-EE", 0x0425 },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("lv-LV", 0x0426));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("lt-LT", 0x0427));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("lv-LV", 0x0426));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("lt-LT", 0x0427));
//{ "tg-Cyrl-TJ", 0x0428 },
//{ "fa-IR", 0x0429 },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("vi-VN", 0x042a));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("vi-VN", 0x042a));
//{ "hy-AM", 0x042b },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("az-Latn-AZ", 0x042c));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("az-Latn-AZ", 0x042c));
//{ "eu-ES", 0x042d },
//{ "wen-DE", 0x042e },
//{ "mk-MK", 0x042f },
......@@ -279,14 +279,14 @@ g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("az-Latn-AZ", 0x042c));
//{ "gd-GB", 0x0491 },
//{ "ar-IQ", 0x0801 },
//{ "zh-CN", 0x0804 },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("de-CH", 0x0807));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("en-GB", 0x0809));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("de-CH", 0x0807));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("en-GB", 0x0809));
//{ "es-MX", 0x080a },
//{ "fr-BE", 0x080c },
//{ "it-CH", 0x0810 },
//{ "nl-BE", 0x0813 },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("nn-NO", 0x0814));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("pt-PT", 0x0816));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("nn-NO", 0x0814));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("pt-PT", 0x0816));
//{ "ro-MO", 0x0818 },
//{ "ru-MO", 0x0819 },
//{ "sr-Latn-CS", 0x081a },
......@@ -310,9 +310,9 @@ g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("pt-PT", 0x0816));
//{ "ti-ET", 0x0873 },
//{ "ar-EG", 0x0c01 },
//{ "zh-HK", 0x0c04 },
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("de-AT", 0x0c07));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("en-AU", 0x0c09));
g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("es-ES", 0x0c0a));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("de-AT", 0x0c07));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("en-AU", 0x0c09));
g_spellCheckLanguages.push(AscCommon.asc_CLanguage("es-ES", 0x0c0a));
//{ "fr-CA", 0x0c0c },
//{ "sr-Cyrl-CS", 0x0c1a },
//{ "se-FI", 0x0c3b },
......@@ -420,4 +420,9 @@ g_spellCheckLanguages.push(window["Asc"].asc_CLanguage("es-ES", 0x0c0a));
//{ "mn-Mong", 0x7c50 },
//{ "iu-Latn", 0x7c5d },
//{ "tzm-Latn", 0x7c5f },
//{ "ha-Latn", 0x7c68 },
\ No newline at end of file
//{ "ha-Latn", 0x7c68 },
//-----------------------------------------------------------export---------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window["AscCommon"].g_spellCheckLanguages = g_spellCheckLanguages;
})(window);
......@@ -27,8 +27,6 @@
(function(window) {
'use strict';
var asc = window["Asc"];
// Класс надстройка, для online и offline работы
var CSpellCheckApi = function(options) {
this._SpellCheckApi = new SpellCheckApi();
......@@ -238,6 +236,8 @@
this.sockjs = initSocksJs(this.sockjs_url, this);
};
asc.CSpellCheckApi = CSpellCheckApi;
//-----------------------------------------------------------export---------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window["AscCommon"].CSpellCheckApi = CSpellCheckApi;
})(window);
......@@ -276,7 +276,7 @@ function asc_docs_api(name)
this.isCoMarksDraw = false;
// Spell Checking
this.SpellCheckApi = (window["AscDesktopEditor"] === undefined) ? new Asc.CSpellCheckApi() : new CSpellCheckApi_desktop();
this.SpellCheckApi = (window["AscDesktopEditor"] === undefined) ? new AscCommon.CSpellCheckApi() : new CSpellCheckApi_desktop();
this.isSpellCheckEnable = true;
// это чтобы сразу показать ридер, без возможности вернуться в редактор/вьюер
......@@ -1055,7 +1055,7 @@ asc_docs_api.prototype._coSpellCheckInit = function() {
};
asc_docs_api.prototype.asc_getSpellCheckLanguages = function() {
return g_spellCheckLanguages;
return AscCommon.g_spellCheckLanguages;
};
asc_docs_api.prototype.asc_SpellCheckDisconnect = function() {
if (!this.SpellCheckApi)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment