fpspreadsheet: Fix cells being pasted in grid from clipboard when worksheet is protected.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6847 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-04-13 20:21:33 +00:00
parent 5a4b8a0dcf
commit 9369e4d3ef
2 changed files with 4 additions and 2 deletions

View File

@ -1031,7 +1031,6 @@ begin
fmt.NumberFormatIndex := destSheet.Workbook.AddNumberFormat(nfs); fmt.NumberFormatIndex := destSheet.Workbook.AddNumberFormat(nfs);
end; end;
end; end;
destSheet.WriteCellFormat(AToCell, fmt); destSheet.WriteCellFormat(AToCell, fmt);
end; end;
end; end;

View File

@ -4662,12 +4662,15 @@ begin
VK_F2: VK_F2:
FEnhEditMode := true; FEnhEditMode := true;
VK_DELETE: VK_DELETE:
if not FReadOnly then begin if (not FReadOnly) and (goEditing in Options) then begin
if (ssCtrl in Shift) then if (ssCtrl in Shift) then
Worksheet.DeleteSelection Worksheet.DeleteSelection
else else
Worksheet.EraseSelection(true); Worksheet.EraseSelection(true);
end; end;
VK_X, VK_V:
if (Shift = [ssCtrl]) and (Worksheet.IsProtected or not (goEditing in Options)) then
Key := 0;
end; end;
inherited; inherited;