Skip to content

Commit

Permalink
Fix/external reference (#3110)
Browse files Browse the repository at this point in the history
* [se] Fix by external links (Bug 38646)
  • Loading branch information
GoshaZotov authored Nov 18, 2022
1 parent 9b54abb commit c79e2f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions cell/model/Workbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -4259,6 +4259,7 @@
Workbook.prototype.removeExternalReference = function (index, addToHistory) {
if (index != null) {
var from = this.externalReferences[index - 1];
//this.reIndexExternalReferencesLinks(index - 1);
this.externalReferences.splice(index - 1, 1);
if (addToHistory) {
History.Add(AscCommonExcel.g_oUndoRedoWorkbook, AscCH.historyitem_Workbook_ChangeExternalReference,
Expand Down
3 changes: 2 additions & 1 deletion cell/model/WorkbookElems.js
Original file line number Diff line number Diff line change
Expand Up @@ -14642,7 +14642,7 @@ QueryTableField.prototype.clone = function() {
if (needGenerateRow) {
cell = new ExternalCell();
AscCommonExcel.executeInR1C1Mode(false, function () {
cell.Ref = new Asc.Range(t.R - 1, index, t.R - 1, index).getName();
cell.Ref = new Asc.Range(index, t.R - 1, index, t.R - 1).getName();
});
this.Cell.push(cell);
}
Expand Down Expand Up @@ -15215,6 +15215,7 @@ QueryTableField.prototype.clone = function() {
prot["asc_getData"] = prot.asc_getData;
prot["asc_getSource"] = prot.asc_getSource;
prot["asc_getId"] = prot.asc_getId;
prot["asc_isExternalLink"] = prot.isExternalLink;


window["AscCommonExcel"].CPrintPreviewState = CPrintPreviewState;
Expand Down
2 changes: 1 addition & 1 deletion cell/view/WorkbookView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5083,7 +5083,7 @@
var _oData = data && data[i];
var _eR = externalReferences[i];

if (_oData && _eR && !_oData.error) {
if (_oData && _eR && (_eR.isExternalLink() || !_oData.error)) {
requests.push(getPromise(_oData, _eR, resolveFunc));
}
}
Expand Down

0 comments on commit c79e2f4

Please sign in to comment.