xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LineLayoutManager.java
Date Mon, 15 Dec 2003 22:39:01 GMT
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: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org


Mime
View raw message