I've started looking at the patch attached at bug #37579, for the moment concentrating on footnotes inside lists.

Concerning shortcoming 2) (from the bug comment):

2) Footnotes from list-item-body starts at the same position (from the starting edge) than the list-item-body itself and not at the starting edge of the region-body.

I'm not sure whether what happens is wrong: isn't this the correct result of the inheritance of indents?

Shortcoming 1)

1) Footnotes in list-item-label produce a "Cannot find LM to handle given FO for LengthBase." AFAICS in the getBaseLength method of AbstractBaseLayoutManger.

is quite related to this: the message is due to failed attempt to recover the value for "end-indent" (setting end-indent to a fixed value gets rid of the message).

The method AbstractBaseLayoutManager.getBaseLength() iterates over the LM tree, moving from a LM to its parent: in this case, the traversed LM are:
  BlockLM
  FootnoteBodyLM
  FlowLM
  PageSequenceLM
  null

It seems that the FootnoteBodyLM should have, in this case, a ListItemContentLM parent (or maybe some kind of reference, so not to break the passing of elements with the PageSequenceLM).

One last note: in the attached example for lisrs, there is a footnote inside a static-content, commented out as "if this is uncommented a runtime error results" (quote from the comment).

A run time error is never a good thing, anyway the specs states that "It is an error if the fo:footnote occurs as a descendant of a flow that is not assigned to a region-body" (section 6.10.3 "fo:footnote"); this should maybe originate a validation exception ...


Tomorrow I will try and finish fixing this. As a quick fix, it should be enough to apply Gerhard Oettl's patch and explicitly set indents on the footnote bodies.

Regards
    Luca

Reply via email to