DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25059>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25059

[PATCH] LineLayoutManager: first word in line too long

           Summary: [PATCH] LineLayoutManager: first word in line too long
           Product: Fop
           Version: 1.0dev
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: page-master/layout
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


This patch addresses the case where the first word in the line is too
long (prevBP == null), both when this is the first word in this LM
(prev == null) and when it is not (prev != null).

The attached test file demonstrates the problem and the result of the
patch. Without the patch several error messages appear. With the patch
they no longer appear, and almost correct output is obtained. The
remaining irregularity in the output is addressed by my preceding
patch.

1. If prevBP == null, get text for hyphenation back from prev (last
breakposs in vecInlineBreaks).

2. If prevBP == null, reset to prev.

These two formulations are conservative. If prevBP would always be
equal to prev, the argument could simply be prev. However, apart from
the case prevBP == null at the start of a line, there is at least one
case in which prevBP is not the same as prev. Viz., if a bp is within
the line length (if (bpDim.min > availIPD.max) else) but !bBreakOK, bp
is added to vecInlineBreaks, but prevBP is not set equal to it; in the
next iteration prevBP != prev. I do not know whether this is
intentional or an error.

3. Add the possibility to reset to a given breakposs.  reset() always
uses prevBP to reset to; because getNextBreakPoss keeps prevBP equal
to null when it starts a line, we also need to be able to reset to a
given breakposs. If we overload reset, we get complaints about an
ambiguous reference reset(null). Note that reset(Position) is defined
by AbstractLayoutManager, which does a different job.

This method also allows for its argument to be null.

The method reset() is reformulated in terms of the new method.

4. Allow for the case prev == null.

5. Allow for the case prev == null.

Reply via email to