richedit: Fix reading paragraph left & first indentation attributes.
This commit is contained in:
parent
f628a1c245
commit
cb4a41b806
|
@ -471,14 +471,16 @@ static void ME_RTFParAttrHook(RTF_Info *info)
|
||||||
}
|
}
|
||||||
case rtfFirstIndent:
|
case rtfFirstIndent:
|
||||||
ME_GetSelectionParaFormat(info->editor, &fmt);
|
ME_GetSelectionParaFormat(info->editor, &fmt);
|
||||||
fmt.dwMask = PFM_STARTINDENT | PFM_OFFSET;
|
fmt.dwMask |= PFM_STARTINDENT | PFM_OFFSET;
|
||||||
fmt.dxStartIndent += info->rtfParam + fmt.dxOffset;
|
fmt.dxStartIndent += info->rtfParam;
|
||||||
fmt.dxOffset = -info->rtfParam;
|
fmt.dxOffset = -info->rtfParam;
|
||||||
break;
|
break;
|
||||||
case rtfLeftIndent:
|
case rtfLeftIndent:
|
||||||
|
/* we assume rtfLeftIndent is always specified before rtfFirstIndent */
|
||||||
ME_GetSelectionParaFormat(info->editor, &fmt);
|
ME_GetSelectionParaFormat(info->editor, &fmt);
|
||||||
fmt.dwMask = PFM_STARTINDENT;
|
fmt.dwMask |= PFM_STARTINDENT;
|
||||||
fmt.dxStartIndent = -fmt.dxOffset + info->rtfParam;
|
fmt.dxStartIndent = info->rtfParam;
|
||||||
|
fmt.dxOffset = 0;
|
||||||
break;
|
break;
|
||||||
case rtfRightIndent:
|
case rtfRightIndent:
|
||||||
fmt.dwMask = PFM_RIGHTINDENT;
|
fmt.dwMask = PFM_RIGHTINDENT;
|
||||||
|
|
Loading…
Reference in New Issue