riched20: Return the underline pen as the return value.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ff8fba389d
commit
08c15246ca
|
@ -216,9 +216,8 @@ static COLORREF get_back_color( ME_Context *c, ME_Style *style, BOOL highlight )
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void get_underline_pen( ME_Style *style, COLORREF color, HPEN *pen )
|
static HPEN get_underline_pen( ME_Style *style, COLORREF color )
|
||||||
{
|
{
|
||||||
*pen = NULL;
|
|
||||||
/* Choose the pen type for underlining the text. */
|
/* Choose the pen type for underlining the text. */
|
||||||
if (style->fmt.dwEffects & CFE_UNDERLINE)
|
if (style->fmt.dwEffects & CFE_UNDERLINE)
|
||||||
{
|
{
|
||||||
|
@ -227,11 +226,9 @@ static void get_underline_pen( ME_Style *style, COLORREF color, HPEN *pen )
|
||||||
case CFU_UNDERLINE:
|
case CFU_UNDERLINE:
|
||||||
case CFU_UNDERLINEWORD: /* native seems to map it to simple underline (MSDN) */
|
case CFU_UNDERLINEWORD: /* native seems to map it to simple underline (MSDN) */
|
||||||
case CFU_UNDERLINEDOUBLE: /* native seems to map it to simple underline (MSDN) */
|
case CFU_UNDERLINEDOUBLE: /* native seems to map it to simple underline (MSDN) */
|
||||||
*pen = CreatePen( PS_SOLID, 1, color );
|
return CreatePen( PS_SOLID, 1, color );
|
||||||
break;
|
|
||||||
case CFU_UNDERLINEDOTTED:
|
case CFU_UNDERLINEDOTTED:
|
||||||
*pen = CreatePen( PS_DOT, 1, color );
|
return CreatePen( PS_DOT, 1, color );
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
FIXME( "Unknown underline type (%u)\n", style->fmt.bUnderlineType );
|
FIXME( "Unknown underline type (%u)\n", style->fmt.bUnderlineType );
|
||||||
/* fall through */
|
/* fall through */
|
||||||
|
@ -240,14 +237,14 @@ static void get_underline_pen( ME_Style *style, COLORREF color, HPEN *pen )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw_underline( ME_Context *c, ME_Run *run, int x, int y, COLORREF color )
|
static void draw_underline( ME_Context *c, ME_Run *run, int x, int y, COLORREF color )
|
||||||
{
|
{
|
||||||
HPEN pen;
|
HPEN pen;
|
||||||
|
|
||||||
get_underline_pen( run->style, color, &pen );
|
pen = get_underline_pen( run->style, color );
|
||||||
if (pen)
|
if (pen)
|
||||||
{
|
{
|
||||||
HPEN old_pen = SelectObject( c->hDC, pen );
|
HPEN old_pen = SelectObject( c->hDC, pen );
|
||||||
|
|
Loading…
Reference in New Issue