You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/03/21 14:21:33 UTC

cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LineLayoutManager.java

jeremias    2005/03/21 05:21:33

  Modified:    src/java/org/apache/fop/layoutmgr Tag:
                        Temp_KnuthStylePageBreaking LineLayoutManager.java
  Log:
  Avoid unnecessary penalties at the beginning of the returnList. They may also badly influence penalties for keeps. Normal penalties between blocks not in the same block are handled higher up.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.42.2.2  +4 -3      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.42.2.1
  retrieving revision 1.42.2.2
  diff -u -r1.42.2.1 -r1.42.2.2
  --- LineLayoutManager.java	18 Mar 2005 09:02:55 -0000	1.42.2.1
  +++ LineLayoutManager.java	21 Mar 2005 13:21:32 -0000	1.42.2.2
  @@ -1053,11 +1053,12 @@
                   /* ALLINEAMENTO NON GIUSTIFICATO, elementi con Position effettive */
                   Position returnPosition = new LeafPosition(this, p);
                   for (int i = 0;
  -                     i < lineLayouts.getChosenLineNumber();
  -                     i ++) {
  +                        i < lineLayouts.getChosenLineNumber();
  +                        i++) {
                       if (!((BlockLevelLayoutManager) parentLM).mustKeepTogether()
                           && i >= fobj.getOrphans()
  -                        && i <= lineLayouts.getChosenLineNumber() - fobj.getWidows()) {
  +                        && i <= lineLayouts.getChosenLineNumber() - fobj.getWidows()
  +                        && returnList.size() > 0) {
                           // null penalty allowing a page break between lines
                           returnList.add(new KnuthPenalty(0, 0, false, returnPosition, false));
                       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org