Skip to content

Commit

Permalink
Issue #136: remove now unused TLineNormalizingMemo code
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarbecker committed Mar 16, 2021
1 parent 62793f0 commit 586eb52
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions source/extra_controls.pas
Expand Up @@ -23,12 +23,6 @@ TExtForm = class(TForm)
property HasSizeGrip: Boolean read GetHasSizeGrip write SetHasSizeGrip default False;
class procedure FixControls(ParentComp: TComponent);
end;
// Memo replacement which accepts any line break format
TLineNormalizingMemo = class(TMemo)
private
procedure WMSetText(var msg: TWMSettext); message WM_SETTEXT;
procedure WMPaste(var msg: TWMPaste); message WM_PASTE;
end;


implementation
Expand Down Expand Up @@ -204,29 +198,4 @@ procedure TExtForm.FilterNodesByEdit(Edit: TButtonedEdit; Tree: TVirtualStringTr




{ TLineNormalizingMemo }

procedure TLineNormalizingMemo.WMSetText(var msg: TWMSettext);
var
s: string;
begin
s := msg.Text;
s := AdjustLineBreaks(s);
msg.Text := PChar(s);
inherited;
end;


procedure TLineNormalizingMemo.WMPaste(var msg: TWMPaste);
var
s: string;
begin
if Clipboard.HasFormat(cf_Text) then begin
s := Clipboard.AsText;
s := AdjustLineBreaks(s);
SelText := s;
end;
end;

end.

0 comments on commit 586eb52

Please sign in to comment.