Module: wine Branch: master Commit: 94146a72ad80c182ba9ac53840eede78178336e9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=94146a72ad80c182ba9ac53840...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Wed Jan 21 10:10:10 2009 -0500
richedit: Removed some unused invalidation code.
The ME_InvalidateFromOfs and ME_QueueInvalidateFromCursor functions are never called, and the nInvalidOfs variable had its value set but never used.
---
dlls/riched20/editor.c | 1 - dlls/riched20/editor.h | 1 - dlls/riched20/editstr.h | 1 - dlls/riched20/paint.c | 25 ------------------------- 4 files changed, 0 insertions(+), 28 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 33964d6..2666c64 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2725,7 +2725,6 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) ed->pLastSelStartPara = ed->pLastSelEndPara = ME_FindItemFwd(ed->pBuffer->pFirst, diParagraph); ed->bWordWrap = (props & TXTBIT_WORDWRAP) != 0; ed->bHideSelection = FALSE; - ed->nInvalidOfs = -1; ed->pfnWordBreak = NULL; ed->lpOleCallback = NULL; ed->mode = TM_RICHTEXT | TM_MULTILEVELUNDO | TM_MULTICODEPAGE; diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 53d6295..484acfb 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -233,7 +233,6 @@ void ME_RewrapRepaint(ME_TextEditor *editor); void ME_UpdateRepaint(ME_TextEditor *editor); void ME_EnsureVisible(ME_TextEditor *editor, ME_Cursor *pCursor); void ME_InvalidateSelection(ME_TextEditor *editor); -void ME_QueueInvalidateFromCursor(ME_TextEditor *editor, int nCursor); BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator); int ME_twips2pointsX(ME_Context *c, int x); int ME_twips2pointsY(ME_Context *c, int y); diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index 7ac476d..ccdf51d 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -363,7 +363,6 @@ typedef struct tagME_TextEditor RECT rcFormat; BOOL bDefaultFormatRect; BOOL bWordWrap; - int nInvalidOfs; int nTextLimit; EDITWORDBREAKPROCW pfnWordBreak; LPRICHEDITOLECALLBACK lpOleCallback; diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 728b623..3de26e1 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -1241,24 +1241,6 @@ void ME_EnsureVisible(ME_TextEditor *editor, ME_Cursor *pCursor)
void -ME_InvalidateFromOfs(ME_TextEditor *editor, int nCharOfs) -{ - RECT rc; - int x, y, height; - ME_Cursor tmp; - - ME_RunOfsFromCharOfs(editor, nCharOfs, &tmp.pRun, &tmp.nOffset); - ME_GetCursorCoordinates(editor, &tmp, &x, &y, &height); - - rc.left = 0; - rc.top = y; - rc.bottom = y + height; - rc.right = editor->rcFormat.right; - ITextHost_TxInvalidateRect(editor->texthost, &rc, FALSE); -} - - -void ME_InvalidateSelection(ME_TextEditor *editor) { ME_DisplayItem *para1, *para2; @@ -1306,13 +1288,6 @@ ME_InvalidateSelection(ME_TextEditor *editor) assert(editor->pLastSelEndPara->type == diParagraph); }
-void -ME_QueueInvalidateFromCursor(ME_TextEditor *editor, int nCursor) -{ - editor->nInvalidOfs = ME_GetCursorOfs(editor, nCursor); -} - - BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator) {