From 793f9a51550124e60986824630bf6a8f95d608cf Mon Sep 17 00:00:00 2001 From: Krzysztof Foltman Date: Wed, 12 Oct 2005 21:05:52 +0000 Subject: [PATCH] - Style trace information is written to different debug channel (it's not very useful anymore, reference counting looks correct for now). - The document dump contains the character position of the end-of-text mark. --- dlls/riched20/list.c | 2 +- dlls/riched20/style.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/riched20/list.c b/dlls/riched20/list.c index 7d6265d775e..857fcf3edfa 100644 --- a/dlls/riched20/list.c +++ b/dlls/riched20/list.c @@ -181,7 +181,7 @@ void ME_DumpDocument(ME_TextBuffer *buffer) pItem->member.run.nCharOfs); break; case diTextEnd: - TRACE("\nEnd\n"); + TRACE("\nEnd(ofs=%d)\n", pItem->member.para.nCharOfs); break; default: break; diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index 1d06154adfc..11fd56b02c8 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -21,6 +21,7 @@ #include "editor.h" WINE_DEFAULT_DEBUG_CHANNEL(richedit); +WINE_DECLARE_DEBUG_CHANNEL(richedit_style); static int all_refs = 0; @@ -197,7 +198,7 @@ void ME_DumpStyle(ME_Style *s) { char buf[2048]; ME_DumpStyleToBuf(&s->fmt, buf); - TRACE("%s\n", buf); + TRACE_(richedit_style)("%s\n", buf); } void ME_DumpStyleToBuf(CHARFORMAT2W *pFmt, char buf[2048]) @@ -321,7 +322,7 @@ HFONT ME_SelectStyleFont(ME_TextEditor *editor, HDC hDC, ME_Style *s) if (i < HFONT_CACHE_SIZE) /* found */ { item = &editor->pFontCache[i]; - TRACE("font reused %d\n", i); + TRACE_(richedit_style)("font reused %d\n", i); s->hFont = item->hFont; item->nRefs++; @@ -332,13 +333,13 @@ HFONT ME_SelectStyleFont(ME_TextEditor *editor, HDC hDC, ME_Style *s) assert(nEmpty != -1); /* otherwise we leak cache entries or get too many fonts at once*/ if (item->hFont) { - TRACE("font deleted %d\n", nEmpty); + TRACE_(richedit_style)("font deleted %d\n", nEmpty); DeleteObject(item->hFont); item->hFont = NULL; } s->hFont = CreateFontIndirectW(&lf); assert(s->hFont); - TRACE("font created %d\n", nEmpty); + TRACE_(richedit_style)("font created %d\n", nEmpty); item->hFont = s->hFont; item->nRefs = 1; memcpy(&item->lfSpecs, &lf, sizeof(LOGFONTW)); @@ -391,9 +392,9 @@ void ME_ReleaseStyle(ME_Style *s) s->nRefs--; all_refs--; if (s->nRefs==0) - TRACE("destroy style %p, total refs=%d\n", s, all_refs); + TRACE_(richedit_style)("destroy style %p, total refs=%d\n", s, all_refs); else - TRACE("release style %p, new refs=%d, total refs=%d\n", s, s->nRefs, all_refs); + TRACE_(richedit_style)("release style %p, new refs=%d, total refs=%d\n", s, s->nRefs, all_refs); if (!all_refs) TRACE("all style references freed (good!)\n"); assert(s->nRefs>=0); if (!s->nRefs)