diff --git a/components/fpspreadsheet/source/common/fpspreadsheet.pas b/components/fpspreadsheet/source/common/fpspreadsheet.pas index f680d3f29..241307b34 100644 --- a/components/fpspreadsheet/source/common/fpspreadsheet.pas +++ b/components/fpspreadsheet/source/common/fpspreadsheet.pas @@ -1031,7 +1031,6 @@ begin fmt.NumberFormatIndex := destSheet.Workbook.AddNumberFormat(nfs); end; end; - destSheet.WriteCellFormat(AToCell, fmt); end; end; diff --git a/components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas b/components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas index 02ef52d44..ff66110ab 100644 --- a/components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas +++ b/components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas @@ -4662,12 +4662,15 @@ begin VK_F2: FEnhEditMode := true; VK_DELETE: - if not FReadOnly then begin + if (not FReadOnly) and (goEditing in Options) then begin if (ssCtrl in Shift) then Worksheet.DeleteSelection else Worksheet.EraseSelection(true); end; + VK_X, VK_V: + if (Shift = [ssCtrl]) and (Worksheet.IsProtected or not (goEditing in Options)) then + Key := 0; end; inherited;