Commit edca49f6 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

riched20: Remove unused functions.

parent 53f9b31a
......@@ -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 */
......
......@@ -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) {
......
......@@ -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
*/
......
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment