trichview.com

trichview.support




Re: Does SaveHTMLToStream do hyperlinks?


Return to index


Author

Message

Luke

Posted: 10/12/2003 22:42:21


I actually do have rvoTagsArePChars set true, and virtually the same code

you provide.

Everything works well for links in my standard TDBRichViewEdit usage.


Where it goes wrong, is where I use LoadRVFFromStream to load a standard

TRichView from a TStringStream, and then use SaveHTMLToStream. The content

is the same content also used in TDBRichViewEdit controls, where the links

work well.


As indicated, multiple URLs in the single document (from TStringStream) always

come through with an id of 0 in URLNeeded, so there's never a chance to get

the correct ItemNo from id anyway.


I'm now wondering if loading from an OleString (instead of a binary storage

may be a problem, except that everything (including tables and graphics)

come out correctly. Even the URLs appear with there blue underlined style

in the resulting HTML document - just no actual URL link capability.


Unfortunately, I use C++Builder, where the debugging capabilites don't show

much useful for Delphi variables, so I can't track down the internals myself

very well.


Regards,

Luke



"Sergey Tkachenko" <[email protected]> wrote:

>No, SaveHTMLToStream saves hyperlinks, if they are provided in OnURLNeeded.

>

>By default, tags of all items are 0 (i.e. nil, empty string). If you store

>URLs in tags (like RichViewActions do), you need to assign tags to hyperlink

>items explicitly (or allow RichViewActions to do it).

>rvoTagsArePChars must be included in Options.

>

>The code for OnURLNeeded must be:

>

>uses CRVFData;

>

>procedure TForm1.RichViewEdit1URLNeeded(Sender: TCustomRichView;

>  id: Integer; var url: String);

>var RVData: TCustomRVFormattedData;

>    ItemNo: Integer;

>begin

>  RichViewEdit1.GetJumpPointLocation(id, RVData, ItemNo);

>  url := PChar(RVData.GetItemTag(ItemNo));

>end;

>

>>

>> Can this be confirmed?

>>

>> On URLNeeded I get 'id' values of zero all the time, and 'GetItemTag'

>doesn't

>> return the text (even for item 0).

>>

>> Thanks.

>

>





Powered by ABC Amber Outlook Express Converter