WPCubed Product Support

FastAppendText deletes leading blank lines

Hi Julian,

We have just upgraded from version 5.36 to version 5.48. We use FastAppendText to construct documents from multiple templates. With version 5.48 we are finding that all the leading blank lines on the template are deleted (I think this might only apply to the first template when the destination RichText is empty).

I took the liberty of debugging into the WPTools source code, and for what it is worth here are my findings.

By commenting out the line in TWPCustomRtfEdit.FastAppendText()
ActiveText.Clear(true);
it seems to have fixed it for our purposes.

However, when we FastAppendText into an empty RichText it adds a blank line at the top. We have a workaround to remove this. Maybe this code is to solve this, which would be nice, but unfortunately deleted blank lines from the source RichText as well.

Your comments would be appreciated
Simon

#1 ♥ 0
3.3k Views 2 users read 1 min
support

Hi,

yes, the problem was the Clear. But if You change it to this, it should work:

aLastPar := nil;
while par <> nil do
begin
if (aLastPar=nil) and ActiveText.Empty then

Julian

#2 ♥ 0
This category is archived. No new posts are possible.