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
0006611 [JEDI VCL] 00 JVCL Components major always 2018-01-21 15:17 2018-01-21 15:17
Reporter marcowobben View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version Daily / GIT
Summary 0006611: Incorrect result in TJvTextAttributes.ConsistentAttributes
Description Requesting TJvRichEdit.SelAttributes.ConsistentAttributes always returns the valid available attributes, not the actual consistent attributes themselves.
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

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2018-01-21 15:17 marcowobben New Issue

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