From d46192418cbb7b41fddda6921e4c719f6a5daf47 Mon Sep 17 00:00:00 2001 From: jesus Date: Thu, 8 Nov 2012 17:57:36 +0000 Subject: [PATCH] =?UTF-8?q?LazReport,=20Fix=20breaking=20lines=20properly?= =?UTF-8?q?=20when=20text=20contains=20utf8=20chars,=20from=20Julio=20Jim?= =?UTF-8?q?=C3=A9nez=20Borreguero,=20issue=20#23291?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: trunk@39266 - --- components/lazreport/source/lr_class.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lazreport/source/lr_class.pas b/components/lazreport/source/lr_class.pas index 2739c993b1..d4483e951b 100644 --- a/components/lazreport/source/lr_class.pas +++ b/components/lazreport/source/lr_class.pas @@ -2955,8 +2955,8 @@ var // output the portion of word that fits maxwidth OutLine(UTF8Range(s, beg, last - beg, Desc)); // if space was found, advance to next no space char - if s[last] = ' ' then - last := last + 1; + while (UTF8Char(s, last, Desc) = ' ') and (last < Length(s)) do + Inc(last); end; beg := last;