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 StaticContentLayoutManager.java LineLayoutManager.java AbstractLayoutManager.java TextLayoutManager.java LayoutManagerMapping.java ContentLayoutManager.java LeaderLayoutManager.java LayoutManager.java CharacterLayoutManager.java BlockLayoutManager.java FlowLayoutManager.java
Date Fri, 10 Jun 2005 03:56:50 GMT
gmazza      2005/06/09 20:56:49

  Modified:    src/java/org/apache/fop/layoutmgr
                        StaticContentLayoutManager.java
                        LineLayoutManager.java AbstractLayoutManager.java
                        TextLayoutManager.java LayoutManagerMapping.java
                        ContentLayoutManager.java LeaderLayoutManager.java
                        LayoutManager.java CharacterLayoutManager.java
                        BlockLayoutManager.java FlowLayoutManager.java
  Log:
  Removed unused functions.  Team, I switched from generatesInlineAreas() calls
  to "instanceof InlineLevelLayoutManager", because AFAICT there is a 1-to-1 mapping
  between the two.  If no one has problems with this, I will be removing
  the generatesInlineAreas() implementations next.
  
  Revision  Changes    Path
  1.16      +1 -1      xml-fop/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java
  
  Index: StaticContentLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- StaticContentLayoutManager.java	31 May 2005 16:19:29 -0000	1.15
  +++ StaticContentLayoutManager.java	10 Jun 2005 03:56:49 -0000	1.16
  @@ -79,7 +79,7 @@
           LinkedList returnList = new LinkedList();
   
           while ((curLM = ((BlockLevelLayoutManager) getChildLM())) != null) {
  -            if (curLM.generatesInlineAreas()) {
  +            if (curLM instanceof InlineLevelLayoutManager) {
                   log.error("inline area not allowed under flow - ignoring");
                   curLM.setFinished(true);
                   continue;
  
  
  
  1.48      +0 -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.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- LineLayoutManager.java	7 Jun 2005 20:43:42 -0000	1.47
  +++ LineLayoutManager.java	10 Jun 2005 03:56:49 -0000	1.48
  @@ -27,7 +27,6 @@
   import org.apache.fop.area.LineArea;
   
   import java.util.ListIterator;
  -import java.util.Iterator;
   import java.util.List;
   import java.util.ArrayList;
   import java.util.LinkedList;
  
  
  
  1.52      +0 -19     xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
  
  Index: AbstractLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- AbstractLayoutManager.java	9 Jun 2005 02:39:55 -0000	1.51
  +++ AbstractLayoutManager.java	10 Jun 2005 03:56:49 -0000	1.52
  @@ -175,25 +175,6 @@
           return null;
       }
   
  -    public KnuthElement addALetterSpaceTo(KnuthElement element) {
  -        log.warn("null implementation of addALetterSpaceTo() called!");
  -        return element;
  -    }
  -
  -    public void getWordChars(StringBuffer sbChars, Position bp1,
  -            Position bp2) {
  -        log.warn("null implementation of getWordChars() called!");
  -    }
  -
  -    public void hyphenate(Position pos, HyphContext hc) {
  -        log.warn("null implementation of hyphenate called!");
  -    }
  -
  -    public boolean applyChanges(List oldList) {
  -        log.warn("null implementation of applyChanges() called!");
  -        return false;
  -    }
  -
       public LinkedList getChangedKnuthElements(List oldList,
                                                 /*int flaggedPenalty,*/
                                                 int alignment) {
  
  
  
  1.36      +0 -24     xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java
  
  Index: TextLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- TextLayoutManager.java	8 Jun 2005 22:06:32 -0000	1.35
  +++ TextLayoutManager.java	10 Jun 2005 03:56:49 -0000	1.36
  @@ -195,30 +195,6 @@
       }
   
       /**
  -     * Get the word characters between two positions.
  -     * This is used when doing hyphenation or other word manipulations.
  -     *
  -     * @param sbChars the string buffer to put the chars into
  -     * @param bp1 the start position
  -     * @param bp2 the end position
  -     */
  -    public void getWordChars(StringBuffer sbChars, Position bp1,
  -                             Position bp2) {
  -        LeafPosition endPos = (LeafPosition) bp2;
  -        AreaInfo ai =
  -          (AreaInfo) vecAreaInfo.get(endPos.getLeafPos());
  -        // Skip all leading spaces for hyphenation
  -        int i;
  -        for (i = ai.iStartIndex;
  -             i < ai.iBreakIndex
  -                 && CharUtilities.isAnySpace(textArray[i]) == true;
  -             i++) {
  -            //nop
  -        }
  -        sbChars.append(new String(textArray, i, ai.iBreakIndex - i));
  -    }
  -
  -    /**
        * Reset position for returning next BreakPossibility.
        *
        * @param prevPos the position to reset to
  
  
  
  1.13      +2 -2      xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java
  
  Index: LayoutManagerMapping.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- LayoutManagerMapping.java	1 Jun 2005 22:41:17 -0000	1.12
  +++ LayoutManagerMapping.java	10 Jun 2005 03:56:49 -0000	1.13
  @@ -219,7 +219,7 @@
                   super.make(node, childList);
                   for (int count = childList.size() - 1; count >= 0; count--) {
                       LayoutManager lm = (LayoutManager) childList.get(count);
  -                    if (lm.generatesInlineAreas()) {
  +                    if (lm instanceof InlineLevelLayoutManager) {
                           LayoutManager blm = new BidiLayoutManager
                               (node, (InlineLayoutManager) lm);
                           lms.add(blm);
  
  
  
  1.32      +0 -4      xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java
  
  Index: ContentLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- ContentLayoutManager.java	9 Jun 2005 02:39:55 -0000	1.31
  +++ ContentLayoutManager.java	10 Jun 2005 03:56:49 -0000	1.32
  @@ -218,10 +218,6 @@
           //to be done
       }
   
  -    /** @see org.apache.fop.layoutmgr.LayoutManager */
  -    public void getWordChars(StringBuffer sbChars, Position bp1,
  -            Position bp2) { }
  -
       /**
        * @see org.apache.fop.layoutmgr.LayoutManager#createNextChildLMs
        */
  
  
  
  1.20      +1 -9      xml-fop/src/java/org/apache/fop/layoutmgr/LeaderLayoutManager.java
  
  Index: LeaderLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LeaderLayoutManager.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- LeaderLayoutManager.java	17 May 2005 16:58:52 -0000	1.19
  +++ LeaderLayoutManager.java	10 Jun 2005 03:56:49 -0000	1.20
  @@ -281,14 +281,6 @@
           return returnList;
       }
   
  -    public KnuthElement addALetterSpaceTo(KnuthElement element) {
  -        // return the unchanged glue object
  -        return new KnuthGlue(areaInfo.ipdArea.opt,
  -                             areaInfo.ipdArea.max - areaInfo.ipdArea.opt,
  -                             areaInfo.ipdArea.opt - areaInfo.ipdArea.min, 
  -                             new LeafPosition(this, 0), false);
  -    }
  -
       public void hyphenate(Position pos, HyphContext hc) {
           // use the AbstractLayoutManager.hyphenate() null implementation
           super.hyphenate(pos, hc);
  
  
  
  1.28      +0 -12     xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManager.java
  
  Index: LayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManager.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- LayoutManager.java	8 Jun 2005 22:06:32 -0000	1.27
  +++ LayoutManager.java	10 Jun 2005 03:56:49 -0000	1.28
  @@ -66,18 +66,6 @@
       void resetPosition(Position position);
   
       /**
  -     * Get the word chars between two positions and
  -     * append to the string buffer. The positions could
  -     * span multiple layout managers.
  -     *
  -     * @param sbChars the string buffer to append the word chars
  -     * @param bp1 the start position
  -     * @param bp2 the end position
  -     */
  -    void getWordChars(StringBuffer sbChars, Position bp1,
  -                             Position bp2);
  -
  -    /**
        * Return a value indicating whether this LayoutManager has laid out
        * all its content (or generated BreakPossibilities for all content.)
        *
  
  
  
  1.13      +1 -19     xml-fop/src/java/org/apache/fop/layoutmgr/CharacterLayoutManager.java
  
  Index: CharacterLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/CharacterLayoutManager.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- CharacterLayoutManager.java	17 May 2005 16:58:52 -0000	1.12
  +++ CharacterLayoutManager.java	10 Jun 2005 03:56:49 -0000	1.13
  @@ -166,24 +166,6 @@
               (((org.apache.fop.area.inline.Character) curArea).getChar());
       }
   
  -    public KnuthElement addALetterSpaceTo(KnuthElement element) {
  -        areaInfo.iLScount ++;
  -        areaInfo.ipdArea.add(letterSpaceIPD);
  -
  -        if (letterSpaceIPD.min == letterSpaceIPD.max) {
  -            // constant letter space, return a new box
  -            return new KnuthInlineBox(areaInfo.ipdArea.opt, areaInfo.lead,
  -                                areaInfo.total, areaInfo.middle,
  -                                new LeafPosition(this, 0), false);
  -        } else {
  -            // adjustable letter space, return a new glue
  -            return new KnuthGlue(letterSpaceIPD.opt,
  -                                 letterSpaceIPD.max - letterSpaceIPD.opt,
  -                                 letterSpaceIPD.opt - letterSpaceIPD.min,
  -                                 new LeafPosition(this, -1), true);
  -        }
  -    }
  -
       public void hyphenate(Position pos, HyphContext hc) {
           if (hc.getNextHyphPoint() == 1) {
               // the character ends a syllable
  
  
  
  1.49      +2 -2      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.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- BlockLayoutManager.java	7 Jun 2005 20:43:43 -0000	1.48
  +++ BlockLayoutManager.java	10 Jun 2005 03:56:49 -0000	1.49
  @@ -125,7 +125,7 @@
   
           while (proxyLMiter.hasNext()) {
               LayoutManager lm = (LayoutManager) proxyLMiter.next();
  -            if (lm.generatesInlineAreas()) {
  +            if (lm instanceof InlineLevelLayoutManager) {
                   LineLayoutManager lineLM = createLineManager(lm);
                   addChildLM(lineLM);
               } else {
  @@ -151,7 +151,7 @@
           inlines.add(firstlm);
           while (proxyLMiter.hasNext()) {
               LayoutManager lm = (LayoutManager) proxyLMiter.next();
  -            if (lm.generatesInlineAreas()) {
  +            if (lm instanceof InlineLevelLayoutManager) {
                   inlines.add(lm);
               } else {
                   proxyLMiter.previous();
  
  
  
  1.20      +1 -1      xml-fop/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
  
  Index: FlowLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- FlowLayoutManager.java	1 Jun 2005 22:41:17 -0000	1.19
  +++ FlowLayoutManager.java	10 Jun 2005 03:56:49 -0000	1.20
  @@ -78,7 +78,7 @@
           LinkedList returnList = new LinkedList();
   
           while ((curLM = ((BlockLevelLayoutManager) getChildLM())) != null) {
  -            if (curLM.generatesInlineAreas()) {
  +            if (curLM instanceof InlineLevelLayoutManager) {
                   log.error("inline area not allowed under flow - ignoring");
                   curLM.setFinished(true);
                   continue;
  
  
  

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


Mime
View raw message