LCL: carbon: TMemo.Lines.Assign: fixed empty strings at start, bug #27438

git-svn-id: trunk@47677 -
This commit is contained in:
mattias 2015-02-10 15:15:51 +00:00
parent f9fbb2185d
commit 6048542c98

View File

@ -95,6 +95,7 @@ type
procedure Insert(Index: Integer; const S: string); override;
procedure LoadFromFile(const FileName: string); override;
procedure SaveToFile(const FileName: string); override;
procedure AddStrings(TheStrings: TStrings); overload; override;
public
property Owner: TCarbonMemo read FOwner;
end;
@ -455,5 +456,17 @@ begin
end;
end;
procedure TCarbonMemoStrings.AddStrings(TheStrings: TStrings);
begin
BeginUpdate;
try
// don't need to copy Objects, VCL does not support them neither
// preserve the last line ending
Text:=ConvertLineEndings(TheStrings.Text);
finally
EndUpdate;
end;
end;
end.