Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006611 [JEDI VCL] 00 JVCL Components major always 2018-01-21 15:17 2018-07-18 16:04
Reporter marcowobben View Status public  
Assigned To
Priority normal Resolution open Platform
Status feedback   OS
Projection none   OS Version
ETA none Fixed in Version Product Version Daily / GIT
  Target Version Product Build
Summary 0006611: Incorrect result in TJvTextAttributes.ConsistentAttributes
Description Requesting TJvRichEdit.SelAttributes.ConsistentAttributes always returns the valid available attributes, not the actual consistent attributes themselves.
Steps To Reproduce
Additional Information The function uses "dwMask" instead of "dwEffects":

function TJvTextAttributes.GetConsistentAttributes: TJvConsistentAttributes;

A fix would be:

function TJvTextAttributes.GetConsistentAttributes: TJvConsistentAttributes;
  Format: TCharFormat2;
  Result := [];
  if FRichEdit.HandleAllocated and (FType <> atDefaultText) then
    SendMessage(FRichEdit.Handle, EM_GETCHARFORMAT,
      AttrFlags[FType], LParam(@Format));
    with Format do
      if (dwEffects and CFM_BOLD) <> 0 then
        Include(Result, caBold);
      if (dwEffects and CFM_COLOR) <> 0 then
        Include(Result, caColor);
      if (dwEffects and CFM_FACE) <> 0 then
        Include(Result, caFace);
      if (dwEffects and CFM_ITALIC) <> 0 then
        Include(Result, caItalic);
      if (dwEffects and CFM_SIZE) <> 0 then
        Include(Result, caSize);
      if (dwEffects and CFM_STRIKEOUT) <> 0 then
        Include(Result, caStrikeOut);
      if (dwEffects and CFM_UNDERLINE) <> 0 then
        Include(Result, caUnderline);
      if (dwEffects and CFM_PROTECTED) <> 0 then
        Include(Result, caProtected);
      if (dwEffects and CFM_OFFSET) <> 0 then
        Include(Result, caOffset);
      if (dwEffects and CFM_HIDDEN) <> 0 then
        Include(Result, caHidden);
      if (dwEffects and CFM_CHARSET) <> 0 then
        Include(Result, caCharset);
      if RichEditVersion >= 2 then
        if (dwEffects and CFM_LINK) <> 0 then
          Include(Result, caLink);
        if (dwEffects and CFM_BACKCOLOR) <> 0 then
          Include(Result, caBackColor);
        if (dwEffects and CFM_DISABLED) <> 0 then
          Include(Result, caDisabled);
        if (dwEffects and CFM_WEIGHT) <> 0 then
          Include(Result, caWeight);
        if (dwEffects and CFM_SUBSCRIPT) <> 0 then
          Include(Result, caSubscript);
        if (dwEffects and CFM_REVAUTHOR) <> 0 then
          Include(Result, caRevAuthor);

Tags No tags attached.
Attached Files

- Relationships

-  Notes
obones (administrator)
2018-07-18 16:04

Could you check if the issue is still present in the latest GIT content? If yes, please provide the zipped sources of an application showing this.

- Issue History
Date Modified Username Field Change
2018-01-21 15:17 marcowobben New Issue
2018-07-18 16:04 obones Note Added: 0021545
2018-07-18 16:04 obones Status new => feedback

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