diff --git a/components/lazreport/source/lr_class.pas b/components/lazreport/source/lr_class.pas index 0775b2ceee..dfd464b8c2 100644 --- a/components/lazreport/source/lr_class.pas +++ b/components/lazreport/source/lr_class.pas @@ -2835,7 +2835,7 @@ var procedure WrapLine(const s: String); var i, cur, beg, last, len: Integer; - WasBreak, CRLF: Boolean; + WasBreak, CRLF, IsCR: Boolean; ch: TUTF8char; begin @@ -2864,21 +2864,25 @@ var Ch := UTF8Char(s, cur, Desc); // check for items with soft-breaks - if (Ch=#10) or (Ch=#13) then + IsCR := Ch=#13; + if IsCR then + begin + //handle composite newline + ch := UTF8Char(s, cur+1, desc); + //dont increase char index if next char is LF (#10) + if ch<>#10 then + Inc(Cur); + end; + if Ch=#10 then begin OutLine(UTF8Range(s, beg, cur - beg, Desc) + #1); - while (cur ' ' then