Re: patch -- fix for Bug 760


Subject: Re: patch -- fix for Bug 760
From: Jesper Skov (jskov@redhat.com)
Date: Thu Jun 01 2000 - 05:54:00 CDT


>>>>> "Martin" == Martin Sevior <msevior@mccubbin.ph.unimelb.edu.au> writes:

>> This sounds reasonable. If Jesper or someone else wants to take
>> another stab at fixing the underlying problem, that would be fine.
>> If nobody is actively persuing it though, we should commit one of
>> the variations of the original patch to at least stop the crash.

Martin> Jesper is on it and pretty soon our cursor motion will be on a
Martin> par with MS Word97. They have the same bug about not putting a
Martin> character in the first column of superscripted run. (I had to
Martin> use MS Word last last night so I took the opportuning to test
Martin> things. I was very happy to see we are doing underlining
Martin> better than than them. Word underlines of subscripts go
Martin> through the bottom of the subscripted text. Ours sit just
Martin> beneath it)

Actually, the problem described by Bug 760 is quite a different beast
from the IP code - but since my first attempt at a fix messes up the
LayoutBlock (fills it with lots of empty Runs) I've had another look
at the code.

Basically, using checkForBeginOnForcedBreak() and
checkForEndOnForcedBreak() was wrong. These assume the LayoutBlock to
be in some special state to work - and as they always add empty Runs
to either the first or the last line of a LayoutBlock, I'm not
convinced that they would always work - but I don't want to stick my
nose in it.

Besides filling the LayoutBlock with junk, the fix also fails if a
line is broken by two forced page breaks:

 1234 + 2xleft + ctrlxReturn => same assertion as I had tried to work around

I'll write a function that will validate and fix a LayoutBlock if it
contains *any* lines which cannot contain the point. Initially, we can
call that where I put in the Bug 760 hack - and thus get rid of the
assertions.

When someone with a clue fixes the bug where it should be fixed, we
can use the function solely for assertion.

Jesper



This archive was generated by hypermail 2b25 : Thu Jun 01 2000 - 05:54:23 CDT