Hi Jan

I have an update on this.

> On 22 Jul 2015, at 13:55, Andreas L. Delmelle <[email protected]> 
> wrote:
> <snip />
> 
> I would focus the efforts on trying to get a better view on the difference in 
> processing between the two situations: with and without the extra fo:inline. 
> Likely, the extra level of nesting causes some additional, auxiliary elements 
> to be added to the content list, which are taken into account while they 
> should not be.

I played around with the sample attached to FOP-1444 and trimmed it down a bit.
See below for the most minimal sample that is guaranteed to reproduce the 
issue, and demonstrates that it is not related to the extra fo:inline per se, 
as I first suspected, but rather by the keep-together.within-line property. 

I have not yet started debugging, but this minimal sample will at least make it 
easier to follow in the code. I would start by comparing the content lists 
received by the parent blocks' LineLayoutManagers in 
collectInlineKnuthElements(). Very likely, the specified keep-together results 
in one or more extra elements that throw off the breaking algorithm.

Hope this helps! Keep us posted if you run into anything.

KR

Andreas

--- minimal.fo ---
<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  
  <fo:layout-master-set>
    <fo:simple-page-master master-name="simple" page-height="297mm" 
page-width="210mm" margin="20mm">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  
  <fo:page-sequence master-reference="simple">  
    <fo:flow flow-name="xsl-region-body">
      <fo:block text-align="start" text-align-last="justify" id="block-1">
        <fo:inline keep-together.within-line="always">
          <fo:basic-link internal-destination="id-1">Lorem ipsum</fo:basic-link>
          <fo:leader leader-alignment="reference-area"
                keep-with-next.within-line="always" leader-pattern="dots"
                rule-thickness="0.8pt"/>
          <fo:basic-link internal-destination="id-1">7</fo:basic-link>
        </fo:inline>
      </fo:block>
      <fo:block text-align="start" text-align-last="justify" id="block-2">
        <fo:inline>
          <fo:basic-link internal-destination="id-1">Lorem ipsum</fo:basic-link>
          <fo:leader leader-alignment="reference-area"
                keep-with-next.within-line="always" leader-pattern="dots"
                rule-thickness="0.8pt"/>
          <fo:basic-link internal-destination="id-1">7</fo:basic-link>
        </fo:inline>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>
--- ---

Reply via email to