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:
Dylan Smith 2008-08-07 10:17:12 -04:00 committed by Alexandre Julliard
parent 2cd620802a
commit e568e15142
1 changed files with 2 additions and 4 deletions

View File

@ -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;