return p->next;
}
+static int ME_GetParaLineSpace(ME_Context* c, ME_Paragraph* para)
+{
+ int sp = 0, ls = 0;
+ if (!(para->pFmt->dwMask & PFM_LINESPACING)) return 0;
+
+ /* FIXME: how to compute simply the line space in ls ??? */
+ /* FIXME: does line spacing include the line itself ??? */
+ switch (para->pFmt->bLineSpacingRule)
+ {
+ case 0: sp = ls; break;
+ case 1: sp = (3 * ls) / 2; break;
+ case 2: sp = 2 * ls; break;
+ case 3: sp = ME_twips2pointsY(c, para->pFmt->dyLineSpacing); if (sp < ls) sp = ls; break;
+ case 4: sp = ME_twips2pointsY(c, para->pFmt->dyLineSpacing); break;
+ case 5: sp = para->pFmt->dyLineSpacing / 20; break;
+ default: FIXME("Unsupported spacing rule value %d\n", para->pFmt->bLineSpacingRule);
+ }
+ if (c->editor->nZoomNumerator == 0)
+ return sp;
+ else
+ return sp * c->editor->nZoomNumerator / c->editor->nZoomDenominator;
+}
+
static void ME_PrepareParagraphForWrapping(ME_Context *c, ME_DisplayItem *tp);
static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) {
if (!(pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) &&
pFmt->dwMask & PFM_BORDER)
{
- border = ME_GetParaBorderWidth(c->editor, tp->member.para.pFmt->wBorders);
+ border = ME_GetParaBorderWidth(c, tp->member.para.pFmt->wBorders);
if (pFmt->wBorders & 1) {
wc.nFirstMargin += border;
wc.nLeftMargin += border;
ME_DisplayItem *item;
ME_Context c;
BOOL bModified = FALSE;
- int yStart = -1;
int totalWidth = 0;
ME_InitContext(&c, editor, ITextHost_TxGetDC(editor->texthost));
ME_WrapTextParagraph(&c, item);
if (bRedraw)
- {
item->member.para.nFlags |= MEPF_REPAINT;
- if (yStart == -1)
- yStart = c.pt.y;
- }
bModified = bModified | bRedraw;
{
REQRESIZE info;
+ info.nmhdr.hwndFrom = NULL;
+ info.nmhdr.idFrom = 0;
info.nmhdr.code = EN_REQUESTRESIZE;
info.rc = rc;
info.rc.right = editor->nTotalWidth;