Red border on table in webpage mode

  • I just bought wptools yeaterdays an am integrating it in an application to view emails. When loading html with tables in wpFormatAsWebpage mode, I get an anoying red border on the tables (it does not show in other modes).

    just doing this :

    cTest.AsWebpage:=[wpFormatAsWebpage];
    cTest.LoadFromString('<html><body><table><tr><td>abc</td></tr></table></body></html>','HTML',true);

    Display a single table cell with "abc" inside and a red border.

    Any Idea how to remove the red border ?

    Thanks.

  • Thanks for your reply,

    No they are not defined.

    I find the culprit in WPRTEPaint after line 6570 :

    if (LineData.lineflags and WPDRAW_TABLEBOX) <> 0 then
    begin
    r.Left := LineData.x;
    r.Top := LineData.y;
    r.Right := r.Left + LineData.w;
    r.Bottom := r.Top + LineData.h;
    DestCanvas.Pen.Width := 0;
    if LineData.Par.ParagraphType=wpIsTable then
    DestCanvas.Pen.Color := clRed
    else if LineData.Par.ParagraphType=wpIsTableRow then
    DestCanvas.Pen.Color := clBlue
    else DestCanvas.Pen.Color := clBlack;
    DestCanvas.MoveTo(r.Left, r.Top);
    DestCanvas.LineTo(r.Right, r.Top);
    DestCanvas.LineTo(r.Right, r.Bottom);
    DestCanvas.LineTo(r.Left, r.Bottom);
    DestCanvas.LineTo(r.Left, r.Top);
    DestCanvas.Pen.Color := clBlack;
    end;

    the root is the WPDRAW_TABLEBOX flag in lineflags which is set in WPRTEFormatB line 849 :

    linedata.lineflags := WPDRAW_TABLEBOX + WPDRAW_NOCURSOR

    Do you have an idea ? Comenting out WPDRAW_TABLEBOX seem to solve the problem but may have other sideeffects.