mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-02-10 18:15:19 +08:00
Fix bug #78791
This commit is contained in:
@ -1510,7 +1510,7 @@
|
||||
// Проверим, нужно ли отсылать информацию о ячейке
|
||||
var ar = ws.model.selectionRange.getLast();
|
||||
var isSelectOnShape = ws.getSelectionShape();
|
||||
//this.StartAction(AscDFH.historydescription_Spreadsheet_SelectRange, [ar]);
|
||||
this.MacrosAddData(AscDFH.historydescription_Spreadsheet_SelectRange, [ar]);
|
||||
|
||||
if (!this._isEqualRange(ws.model.selectionRange, isSelectOnShape)) {
|
||||
this._onWSSelectionChanged();
|
||||
@ -6731,7 +6731,10 @@
|
||||
this.Api.sendEvent("asc_onUserActionStart");
|
||||
this.Api.getMacroRecorder().onAction(nDescription, additional);
|
||||
};
|
||||
|
||||
WorkbookView.prototype.MacrosAddData = function(nDescription, additional)
|
||||
{
|
||||
this.Api.getMacroRecorder().addStepData(nDescription, additional);
|
||||
};
|
||||
WorkbookView.prototype.FinalizeAction = function(nDescription, additional)
|
||||
{
|
||||
this.Api.sendEvent("asc_onUserActionEnd");
|
||||
|
||||
@ -12710,6 +12710,7 @@ function isAllowPasteLink(pastedWb) {
|
||||
activeCell.row;
|
||||
var p = this._calcCellPosition(c, r, dc, dr);
|
||||
ar.assign(p.col, p.row, p.col, p.row);
|
||||
this.workbook.MacrosAddData(AscDFH.historydescription_Spreadsheet_SelectRange, [ar]);
|
||||
selection.setActiveCell(p.row, p.col);
|
||||
this._fixSelectionOfHiddenCells(dc >= 0 ? +1 : -1, dr >= 0 ? +1 : -1, ar);
|
||||
this._fixSelectionOfMergedCells(undefined, undefined, customSelection);
|
||||
@ -19148,9 +19149,9 @@ function isAllowPasteLink(pastedWb) {
|
||||
}
|
||||
|
||||
if (applyByArray)
|
||||
this.workbook.StartAction(AscDFH.historydescription_Spreadsheet_SetCellFormula, AscCommonExcel.getFragmentsText(val));
|
||||
this.workbook.MacrosAddData(AscDFH.historydescription_Spreadsheet_SetCellFormula, AscCommonExcel.getFragmentsText(val));
|
||||
else
|
||||
this.workbook.StartAction(AscDFH.historydescription_Spreadsheet_SetCellValue, AscCommonExcel.getFragmentsText(val));
|
||||
this.workbook.MacrosAddData(AscDFH.historydescription_Spreadsheet_SetCellValue, AscCommonExcel.getFragmentsText(val));
|
||||
|
||||
// set the value to the selected range
|
||||
c.setValue(AscCommonExcel.getFragmentsText(val), function (r) {
|
||||
@ -19208,6 +19209,7 @@ function isAllowPasteLink(pastedWb) {
|
||||
}
|
||||
}
|
||||
|
||||
this.workbook.MacrosAddData(AscDFH.historydescription_Spreadsheet_SetCellValue, AscCommonExcel.getFragmentsText(val));
|
||||
// set the value to the selected range
|
||||
if (pivotTable) {
|
||||
pivotTable.editCell(c.bbox, AscCommonExcel.getFragmentsText(val));
|
||||
|
||||
@ -81,6 +81,9 @@
|
||||
{
|
||||
if (e.KeyCode === 8) // BackSpace
|
||||
{
|
||||
if (_t.editor.editorId !== AscCommon.c_oEditorId.Word)
|
||||
return;
|
||||
|
||||
_t.addStepData("remove", 1);
|
||||
// TODO when we have:
|
||||
// * Selection.Delete
|
||||
@ -88,6 +91,18 @@
|
||||
}
|
||||
else if (e.KeyCode === 9) // Tab
|
||||
{
|
||||
if (_t.editor.editorId !== AscCommon.c_oEditorId.Word)
|
||||
return;
|
||||
|
||||
let doc = _t.editor.getLogicDocument();
|
||||
if (doc.GetCurrentTable())
|
||||
{
|
||||
_t.addStepData("moveCursorRight", [{
|
||||
isRtl: false,
|
||||
isAddSelect: e.IsShift(),
|
||||
isWord: e.IsCtrl()
|
||||
}]);
|
||||
}
|
||||
}
|
||||
else if (e.KeyCode === 13) // Enter
|
||||
{
|
||||
@ -1168,7 +1183,7 @@
|
||||
else
|
||||
value = value.toString();
|
||||
|
||||
return "\tApi.GetSelection().SetValue(" + value + ");\n"
|
||||
return "\tworksheet.GetActiveCell().SetValue(" + value + ");\n"
|
||||
},
|
||||
setCellFormula : function(value){
|
||||
if (typeof value === 'string')
|
||||
@ -1176,7 +1191,7 @@
|
||||
else
|
||||
value = value.toString();
|
||||
|
||||
return "\tApi.GetSelection().SetFormulaArray(" + value + ");\n"
|
||||
return "\tworksheet.GetActiveCell().SetFormulaArray(" + value + ");\n"
|
||||
},
|
||||
setCellAngle : function(angle){
|
||||
switch (angle) {
|
||||
@ -1263,7 +1278,6 @@
|
||||
// setCellHyperlinkModify : function(additional) {return (additional && additional.url) ? "" : ""},
|
||||
// setCellHyperlinkRemove : function(additional) {return (additional && additional.url) ? "" : ""},
|
||||
// cut : function(){return "ApiApi.GetSelection().Cut();\n"},
|
||||
cellChangeValue : function(value){return "\tApi.GetSelection().SetValue(\"" + value + "\");\n"},
|
||||
setCellStyle : function(style){return ""},
|
||||
setCellFormat : function(format){
|
||||
return "\tlet " + CounterStore.inc('format') + " = Api.Format(worksheet.GetActiveCell().GetValue(), \'" + format + "\')\n"
|
||||
@ -1391,7 +1405,7 @@
|
||||
CellActionsMacroList[AscDFH.historydescription_Spreadsheet_AddImageUrls] = cellActions.addImageUrls;
|
||||
CellActionsMacroList[AscDFH.historydescription_Spreadsheet_AddAutoFilter] = cellActions.addAutoFilter;
|
||||
CellActionsMacroList[AscDFH.historydescription_Spreadsheet_RemoveAutoFilter] = cellActions.removeAutoFilter;
|
||||
//CellActionsMacroList[AscDFH.historydescription_Spreadsheet_SelectRange] = cellActions.selectRange;
|
||||
CellActionsMacroList[AscDFH.historydescription_Spreadsheet_SelectRange] = cellActions.selectRange;
|
||||
CellActionsMacroList[AscDFH.historydescription_Spreadsheet_SetCellFormula] = cellActions.setCellFormula;
|
||||
|
||||
const presActions = {
|
||||
|
||||
Reference in New Issue
Block a user