You've already forked lazarus-ccr
richmemo: manual reading of RTF file
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3732 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -383,13 +383,17 @@ function TCustomRichMemo.LoadRichText(Source: TStream): Boolean;
|
||||
begin
|
||||
if not HandleAllocated then HandleNeeded;
|
||||
if Assigned(Source) and HandleAllocated then begin
|
||||
Result := TWSCustomRichMemoClass(WidgetSetClass).LoadRichText(Self, Source);
|
||||
if not Result and Assigned(RTFLoadStream) then begin
|
||||
if Assigned(RTFLoadStream) then begin
|
||||
Self.Lines.BeginUpdate;
|
||||
Self.Lines.Clear;
|
||||
Result:=RTFLoadStream(Self, Source);
|
||||
Self.Lines.EndUpdate;
|
||||
try
|
||||
Self.Lines.Clear;
|
||||
Result:=RTFLoadStream(Self, Source);
|
||||
finally
|
||||
Self.Lines.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
if not Result then
|
||||
Result := TWSCustomRichMemoClass(WidgetSetClass).LoadRichText(Self, Source);
|
||||
end else
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user