v4.22b and Cell Width

  • Julian,

    Yesterday upgraded WPTools to v4.22b. This solves many problems (suddenly disappearing imageobjects, etc). But there are yet some small problems:

    - Saving of the Table Border is not done correctly, see my other suggestion / post @ My Table Post. Border-width Points are calculated incorrect.


    - Reading the Cell Width is not done correctly (since 4.22(b)). The Cell width is written correctly, but in the Reading routines it's not restored, so a table width col1=10% and col2=90% will be read in wptools as col1=50% and col2=50%.

    Many thanks for solving this small problems.

    Janno de Wit.

  • Julian,

    Searched for a while in WPXMLFile.pas and fixed the solution.

    Problem:
    You save the column-width like <TD style="width:90%">. When wptools load the page it seems that "width:90%" isn't parsed.
    But wptools will parse <TD WIDTH="90%">!

    Thus, I inserted at line ~795 of WPXMLFile.pas:

    --
    EXTRACSSStyle := 'width:' + FormatFloat('0', (save_par^.celldef^.CWidthPC / 255) * 100) + '%;';

    // -JDW @ 06/05 Parameter toegevoegd omdat style="width:50%;" niet goed ingelezen wordt.
    FParams.Add( 'WIDTH="' + FormatFloat('0', (save_par^.celldef^.CWidthPC / 255) * 100) + '%"' );

    if not (blEnabled in save_par^.border.LineType) then
    ------

    to save the width again in <TD>.

    Thanks.
    Janno.