trichview.support
Re: URL Updating |
Author |
Message |
Sergey Tkachenko |
Posted: 07/07/2004 22:00:40 This procedure processes text hyperlinks (you can also check for GetItemStyle(i)=rvsHotPicture). Call ProcessLinks(RichView.RVData). This procedure cannot be undone/redone, so if you call it for editor, call ClearUndo after it. procedure ProcessLinks(RVData: TCustomRVData); var i,r,c: Integer; table: TRVTableItemInfo; begin for i := 0 to RVData.ItemCount-1 do if (RVData.GetItemStyle(i)>=0) and RVData.GetRVStyle[RVData.GetItemStyle(i)].Jump then begin // converting hypertext link to upper case s := RVData.GetItemTextA(i); s := AnsiUpperCase(s); RVData.SetItemTextA(i,s); // converting hyperlink target to lower case // assuming that it's in item tag, and // rvoTagsArePChars is in Options s := PChar(RVData.GetItemTag(i)); s := AnsiLowerCase(s); RVData.SetItemTag(Integer(StrNew(PChar(s)))); end else if RVData.GetItemStyle(i)=rvsTable then begin table := TRVTableItemInfo(RVData.GetItem(i)); for r := 0 to table.Rows.Count-1 do for c := 0 to table.Rows[r].Count-1 do if table.Cells[r,c]<>nil then ProcessLinks(table.Cells[r,c].GetRVData); end; end; > Hello > > Is it possible once a URL has been inserted to interate through the document > find it and update either > the text or the URL itself. > > Thanks Mike > > |
Powered by ABC Amber Outlook Express Converter