RVE Doc. contains links ?

General TRichView support forum. Please post your questions here
Post Reply
vega
Posts: 50
Joined: Fri Oct 26, 2007 6:29 am

RVE Doc. contains links ?

Post 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
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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
Post Reply