gmazza      2003/12/15 14:39:01

  Modified:    src/java/org/apache/fop/layoutmgr LineLayoutManager.java
  Log:
  Hyphenation/Quotation problem fixed ("quoted strings" not breaking properly.)
  Patch #25512 by Simon Pepping (spepping at leverkruid dot nl).
  
  Revision  Changes    Path
  1.7       +15 -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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- LineLayoutManager.java    1 Dec 2003 04:47:00 -0000       1.6
  +++ LineLayoutManager.java    15 Dec 2003 22:39:01 -0000      1.7
  @@ -322,7 +322,7 @@
               prevBP = getBestBP(vecPossEnd);
           }
           // Backup child LM if necessary
  -        if (bp != prevBP && !prevBP.couldEndLine()) {
  +        if (bp != prevBP && !prevCouldEndLine(prevBP)) {
               reset();
           }
   
  @@ -394,6 +394,20 @@
       /** Line area is always considered to act as a fence. */
       protected boolean hasTrailingFence(boolean bNotLast) {
           return true;
  +    }
  +
  +    /** Test whether all breakposs in vecInlineBreaks
  +        back to and including prev could end line */
  +    private boolean prevCouldEndLine(BreakPoss prev) {
  +        ListIterator bpIter =
  +            vecInlineBreaks.listIterator(vecInlineBreaks.size());
  +        boolean couldEndLine = true;
  +        while (bpIter.hasPrevious()) {
  +            BreakPoss bp = (BreakPoss) bpIter.previous();
  +            couldEndLine = bp.couldEndLine();
  +            if (!couldEndLine || bp == prev) break;
  +        }
  +        return couldEndLine;
       }
   
       private HyphContext getHyphenContext(BreakPoss prev,
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to