Commit cf1218fd authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs_onlyoffice_sdkjs: new version from:

https://lab.nexedi.com/bk/sdkjs/commits/merge_jio_xmla.171114
parent 55da9892
......@@ -20,9 +20,7 @@
"../common/apiBase.js",
"../common/Private/license.js",
"../word/apiCommon.js",
"../cell/api.js",
"../common/Local/license.js",
"../common/Local/jio.js"
"../cell/api.js"
],
"common": [
"../common/downloaderfiles.js",
......@@ -140,18 +138,21 @@
"../cell/model/PivotTables.js",
"../word/Editor/DocumentContentElementBase.js",
"../word/Editor/ParagraphContentBase.js",
"../word/Editor/Bookmarks.js",
"../word/Editor/Comments.js",
"../word/Editor/CommentsChanges.js",
"../word/Editor/Styles.js",
"../word/Editor/StylesChanges.js",
"../word/Editor/RevisionsChange.js",
"../word/Editor/FlowObjects.js",
"../word/Editor/ParagraphContent.js",
"../word/Editor/ParagraphContentBase.js",
"../word/Editor/ParagraphContent.js",
"../word/Editor/Paragraph/ParaTextPr.js",
"../word/Editor/Paragraph/ParaTextPrChanges.js",
"../word/Editor/Paragraph/ParaDrawing.js",
"../word/Editor/Paragraph/ParaDrawingChanges.js",
"../word/Editor/Paragraph/ComplexFieldInstruction.js",
"../word/Editor/Paragraph/ComplexField.js",
"../word/Editor/Hyperlink.js",
"../word/Editor/HyperlinkChanges.js",
"../word/Editor/Field.js",
......@@ -218,9 +219,7 @@
"../common/text_input.js",
"../common/Drawings/Format/OleObject.js",
"../common/Drawings/Format/DrawingContent.js",
"../common/plugins.js",
"../common/Local/common_jio.js",
"../cell/Local/api_jio.js"
"../common/plugins.js"
],
"private": [
"../cell/Private/comments.js"
......@@ -276,6 +275,8 @@
"../common/externs/jquery-3.2.js",
"../common/externs/xregexp-3.0.0.js",
"../common/externs/sockjs.js",
"../common/externs/Xmla.js",
"../common/externs/rsvp-2.0.4.js",
"../common/externs/jszip.min.js",
"../common/externs/jszip-utils.js"
],
......
......@@ -20,11 +20,8 @@
"../common/apiBase.js",
"../common/Private/license.js",
"../word/apiCommon.js",
"../slide/api.js",
"../common/Local/license.js",
"../common/Local/empty_slide.js",
"../common/Local/jio.js"
],
"../slide/api.js"
],
"common": [
"../common/downloaderfiles.js",
"../common/NumFormat.js",
......@@ -151,6 +148,8 @@
"../word/Editor/Paragraph/ParaTextPrChanges.js",
"../word/Editor/Paragraph/ParaDrawing.js",
"../word/Editor/Paragraph/ParaDrawingChanges.js",
"../word/Editor/Paragraph/ComplexFieldInstruction.js",
"../word/Editor/Paragraph/ComplexField.js",
"../word/Editor/Hyperlink.js",
"../word/Editor/HyperlinkChanges.js",
"../word/Editor/Field.js",
......@@ -207,9 +206,7 @@
"../common/text_input.js",
"../common/Drawings/Format/OleObject.js",
"../common/Drawings/Format/DrawingContent.js",
"../common/plugins.js",
"../common/Local/common_jio.js",
"../slide/Local/api_jio.js"
"../common/plugins.js"
],
"private": [
"../slide/Private/comments.js",
......@@ -227,20 +224,16 @@
]
},
"mobile_banners": {
"min": [
"../common/Native/native.js",
"../common/Native/jquery_native.js",
"../../web-apps/vendor/xregexp/xregexp-all-min.js"
"min": [
"../common/Native/Wrappers/memory.js"
],
"common": []
},
"mobile": [
"../common/Native/Wrappers/memory.js",
"../common/Native/Wrappers/TextMeasurerWrapper.js",
"../common/Native/Wrappers/DrawingStream.js",
"../common/Native/Wrappers/ShapeDrawer.js",
"../common/Native/Wrappers/Overlay.js",
"../slide/Native/native.js",
"../slide/Native/Wrappers/api.js",
"../slide/Native/Wrappers/HtmlPage.js",
"../slide/Native/Wrappers/DrawingDocument.js",
......
......@@ -20,10 +20,8 @@
"../common/apiBase.js",
"../common/Private/license.js",
"../word/apiCommon.js",
"../word/api.js",
"../common/Local/license.js",
"../common/Local/jio.js"
],
"../word/api.js"
],
"common": [
"../common/downloaderfiles.js",
"../common/NumFormat.js",
......@@ -109,18 +107,21 @@
"../word/Editor/GraphicObjects/GraphicPage.js",
"../word/Editor/GraphicObjects/WrapManager.js",
"../word/Editor/DocumentContentElementBase.js",
"../word/Editor/ParagraphContentBase.js",
"../word/Editor/Comments.js",
"../word/Editor/CommentsChanges.js",
"../word/Editor/Bookmarks.js",
"../word/Editor/Styles.js",
"../word/Editor/StylesChanges.js",
"../word/Editor/RevisionsChange.js",
"../word/Editor/FlowObjects.js",
"../word/Editor/ParagraphContent.js",
"../word/Editor/ParagraphContentBase.js",
"../word/Editor/ParagraphContent.js",
"../word/Editor/Paragraph/ParaTextPr.js",
"../word/Editor/Paragraph/ParaTextPrChanges.js",
"../word/Editor/Paragraph/ParaDrawing.js",
"../word/Editor/Paragraph/ParaDrawingChanges.js",
"../word/Editor/Paragraph/ComplexFieldInstruction.js",
"../word/Editor/Paragraph/ComplexField.js",
"../word/Editor/Hyperlink.js",
"../word/Editor/HyperlinkChanges.js",
"../word/Editor/Field.js",
......@@ -195,9 +196,7 @@
"../common/text_input.js",
"../common/Drawings/Format/OleObject.js",
"../common/Drawings/Format/DrawingContent.js",
"../common/plugins.js",
"../common/Local/common_jio.js",
"../word/Local/api_jio.js"
"../common/plugins.js"
],
"private": [
"../common/Private/versionHistory.js",
......
......@@ -87,7 +87,6 @@ onlyoffice/sdkjs/build/configs/webexcel.json\n
onlyoffice/sdkjs/build/configs/webpowerpoint.json\n
onlyoffice/sdkjs/build/configs/webword.json\n
onlyoffice/sdkjs/cell/Local/api.js\n
onlyoffice/sdkjs/cell/Local/api_jio.js\n
onlyoffice/sdkjs/cell/Private/comments.js\n
onlyoffice/sdkjs/cell/api.js\n
onlyoffice/sdkjs/cell/apiBuilder.js\n
......@@ -207,9 +206,6 @@ onlyoffice/sdkjs/common/Images/plus_copy_2x.png\n
onlyoffice/sdkjs/common/Images/text_copy.png\n
onlyoffice/sdkjs/common/Images/text_copy_2x.png\n
onlyoffice/sdkjs/common/Local/common.js\n
onlyoffice/sdkjs/common/Local/common_jio.js\n
onlyoffice/sdkjs/common/Local/empty_slide.js\n
onlyoffice/sdkjs/common/Local/jio.js\n
onlyoffice/sdkjs/common/Local/license.js\n
onlyoffice/sdkjs/common/Merge/NodejsEnv.js\n
onlyoffice/sdkjs/common/Native/Wrappers/DrawingDocument.js\n
......@@ -248,12 +244,6 @@ onlyoffice/sdkjs/common/docscoapicommon.js\n
onlyoffice/sdkjs/common/downloaderfiles.js\n
onlyoffice/sdkjs/common/easysax.js\n
onlyoffice/sdkjs/common/editorscommon.js\n
onlyoffice/sdkjs/common/externs/global.js\n
onlyoffice/sdkjs/common/externs/jquery-3.2.js\n
onlyoffice/sdkjs/common/externs/jszip-utils.js\n
onlyoffice/sdkjs/common/externs/jszip.min.js\n
onlyoffice/sdkjs/common/externs/sockjs.js\n
onlyoffice/sdkjs/common/externs/xregexp-3.0.0.js\n
onlyoffice/sdkjs/common/openxml.js\n
onlyoffice/sdkjs/common/pluginBase.js\n
onlyoffice/sdkjs/common/plugins.js\n
......@@ -282,11 +272,9 @@ onlyoffice/sdkjs/slide/Editor/Format/SlideMaster.js\n
onlyoffice/sdkjs/slide/Editor/Format/StylesPrototype.js\n
onlyoffice/sdkjs/slide/Editor/Format/TextBodyPrototype.js\n
onlyoffice/sdkjs/slide/Local/api.js\n
onlyoffice/sdkjs/slide/Local/api_jio.js\n
onlyoffice/sdkjs/slide/Native/Wrappers/DrawingDocument.js\n
onlyoffice/sdkjs/slide/Native/Wrappers/HtmlPage.js\n
onlyoffice/sdkjs/slide/Native/Wrappers/api.js\n
onlyoffice/sdkjs/slide/Native/native.js\n
onlyoffice/sdkjs/slide/Private/comments.js\n
onlyoffice/sdkjs/slide/Texture/Canvas.png\n
onlyoffice/sdkjs/slide/Texture/Carton.png\n
......@@ -344,6 +332,7 @@ onlyoffice/sdkjs/word/Drawing/ShapeDrawer.js\n
onlyoffice/sdkjs/word/Drawing/documentrenderer.js\n
onlyoffice/sdkjs/word/Drawing/mobileTouchManager.js\n
onlyoffice/sdkjs/word/Drawing/translations.js\n
onlyoffice/sdkjs/word/Editor/Bookmarks.js\n
onlyoffice/sdkjs/word/Editor/CollaborativeEditing.js\n
onlyoffice/sdkjs/word/Editor/Comments.js\n
onlyoffice/sdkjs/word/Editor/CommentsChanges.js\n
......@@ -382,6 +371,8 @@ onlyoffice/sdkjs/word/Editor/MathChanges.js\n
onlyoffice/sdkjs/word/Editor/Numbering.js\n
onlyoffice/sdkjs/word/Editor/NumberingChanges.js\n
onlyoffice/sdkjs/word/Editor/Paragraph.js\n
onlyoffice/sdkjs/word/Editor/Paragraph/ComplexField.js\n
onlyoffice/sdkjs/word/Editor/Paragraph/ComplexFieldInstruction.js\n
onlyoffice/sdkjs/word/Editor/Paragraph/ParaDrawing.js\n
onlyoffice/sdkjs/word/Editor/Paragraph/ParaDrawingChanges.js\n
onlyoffice/sdkjs/word/Editor/Paragraph/ParaTextPr.js\n
......@@ -413,7 +404,6 @@ onlyoffice/sdkjs/word/Editor/Table/TableRecalculate.js\n
onlyoffice/sdkjs/word/Editor/Table/TableRow.js\n
onlyoffice/sdkjs/word/Editor/Table/TableRowChanges.js\n
onlyoffice/sdkjs/word/Local/api.js\n
onlyoffice/sdkjs/word/Local/api_jio.js\n
onlyoffice/sdkjs/word/Local/documentrenderer.js\n
onlyoffice/sdkjs/word/Local/local.html\n
onlyoffice/sdkjs/word/Math/accent.js\n
......
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL 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
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
"use strict";
// Import
var c_oAscError = Asc.c_oAscError;
/////////////////////////////////////////////////////////
////////////// OPEN ////////////////////////
/////////////////////////////////////////////////////////
(/**
* @param {jQuery} $
* @param {Window} window
* @param {undefined} undefined
*/
function($, window, undefined) {
var asc = window["Asc"];
var prot;
asc['spreadsheet_api'].prototype._OfflineAppDocumentStartLoad = function()
{
this.asc_registerCallback('asc_onDocumentContentReady', function(){
DesktopOfflineUpdateLocalName(window["Asc"]["editor"]);
//setTimeout(function(){window["UpdateInstallPlugins"]();}, 10);
});
this.jio_open();
};
asc['spreadsheet_api'].prototype._OfflineAppDocumentEndLoad = function(_url, _data)
{
//AscCommon.g_oIdCounter.m_sUserId = window["AscDesktopEditor"]["CheckUserId"]();
if (_data == "")
{
this.sendEvent("asc_onError", c_oAscError.ID.ConvertationOpenError, c_oAscError.Level.Critical);
return;
}
this.openDocument(_data);
AscCommon.History.UserSaveMode = true;
DesktopOfflineUpdateLocalName(this);
this.onUpdateDocumentModified(AscCommon.History.Have_Changes());
};
asc['spreadsheet_api'].prototype._onNeedParams = function(data, opt_isPassword)
{
var options;
if(opt_isPassword){
options = new AscCommon.asc_CAdvancedOptions(Asc.c_oAscAdvancedOptionsID.DRM);
} else {
var cp = JSON.parse("{\"codepage\":46,\"delimiter\":1}");
cp['encodings'] = AscCommon.getEncodingParams();
options = new AscCommon.asc_CAdvancedOptions(Asc.c_oAscAdvancedOptionsID.CSV, cp);
}
this.handlers.trigger("asc_onAdvancedOptions", options, AscCommon.c_oAscAdvancedOptionsAction.Open);
};
})(jQuery, window);
window["Asc"]['spreadsheet_api'].prototype.asc_setAdvancedOptions = function(idOption, option)
{
if (window["Asc"].c_oAscAdvancedOptionsID.CSV === idOption) {
var _param = "";
_param += ("<m_nCsvTxtEncoding>" + option.asc_getCodePage() + "</m_nCsvTxtEncoding>");
_param += ("<m_nCsvDelimiter>" + option.asc_getDelimiter() + "</m_nCsvDelimiter>");
window["AscDesktopEditor"]["SetAdvancedOptions"](_param);
}
else if (window["Asc"].c_oAscAdvancedOptionsID.DRM === idOption) {
var _param = "";
_param += ("<m_sPassword>" + AscCommon.CopyPasteCorrectString(option.asc_getPassword()) + "</m_sPassword>");
window["AscDesktopEditor"]["SetAdvancedOptions"](_param);
}
};
window["Asc"]['spreadsheet_api'].prototype["asc_setAdvancedOptions"] = window["Asc"]['spreadsheet_api'].prototype.asc_setAdvancedOptions;
window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data)
{
AscCommon.g_oDocumentUrls.documentUrl = _url;
if (AscCommon.g_oDocumentUrls.documentUrl.indexOf("file:") != 0)
{
if (AscCommon.g_oDocumentUrls.documentUrl.indexOf("/") != 0)
AscCommon.g_oDocumentUrls.documentUrl = "/" + AscCommon.g_oDocumentUrls.documentUrl;
AscCommon.g_oDocumentUrls.documentUrl = "file://" + AscCommon.g_oDocumentUrls.documentUrl;
}
window["Asc"]["editor"]._OfflineAppDocumentEndLoad(_data);
};
/////////////////////////////////////////////////////////
////////////// CHANGES /////////////////////
/////////////////////////////////////////////////////////
AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
{
this.SavedIndex = (null === this.SavedIndex && -1 === this.Index ? null : this.Index);
if (true === this.Is_UserSaveMode())
{
if (true === IsUserSave)
{
this.UserSavedIndex = this.Index;
this.ForceSave = false;
}
}
else
{
this.ForceSave = false;
}
};
AscCommon.CHistory.prototype.Have_Changes = function(IsNotUserSave, IsNoSavedNoModifyed)
{
var checkIndex = (this.Is_UserSaveMode() && !IsNotUserSave) ? this.UserSavedIndex : this.SavedIndex;
if (-1 === this.Index && null === checkIndex && false === this.ForceSave)
{
if (window["AscDesktopEditor"])
{
if (0 != window["AscDesktopEditor"]["LocalFileGetOpenChangesCount"]())
return true;
if (!window["AscDesktopEditor"]["LocalFileGetSaved"]() && IsNoSavedNoModifyed !== true)
return true;
}
return false;
}
return (this.Index != checkIndex || true === this.ForceSave);
};
window["DesktopOfflineAppDocumentApplyChanges"] = function(_changes)
{
for (var i = 0, l = _changes.length; i < l; ++i)
{
window["Asc"]["editor"].CoAuthoringApi.onSaveChanges(_changes[i], null, true);
}
};
/////////////////////////////////////////////////////////
//////////////// SAVE //////////////////////
/////////////////////////////////////////////////////////
window["Asc"]['spreadsheet_api'].prototype.asc_DownloadAs = function(typeFile, bIsDownloadEvent)
{
this.asc_Save(false, true);
};
window["Asc"]['spreadsheet_api'].prototype.asc_isOffline = function()
{
return true;
};
window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs)
{
window["Asc"]["editor"].sync_StartAction(Asc.c_oAscAsyncActionType.BlockInteraction, Asc.c_oAscAsyncAction.Save);
var _param = "";
if (isSaveAs === true)
_param += "saveas=true;";
if (AscCommon.AscBrowser.isRetina)
_param += "retina=true;";
window["AscDesktopEditor"]["LocalFileSave"](_param);
};
window["DesktopOfflineAppDocumentEndSave"] = function(error)
{
window["Asc"]["editor"].sync_EndAction(Asc.c_oAscAsyncActionType.BlockInteraction, Asc.c_oAscAsyncAction.Save);
if (0 == error)
DesktopOfflineUpdateLocalName(window["Asc"]["editor"]);
else
AscCommon.History.UserSavedIndex = window["Asc"]["editor"].LastUserSavedIndex;
window["Asc"]["editor"].onUpdateDocumentModified(AscCommon.History.Have_Changes());
window["Asc"]["editor"].LastUserSavedIndex = undefined;
if (2 == error)
window["Asc"]["editor"].sendEvent("asc_onError", c_oAscError.ID.ConvertationSaveError, c_oAscError.Level.NoCritical);
};
window["Asc"]['spreadsheet_api'].prototype["asc_addImageDrawingObject"] = window["Asc"]['spreadsheet_api'].prototype.asc_addImageDrawingObject;
window["Asc"]['spreadsheet_api'].prototype["asc_showImageFileDialog"] = window["Asc"]['spreadsheet_api'].prototype.asc_showImageFileDialog;
window["Asc"]['spreadsheet_api'].prototype["asc_Save"] = window["Asc"]['spreadsheet_api'].prototype.asc_Save;
window["Asc"]['spreadsheet_api'].prototype["asc_DownloadAs"] = window["Asc"]['spreadsheet_api'].prototype.asc_DownloadAs;
window["Asc"]['spreadsheet_api'].prototype["asc_isOffline"] = window["Asc"]['spreadsheet_api'].prototype.asc_isOffline;
window["Asc"]['spreadsheet_api'].prototype["asc_addImage"] = window["Asc"]['spreadsheet_api'].prototype.asc_addImage;
window["DesktopOfflineAppDocumentAddImageEnd"] = function(url)
{
if (url == "")
return;
var ws = window["Asc"]["editor"].wb.getWorksheet();
if (ws)
{
var _url = window["AscDesktopEditor"]["LocalFileGetImageUrl"](url);
ws.objectRender.addImageDrawingObject(AscCommon.g_oDocumentUrls.getImageUrl(_url) , null);
}
};
window["on_editor_native_message"] = function(sCommand, sParam)
{
if (!window["Asc"]["editor"])
return;
if (sCommand == "save")
window["Asc"]["editor"].asc_Save();
else if (sCommand == "saveAs")
window["Asc"]["editor"].asc_Save(false, true);
else if (sCommand == "print")
window["Asc"]["editor"].asc_Print();
};
\ No newline at end of file
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL 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
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
"use strict";
(/**
* @param {Window} window
* @param {undefined} undefined
*/
function(window, undefined) {
var asc = window["Asc"];
var prot;
asc['spreadsheet_api'].prototype.asc_addComment = function(oComment) {
var oPlace = oComment.bDocument ? this.wb : this.wb.getWorksheet();
oPlace.cellCommentator.addComment(oComment);
};
prot = asc['spreadsheet_api'].prototype;
prot['asc_addComment'] = prot.asc_addComment;
AscCommonExcel.CCellCommentator.prototype.addComment = function(comment, bIsNotUpdate) {
var t = this;
var oComment = comment;
var bChange = false;
oComment.wsId = this.model.getId();
oComment.setId();
if (!oComment.bDocument) {
if (!bIsNotUpdate) {
var activeCell = this.model.selectionRange.activeCell;
oComment.asc_putCol(activeCell.col);
oComment.asc_putRow(activeCell.row);
}
var existComments = this.getComments(oComment.nCol, oComment.nRow);
if (existComments.length) {
oComment = existComments[0];
bChange = true;
}
}
var onAddCommentCallback = function (isSuccess) {
if (false === isSuccess)
return;
t._addComment(oComment, bChange, bIsNotUpdate);
};
if (bIsNotUpdate) {
onAddCommentCallback(true);
} else {
this.isLockedComment(oComment, onAddCommentCallback);
}
};
})(window);
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL 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
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
"use strict";
(/**
* @param {Window} window
* @param {undefined} undefined
*/
function(window, undefined) {
var asc = window["Asc"];
var prot;
asc['spreadsheet_api'].prototype.asc_addComment = function(oComment) {
var oPlace = oComment.bDocument ? this.wb : this.wb.getWorksheet();
oPlace.cellCommentator.addComment(oComment);
};
prot = asc['spreadsheet_api'].prototype;
prot['asc_addComment'] = prot.asc_addComment;
AscCommonExcel.CCellCommentator.prototype.addComment = function(comment, bIsNotUpdate) {
var t = this;
var oComment = comment;
var bChange = false;
oComment.wsId = this.model.getId();
oComment.setId();
if (!oComment.bDocument) {
if (!bIsNotUpdate) {
var activeCell = this.model.selectionRange.activeCell;
oComment.asc_putCol(activeCell.col);
oComment.asc_putRow(activeCell.row);
}
var existComments = this.getComments(oComment.nCol, oComment.nRow);
if (existComments.length) {
oComment = existComments[0];
bChange = true;
}
}
var onAddCommentCallback = function (isSuccess) {
if (false === isSuccess)
return;
t._addComment(oComment, bChange, bIsNotUpdate);
};
if (bIsNotUpdate) {
onAddCommentCallback(true);
} else {
this.isLockedComment(oComment, onAddCommentCallback);
}
};
})(window);
@charset "UTF-8";
/*
* Worksheet canvas
* --------------------------------------------------------
*/
#ws-canvas-outer {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
#ws-canvas {
border: 0;
}
#ws-canvas-overlay, #ws-canvas-graphic, #ws-canvas-graphic-overlay {
border: 0;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
/*
* Worksheet scroll bars
* --------------------------------------------------------
*/
#ws-v-scrollbar {
position: absolute;
right: 0;
width: 19px;
top: -1px;
bottom: 18px;
overflow: hidden;
z-index: 10;
}
#ws-v-scroll-helper {
width: 1px;
}
#ws-h-scrollbar {
position: absolute;
bottom: 0;
height: 19px;
left: 0;
right: 18px;
overflow: hidden;
z-index: 10;
}
#ws-h-scroll-helper {
height: 1px;
}
#ws-scrollbar-corner {
position: absolute;
right: 0;
bottom: 0;
width: 18px;
height: 18px;
background-color: #DCE2E8;
border: 0;
z-index: 10;
}
/* Scrollbars common */
#ws-v-scrollbar .jspVerticalBar,
#ws-h-scrollbar .jspHorizontalBar,
#ws-v-scrollbar .jspTrack,
#ws-h-scrollbar .jspTrack {
background-color: #DCE2E8;
}
#ws-v-scrollbar .jspDrag,
#ws-h-scrollbar .jspDrag {
background-color: #C0C0C0;
}
#ws-v-scrollbar .jspDrag.jspHover,
#ws-v-scrollbar .jspDrag.jspActive,
#ws-h-scrollbar .jspDrag.jspHover,
#ws-h-scrollbar .jspDrag.jspActive {
background-color: #808080;
}
/* Vertical scrollbar */
#ws-v-scrollbar .jspVerticalBar {
width: 7px;
border-left: 1px solid #C1C6CC;
}
#ws-v-scrollbar .jspTrack {
width: 8px;
}
/* Horizontal scrollbar */
#ws-h-scrollbar .jspHorizontalBar {
height: 7px;
border-top: 1px solid #C1C6CC;
}
#ws-h-scrollbar .jspTrack {
height: 8px;
}
@charset "UTF-8";
/*
* Worksheet canvas
* --------------------------------------------------------
*/
#ws-canvas-outer {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
#ws-canvas {
border: 0;
}
#ws-canvas-overlay, #ws-canvas-graphic, #ws-canvas-graphic-overlay {
border: 0;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
/*
* Worksheet scroll bars
* --------------------------------------------------------
*/
#ws-v-scrollbar {
position: absolute;
right: 0;
width: 19px;
top: -1px;
bottom: 18px;
overflow: hidden;
z-index: 10;
}
#ws-v-scroll-helper {
width: 1px;
}
#ws-h-scrollbar {
position: absolute;
bottom: 0;
height: 19px;
left: 0;
right: 18px;
overflow: hidden;
z-index: 10;
}
#ws-h-scroll-helper {
height: 1px;
}
#ws-scrollbar-corner {
position: absolute;
right: 0;
bottom: 0;
width: 18px;
height: 18px;
background-color: #DCE2E8;
border: 0;
z-index: 10;
}
/* Scrollbars common */
#ws-v-scrollbar .jspVerticalBar,
#ws-h-scrollbar .jspHorizontalBar,
#ws-v-scrollbar .jspTrack,
#ws-h-scrollbar .jspTrack {
background-color: #DCE2E8;
}
#ws-v-scrollbar .jspDrag,
#ws-h-scrollbar .jspDrag {
background-color: #C0C0C0;
}
#ws-v-scrollbar .jspDrag.jspHover,
#ws-v-scrollbar .jspDrag.jspActive,
#ws-h-scrollbar .jspDrag.jspHover,
#ws-h-scrollbar .jspDrag.jspActive {
background-color: #808080;
}
/* Vertical scrollbar */
#ws-v-scrollbar .jspVerticalBar {
width: 7px;
border-left: 1px solid #C1C6CC;
}
#ws-v-scrollbar .jspTrack {
width: 8px;
}
/* Horizontal scrollbar */
#ws-h-scrollbar .jspHorizontalBar {
height: 7px;
border-top: 1px solid #C1C6CC;
}
#ws-h-scrollbar .jspTrack {
height: 8px;
}
@charset "UTF-8";
/*
* Worksheet canvas
* --------------------------------------------------------
*/
#ws-canvas-outer {
position: absolute;
left: 0;
top: 0;
right: 14px;
bottom: 14px;
overflow: hidden;
}
#ws-canvas {
border: 0;
-webkit-user-select: none;
}
#ws-canvas-overlay, #ws-canvas-graphic, #ws-canvas-graphic-overlay {
-webkit-user-select: none;
border: 0;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
/*
* Worksheet scroll bars
* --------------------------------------------------------
*/
#ws-v-scrollbar {
position: absolute;
right: 0;
width: 14px;
top: 0px;
bottom: 14px;
overflow: hidden;
z-index: 10;
background-color: #f1f1f1;
}
#ws-v-scroll-helper {
width: 1px;
}
#ws-h-scrollbar {
position: absolute;
bottom: 0;
height: 14px;
left: 0px;
right: 14px;
overflow: hidden;
z-index: 10;
background-color: #f1f1f1;
}
#ws-h-scroll-helper {
height: 1px;
}
#ws-scrollbar-corner {
position: absolute;
right: 0;
bottom: 0;
width: 14px;
height: 14px;
background-color: #F4F4F4;
border: 0;
z-index: 10;
}
/* Scrollbars common */
#ws-v-scrollbar .jspVerticalBar,
#ws-h-scrollbar .jspHorizontalBar,
#ws-v-scrollbar .jspTrack,
#ws-h-scrollbar .jspTrack {
background-color: #DCE2E8;
}
#ws-v-scrollbar .jspDrag,
#ws-h-scrollbar .jspDrag {
background-color: #C0C0C0;
}
#ws-v-scrollbar .jspDrag.jspHover,
#ws-v-scrollbar .jspDrag.jspActive,
#ws-h-scrollbar .jspDrag.jspHover,
#ws-h-scrollbar .jspDrag.jspActive {
background-color: #808080;
}
/* Vertical scrollbar */
#ws-v-scrollbar .jspVerticalBar {
width: 7px;
border-left: 1px solid #C1C6CC;
}
#ws-v-scrollbar .jspTrack {
width: 8px;
}
/* Horizontal scrollbar */
#ws-h-scrollbar .jspHorizontalBar {
height: 7px;
border-top: 1px solid #C1C6CC;
}
#ws-h-scrollbar .jspTrack {
height: 8px;
}
/*
* Cell editor
* --------------------------------------------------------
*/
#ce-canvas-outer {
position: absolute;
border: 0;
overflow: hidden;
}
#ce-canvas,
#ce-canvas-overlay {
border: 0;
position: absolute;
left: 0;
top: 0;
}
#ce-cursor {
position: absolute;
background-color: #000;
width: 1px;
height: 11pt;
cursor: text;
}
#apiPopUpSelector {
position: absolute;
}
#apiPopUpList {
width: 100%;
height: 100%;
max-height: 210px;
overflow: hidden;
position: relative;
}
#apiPopUpList li {
max-width: 500px;
@charset "UTF-8";
/*
* Worksheet canvas
* --------------------------------------------------------
*/
#ws-canvas-outer {
position: absolute;
left: 0;
top: 0;
right: 14px;
bottom: 14px;
overflow: hidden;
}
#ws-canvas {
border: 0;
-webkit-user-select: none;
}
#ws-canvas-overlay, #ws-canvas-graphic, #ws-canvas-graphic-overlay {
-webkit-user-select: none;
border: 0;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
/*
* Worksheet scroll bars
* --------------------------------------------------------
*/
#ws-v-scrollbar {
position: absolute;
right: 0;
width: 14px;
top: 0px;
bottom: 14px;
overflow: hidden;
z-index: 10;
background-color: #f1f1f1;
}
#ws-v-scroll-helper {
width: 1px;
}
#ws-h-scrollbar {
position: absolute;
bottom: 0;
height: 14px;
left: 0px;
right: 14px;
overflow: hidden;
z-index: 10;
background-color: #f1f1f1;
}
#ws-h-scroll-helper {
height: 1px;
}
#ws-scrollbar-corner {
position: absolute;
right: 0;
bottom: 0;
width: 14px;
height: 14px;
background-color: #F4F4F4;
border: 0;
z-index: 10;
}
/* Scrollbars common */
#ws-v-scrollbar .jspVerticalBar,
#ws-h-scrollbar .jspHorizontalBar,
#ws-v-scrollbar .jspTrack,
#ws-h-scrollbar .jspTrack {
background-color: #DCE2E8;
}
#ws-v-scrollbar .jspDrag,
#ws-h-scrollbar .jspDrag {
background-color: #C0C0C0;
}
#ws-v-scrollbar .jspDrag.jspHover,
#ws-v-scrollbar .jspDrag.jspActive,
#ws-h-scrollbar .jspDrag.jspHover,
#ws-h-scrollbar .jspDrag.jspActive {
background-color: #808080;
}
/* Vertical scrollbar */
#ws-v-scrollbar .jspVerticalBar {
width: 7px;
border-left: 1px solid #C1C6CC;
}
#ws-v-scrollbar .jspTrack {
width: 8px;
}
/* Horizontal scrollbar */
#ws-h-scrollbar .jspHorizontalBar {
height: 7px;
border-top: 1px solid #C1C6CC;
}
#ws-h-scrollbar .jspTrack {
height: 8px;
}
/*
* Cell editor
* --------------------------------------------------------
*/
#ce-canvas-outer {
position: absolute;
border: 0;
overflow: hidden;
}
#ce-canvas,
#ce-canvas-overlay {
border: 0;
position: absolute;
left: 0;
top: 0;
}
#ce-cursor {
position: absolute;
background-color: #000;
width: 1px;
height: 11pt;
cursor: text;
}
#apiPopUpSelector {
position: absolute;
}
#apiPopUpList {
width: 100%;
height: 100%;
max-height: 210px;
overflow: hidden;
position: relative;
}
#apiPopUpList li {
max-width: 500px;
}
\ No newline at end of file
......@@ -640,7 +640,7 @@
return this;
};
DrawingContext.prototype.save = function () {
this.nctx["PD_Save"]();
return this;
......
......@@ -415,8 +415,8 @@
t.newTextFormat = opt.fragments[first.index].format.clone();
}
t._setFormatProperty(t.newTextFormat, prop, val);
t._update();
}
}
};
......@@ -809,15 +809,15 @@
var bbox = AscCommonExcel.g_oRangeCache.getActiveRange(this.options.cellName);
this._formula = new AscCommonExcel.parserFormula(s.substr(1), null, ws);
this._formula.parse(true, true);
var refPos = this._formula.parse(true, true);
var r, offset, _e, _s, wsName = null, refStr, isName = false, _sColorPos;
if (this._formula.RefPos && this._formula.RefPos.length > 0) {
for (var index = 0; index < this._formula.RefPos.length; index++) {
if (refPos && refPos.length > 0) {
for (var index = 0; index < refPos.length; index++) {
wsName = null;
isName = false;
r = this._formula.RefPos[index];
r = refPos[index];
offset = r.end;
_e = r.end;
......@@ -935,12 +935,12 @@
var bbox = AscCommonExcel.g_oRangeCache.getActiveRange(this.options.cellName);
this._formula = new AscCommonExcel.parserFormula(s.substr(1), null, ws);
this._formula.parse(true, true);
var refPos = this._formula.parse(true, true);
if (this._formula.RefPos && this._formula.RefPos.length > 0) {
for (var index = 0; index < this._formula.RefPos.length; index++) {
if (refPos && refPos.length > 0) {
for (var index = 0; index < refPos.length; index++) {
wsName = null;
r = this._formula.RefPos[index];
r = refPos[index];
offset = r.end;
_e = r.end;
......@@ -1491,6 +1491,7 @@
};
CellEditor.prototype._moveCursor = function (kind, pos) {
this.newTextFormat = null;
var t = this;
this.sAutoComplete = null;
switch (kind) {
......@@ -2119,7 +2120,7 @@
if ( !tmp ) {
return;
}
tmp = this.options.fragments[tmp.index].format;
tmp = this.newTextFormat || this.options.fragments[tmp.index].format;
var va = tmp.getVerticalAlign();
var fc = tmp.getColor();
var result = new AscCommonExcel.asc_CFont();
......@@ -2640,6 +2641,8 @@
this._moveCursor(kPosition, startWord);
this._selectChars(kPosition, endWord);
}
} else if (2 === event.button) {
this.handlers.trigger('onContextMenu', event);
}
return true;
};
......@@ -2647,7 +2650,6 @@
/** @param event {MouseEvent} */
CellEditor.prototype._onMouseUp = function (event) {
if (2 === event.button) {
this.handlers.trigger('onContextMenu', event);
return true;
}
this.isSelectMode = c_oAscCellEditorSelectState.no;
......
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