Commit e568e151 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Removed assumption about the order of rtf indent control words.

Previously the calculations of dxStartIdent and dxOffset depended on their order.
parent 2cd62080
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment