Commit 684965b8 authored by Jactry Zeng's avatar Jactry Zeng Committed by Alexandre Julliard

riched20: Print boundary for ME_CheckCharOffsets only when richedit_check channel was opened.

parent c634f34a
......@@ -102,6 +102,8 @@ void ME_CheckCharOffsets(ME_TextEditor *editor)
{
ME_DisplayItem *p = editor->pBuffer->pFirst;
int ofs = 0, ofsp = 0;
TRACE_(richedit_check)("Checking begin\n");
if(TRACE_ON(richedit_lists))
{
TRACE_(richedit_lists)("---\n");
......@@ -113,6 +115,7 @@ void ME_CheckCharOffsets(ME_TextEditor *editor)
case diTextEnd:
TRACE_(richedit_check)("tend, real ofsp = %d, counted = %d\n", p->member.para.nCharOfs, ofsp+ofs);
assert(ofsp+ofs == p->member.para.nCharOfs);
TRACE_(richedit_check)("Checking finished\n");
return;
case diParagraph:
TRACE_(richedit_check)("para, real ofsp = %d, counted = %d\n", p->member.para.nCharOfs, ofsp+ofs);
......@@ -137,6 +140,7 @@ void ME_CheckCharOffsets(ME_TextEditor *editor)
assert(0);
}
} while(1);
TRACE_(richedit_check)("Checking finished\n");
}
/******************************************************************************
......@@ -234,12 +238,8 @@ void ME_JoinRuns(ME_TextEditor *editor, ME_DisplayItem *p)
ME_Remove(pNext);
ME_DestroyDisplayItem(pNext);
ME_UpdateRunFlags(editor, &p->member.run);
if(TRACE_ON(richedit))
{
TRACE("Before check after join\n");
if(TRACE_ON(richedit_check))
ME_CheckCharOffsets(editor);
TRACE("After check after join\n");
}
}
/******************************************************************************
......
......@@ -23,6 +23,7 @@
#include "editor.h"
WINE_DEFAULT_DEBUG_CHANNEL(richedit);
WINE_DECLARE_DEBUG_CHANNEL(richedit_check);
/*
* Unsolved problems:
......@@ -123,12 +124,8 @@ static ME_DisplayItem *split_run_extents(ME_WrapContext *wc, ME_DisplayItem *ite
ME_Cursor cursor = {wc->pPara, item, nVChar};
assert(item->member.run.nCharOfs != -1);
if(TRACE_ON(richedit))
{
TRACE("Before check before split\n");
if(TRACE_ON(richedit_check))
ME_CheckCharOffsets(editor);
TRACE("After check before split\n");
}
run = &item->member.run;
......@@ -147,15 +144,12 @@ static ME_DisplayItem *split_run_extents(ME_WrapContext *wc, ME_DisplayItem *ite
run2->pt.x = run->pt.x+run->nWidth;
run2->pt.y = run->pt.y;
if(TRACE_ON(richedit))
{
TRACE("Before check after split\n");
if(TRACE_ON(richedit_check))
ME_CheckCharOffsets(editor);
TRACE("After check after split\n");
TRACE("After split: %s(%d, %d), %s(%d, %d)\n",
debugstr_run( run ), run->pt.x, run->pt.y,
debugstr_run( run2 ), run2->pt.x, run2->pt.y);
}
TRACE("After split: %s(%d, %d), %s(%d, %d)\n",
debugstr_run( run ), run->pt.x, run->pt.y,
debugstr_run( run2 ), run2->pt.x, run2->pt.y);
return cursor.pRun;
}
......
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