mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
Simplify data transfer for macros generation
This commit is contained in:
@ -1295,7 +1295,7 @@ CCellCommentator.prototype._addComment = function (oComment, bChange, bIsNotUpda
|
||||
// Add new comment
|
||||
if (!bChange) {
|
||||
History.Create_NewPoint();
|
||||
this.worksheet.workbook.StartAction(AscDFH.historydescription_Spreadsheet_AddComment, [oComment]);
|
||||
this.worksheet.workbook.StartAction(AscDFH.historydescription_Spreadsheet_AddComment, oComment);
|
||||
History.Add(AscCommonExcel.g_oUndoRedoComment, AscCH.historyitem_Comment_Add, this.model.getId(), null, oComment.clone());
|
||||
if (!oComment.bDocument) {
|
||||
this.updateAreaComment(oComment);
|
||||
|
||||
@ -463,7 +463,7 @@ DrawingObjectsController.prototype.addChartDrawingObject = function(options)
|
||||
this.startRecalculate();
|
||||
this.drawingObjects.sendGraphicObjectProps();
|
||||
}
|
||||
Asc.editor.wb.FinalizeAction(AscDFH.historydescription_Spreadsheet_AddChart, {chartProps: chart.chart});
|
||||
Asc.editor.wb.FinalizeAction(AscDFH.historydescription_Spreadsheet_AddChart, chart.chart);
|
||||
return chart;
|
||||
};
|
||||
|
||||
|
||||
@ -1507,6 +1507,8 @@
|
||||
// Проверим, нужно ли отсылать информацию о ячейке
|
||||
var ar = ws.model.selectionRange.getLast();
|
||||
var isSelectOnShape = ws.getSelectionShape();
|
||||
this.StartAction(AscDFH.historydescription_Spreadsheet_SelectRange, ar);
|
||||
|
||||
if (!this._isEqualRange(ws.model.selectionRange, isSelectOnShape)) {
|
||||
this._onWSSelectionChanged();
|
||||
let t = this;
|
||||
@ -1593,6 +1595,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
this.FinalizeAction();
|
||||
this.timerEnd = false;
|
||||
};
|
||||
|
||||
|
||||
@ -16893,17 +16893,17 @@ function isAllowPasteLink(pastedWb) {
|
||||
|
||||
if (prop === "fa") {
|
||||
switch (val) {
|
||||
case 0: return {nDescription: AscDFH.historydescription_Spreadsheet_SetCellSuperscript, additional: {val: false}};
|
||||
case 1: return {nDescription: AscDFH.historydescription_Spreadsheet_SetCellSubscript, additional: {val: true}};
|
||||
case 2: return {nDescription: AscDFH.historydescription_Spreadsheet_SetCellSuperscript, additional: {val: true}};
|
||||
default: return {nDescription: AscDFH.historydescription_Spreadsheet_SetCellSuperscript, additional: {val: false}};
|
||||
case 0: return {nDescription: AscDFH.historydescription_Spreadsheet_SetCellSuperscript, additional: false};
|
||||
case 1: return {nDescription: AscDFH.historydescription_Spreadsheet_SetCellSubscript, additional: true};
|
||||
case 2: return {nDescription: AscDFH.historydescription_Spreadsheet_SetCellSuperscript, additional: true};
|
||||
default: return {nDescription: AscDFH.historydescription_Spreadsheet_SetCellSuperscript, additional: false};
|
||||
}
|
||||
}
|
||||
if (prop === "angle" && (val === 90 || val === - 90 || val === 0 || val === 255)) {
|
||||
return {nDescription: AscDFH.historydescription_Spreadsheet_SetCellAngle, additional: {val: val}};
|
||||
return {nDescription: AscDFH.historydescription_Spreadsheet_SetCellAngle, additional: val};
|
||||
}
|
||||
|
||||
return startActionMap[prop] ? {nDescription: startActionMap[prop], additional: {val: val}} : null;
|
||||
return startActionMap[prop] ? {nDescription: startActionMap[prop], additional: val} : null;
|
||||
};
|
||||
|
||||
WorksheetView.prototype.specialPaste = function (props) {
|
||||
@ -19837,6 +19837,7 @@ function isAllowPasteLink(pastedWb) {
|
||||
|
||||
History.Create_NewPoint();
|
||||
History.StartTransaction();
|
||||
t.workbook.StartAction(AscDFH.historydescription_Spreadsheet_AddAutoFilter, {style: styleName, range: ar, info: filterInfo});
|
||||
|
||||
|
||||
var type = ar.getType();
|
||||
@ -19881,9 +19882,11 @@ function isAllowPasteLink(pastedWb) {
|
||||
if(isSlowOperation) {
|
||||
window.setTimeout(function() {
|
||||
slowOperationCallback();
|
||||
t.workbook.FinalizeAction();
|
||||
}, 0);
|
||||
} else {
|
||||
slowOperationCallback();
|
||||
t.workbook.FinalizeAction();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user