Re: [RFC] fp_EmptyTextRun


Subject: Re: [RFC] fp_EmptyTextRun
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Mon Jun 05 2000 - 08:21:52 CDT


On Mon, 5 Jun 2000, Jesper Skov wrote:

>
> I am looking at the problem of cursor size being wrong after a page
> break if the text before it was super/subscript.
>
> This is because the zero-length TextRun added to the block when
> inserting a page break does not inherit the correct properties - which
> is due, as far as I can tell, to the Run not representing anything in
> the piece table (lookupProperties has nothing to work with).
>
>
> Having a separate class for these zero-length placeholder Runs (also
> used by _insertFakeTextRun, checkForBeginOnForcedBreak, and
> checkForEndOnForcedBreak) would allow us to do two things:
>
> o liberal amounts of assertions to ensure the dummy Runs do not get
> used for anything but as a placeholders for the formatter code.
>
> o lookupProperties can get its data from the previous "proper" Run
> and thus fix the cursor problem.

>
> I'd make it a sub-class of fp_TextRun.

I really like this idea. I just wonder if it can be used in different
context too. Right now fields inserted at the start of a line have no
properties of the surrounding text. If we had one of these 0 length runs
before every field run, the field would know what it's properties were. I
guess this is similar to Justin's idea of zero length field encapsulation
runs that surround a field. I was also thinking of making textRuns a
friend class of Field runs so fields could use the textrun code to do
underling and other text attributes. If Fields become Friend classes of
textRun's can Fields use these 0 length runs? I don't know enough C++ to
know.

Cheers

Martin



This archive was generated by hypermail 2b25 : Mon Jun 05 2000 - 08:22:04 CDT