diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index adc9362..7b1a0b0 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -346,7 +346,7 @@ static void ME_ApplyBorderProperties(RTF_Info *info, } } -static void ME_RTFCharAttrHook(RTF_Info *info) +void ME_RTFCharAttrHook(RTF_Info *info) { CHARFORMAT2W fmt; fmt.cbSize = sizeof(fmt); @@ -468,7 +468,7 @@ static void ME_RTFCharAttrHook(RTF_Info *info) /* FIXME this function doesn't get any information about context of the RTF tag, which is very bad, the same tags mean different things in different contexts */ -static void ME_RTFParAttrHook(RTF_Info *info) +void ME_RTFParAttrHook(RTF_Info *info) { PARAFORMAT2 fmt; fmt.cbSize = sizeof(fmt); @@ -825,7 +825,7 @@ static void ME_RTFParAttrHook(RTF_Info *info) } } -static void ME_RTFTblAttrHook(RTF_Info *info) +void ME_RTFTblAttrHook(RTF_Info *info) { switch (info->rtfMinor) { @@ -896,7 +896,7 @@ static void ME_RTFTblAttrHook(RTF_Info *info) } } -static void ME_RTFSpecialCharHook(RTF_Info *info) +void ME_RTFSpecialCharHook(RTF_Info *info) { RTFTable *tableDef = info->tableDef; switch (info->rtfMinor) @@ -1325,7 +1325,8 @@ static void ME_RTFReadObjectGroup(RTF_Info *info) RTFRouteToken(info); /* feed "}" back to router */ } -static void ME_RTFReadHook(RTF_Info *info) { +static void ME_RTFReadHook(RTF_Info *info) +{ switch(info->rtfClass) { case rtfGroup: @@ -1363,23 +1364,6 @@ static void ME_RTFReadHook(RTF_Info *info) { } } break; - case rtfControl: - switch(info->rtfMajor) - { - case rtfCharAttr: - ME_RTFCharAttrHook(info); - break; - case rtfParAttr: - ME_RTFParAttrHook(info); - break; - case rtfTblAttr: - ME_RTFTblAttrHook(info); - break; - case rtfSpecialChar: - ME_RTFSpecialCharHook(info); - break; - } - break; } } diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index b9c01b7..6ec4c1f 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -21,6 +21,8 @@ #include "editstr.h" #include "wine/unicode.h" +struct _RTF_Info; + extern HANDLE me_heap; static inline void __WINE_ALLOC_SIZE(1) *heap_alloc( size_t len ) @@ -275,6 +277,10 @@ void ME_SendOldNotify(ME_TextEditor *editor, int nCode); void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam); int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int nStart, int nChars, BOOL bCRLF); ME_DisplayItem *ME_FindItemAtOffset(ME_TextEditor *editor, ME_DIType nItemType, int nOffset, int *nItemOffset); +void ME_RTFCharAttrHook(struct _RTF_Info *info); +void ME_RTFParAttrHook(struct _RTF_Info *info); +void ME_RTFTblAttrHook(struct _RTF_Info *info); +void ME_RTFSpecialCharHook(struct _RTF_Info *info); void ME_StreamInFill(ME_InStream *stream); int ME_AutoURLDetect(ME_TextEditor *editor, WCHAR curChar); extern int me_debug; diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c index 8801137..95d88f7 100644 --- a/dlls/riched20/reader.c +++ b/dlls/riched20/reader.c @@ -2477,6 +2477,13 @@ ControlClass (RTF_Info *info) { case rtfCharAttr: CharAttr(info); + ME_RTFCharAttrHook(info); + break; + case rtfParAttr: + ME_RTFParAttrHook(info); + break; + case rtfTblAttr: + ME_RTFTblAttrHook(info); break; case rtfCharSet: CharSet(info); @@ -2492,6 +2499,7 @@ ControlClass (RTF_Info *info) break; case rtfSpecialChar: SpecialChar (info); + ME_RTFSpecialCharHook(info); break; } }