richedit: Move function ME_GetParaLineSpace to make it static.
This commit is contained in:
parent
28a4a7bd42
commit
535afbd3aa
@ -230,7 +230,6 @@ void ME_UpdateScrollBar(ME_TextEditor *editor);
|
|||||||
|
|
||||||
/* other functions in paint.c */
|
/* other functions in paint.c */
|
||||||
int ME_GetParaBorderWidth(ME_TextEditor *editor, int);
|
int ME_GetParaBorderWidth(ME_TextEditor *editor, int);
|
||||||
int ME_GetParaLineSpace(ME_Context *c, ME_Paragraph*);
|
|
||||||
|
|
||||||
/* richole.c */
|
/* richole.c */
|
||||||
LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *);
|
LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *);
|
||||||
|
@ -520,29 +520,6 @@ int ME_GetParaBorderWidth(ME_TextEditor* editor, int flags)
|
|||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
|
|
||||||
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_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT* bounds)
|
static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT* bounds)
|
||||||
{
|
{
|
||||||
int idx, border_width, top_border, bottom_border;
|
int idx, border_width, top_border, bottom_border;
|
||||||
|
@ -456,6 +456,29 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
|
|||||||
return p->next;
|
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_PrepareParagraphForWrapping(ME_Context *c, ME_DisplayItem *tp);
|
||||||
|
|
||||||
static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) {
|
static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user