Huw Davies : riched20: Set the end-of-paragraph run width to that of a space.
Alexandre Julliard
julliard at winehq.org
Tue Oct 4 13:38:25 CDT 2016
Module: wine
Branch: master
Commit: 4c322698dad93edccc55c1462e7d8428a3177ffb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4c322698dad93edccc55c1462e7d8428a3177ffb
Author: Huw Davies <huw at codeweavers.com>
Date: Tue Oct 4 13:07:31 2016 +0100
riched20: Set the end-of-paragraph run width to that of a space.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/riched20/run.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c
index 778a952..984f8f5 100644
--- a/dlls/riched20/run.c
+++ b/dlls/riched20/run.c
@@ -611,17 +611,16 @@ SIZE ME_GetRunSizeCommon(ME_Context *c, const ME_Paragraph *para, ME_Run *run, i
int startx, int *pAscent, int *pDescent)
{
SIZE size;
- int nMaxLen = run->len;
+ WCHAR spaceW[] = {' ',0};
- if (nLen>nMaxLen)
- nLen = nMaxLen;
+ nLen = min( nLen, run->len );
- /* FIXME the following call also ensures that TEXTMETRIC structure is filled
- * this is wasteful for MERF_NONTEXT runs, but that shouldn't matter
- * in practice
- */
-
- if (para->nFlags & MEPF_COMPLEX)
+ if (run->nFlags & MERF_ENDPARA)
+ {
+ nLen = min( nLen, 1 );
+ ME_GetTextExtent(c, spaceW, nLen, run->style, &size);
+ }
+ else if (para->nFlags & MEPF_COMPLEX)
{
size.cx = run->nWidth;
}
More information about the wine-cvs
mailing list