Dylan Smith : richedit: Move function ME_GetParaLineSpace to make it static .
Alexandre Julliard
julliard at winehq.org
Wed Feb 10 10:44:50 CST 2010
Module: wine
Branch: master
Commit: 535afbd3aa81949f08e735d0efd9d9dbe1f11c0b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=535afbd3aa81949f08e735d0efd9d9dbe1f11c0b
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Tue Feb 9 12:07:22 2010 -0500
richedit: Move function ME_GetParaLineSpace to make it static.
---
dlls/riched20/editor.h | 1 -
dlls/riched20/paint.c | 23 -----------------------
dlls/riched20/wrap.c | 23 +++++++++++++++++++++++
3 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h
index 8a5304b..89c18b7 100644
--- a/dlls/riched20/editor.h
+++ b/dlls/riched20/editor.h
@@ -230,7 +230,6 @@ void ME_UpdateScrollBar(ME_TextEditor *editor);
/* other functions in paint.c */
int ME_GetParaBorderWidth(ME_TextEditor *editor, int);
-int ME_GetParaLineSpace(ME_Context *c, ME_Paragraph*);
/* richole.c */
LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *);
diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index 52127d7..b0e6c1e 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -520,29 +520,6 @@ int ME_GetParaBorderWidth(ME_TextEditor* editor, int flags)
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)
{
int idx, border_width, top_border, bottom_border;
diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c
index 75f47a2..f567d40 100644
--- a/dlls/riched20/wrap.c
+++ b/dlls/riched20/wrap.c
@@ -456,6 +456,29 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
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) {
More information about the wine-cvs
mailing list