View Issue Details

IDProjectCategoryView StatusLast Update
0023291LazarusLazReportpublic2012-11-08 18:58
ReporterJulio Jiménez BorregueroAssigned ToJesus Reyes 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.1 (SVN)Product Build 
Target Version1.2.0Fixed in Version1.1 (SVN) 
Summary0023291: Patch: Fix breaking lines properly when text contains utf8 chars
DescriptionIf the text contains utf8 chars last position breaking lines is wrongly calculated.

Also implements properly: 'if space was found, advance to next no space char'
TagsNo tags attached.
Fixed in Revision39266
LazTarget1.2
Widgetset
Attached Files
  • fix-lrclass.diff (633 bytes)
    Index: lazreport/source/lr_class.pas
    ===================================================================
    --- lazreport/source/lr_class.pas	(revisión: 39264)
    +++ lazreport/source/lr_class.pas	(copia de trabajo)
    @@ -2955,8 +2955,8 @@
                 // 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;
    
    fix-lrclass.diff (633 bytes)

Activities

2012-11-08 13:42

 

fix-lrclass.diff (633 bytes)
Index: lazreport/source/lr_class.pas
===================================================================
--- lazreport/source/lr_class.pas	(revisión: 39264)
+++ lazreport/source/lr_class.pas	(copia de trabajo)
@@ -2955,8 +2955,8 @@
             // 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;
fix-lrclass.diff (633 bytes)

Jesus Reyes

2012-11-08 18:58

developer   ~0063750

Applied, thanks.

Issue History

Date Modified Username Field Change
2012-11-08 13:42 Julio Jiménez Borreguero New Issue
2012-11-08 13:42 Julio Jiménez Borreguero File Added: fix-lrclass.diff
2012-11-08 14:43 Zeljan Rikalo Status new => assigned
2012-11-08 14:43 Zeljan Rikalo Assigned To => Jesus Reyes
2012-11-08 18:58 Jesus Reyes Fixed in Revision => 39266
2012-11-08 18:58 Jesus Reyes LazTarget => 1.2
2012-11-08 18:58 Jesus Reyes Status assigned => resolved
2012-11-08 18:58 Jesus Reyes Fixed in Version => 1.1 (SVN)
2012-11-08 18:58 Jesus Reyes Resolution open => fixed
2012-11-08 18:58 Jesus Reyes Note Added: 0063750
2012-11-08 18:58 Jesus Reyes Target Version => 1.2.0