gmazza 2003/12/23 12:41:58 Modified: src/java/org/apache/fop/layoutmgr LineLayoutManager.java Log: Bug #25031 -- patch in calculation of line breakpoints, by Simon Pepping (spepping at leverkruid dot nl) Revision Changes Path 1.8 +12 -1 xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java Index: LineLayoutManager.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- LineLayoutManager.java 15 Dec 2003 22:39:01 -0000 1.7 +++ LineLayoutManager.java 23 Dec 2003 20:41:58 -0000 1.8 @@ -242,6 +242,10 @@ // If we are already in a hyphenation loop, then stop. if (inlineLC.tryHyphenate()) { + if (prevBP == null) { + vecInlineBreaks.add(bp); + prevBP = bp; + } break; } // Otherwise, prepare to try hyphenation @@ -254,6 +258,10 @@ inlineLC.setHyphContext( getHyphenContext((prevBP == null) ? prev : prevBP, bp)); if (inlineLC.getHyphContext() == null) { + if (prevBP == null) { + vecInlineBreaks.add(bp); + prevBP = bp; + } break; } inlineLC.setFlags(LayoutContext.TRY_HYPHENATE, @@ -264,6 +272,10 @@ /* If we are not in justified text, we can end the line at * prevBP. */ + if (prevBP == null) { + vecInlineBreaks.add(bp); + prevBP = bp; + } break; } } else { @@ -313,7 +325,6 @@ return null; } if (prevBP == null) { - vecInlineBreaks.add(bp); prevBP = bp; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]