trichview.com

trichview.support




Re: Underlines and HTML Export


Return to index


Author

Message

Yernar

Posted: 12/17/2002 17:18:32


Something like this?


procedure ReplaceAll(RVData: TCustomRVData; const OldText, NewText: string);

var

  i, r, c: Integer;

  table: TRVTableItemInfo;

begin

  for i := 0 to RVData.Items.Count - 1 do

    if RVData.GetItemStyle(i) >= 0 then

      RVData.Items[i] := ReplaceStr(RVData.Items[i],

        OldText, NewText)

    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

            ReplaceAll(table.Cells[r, c].GetRVData, OldText, NewText);

      table.Changed;

    end;

end;


Call: ReplaceAll(MyRichView.RVData, '<B>some underlined text</B>', '<U>some

underlined text</U>');


P.S. ReplaceStr function is from RX Library.


Hope it helps.



"mjg" <[email protected]> wrote:

>

>Hi there

>

>I currently (successfully) pasting Richtext from Word into an rve and converting

>it to HTML en-route so I get to see the HTML code for the richtext I'm pasting.

>

>

>It seems however that underlined text is treated as bold. ie. it comes out

>as

><B>some underlined text</B>

>rather than

><U>some underlined text</U>

>

>I know it's not my code but perhaps I haven't set an rve property or Style

>somewhere?

>

>I get a similar problem with the XML support stuff too :o(

>

>Any ideas?

>

>TIA

>

>M.





Powered by ABC Amber Outlook Express Converter