Re: Interline bug and paragraph borders

From: Martin Sevior <>
Date: Fri Nov 25 2011 - 04:43:36 CET

Hi Simon,

Thank you very much for your interest and suggestions. I considered
issue of frame objects very deeply before implementing the paragraph
borders and shading as I did. Unfortunately there are numerous
technical problems with implementing the feature as frames.

Basically frames are separate containers of lines and paragraphs. They
have their own structure and mapping within the PieceTable. If I were
to implement paragraph borders and shading as a frame a lot of the
current infrastructure would have to be rewritten with borders and
shading as special case of frames. This breaks numerous assumptions
throughout the codebase. For example tables are not meant to contain
frames, nor are frames meant to be broken across pages.

While I concede the problems you enumerate, at least these bugs are
contained within borders and shading. The rest of the codebase is
unchanged. Until your comments borders & shading ad not been closely
examined by other developers. With your help I'm sure we can fix the
bugs in the current implementation.

I'll get started on this as soon as I can.



On Thu, Nov 24, 2011 at 2:05 PM, Simon Larochelle
<> wrote:
> I submitted a patch in bugzilla for bug 13101 (Line spacing has no
> effect). The patch is rather long, most of it is necessary to set the
> correct line heights in paragraphs with borders (note: there is still
> one case that is not implemented; a paragraph with borders which
> starts on one page and continues on the next).
> The current implementation of paragraph borders does not seems ideal.
> Because the line height depends on the position of a line inside a
> block and on neighboring blocks properties, it is creating a mess in
> the fp_Line and fl_BlockLayout classes. Also, the current scheme makes
> the implementation difficult for multiple paragraph boxes. As
> currently coded, paragraphs cannot be separated using "margin after"
> and the left and right margins cannot be set independently of the box
> width (so the second paragraph cannot have margins different from the
> first paragraph and be in the same box). Another difficulty is that in
> paragraphs with frame images, the image is not necessarily on top of
> the shading.
> A different implementation of the paragraph borders could be to create
> a frame object that interacts with the fp_Column and fp_BlockLayout
> classes. It would act on the fp_Line class only indirectly; it would
> leave the line height completely untouched and would modify the line
> width only through the left and right block margins properties. That
> implementation would likely have a much smaller footprint in the code.
> Simon
Received on Fri Nov 25 04:44:08 2011

This archive was generated by hypermail 2.1.8 : Fri Nov 25 2011 - 04:44:09 CET