From edca49f6aaae947ba8716790a09930463a9a7d7c Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Sat, 7 Feb 2009 19:38:54 +0000 Subject: [PATCH] riched20: Remove unused functions. --- dlls/riched20/editor.h | 3 --- dlls/riched20/list.c | 10 ---------- dlls/riched20/row.c | 44 -------------------------------------------- dlls/riched20/style.c | 6 ------ 4 files changed, 63 deletions(-) diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 68ab596518b..77b33d248c7 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -70,7 +70,6 @@ void ME_ClearTempStyle(ME_TextEditor *editor); void ME_DumpStyleToBuf(CHARFORMAT2W *pFmt, char buf[2048]); void ME_DumpStyle(ME_Style *s); CHARFORMAT2W *ME_ToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from); -void ME_CopyToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from); void ME_CopyToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from); void ME_CopyCharFormat(CHARFORMAT2W *pDest, const CHARFORMAT2W *pSrc); /* only works with 2W structs */ void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt); /* ditto */ @@ -81,7 +80,6 @@ void ME_Remove(ME_DisplayItem *diWhere); ME_DisplayItem *ME_FindItemBack(ME_DisplayItem *di, ME_DIType nTypeOrClass); ME_DisplayItem *ME_FindItemFwd(ME_DisplayItem *di, ME_DIType nTypeOrClass); ME_DisplayItem *ME_FindItemBackOrHere(ME_DisplayItem *di, ME_DIType nTypeOrClass); -ME_DisplayItem *ME_FindItemFwdOrHere(ME_DisplayItem *di, ME_DIType nTypeOrClass); ME_DisplayItem *ME_MakeDI(ME_DIType type); void ME_DestroyDisplayItem(ME_DisplayItem *item); void ME_DumpDocument(ME_TextBuffer *buffer); @@ -121,7 +119,6 @@ int ME_ReverseFindNonWhitespaceV(const ME_String *s, int nVChar); int ME_ReverseFindWhitespaceV(const ME_String *s, int nVChar); /* row.c */ -ME_DisplayItem *ME_FindRowStart(ME_Context *c, ME_DisplayItem *run, int nRelPos); ME_DisplayItem *ME_RowStart(ME_DisplayItem *item); /* ME_DisplayItem *ME_RowEnd(ME_DisplayItem *item); */ void ME_RenumberParagraphs(ME_DisplayItem *item); /* TODO */ diff --git a/dlls/riched20/list.c b/dlls/riched20/list.c index f9a903205b9..d3d9463c04b 100644 --- a/dlls/riched20/list.c +++ b/dlls/riched20/list.c @@ -98,16 +98,6 @@ ME_DisplayItem *ME_FindItemFwd(ME_DisplayItem *di, ME_DIType nTypeOrClass) return NULL; } -ME_DisplayItem *ME_FindItemFwdOrHere(ME_DisplayItem *di, ME_DIType nTypeOrClass) -{ - while(di!=NULL) { - if (ME_DITypesEqual(di->type, nTypeOrClass)) - return di; - di = di->next; - } - return NULL; -} - void ME_DestroyDisplayItem(ME_DisplayItem *item) { /* TRACE("type=%s\n", ME_GetDITypeName(item->type)); */ if (item->type==diParagraph || item->type == diUndoSetParagraphFormat) { diff --git a/dlls/riched20/row.c b/dlls/riched20/row.c index d3ef3de6b8f..1bf153f6ca9 100644 --- a/dlls/riched20/row.c +++ b/dlls/riched20/row.c @@ -24,50 +24,6 @@ #include "editor.h" -ME_DisplayItem *ME_FindRowStart(ME_Context *c, ME_DisplayItem *item, - int nRelPos) { - ME_DisplayItem *para = ME_GetParagraph(item); - ME_MustBeWrapped(c, para); - if(nRelPos<=0) { /* if this or preceding row */ - do { - ME_DisplayItem *item2 = ME_FindItemBack(item, diStartRowOrParagraph); - if (item2->type == diParagraph) - { - if (item2->member.para.prev_para == NULL) - return item; - /* if skipping to the preceding paragraph, ensure it's wrapped */ - ME_MustBeWrapped(c, item2->member.para.prev_para); - item = item2; - continue; - } - else if (item2->type == diStartRow) - { - nRelPos++; - if (nRelPos>0) - return item; - item = item2; - continue; - } - assert(0 == "bug in FindItemBack(item, diStartRowOrParagraph)"); - item = item2; - } while(1); - } - while(nRelPos>0) { /* if one of the next rows */ - ME_DisplayItem *item2 = ME_FindItemFwd(item, diStartRowOrParagraph); - if (!item2) - return item; - if (item2->type == diParagraph) - { - if (item2->member.para.next_para == NULL) - return item; - continue; - } - item = item2; - nRelPos--; - } - return item; -} - /* I'm sure these functions would simplify some code in caret ops etc, * I just didn't remember them when I wrote that code */ diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index 3980400fb65..a3b532ebd43 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -71,12 +71,6 @@ CHARFORMAT2W *ME_ToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from) return (from->cbSize >= sizeof(CHARFORMAT2W)) ? from : NULL; } -void ME_CopyToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from) -{ - if (ME_ToCF2W(to, from) == from) - *to = *from; -} - static CHARFORMAT2W *ME_ToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from) { assert(from->cbSize == sizeof(CHARFORMAT2W)); -- 2.11.4.GIT