richedit: Removed assumption about the order of rtf indent control words.
Previously the calculations of dxStartIdent and dxOffset depended on their order.
This commit is contained in:
parent
2cd620802a
commit
e568e15142
|
@ -473,15 +473,13 @@ static void ME_RTFParAttrHook(RTF_Info *info)
|
|||
case rtfFirstIndent:
|
||||
ME_GetSelectionParaFormat(info->editor, &fmt);
|
||||
fmt.dwMask = PFM_STARTINDENT | PFM_OFFSET;
|
||||
fmt.dxStartIndent += info->rtfParam;
|
||||
fmt.dxStartIndent += fmt.dxOffset + info->rtfParam;
|
||||
fmt.dxOffset = -info->rtfParam;
|
||||
break;
|
||||
case rtfLeftIndent:
|
||||
/* we assume rtfLeftIndent is always specified before rtfFirstIndent */
|
||||
ME_GetSelectionParaFormat(info->editor, &fmt);
|
||||
fmt.dwMask = PFM_STARTINDENT;
|
||||
fmt.dxStartIndent = info->rtfParam;
|
||||
fmt.dxOffset = 0;
|
||||
fmt.dxStartIndent = info->rtfParam - fmt.dxOffset;
|
||||
break;
|
||||
case rtfRightIndent:
|
||||
fmt.dwMask = PFM_RIGHTINDENT;
|
||||
|
|
Loading…
Reference in New Issue