richedit: Fix reading paragraph left & first indentation attributes.

This commit is contained in:
Eric Pouech 2008-03-16 21:46:03 +01:00 committed by Alexandre Julliard
parent f628a1c245
commit cb4a41b806
1 changed files with 6 additions and 4 deletions

View File

@ -471,14 +471,16 @@ 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.dxOffset;
fmt.dwMask |= PFM_STARTINDENT | PFM_OFFSET;
fmt.dxStartIndent += 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 = -fmt.dxOffset + info->rtfParam;
fmt.dwMask |= PFM_STARTINDENT;
fmt.dxStartIndent = info->rtfParam;
fmt.dxOffset = 0;
break;
case rtfRightIndent:
fmt.dwMask = PFM_RIGHTINDENT;