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 16:37:42 UTC

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

jeremias    2005/03/21 07:37:42

  Modified:    src/java/org/apache/fop/layoutmgr Tag:
                        Temp_KnuthStylePageBreaking
                        BlockContainerLayoutManager.java
                        BlockLayoutManager.java
  Log:
  Check within-column, too. Note: This is all very basic for now and needs to be improved in time.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.36.2.5  +7 -3      xml-fop/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
  
  Index: BlockContainerLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java,v
  retrieving revision 1.36.2.4
  retrieving revision 1.36.2.5
  diff -u -r1.36.2.4 -r1.36.2.5
  --- BlockContainerLayoutManager.java	21 Mar 2005 12:41:34 -0000	1.36.2.4
  +++ BlockContainerLayoutManager.java	21 Mar 2005 15:37:42 -0000	1.36.2.5
  @@ -1210,22 +1210,26 @@
        * @see org.apache.fop.layoutmgr.BlockLevelLayoutManager#mustKeepTogether()
        */
       public boolean mustKeepTogether() {
  +        //TODO Keeps will have to be more sophisticated sooner or later
           return ((BlockLevelLayoutManager)getParent()).mustKeepTogether() 
  -                || !fobj.getKeepTogether().getWithinPage().isAuto();
  +                || !fobj.getKeepTogether().getWithinPage().isAuto()
  +                || !fobj.getKeepTogether().getWithinColumn().isAuto();
       }
   
       /**
        * @see org.apache.fop.layoutmgr.BlockLevelLayoutManager#mustKeepWithPrevious()
        */
       public boolean mustKeepWithPrevious() {
  -        return !fobj.getKeepWithPrevious().getWithinPage().isAuto();
  +        return !fobj.getKeepWithPrevious().getWithinPage().isAuto()
  +                || !fobj.getKeepWithPrevious().getWithinColumn().isAuto();
       }
   
       /**
        * @see org.apache.fop.layoutmgr.BlockLevelLayoutManager#mustKeepWithNext()
        */
       public boolean mustKeepWithNext() {
  -        return !fobj.getKeepWithNext().getWithinPage().isAuto();
  +        return !fobj.getKeepWithNext().getWithinPage().isAuto()
  +                || !fobj.getKeepWithNext().getWithinColumn().isAuto();
       }
       
   }
  
  
  
  1.43.2.4  +7 -4      xml-fop/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
  
  Index: BlockLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java,v
  retrieving revision 1.43.2.3
  retrieving revision 1.43.2.4
  diff -u -r1.43.2.3 -r1.43.2.4
  --- BlockLayoutManager.java	21 Mar 2005 12:41:34 -0000	1.43.2.3
  +++ BlockLayoutManager.java	21 Mar 2005 15:37:42 -0000	1.43.2.4
  @@ -18,7 +18,6 @@
   
   package org.apache.fop.layoutmgr;
   
  -import java.util.Iterator;
   import java.util.LinkedList;
   import java.util.ListIterator;
   import java.util.List;
  @@ -1060,22 +1059,26 @@
        * @see org.apache.fop.layoutmgr.BlockLevelLayoutManager#mustKeepTogether()
        */
       public boolean mustKeepTogether() {
  +        //TODO Keeps will have to be more sophisticated sooner or later
           return ((BlockLevelLayoutManager)getParent()).mustKeepTogether() 
  -                || !fobj.getKeepTogether().getWithinPage().isAuto();
  +                || !fobj.getKeepTogether().getWithinPage().isAuto()
  +                || !fobj.getKeepTogether().getWithinColumn().isAuto();
       }
   
       /**
        * @see org.apache.fop.layoutmgr.BlockLevelLayoutManager#mustKeepWithPrevious()
        */
       public boolean mustKeepWithPrevious() {
  -        return !fobj.getKeepWithPrevious().getWithinPage().isAuto();
  +        return !fobj.getKeepWithPrevious().getWithinPage().isAuto()
  +            || !fobj.getKeepWithPrevious().getWithinColumn().isAuto();
       }
   
       /**
        * @see org.apache.fop.layoutmgr.BlockLevelLayoutManager#mustKeepWithNext()
        */
       public boolean mustKeepWithNext() {
  -        return !fobj.getKeepWithNext().getWithinPage().isAuto();
  +        return !fobj.getKeepWithNext().getWithinPage().isAuto()
  +                || !fobj.getKeepWithNext().getWithinColumn().isAuto();
       }
   
       //TODO this method is no longer used
  
  
  

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