Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/release/v8.3.0' into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
KirillovIlya committed Feb 3, 2025
2 parents 632ccae + fdcb678 commit 57a1964
Show file tree
Hide file tree
Showing 138 changed files with 16,858 additions and 4,017 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/common_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libatk1.0-0 libcups2 libatk-bridge2.0-0 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libnss3 libgbm1 libasound2
sudo apt-get install -y libatk1.0-0 libcups2 libatk-bridge2.0-0 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libnss3 libgbm1 libasound2t64
- name: check out repository
uses: actions/checkout@v3
Expand Down
40 changes: 20 additions & 20 deletions build/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,22 +365,22 @@ module.exports = function(grunt) {
}
]
},
visio: {
files: [
{
expand: true,
cwd: visio,
src: [
'sdk-all-min.js.map',
'sdk-all.js.map',
],
dest: 'maps',
rename: function (dest, src) {
return path.join(dest , src.replace('sdk', 'visio'));
}
}
]
}
// visio: {
// files: [
// {
// expand: true,
// cwd: visio,
// src: [
// 'sdk-all-min.js.map',
// 'sdk-all.js.map',
// ],
// dest: 'maps',
// rename: function (dest, src) {
// return path.join(dest , src.replace('sdk', 'visio'));
// }
// }
// ]
// }
},
clean: {
deploy: {
Expand All @@ -394,15 +394,15 @@ module.exports = function(grunt) {
path.join(cell, 'sdk-all.js.map'),
path.join(slide, 'sdk-all-min.js.map'),
path.join(slide, 'sdk-all.js.map'),
path.join(visio, 'sdk-all-min.js.map'),
path.join(visio, 'sdk-all.js.map'),
// path.join(visio, 'sdk-all-min.js.map'),
// path.join(visio, 'sdk-all.js.map'),
]
}
}
});
grunt.task.run('copy', 'clean');
});
grunt.registerTask('compile-sdk', ['compile-word', 'compile-cell', 'compile-slide', 'compile-visio']);
grunt.registerTask('compile-sdk', ['compile-word', 'compile-cell', 'compile-slide'/* , 'compile-visio' */]);
grunt.registerTask('clean-deploy', 'Clean deploy folder before deploying', function () {
grunt.initConfig({
clean: {
Expand Down Expand Up @@ -521,7 +521,7 @@ module.exports = function(grunt) {
writeScripts(configs.word['sdk'], 'word');
writeScripts(configs.cell['sdk'], 'cell');
writeScripts(configs.slide['sdk'], 'slide');
writeScripts(configs.visio['sdk'], 'visio');
// writeScripts(configs.visio['sdk'], 'visio');
});
const defaultTasks = ['clean-deploy', 'compile-sdk', 'copy-other'];
if (grunt.option('map')) {
Expand Down
60 changes: 45 additions & 15 deletions cell/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ var editor;
};

spreadsheet_api.prototype.asc_getCanUndo = function () {
let bCanUndo = History.Can_Undo();
let bCanUndo = AscCommon.History && AscCommon.History.Can_Undo();

if (true !== bCanUndo && this.collaborativeEditing && true === this.collaborativeEditing.Is_Fast() && true !== this.collaborativeEditing.Is_SingleUser()) {
bCanUndo = this.collaborativeEditing.CanUndo();
Expand Down Expand Up @@ -1682,7 +1682,7 @@ var editor;
//возвращаю инфомарцию об активном листе, который печатаем
var indexActiveWs = curPage && curPage.indexWorksheet;
if (indexActiveWs === undefined) {
indexActiveWs = this.wbModel.getActive();
indexActiveWs = null !== this.wb.printPreviewState.realActiveSheet ? this.wb.printPreviewState.realActiveSheet : this.wbModel.getActive();
}
this.handlers.trigger("asc_onPrintPreviewSheetChanged", indexActiveWs);
this.handlers.trigger("asc_onPrintPreviewPageChanged", index);
Expand Down Expand Up @@ -2995,8 +2995,11 @@ var editor;
};
this.CoAuthoringApi.onChangesIndex = function(changesIndex)
{
if (t.isLiveViewer() && changesIndex >= 0) {
//todo
if (t.isLiveViewer() && changesIndex >= 0 && changesIndex < AscCommon.CollaborativeEditing.GetAllChangesCount()) {
//перестаем быть LiveViewer из-за бага, что мы не может делать undo действиям которые пришли в изменениях (нет oldValue)
t.asc_SetFastCollaborative(false);
// let count = AscCommon.CollaborativeEditing.GetAllChangesCount() - changesIndex;
// AscCommon.CollaborativeEditing.UndoGlobal(count);
}
};
this.CoAuthoringApi.onRecalcLocks = function(excelAdditionalInfo) {
Expand All @@ -3023,16 +3026,6 @@ var editor;
t.wb.Update_ForeignCursor(e[e.length - 1]['cursor'], e[e.length - 1]['user'], true, e[e.length - 1]['useridoriginal']);
}
};
this.CoAuthoringApi.onParticipantsChangedOrigin = function(users)
{
let m_bIsCollaborativeWithLiveViewer = users && -1 !== users.findIndex(function(element) {
return !!element['isLiveViewer'];
});
t.collaborativeEditing.m_bIsCollaborativeWithLiveViewer = m_bIsCollaborativeWithLiveViewer;
if (t.isDocumentLoadComplete && m_bIsCollaborativeWithLiveViewer) {
AscCommon.History.Clear();
}
};
};

spreadsheet_api.prototype._onSaveChanges = function(recalcIndexColumns, recalcIndexRows, isAfterAskSave, arrChanges) {
Expand Down Expand Up @@ -6251,7 +6244,7 @@ var editor;
if (this.collaborativeEditing.getGlobalLock() || !this.canEdit()) {
return;
}

let ws = this.wb.getWorksheet();
if (ws.objectRender.selectedGraphicObjectsExists() && ws.objectRender.controller.setCellBold) {
ws.objectRender.controller.setCellBold(isBold);
Expand Down Expand Up @@ -9972,6 +9965,38 @@ var editor;
}
};

spreadsheet_api.prototype.asc_SetShowVerticalScroll = function (val) {
let wb = this.wb;
if (!wb) {
return;
}
return wb.setShowVerticalScroll(val);
};

spreadsheet_api.prototype.asc_GetShowVerticalScroll = function () {
let wb = this.wb;
if (!wb) {
return;
}
return wb.getShowVerticalScroll();
};

spreadsheet_api.prototype.asc_SetShowHorizontalScroll = function (val) {
let wb = this.wb;
if (!wb) {
return;
}
return wb.setShowHorizontalScroll(val);
};

spreadsheet_api.prototype.asc_GetShowHorizontalScroll = function () {
let wb = this.wb;
if (!wb) {
return;
}
return wb.getShowHorizontalScroll();
};

/*
* Export
* -----------------------------------------------------------------------------
Expand Down Expand Up @@ -10581,6 +10606,11 @@ var editor;
prot["asc_SetSmoothScrolling"]= prot.asc_SetSmoothScrolling;
prot["asc_GetSmoothScrolling"]= prot.asc_GetSmoothScrolling;

prot["asc_SetShowVerticalScroll"]= prot.asc_SetShowVerticalScroll;
prot["asc_GetShowVerticalScroll"]= prot.asc_GetShowVerticalScroll;
prot["asc_SetShowHorizontalScroll"]= prot.asc_SetShowHorizontalScroll;
prot["asc_GetShowHorizontalScroll"]= prot.asc_GetShowHorizontalScroll;



})(window);
6 changes: 3 additions & 3 deletions cell/model/CellComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,9 @@ CCellCommentator.prototype.isLockedComment = function(oComment, callbackFunc) {
x = metrics.left + metrics.width;
y = metrics.top;
this.drawingCtx.beginPath();
this.drawingCtx.moveTo(x - (size + borderW), y);
this.drawingCtx.lineTo(x - borderW, y);
this.drawingCtx.lineTo(x - borderW, y + size);
this.worksheet._moveTo(this.drawingCtx, x - (size + borderW), y);
this.worksheet._lineTo(this.drawingCtx, x - borderW, y);
this.worksheet._lineTo(this.drawingCtx, x - borderW, y + size);
this.drawingCtx.fill();

if (isClip) {
Expand Down
7 changes: 1 addition & 6 deletions cell/model/CollaborativeEditing.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
AscCommon.CCollaborativeEditingBase.call(this);

this.m_nUseType = 1; // 1 - 1 клиент и мы сохраняем историю, -1 - несколько клиентов, 0 - переход из -1 в 1
this.m_bIsCollaborativeWithLiveViewer = false;//todo remove after implementing undo in spreadsheet

this.handlers = new AscCommonExcel.asc_CHandlersList(handlers);
this.m_bIsViewerMode = !!isViewerMode; // Режим Viewer-а
Expand Down Expand Up @@ -410,10 +409,6 @@

if (0 === this.m_nUseType)
this.m_nUseType = 1;
} else if (this.m_bIsCollaborativeWithLiveViewer) {
//todo remove
// Чистим Undo/Redo
AscCommon.History.Clear();
} else {
// Обновляем точку последнего сохранения в истории
AscCommon.History.Reset_SavedIndex(IsUserSave);
Expand Down Expand Up @@ -1067,7 +1062,7 @@
if (!oOtherAction) {
continue;
}
if (oChange.CommuteRelated && false === oChange.CommuteRelated(oChange, oOtherAction)) {
if (true !== oOtherAction.IsReverted() && oChange.CommuteRelated && false === oChange.CommuteRelated(oChange, oOtherAction)) {
return false;
}
}
Expand Down
Loading

0 comments on commit 57a1964

Please sign in to comment.