RBSupport and mailmerge fix

  • 1) With "{$DEFINE WPTOOLS_MAILMERGE}" set disabled the mailmerge of "<field>" didn't work.

    in TppCustomWPTRichText.MergeDBFields I added these rows to mantain the correct text format and to delete field tags when value is blank

    Code
    sfValue := lDataPipeline.GetFieldAsString(lFieldName);---->     Cursor.GetCharAttr;---->     if sfValue <> '' then                  FPaintEngine.Memo.InputString(sfValue)---->     else---->           FPaintEngine.Memo.Cursor.ClearSelection(true, false, false);

    ----------------------------------------------------------------------------

    2) I overrided LoadWPTRichText in TppWPTRichText class to fix mailmerge (before my intervention the text shown was the same in all records)

    this is my code implementation:

    ----------------------------------------------------------------------------

    3) The TppWPTRichText.edit metoth displays an editor (TWPToolsEditor) that does not allow the addition of <field> selecting from a list. I put the old code of rbsupport for wptools4


    Please fix your code.

    Best Regards
    Matteo