Sample text like:
asf asdf asdf asdf
Displays properly both in the control and in MS WordPad and Word.
but introduce a SINGLE CR anywhere, and every space is replaced with a CR:
asf
asdf
asdf
asdf
The effect occurs after code that "merges" temporary rtf text files into a larger document using:
If FileExists(ExtractFilePath(Application.EXEName) + 'WorkFiles\TempTab ' + LeftPadChS(IntToStr(n),'0',2) + '.rtf') then begin
row := par.AppendNewRow(true);
cell := row.AppendNewCell(true);
cell.ASet(WPAT_BorderFlags, WPBRD_DRAW_All4);
cell.ASet(WPAT_COLWIDTH, WPInchToTwips(😎);
// cell.SetText(FormFrontPage.wwTableSheetTabs.FieldByName('SheetName').AsString, titleA);
If LastDelimiter('=', Book1.TextRC[1,6]) > 0 then
cell.SetText(Copy(Book1.TextRC[1, 6], 1, LastDelimiter('=', Book1.TextRC[1,6]) - 1) + ' - Specific Recommendations', titleA)
Else
cell.SetText(Book1.TextRC[1, 6] + ' - Specific Recommendations', titleA);
row := par.AppendNewRow(true);
cell := row.AppendNewCell(true);
cell.ASet(WPAT_BorderFlags, WPBRD_DRAW_All4);
cell.ASet(WPAT_COLWIDTH, WPInchToTwips(😎);
cell.LoadFromFile(ExtractFilePath(Application.EXEName) + 'WorkFiles\TempTab ' + LeftPadChS(IntToStr(n),'0',2) + '.rtf', 'AUTO', []);
end;
par := WPRichText1.ActiveText.LastPar;
par := par.AppendNewTable;
// par.ASet(WPAT_BoxHeight, WPInchToTwips(1));
row := par.AppendNewRow(true);
cell := row.AppendNewCell(true);
end;
The "workfiles" line allows a user's to annotations of sections of a report with comments that are temporarily stored in files numbered for convenience and merged above with other content in a table that is unaffected (negatively.)