From 26074a9b6dd829dc1b656ae7a3c60e308ee57d5e Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Sun, 13 May 2012 23:04:32 -0400 Subject: [PATCH] richedit: Remove some unused structure fields. (cherry picked from commit 2ebfd01b5171dd2e4995f43e7d922b35f6bc03cd) --- dlls/riched20/context.c | 3 --- dlls/riched20/editor.c | 1 - dlls/riched20/editstr.h | 7 ------- dlls/riched20/paint.c | 1 - dlls/riched20/style.c | 1 - 5 files changed, 13 deletions(-) diff --git a/dlls/riched20/context.c b/dlls/riched20/context.c index 93d5caaed69..2cdaeff328a 100644 --- a/dlls/riched20/context.c +++ b/dlls/riched20/context.c @@ -22,12 +22,10 @@ void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC) { - c->nSequence = editor->nSequence++; c->hDC = hDC; c->editor = editor; c->pt.x = 0; c->pt.y = 0; - c->hbrMargin = CreateSolidBrush(RGB(224,224,224)); c->rcView = editor->rcFormat; if (hDC) { c->dpi.cx = GetDeviceCaps(hDC, LOGPIXELSX); @@ -44,5 +42,4 @@ void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC) void ME_DestroyContext(ME_Context *c) { if (c->hDC) ITextHost_TxReleaseDC(c->editor->texthost, c->hDC); - DeleteObject(c->hbrMargin); } diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index e61aac41fd0..6d5749a8933 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2687,7 +2687,6 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) ed->nLastTotalLength = ed->nTotalLength = 0; ed->nLastTotalWidth = ed->nTotalWidth = 0; ed->nUDArrowX = -1; - ed->nSequence = 0; ed->rgbBackColor = -1; ed->hbrBackground = GetSysColorBrush(COLOR_WINDOW); ed->bCaretAtEnd = FALSE; diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index 5b5afaebce2..b782ed3e554 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -67,7 +67,6 @@ typedef struct tagME_Style HFONT hFont; /* cached font for the style */ TEXTMETRICW tm; /* cached font metrics for the style */ int nRefs; /* reference count */ - int nSequence; /* incremented when cache needs to be rebuilt, ie. every screen redraw */ } ME_Style; typedef enum { @@ -186,7 +185,6 @@ typedef struct tagME_Paragraph int nFlags; POINT pt; int nHeight, nWidth; - int nLastPaintYPos, nLastPaintHeight; int nRows; struct tagME_DisplayItem *prev_para, *next_para; } ME_Paragraph; @@ -335,7 +333,6 @@ typedef struct tagME_TextEditor int nTotalWidth, nLastTotalWidth; int nAvailWidth; /* 0 = wrap to client area, else wrap width in twips */ int nUDArrowX; - int nSequence; COLORREF rgbBackColor; HBRUSH hbrBackground; BOOL bCaretAtEnd; @@ -385,16 +382,12 @@ typedef struct tagME_Context { HDC hDC; POINT pt; - POINT ptRowOffset; RECT rcView; - HBRUSH hbrMargin; SIZE dpi; int nAvailWidth; /* those are valid inside ME_WrapTextParagraph and related */ - POINT ptFirstRun; ME_TextEditor *editor; - int nSequence; } ME_Context; typedef struct tagME_WrapContext diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index eecdfaca5f4..92c34c63afc 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -41,7 +41,6 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate) IntersectClipRect(hDC, rcUpdate->left, rcUpdate->top, rcUpdate->right, rcUpdate->bottom); - editor->nSequence++; ME_InitContext(&c, editor, hDC); SetBkMode(hDC, TRANSPARENT); ME_MoveCaret(editor); diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index 605faeb92f0..6cf85da3e6c 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -145,7 +145,6 @@ ME_Style *ME_MakeStyle(CHARFORMAT2W *style) assert(style->cbSize == sizeof(CHARFORMAT2W)); s->fmt = *style; - s->nSequence = -2; s->nRefs = 1; s->hFont = NULL; memset(&s->tm, 0, sizeof(s->tm)); -- 2.11.4.GIT