Page 1 of 1
RVE Doc. contains links ?
Posted: Fri Mar 07, 2008 9:24 am
by vega
Hi, I just need to know if my doc. has hyperlinks in it (I don't really care to know the number of them). This should be done just before the call to SaveHTMLToStreamEx. Any hint appreciated
Thanks in advance, Dan
Posted: Fri Mar 07, 2008 11:57 am
by Sergey Tkachenko
The simplest way is using RichView.RVData.EnumItems:
Code: Select all
procedure TForm1.EnumLinks(RVData: TCustomRVData; ItemNo: Integer;
var UserData1: Integer; const UserData2: String;
var ContinueEnum: Boolean);
begin
ContinueEnum := not RVData.GetItem(ItemNo).GetBoolValueEx(rvbpJump, RVData.GetRVStyle);
if not ContinueEnum then
UserData1 := 1;
end;
function TForm1.HasLinks(rv: TCustomRichView): Boolean;
var r: Integer;
begin
r := 0;
rv.RVData.EnumItems(EnumLinks, r, '');
Result := r<>0;
end;
See also
http://www.trichview.com/forums/viewtopic.php?t=397