Huw Davies : riched20: The run width is always passed so we don' t need to calculate it again.
Alexandre Julliard
julliard at winehq.org
Thu Feb 14 15:01:32 CST 2013
Module: wine
Branch: master
Commit: 941775e3116bce57be5f1f7f48270a472dd82128
URL: http://source.winehq.org/git/wine.git/?a=commit;h=941775e3116bce57be5f1f7f48270a472dd82128
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Feb 14 14:16:13 2013 +0000
riched20: The run width is always passed so we don't need to calculate it again.
---
dlls/riched20/paint.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index 57b1893..1f8c7c4 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -223,7 +223,6 @@ static void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText,
HGDIOBJ hOldFont;
COLORREF rgbOld;
int yOffset = 0, yTwipsOffset = 0;
- SIZE sz;
COLORREF rgb;
HPEN hPen = NULL, hOldPen = NULL;
BOOL bHighlightedText = (nSelFrom < nChars && nSelTo >= 0
@@ -255,13 +254,9 @@ static void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText,
else
rgb = s->fmt.crTextColor;
- /* Determine the area that is selected in the run. */
- GetTextExtentPoint32W(hDC, szText, nChars, &sz);
- /* Treat width as an optional parameter. We can get the width from the
- * text extent of the string if it isn't specified. */
- if (!width) width = sz.cx;
if (bHighlightedText)
{
+ SIZE sz;
if (nSelFrom <= 0)
{
nSelFrom = 0;
More information about the wine-cvs
mailing list