Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch release/v7.3.0 into develop #3318

Merged
merged 170 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
ae50bee
Merge branch 'release/v7.3.0' of https://github.com/ONLYOFFICE/sdkjs …
Jan 10, 2023
38d82dd
[bug] fix bug 60585
SergeyLuzyanin Jan 17, 2023
31ebbfe
[bug] fix bug 60579
SergeyLuzyanin Jan 17, 2023
996625e
[se] Fix bug 60501
GoshaZotov Jan 17, 2023
a48490c
[bug] fix bug 60586
SergeyLuzyanin Jan 17, 2023
69313c3
[all] Change asc_getUrlType for bug 59780
konovalovsergey Jan 17, 2023
72327e8
Fix bug 59621 (#3227)
SylaiseElvenan Jan 17, 2023
ffdb806
[de] Fix bug 60650
GoshaZotov Jan 18, 2023
4cfee7c
[all] Fix socket.io event subscription for error 60619
konovalovsergey Jan 18, 2023
bc6fa87
fix the problem with copying text outline
SergeyLuzyanin Jan 18, 2023
0ba423d
Fix bug 59871
IgolJack Jan 12, 2023
d8b34a3
Fix bug 60502
IgolJack Jan 12, 2023
bca602f
Fix GetTextOfElement method of fractions
IgolJack Jan 12, 2023
a1ed830
Fix bug 59876
IgolJack Jan 16, 2023
5ac989b
Fix bug 50365
IgolJack Jan 16, 2023
62b962e
Fix bug 60499
IgolJack Jan 16, 2023
b3d3560
Fix bug 60506
IgolJack Jan 16, 2023
09cdbf7
Fix bug 60502
IgolJack Jan 16, 2023
869976b
Fix math autocorrection
IgolJack Jan 16, 2023
ad9fc24
Fix bug 60516
IgolJack Jan 16, 2023
66396dc
Remove debugger
IgolJack Jan 16, 2023
d1b2676
Fix bug #60502
KirillovIlya Jan 16, 2023
a8a5842
Draw math track for non-empty zero-width equations
KirillovIlya Jan 17, 2023
9ee0a2f
Add math accent autocorrection
IgolJack Jan 17, 2023
d80b8b6
Remove unnecessary GetParaMath functions
IgolJack Jan 17, 2023
8ab33bf
Delete unnecessary lock
IgolJack Jan 17, 2023
9651986
Add IsSelectionLock to math all convert
IgolJack Jan 17, 2023
80833a0
Fix bug 60533
IgolJack Jan 17, 2023
828b697
Fix processing of Nary in Unicode
IgolJack Jan 17, 2023
6805c2f
Fix nary GetTextOfElement method
IgolJack Jan 17, 2023
5942e6e
Fix bug 60534
IgolJack Jan 17, 2023
e39f539
Fix autocorrection processing
IgolJack Jan 17, 2023
35ccd17
[de] Rework method for converting the view form of all paragraphs
KirillovIlya Jan 18, 2023
ef3d44f
[de] Remove unnecessary assignment
KirillovIlya Jan 18, 2023
5e8bef3
[se] Fix bug 60519
GoshaZotov Jan 18, 2023
d8ebe5e
Fix bug 60019
K0R0L Jan 18, 2023
79e7821
Fix autocorrection processing
IgolJack Jan 18, 2023
d3396f1
Update viewer module
K0R0L Jan 18, 2023
b6b43c1
Fix undo in smartArts
Jan 19, 2023
1451ec0
[se] For reference data
konovalovsergey Jan 19, 2023
1d29122
For bug 59888
Jan 19, 2023
a87f062
Fix fit font size in lists preview
Jan 19, 2023
dc796d3
Merge branch 'release/v7.3.0' of https://github.com/ONLYOFFICE/sdkjs …
Jan 19, 2023
7990dfc
Fix bug 60137
K0R0L Jan 19, 2023
4bda06c
[se] Fix bug 60603 (#3242)
GoshaZotov Jan 19, 2023
d0fb6ae
[bug] fix bug 60664
SergeyLuzyanin Jan 19, 2023
2da8a76
[se] By bug 60455: update cells(if cells have been cleared)
GoshaZotov Jan 19, 2023
1dd1e82
Fix bug #60652
KirillovIlya Jan 19, 2023
127cf95
[bug] fix bug 60669
SergeyLuzyanin Jan 19, 2023
bf5ed33
[bug] fix bug 60670
SergeyLuzyanin Jan 19, 2023
fafd9a9
Change margins in mobile view mode
K0R0L Jan 19, 2023
3a346c8
[oform] Send an event to oform document on undo/redo
KirillovIlya Jan 19, 2023
dddaf0d
[oform] Fix event dispatch sequence for oform document
KirillovIlya Jan 19, 2023
7d5d5fb
For bug 59888
Jan 19, 2023
b0b45dd
Fix bug #60678
KirillovIlya Jan 19, 2023
f0d714c
[bug] fix bug 60680
SergeyLuzyanin Jan 19, 2023
1482627
updated the plugin descriptions for 7.3 (#3212)
ovchinnikova-natalya Jan 19, 2023
05b2c87
Api descriptions 7.3 (#3214)
ovchinnikova-natalya Jan 19, 2023
7f288ef
[se] Fix bug 60455
konovalovsergey Jan 20, 2023
bad078a
Fix bug 60529
IgolJack Jan 18, 2023
6cdb2e9
Fixed italic function-limits names
IgolJack Jan 19, 2023
aa28e6d
Fix space processing in Unicode
IgolJack Jan 19, 2023
ebfc8de
Fix bug 60506
IgolJack Jan 20, 2023
e431c75
Fix bug 60666
IgolJack Jan 20, 2023
8fde318
Fix bug #60428
KirillovIlya Jan 20, 2023
e73edb7
Fix/reference data (#3246)
GoshaZotov Jan 21, 2023
32bf812
[se] By bug 60578
GoshaZotov Jan 21, 2023
91a6215
Fix bug #60716
KirillovIlya Jan 21, 2023
34fbfeb
[se] By bug 58562 (#3248)
GoshaZotov Jan 21, 2023
19c7fc3
[se] Do file close(desktop->convertFile)
GoshaZotov Jan 21, 2023
be88d87
[se] By bug 60578
GoshaZotov Jan 22, 2023
0a68b69
[se] Fix typos (desktop external links)
GoshaZotov Jan 22, 2023
fd8a4a1
[se] Fix update reference data (#3252)
GoshaZotov Jan 22, 2023
aa6f933
Fix bug 60737
K0R0L Jan 22, 2023
832454c
[se] Fix export for bug 60742
konovalovsergey Jan 22, 2023
095a75c
[all] Revert special check for None restriction flag
KirillovIlya Jan 22, 2023
dc077ed
[all] Make OnlySignatures most significant restriction type
KirillovIlya Jan 22, 2023
5e8a696
Think about transform
Jan 22, 2023
fa2bd52
For bug 60725
K0R0L Jan 22, 2023
524cba9
Fix bug #60734
KirillovIlya Jan 22, 2023
e23d331
Fix bug 60729
IgolJack Jan 22, 2023
f8f628e
Fix bug 60727
IgolJack Jan 22, 2023
f68037a
Fix bug 60721
IgolJack Jan 22, 2023
2650c45
Fix bug 60732
IgolJack Jan 22, 2023
b62a547
Fix bug 60733
IgolJack Jan 22, 2023
b83de86
Fix html DocInfo (#3244)
SylaiseElvenan Jan 23, 2023
a6f93fb
[de] Remove bOform flag for bug 60725
konovalovsergey Jan 23, 2023
9516438
[bug] fix bug 60730
SergeyLuzyanin Jan 23, 2023
de446df
Fix bug #60715
KirillovIlya Jan 23, 2023
01d9d2c
Fix/external links copy paste (#3255)
GoshaZotov Jan 23, 2023
652e546
Fix bug 60701
Jan 23, 2023
ff28b09
Fix bug 60665 (#3256)
SylaiseElvenan Jan 23, 2023
ba2d72c
Fix bug 59621 (#3258)
SylaiseElvenan Jan 23, 2023
1150ad6
For bug 60702
Jan 23, 2023
068336b
[bug] fix bug 60731
SergeyLuzyanin Jan 23, 2023
9ac1c4d
Fix bug #60719
KirillovIlya Jan 23, 2023
3c1e8d2
[all] Fix disconnect reason for socket.io
konovalovsergey Jan 23, 2023
b0aa344
Merge pull request #3259 from ONLYOFFICE/fix/bug60702
SergeyLuzyanin Jan 23, 2023
d3517c6
Merge pull request #3257 from ONLYOFFICE/fix/bug60701
SergeyLuzyanin Jan 23, 2023
f165078
small fixes for api descriptions 7.3 (#3260)
ovchinnikova-natalya Jan 23, 2023
6561c7d
fix calculation of text matrix after
SergeyLuzyanin Jan 23, 2023
7dfa645
[se] Desktop: fix paste into same doc
GoshaZotov Jan 23, 2023
4f5ae49
[se] Add tests for check relative links
GoshaZotov Jan 24, 2023
32e4073
Fix bug #60775
KirillovIlya Jan 24, 2023
f643507
fixed a note (#3263)
ovchinnikova-natalya Jan 24, 2023
474831d
[se] By bug 60376: don't show image error
GoshaZotov Jan 24, 2023
f436433
[se] Fix bug 60808
GoshaZotov Jan 24, 2023
8a32b0b
Update module
K0R0L Jan 24, 2023
c25c834
Fix bug #45966
KirillovIlya Jan 24, 2023
1379465
Fix bug 60821
Jan 24, 2023
be3fb26
[se] By bug 60816
GoshaZotov Jan 24, 2023
55dbc2f
Fix bug #60637
KirillovIlya Jan 24, 2023
ed0d4da
[se] Escape external reference
GoshaZotov Jan 24, 2023
43a6dc7
Fix processing of binomial in LaTeX mode
IgolJack Jan 23, 2023
0785513
Fix bug 60529
IgolJack Jan 24, 2023
1693287
Fix bug 50365
IgolJack Jan 24, 2023
5013901
Fix bug 60594
IgolJack Jan 24, 2023
360f634
Fix bug 60374
IgolJack Jan 24, 2023
28d3a89
Fix bug 59876
IgolJack Jan 24, 2023
5a3a9af
Fix bug 60822
K0R0L Jan 24, 2023
fd3540a
Fix bug #60758
KirillovIlya Jan 24, 2023
66e5f82
Fix bug 59987
K0R0L Jan 24, 2023
9f7c6b0
Merge pull request #3267 from ONLYOFFICE/fix/bug60821
SergeyLuzyanin Jan 25, 2023
de57327
fix text transform calculation after collaborative undo
SergeyLuzyanin Jan 25, 2023
b72f585
[se] Add checks for desktop convert file use (#3270)
GoshaZotov Jan 25, 2023
cbdde31
fix crash on undo in coauthoring
SergeyLuzyanin Jan 25, 2023
ac0e716
Fix bug #60633
KirillovIlya Jan 25, 2023
3cf31a6
[se] By bug 60825
GoshaZotov Jan 25, 2023
0fae221
Fix bug 60616
K0R0L Jan 25, 2023
3b84729
Fix bug #59761
KirillovIlya Jan 25, 2023
a446fc0
[se] Fix bug 60455
GoshaZotov Jan 25, 2023
f36afbb
[se] Fix bug 60818
GoshaZotov Jan 25, 2023
cf4297f
Fix bug #60778
KirillovIlya Jan 25, 2023
6af5c98
[se] Fix bug 60015
GoshaZotov Jan 25, 2023
c7fbd6f
Fix bug 60819
Jan 25, 2023
18def1c
For bug 59888
Jan 25, 2023
7e3bc8b
[se] Fix error if change external ref on area
GoshaZotov Jan 25, 2023
e6cc0ec
Merge pull request #3275 from ONLYOFFICE/fix/bug60819
SergeyLuzyanin Jan 25, 2023
f965daa
Fix bug 60840
Jan 25, 2023
04be248
Fix bug 60532
IgolJack Jan 25, 2023
64e09d2
Fix bug 59538
IgolJack Jan 25, 2023
5d58949
Fix bug 60721
IgolJack Jan 25, 2023
0232015
Fix bug 60532
IgolJack Jan 25, 2023
7099d56
Fix processing of content in brackets
IgolJack Jan 25, 2023
e252f64
Merge pull request #3278 from ONLYOFFICE/fix/bug60840
SergeyLuzyanin Jan 25, 2023
1d161bd
Merge pull request #3277 from ONLYOFFICE/fix/bug59888
SergeyLuzyanin Jan 25, 2023
a4b6dc6
Fix bug #60828
KirillovIlya Jan 25, 2023
4a5a4f0
Fix bug #60699
KirillovIlya Jan 25, 2023
77995b9
Fix/bug59171 (#3280)
K0R0L Jan 25, 2023
423aadd
[se] Fix bug 60825: fix typo (#3281)
GoshaZotov Jan 26, 2023
9f28940
[se] For print pages: clone font object on CPdfPrinter init (#3282)
GoshaZotov Jan 26, 2023
3cc86ea
Fix bug 59621 (#3287)
SylaiseElvenan Jan 26, 2023
86b62c9
Fix shift+command+T -> ctrl+opt+= hotkey for inserting sum function o…
Jan 26, 2023
0841c28
[se] Fix bug 60876
GoshaZotov Jan 26, 2023
ffa0b3d
[oform] Generate new form keys for forms without a key when opening a…
KirillovIlya Jan 26, 2023
3970a60
Fix recursive loop in checking text literal
IgolJack Jan 26, 2023
9cffb30
Fix bug #60860
KirillovIlya Jan 26, 2023
9115752
[de] For OformMaster reading/writing from SdtPr to FromPr (#3291)
konovalovsergey Jan 26, 2023
f7f079e
[se] Fix bug 60872 (#3292)
GoshaZotov Jan 26, 2023
64ab6d9
[se] Fix typo
GoshaZotov Jan 27, 2023
afc2b7a
[de] Fix bug 60870
GoshaZotov Jan 27, 2023
9e8f8ee
Update module
K0R0L Jan 27, 2023
35cfe62
Fix bug #60637
KirillovIlya Jan 27, 2023
e0e8209
Fix bug 60774
IgolJack Jan 27, 2023
ebc9c5f
[de] Fix utf16 strings in math
KirillovIlya Jan 27, 2023
eb5b71f
Fix bug #60556
KirillovIlya Jan 27, 2023
08cc575
Fix bug #60877
KirillovIlya Jan 27, 2023
b3e293f
[se] Check on restriction undo/redo cell editing
GoshaZotov Jan 27, 2023
4ab0199
[se] Close cell editor without save if signature restriction turn on
GoshaZotov Jan 27, 2023
8d5ae43
[de] Fix bug 60892
GoshaZotov Jan 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
npm install -g grunt-cli node-qunit-puppeteer
npm install --prefix build
grunt --gruntfile build/Gruntfile.js develop
node-qunit-puppeteer tests/common/api/api.html
node-qunit-puppeteer tests/cell/spreadsheet-calculation/FormulaTests.html
node-qunit-puppeteer tests/cell/spreadsheet-calculation/PivotTests.html
node-qunit-puppeteer tests/cell/spreadsheet-calculation/CopyPasteTests.html
Expand Down
228 changes: 128 additions & 100 deletions cell/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,16 +432,23 @@ var editor;
return true;
};

spreadsheet_api.prototype._printDesktop = function (options) {
window.AscDesktopEditor_PrintOptions = options;
spreadsheet_api.prototype._printDesktop = function (options) {
let advOpt = options && options.advancedOptions;
if (advOpt && advOpt.asc_getNativeOptions() && advOpt.asc_getNativeOptions()["quickPrint"]) {
advOpt.ignorePrintArea = true;
advOpt.printType = Asc.c_oAscPrintType.EntireWorkbook;
}

let desktopOptions = {};
if (options && options.advancedOptions)
desktopOptions["nativeOptions"] = options.advancedOptions.asc_getNativeOptions();
window.AscDesktopEditor_PrintOptions = options;

window["AscDesktopEditor"]["Print"](JSON.stringify(desktopOptions));
return true;
};
let desktopOptions = {};
if (advOpt) {
desktopOptions["nativeOptions"] = advOpt.asc_getNativeOptions();
}

window["AscDesktopEditor"]["Print"](JSON.stringify(desktopOptions));
return true;
};

spreadsheet_api.prototype.asc_ChangePrintArea = function(type) {
var ws = this.wb.getWorksheet();
Expand Down Expand Up @@ -574,9 +581,9 @@ var editor;
}
};

spreadsheet_api.prototype._getFileFromUrl = function (url, fileType, callback) {
spreadsheet_api.prototype._getFileFromUrl = function (url, fileType, token, outputFormat, callback) {
if (this.canEdit()) {
var document = {url: url, format: "XLSX"};
var document = {url: url, format: fileType, token: token};
this.insertDocumentUrlsData = {
imageMap: null, documents: [document], convertCallback: function (_api, url) {
_api.insertDocumentUrlsData.imageMap = url;
Expand All @@ -593,7 +600,7 @@ var editor;
}
};

var _options = new Asc.asc_CDownloadOptions(fileType);
var _options = new Asc.asc_CDownloadOptions(outputFormat);
_options.isNaturalDownload = true;
_options.isGetTextFromUrl = true;
this.downloadAs(Asc.c_oAscAsyncAction.DownloadAs, _options);
Expand Down Expand Up @@ -653,90 +660,107 @@ var editor;
spreadsheet_api.prototype.asc_ImportXmlStart = function (callback) {
let t = this;

if (window["AscDesktopEditor"]) {
if (window["AscDesktopEditor"] && window["AscDesktopEditor"]["IsLocalFile"]()) {
// TODO: add translations
window["AscDesktopEditor"]["OpenFilenameDialog"]("(*xml)", false, function (_file) {
let file = _file;
if (Array.isArray(file))
if (Array.isArray(file)) {
file = file[0];
if (!file)
}
if (!file) {
callback(null);
return;
}

window["AscDesktopEditor"]["loadLocalFile"](file, function(uint8Array) {
if (!uint8Array)
return;

t._convertFromXml({data: uint8Array, format: "xml"}, callback);
window["AscDesktopEditor"]["convertFile"](file, 0x2002, function (convertedFile) {
let stream = null;
if (convertedFile) {
stream = convertedFile["get"](/*Editor.bin*/);
convertedFile["close"]();
}
callback(stream ? new Uint8Array(stream) : null);
});
});
return;
}

AscCommon.ShowXmlFileDialog(function (error, files) {
if (Asc.c_oAscError.ID.No !== error) {
t.sendEvent("asc_onError", error, Asc.c_oAscError.Level.NoCritical);
return;
}
} else if (!window["NATIVE_EDITOR_ENJINE"]) {
AscCommon.ShowXmlFileDialog(function (error, files) {
if (Asc.c_oAscError.ID.No !== error) {
t.sendEvent("asc_onError", error, Asc.c_oAscError.Level.NoCritical);
callback(null);
return;
}

let format = AscCommon.GetFileExtension(files[0].name);
let reader = new FileReader();
reader.onload = function () {
t._convertFromXml({data: new Uint8Array(reader.result), format: format}, callback);
};
reader.onerror = function () {
t.sendEvent("asc_onError", Asc.c_oAscError.ID.Unknown, Asc.c_oAscError.Level.NoCritical);
};
let format = AscCommon.GetFileExtension(files[0].name);
let reader = new FileReader();
reader.onload = function () {
t._convertFromXml({data: new Uint8Array(reader.result), format: format}, callback);
};
reader.onerror = function () {
t.sendEvent("asc_onError", Asc.c_oAscError.ID.Unknown, Asc.c_oAscError.Level.NoCritical);
callback(null);
};

reader.readAsArrayBuffer(files[0]);
});
reader.readAsArrayBuffer(files[0]);
});
} else {
callback(null);
}
};

spreadsheet_api.prototype.asc_ImportXmlEnd = function (stream, dataRef, newSheetName) {
let t = this;


let doInsertXml = function (_dataRef, _ws) {
let jsZlib = new AscCommon.ZLib();
if (!jsZlib.open(stream)) {
//t.model.handlers.trigger("asc_onErrorUpdateExternalReference", eR.Id);
return false;
let binaryData = stream;
if (!window["AscDesktopEditor"]) {
//xlst
binaryData = null;
let jsZlib = new AscCommon.ZLib();
if (!stream || !jsZlib.open(stream)) {
//t.model.handlers.trigger("asc_onErrorUpdateExternalReference", eR.Id);
return false;
}

if (jsZlib.files && jsZlib.files.length) {
binaryData = jsZlib.getFile(jsZlib.files[0]);
}
}

if (jsZlib.files && jsZlib.files.length) {
let binaryData = jsZlib.getFile(jsZlib.files[0]);
if (!binaryData) {
return;
}

//заполняем через банарник
let oBinaryFileReader = new AscCommonExcel.BinaryFileReader(true);
//чтобы лишнего не читать, проставляю флаг копипаст
oBinaryFileReader.InitOpenManager.copyPasteObj = {
isCopyPaste: true, activeRange: null, selectAllSheet: true
};
//заполняем через банарник
let oBinaryFileReader = new AscCommonExcel.BinaryFileReader(true);
//чтобы лишнего не читать, проставляю флаг копипаст
oBinaryFileReader.InitOpenManager.copyPasteObj = {
isCopyPaste: true, activeRange: null, selectAllSheet: true
};

let wb = new AscCommonExcel.Workbook();
wb.DrawingDocument = Asc.editor.wbModel.DrawingDocument;
let wb = new AscCommonExcel.Workbook();
wb.DrawingDocument = Asc.editor.wbModel.DrawingDocument;

AscFormat.ExecuteNoHistory(function () {
AscCommonExcel.executeInR1C1Mode(false, function () {
oBinaryFileReader.Read(binaryData, wb);
});
AscFormat.ExecuteNoHistory(function () {
AscCommonExcel.executeInR1C1Mode(false, function () {
oBinaryFileReader.Read(binaryData, wb);
});
});

if (wb.aWorksheets) {
let arrSheets = wb.aWorksheets;
let pastedSheet = arrSheets && arrSheets[0];
if (pastedSheet) {
if (_ws) {
t.wbModel.setActive(_ws.index);
t.wb.updateWorksheetByModel();
t.wb.showWorksheet();
}
let ws = t.wb.getWorksheet();
if (_dataRef) {
ws.setSelection(_dataRef);
}
AscCommonExcel.g_clipboardExcel.pasteProcessor.activeRange = new Asc.Range(0, 0, Math.max(pastedSheet.nColsCount - 1, 0), Math.max(pastedSheet.nRowsCount - 1, 0)).getName();
t.wb.getWorksheet().setSelectionInfo('paste', {data: pastedSheet, fromBinary: true, fontsNew: [], pasteAllSheet: true, wb: wb});
if (wb.aWorksheets) {
let arrSheets = wb.aWorksheets;
let pastedSheet = arrSheets && arrSheets[0];
if (pastedSheet) {
if (_ws) {
t.wbModel.setActive(_ws.index);
t.wb.updateWorksheetByModel();
t.wb.showWorksheet();
}
let ws = t.wb.getWorksheet();
if (_dataRef) {
ws.setSelection(_dataRef);
}
AscCommonExcel.g_clipboardExcel.pasteProcessor.activeRange = new Asc.Range(0, 0, Math.max(pastedSheet.nColsCount - 1, 0), Math.max(pastedSheet.nRowsCount - 1, 0)).getName();
t.wb.getWorksheet().setSelectionInfo('paste', {data: pastedSheet, fromBinary: true, fontsNew: [], pasteAllSheet: true, wb: wb});
}
}
};
Expand Down Expand Up @@ -956,11 +980,15 @@ var editor;
};

spreadsheet_api.prototype.asc_Undo = function() {
if (!this.canUndoRedoByRestrictions())
return;
this.wb.undo();
this.wb.restoreFocus();
};

spreadsheet_api.prototype.asc_Redo = function() {
if (!this.canUndoRedoByRestrictions())
return;
this.wb.redo();
this.wb.restoreFocus();
};
Expand Down Expand Up @@ -3196,8 +3224,8 @@ var editor;
}
this.asc_Resize();
}

if (this.asc_getExternalReferences()) {
if (this.canEdit() && this.asc_getExternalReferences()) {
this.handlers.trigger("asc_onNeedUpdateExternalReferenceOnOpen");
}
//this.asc_Resize(); // Убрал, т.к. сверху приходит resize (http://bugzilla.onlyoffice.com/show_bug.cgi?id=14680)
Expand Down Expand Up @@ -4415,24 +4443,24 @@ var editor;
const arrBinaryData = oBinaryFileWriter.Write().split(';');
const sCleanBinaryData = arrBinaryData[arrBinaryData.length - 1];
const oBinaryInfo = {};
const arrWorksheets = this.wb.wsViews;
const arrRasterImageIds = [];
for (let i = 0; i < arrWorksheets.length; i += 1) {
const oWorksheet = arrWorksheets[i];
const arrDrawings = oWorksheet.model.Drawings;
if (arrDrawings) {
for (let i = 0; i < arrDrawings.length; i += 1) {
const oDrawing = arrDrawings[i];
oDrawing.graphicObject.getAllRasterImages(arrRasterImageIds);
}
const arrWorksheetLength = this.wbModel.aWorksheets.length;
for (let i = 0; i < arrWorksheetLength; i += 1) {
const oWorksheet = this.wbModel.aWorksheets[i];
const arrDrawings = oWorksheet.Drawings;
if (arrDrawings) {
for (let j = 0; j < arrDrawings.length; j += 1) {
const oDrawing = arrDrawings[j];
oDrawing.graphicObject.getAllRasterImages(arrRasterImageIds);
}
}
}
const urlsForAddToHistory = [];
for (let i = 0; i < arrRasterImageIds.length; i += 1) {
const url = AscCommon.g_oDocumentUrls.mediaPrefix + arrRasterImageIds[i];
if (!(this.imagesFromGeneralEditor && this.imagesFromGeneralEditor[url] && this.imagesFromGeneralEditor[url] === AscCommon.g_oDocumentUrls.getUrls()[url])) {
urlsForAddToHistory.push(arrRasterImageIds[i]);
}
const url = AscCommon.g_oDocumentUrls.mediaPrefix + arrRasterImageIds[i];
if (!(this.imagesFromGeneralEditor && this.imagesFromGeneralEditor[url] && this.imagesFromGeneralEditor[url] === AscCommon.g_oDocumentUrls.getUrls()[url])) {
urlsForAddToHistory.push(arrRasterImageIds[i]);
}
}


Expand All @@ -4441,9 +4469,9 @@ var editor;
oBinaryInfo["isFromSheetEditor"] = this.isFromSheetEditor;
oBinaryInfo["imagesForAddToHistory"] = urlsForAddToHistory;
if (this.saveImageCoefficients) {
oBinaryInfo["widthCoefficient"] = this.saveImageCoefficients.widthCoefficient;
oBinaryInfo["heightCoefficient"] = this.saveImageCoefficients.heightCoefficient;
delete this.saveImageCoefficients;
oBinaryInfo["widthCoefficient"] = this.saveImageCoefficients.widthCoefficient;
oBinaryInfo["heightCoefficient"] = this.saveImageCoefficients.heightCoefficient;
delete this.saveImageCoefficients;
}

return oBinaryInfo;
Expand Down Expand Up @@ -7721,10 +7749,7 @@ var editor;
};

spreadsheet_api.prototype.onUpdateRestrictions = function () {
var oHistory = AscCommon.History;
if (this.isRestrictionSignatures() && oHistory && !oHistory.Have_Changes()) {
oHistory.Clear();
}
this._onUpdateDocumentCanUndoRedo();
};
spreadsheet_api.prototype.isShowShapeAdjustments = function()
{
Expand Down Expand Up @@ -8193,34 +8218,36 @@ var editor;
{
let wb = this.wb;
if (!wb)
return;
return false;

wb.EnterText(codePoints);
return wb.EnterText(codePoints);
};

spreadsheet_api.prototype.asc_correctEnterText = function(oldValue, newValue)
{
let wb = this.wb;
if (!wb)
return;
return false;

wb.CorrectEnterText(oldValue, newValue);
return wb.CorrectEnterText(oldValue, newValue);
};

spreadsheet_api.prototype.asc_getExternalReferences = function() {
return this.wb.getExternalReferences();
};

spreadsheet_api.prototype.asc_updateExternalReferences = function(arr) {
if (this.canEdit()) {
this.wb.updateExternalReferences(arr);
if (this.collaborativeEditing.getGlobalLock() || !this.canEdit()) {
return;
}
this.wb.updateExternalReferences(arr);
};

spreadsheet_api.prototype.asc_removeExternalReferences = function(arr) {
if (this.canEdit()) {
this.wb.removeExternalReferences(arr);
if (this.collaborativeEditing.getGlobalLock() || !this.canEdit()) {
return;
}
this.wb.removeExternalReferences(arr);
};

spreadsheet_api.prototype.asc_fillHandleDone = function(range) {
Expand Down Expand Up @@ -8692,6 +8719,7 @@ var editor;
prot["asc_getAddPivotTableOptions"] = prot.asc_getAddPivotTableOptions;
prot["asc_insertPivotNewWorksheet"] = prot.asc_insertPivotNewWorksheet;
prot["asc_insertPivotExistingWorksheet"] = prot.asc_insertPivotExistingWorksheet;
prot["asc_refreshAllPivots"] = prot.asc_refreshAllPivots;
// signatures
prot["asc_addSignatureLine"] = prot.asc_addSignatureLine;
prot["asc_CallSignatureDblClickEvent"] = prot.asc_CallSignatureDblClickEvent;
Expand Down
10 changes: 5 additions & 5 deletions cell/apiBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@

/**
* Possible values for the position of chart tick labels (either horizontal or vertical).
* * **"none"** - does not display the selected tick labels.
* * **"nextTo"** - sets the position of the selected tick labels next to the main label.
* * **"low"** - sets the position of the selected tick labels in the part of the chart with lower values.
* * **"high"** - sets the position of the selected tick labels in the part of the chart with higher values.
* * <b>"none"</b> - does not display the selected tick labels.
* * <b>"nextTo"</b> - sets the position of the selected tick labels next to the main label.
* * <b>"low"</b> - sets the position of the selected tick labels in the part of the chart with lower values.
* * <b>"high"</b> - sets the position of the selected tick labels in the part of the chart with higher values.
* @typedef {("none" | "nextTo" | "low" | "high")} TickLabelPosition
* **/

Expand Down Expand Up @@ -1429,7 +1429,7 @@
* @typeofeditors ["CSE"]
* @param {string} sRange - The range where the hyperlink will be added to.
* @param {string} sAddress - The link address.
* @param {string} subAddress - The subaddress of the hyperlink.
* @param {string} subAddress - The link subaddress to insert internal sheet hyperlinks.
* @param {string} sScreenTip - The screen tip text.
* @param {string} sTextToDisplay - The link text that will be displayed on the sheet.
* */
Expand Down
Loading