Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004520 [JEDI VCL] 00 JVCL Components minor always 2008-10-10 07:08 2008-11-01 17:02
Reporter darkendorf View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.34
Summary 0004520: JvRichEditToHtml.pas - ConvertToHtmlStrings changing font style on second character
Description On line 483, following code gives unexpected result while formatting text; it adds a character with new font style before setting up the new style, so each time the first character of a word/string is out of its own format :

        J := I;
        while (J <= Len) and not (Text[J] in [#$A, #$B, #$D]) do
        begin
          Att.Assign(Value.SelAttributes);
          if Diff(Att, CurrAt) then
          begin
            St.Append(FEndSection);
            CurrAt.Assign(Att);
            St.Append(AttToHtml(Att));
          end;

          if Text[J] in ['A'..'Z', 'a'..'z', '0'..'9'] then
            St.Append(Text[J])
          else
            St.Append(CharToHtml(Text[J]));
          Inc(J);
          Value.SelStart := J - 1;
        end;

if the word HTML is underlined in a text, it gives this : HTML
Additional Information I solved the problem doing this :
        J := I;
        while (J <= Len) and not (Text[J] in [#$A, #$B, #$D]) do
        begin
          Att.Assign(Value.SelAttributes);
          if Diff(Att, CurrAt) then
          begin
            St.Append(FEndSection);
            CurrAt.Assign(Att);
            St.Append(AttToHtml(Att));
            Value.SelStart := J;
          end else
          begin
            if Text[J] in ['A'..'Z', 'a'..'z', '0'..'9'] then
              St.Append(Text[J])
            else
              St.Append(CharToHtml(Text[J]));
            Inc(J);
            Value.SelStart := J;
          end;
        end;
Tags No tags attached.
Attached Files

- Relationships
related to 0004734resolvedAHUser Issue 0004520 isn't solved completely 

-  Notes
(0014833)
darkendorf (reporter)
2008-10-10 07:55

This error IS present either in 3.34 or in last (10/10/2008) JVCL Daily package.
(0014839)
obones (administrator)
2008-10-12 23:49

Please post the zipped sources of a sample application showing this issue.
(0014946)
AHUser (developer)
2008-11-01 17:02

Fixed in SVN.

- Issue History
Date Modified Username Field Change
2008-10-10 07:08 darkendorf New Issue
2008-10-10 07:09 darkendorf Issue Monitored: darkendorf
2008-10-10 07:55 darkendorf Note Added: 0014832
2008-10-10 07:55 darkendorf Note Added: 0014833
2008-10-10 08:20 obones Note Deleted: 0014832
2008-10-12 23:49 obones Note Added: 0014839
2008-10-12 23:49 obones Status new => feedback
2008-11-01 17:02 AHUser Status feedback => resolved
2008-11-01 17:02 AHUser Fixed in Version => Daily / SVN
2008-11-01 17:02 AHUser Resolution open => fixed
2008-11-01 17:02 AHUser Assigned To => AHUser
2008-11-01 17:02 AHUser Note Added: 0014946
2009-04-09 14:52 obones Relationship added related to 0004734


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker