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 2008/07/25 14:46:22 UTC

svn commit: r679781 [19/34] - in /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign: ./ examples/embedding/java/embedding/ examples/embedding/java/embedding/events/ examples/embedding/java/embedding/intermediate/ examples/embedding/java/embedding/model/ ...

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -75,7 +75,7 @@
  * creates a line area to contain the inline areas added by the
  * child layout managers.
  */
-public class LineLayoutManager extends InlineStackingLayoutManager 
+public class LineLayoutManager extends InlineStackingLayoutManager
                                implements BlockLevelLayoutManager {
 
     /**
@@ -85,7 +85,7 @@
 
     private Block fobj;
     private boolean isFirstInBlock;
-    
+
     /** {@inheritDoc} */
     public void initialize() {
         textAlignment = fobj.getTextAlign();
@@ -108,7 +108,7 @@
             return textAlignment;
         }
     }
-    
+
     /**
      * Private class to store information about inline breaks.
      * Each value holds the start and end indexes into a List of
@@ -148,7 +148,7 @@
             spaceAfter = sa;
             baseline = bl;
         }
-        
+
     }
 
 
@@ -181,7 +181,7 @@
 
     /**
      * this constant is used to create elements when text-align is center:
-     * every TextLM descendant of LineLM must use the same value, 
+     * every TextLM descendant of LineLM must use the same value,
      * otherwise the line breaking algorithm does not find the right
      * break point
      */
@@ -205,7 +205,7 @@
 
     // this class represents a paragraph
     private class Paragraph extends InlineKnuthSequence {
-        /** Number of elements to ignore at the beginning of the list. */ 
+        /** Number of elements to ignore at the beginning of the list. */
         private int ignoreAtStart = 0;
         /** Number of elements to ignore at the end of the list. */
         private int ignoreAtEnd = 0;
@@ -233,11 +233,11 @@
             // set the minimum amount of empty space at the end of the
             // last line
             if (textAlignment == EN_CENTER) {
-                lineFiller = new MinOptMax(lastLineEndIndent); 
+                lineFiller = new MinOptMax(lastLineEndIndent);
             } else {
-                lineFiller = new MinOptMax(lastLineEndIndent, 
-                                            lastLineEndIndent, 
-                                            layoutManager.iLineWidth); 
+                lineFiller = new MinOptMax(lastLineEndIndent,
+                                            lastLineEndIndent,
+                                            layoutManager.iLineWidth);
             }
 
             // add auxiliary elements at the beginning of the paragraph
@@ -251,7 +251,7 @@
             // at the beginning of the first paragraph
             if (isFirstInBlock && knuthParagraphs.size() == 0
                         && textIndent != 0) {
-                this.add(new KnuthInlineBox(textIndent, null, 
+                this.add(new KnuthInlineBox(textIndent, null,
                                       null, false));
                 ignoreAtStart++;
             }
@@ -277,10 +277,10 @@
                     // add the elements representing the space
                     // at the end of the last line
                     // and the forced break
-                    this.add(new KnuthPenalty(0, KnuthElement.INFINITE, 
+                    this.add(new KnuthPenalty(0, KnuthElement.INFINITE,
                                               false, null, false));
-                    this.add(new KnuthGlue(0, 
-                            lineFiller.max - lineFiller.opt, 
+                    this.add(new KnuthGlue(0,
+                            lineFiller.max - lineFiller.opt,
                             lineFiller.opt - lineFiller.min, null, false));
                     this.add(new KnuthPenalty(lineFiller.opt, -KnuthElement.INFINITE,
                                               false, null, false));
@@ -339,7 +339,7 @@
             follow = fl;
             thisLLM = llm;
             activePossibility = -1;
-            maxDiff = fobj.getWidows() >= fobj.getOrphans() 
+            maxDiff = fobj.getWidows() >= fobj.getOrphans()
                     ? fobj.getWidows()
                     : fobj.getOrphans();
         }
@@ -382,7 +382,7 @@
             }
 
             if (log.isWarnEnabled()) {
-                int lack = difference + bestActiveNode.availableShrink; 
+                int lack = difference + bestActiveNode.availableShrink;
                 if (lack < 0) {
                     InlineLevelEventProducer eventProducer
                         = InlineLevelEventProducer.Provider.get(
@@ -391,15 +391,15 @@
                             -lack, getFObj().getLocator());
                 }
             }
-            
-            //log.debug("LLM> (" + (lineLayouts.getLineNumber(activePossibility) - addedPositions) 
+
+            //log.debug("LLM> (" + (lineLayouts.getLineNumber(activePossibility) - addedPositions)
             //    + ") difference = " + difference + " ratio = " + ratio);
             lineLayouts.addBreakPosition(makeLineBreakPosition(par,
                    (bestActiveNode.line > 1 ? bestActiveNode.previous.position + 1 : 0),
                    bestActiveNode.position,
-                   bestActiveNode.availableShrink - (addedPositions > 0 
-                       ? 0 : ((Paragraph)par).lineFiller.opt - ((Paragraph)par).lineFiller.min), 
-                   bestActiveNode.availableStretch, 
+                   bestActiveNode.availableShrink - (addedPositions > 0
+                       ? 0 : ((Paragraph)par).lineFiller.opt - ((Paragraph)par).lineFiller.min),
+                   bestActiveNode.availableStretch,
                    difference, ratio, indent), activePossibility);
             addedPositions++;
         }
@@ -413,8 +413,8 @@
         private LineBreakPosition makeLineBreakPosition(KnuthSequence par,
                                                         int firstElementIndex,
                                                         int lastElementIndex,
-                                                        int availableShrink, 
-                                                        int availableStretch, 
+                                                        int availableShrink,
+                                                        int availableStretch,
                                                         int difference,
                                                         double ratio,
                                                         int indent) {
@@ -424,7 +424,7 @@
             int spaceAfter = lineHeight - lead - follow - spaceBefore;
             // height before the main baseline
             int lineLead = lead;
-            // maximum follow 
+            // maximum follow
             int lineFollow = follow;
             // true if this line contains only zero-height, auxiliary boxes
             // and the actual line width is 0; in this case, the line "collapses"
@@ -492,7 +492,7 @@
                                              firstElementIndex, lastElementIndex,
                                              availableShrink, availableStretch,
                                              difference, ratio, 0, indent,
-                                             lineLead + lineFollow, 
+                                             lineLead + lineFollow,
                                              iLineWidth, spaceBefore, spaceAfter,
                                              lineLead);
             }
@@ -501,7 +501,7 @@
         public int findBreakingPoints(Paragraph par, /*int lineWidth,*/
                                       double threshold, boolean force,
                                       int allowedBreaks) {
-            return super.findBreakingPoints(par, /*lineWidth,*/ 
+            return super.findBreakingPoints(par, /*lineWidth,*/
                     threshold, force, allowedBreaks);
         }
 
@@ -548,9 +548,9 @@
         }
     }
 
-      
+
     private int constantLineHeight = 12000;
-      
+
 
     /**
      * Create a new Line Layout Manager.
@@ -641,19 +641,19 @@
      */
     private void collectInlineKnuthElements(LayoutContext context) {
         LayoutContext inlineLC = new LayoutContext(context);
-        
+
         InlineLevelLayoutManager curLM;
         List returnedList = null;
         iLineWidth = context.getStackLimitIP().opt;
-            
+
         // convert all the text in a sequence of paragraphs made
         // of KnuthBox, KnuthGlue and KnuthPenalty objects
         boolean bPrevWasKnuthBox = false;
-        
+
         StringBuffer trace = new StringBuffer("LineLM:");
-        
+
         Paragraph lastPar = null;
-        
+
         while ((curLM = (InlineLevelLayoutManager) getChildLM()) != null) {
             returnedList = curLM.getNextKnuthElements(inlineLC, effectiveAlignment);
             if (returnedList == null
@@ -663,10 +663,10 @@
                  * so just iterate once more to see if there are other children */
                 continue;
             }
-            
+
             if (lastPar != null) {
                 KnuthSequence firstSeq = (KnuthSequence) returnedList.get(0);
-                
+
                 // finish last paragraph before a new block sequence
                 if (!firstSeq.isInlineSequence()) {
                     lastPar.endParagraph();
@@ -677,7 +677,7 @@
                     }
                     bPrevWasKnuthBox = false;
                 }
-                
+
                 // does the first element of the first paragraph add to an existing word?
                 if (lastPar != null) {
                     KnuthElement thisElement;
@@ -688,28 +688,28 @@
                     }
                 }
             }
-            
+
             // loop over the KnuthSequences (and single KnuthElements) in returnedList
             ListIterator iter = returnedList.listIterator();
             while (iter.hasNext()) {
                 KnuthSequence sequence = (KnuthSequence) iter.next();
                 // the sequence contains inline Knuth elements
                 if (sequence.isInlineSequence()) {
-                    // look at the last element 
+                    // look at the last element
                     ListElement lastElement = sequence.getLast();
                     if (lastElement == null) {
                         throw new NullPointerException(
                         "Sequence was empty! lastElement is null");
                     }
-                    bPrevWasKnuthBox = lastElement.isBox() 
-                                        && !((KnuthElement) lastElement).isAuxiliary() 
+                    bPrevWasKnuthBox = lastElement.isBox()
+                                        && !((KnuthElement) lastElement).isAuxiliary()
                                         && ((KnuthElement) lastElement).getW() != 0;
-                    
+
                     // if last paragraph is open, add the new elements to the paragraph
                     // else this is the last paragraph
-                    if (lastPar == null) { 
-                        lastPar = new Paragraph(this, 
-                                                textAlignment, textAlignmentLast, 
+                    if (lastPar == null) {
+                        lastPar = new Paragraph(this,
+                                                textAlignment, textAlignmentLast,
                                                 textIndent.getValue(this),
                                                 lastLineEndIndent.getValue(this));
                         lastPar.startSequence();
@@ -725,7 +725,7 @@
                     if (log.isTraceEnabled()) {
                         trace.append(" I");
                     }
-                    
+
                     // finish last paragraph if it was closed with a linefeed
                     if (lastElement.isPenalty()
                             && ((KnuthPenalty) lastElement).getP()
@@ -735,7 +735,7 @@
                         // which forces a line break
                         lastPar.removeLast();
                         if (!lastPar.containsBox()) {
-                            //only a forced linefeed on this line 
+                            //only a forced linefeed on this line
                             //-> compensate with an auxiliary glue
                             lastPar.add(new KnuthGlue(iLineWidth, 0, iLineWidth, null, true));
                         }
@@ -765,11 +765,11 @@
         }
         log.trace(trace);
     }
-    
+
     /**
      * Find a set of breaking points.
-     * This method is called only once by getNextBreakPoss, and it 
-     * subsequently calls the other findBreakingPoints() method with 
+     * This method is called only once by getNextBreakPoss, and it
+     * subsequently calls the other findBreakingPoints() method with
      * different parameters, until a set of breaking points is found.
      *
      * @param par       the list of elements that must be parted
@@ -805,7 +805,7 @@
             }
         }
     }
-    
+
     private boolean findBreakingPoints(Paragraph par, int lineWidth,
             double threshold, boolean force) {
         KnuthParagraph knuthPara = new KnuthParagraph(par);
@@ -813,11 +813,11 @@
         if (lines == 0) {
             return false;
         }
-        
+
         for (int i = lines-1; i >= 0; i--) {
             int line = i+1;
             if (log.isTraceEnabled()) {
-                log.trace("Making line from " + knuthPara.getStart(i) + " to " + 
+                log.trace("Making line from " + knuthPara.getStart(i) + " to " +
                            knuthPara.getEnd(i));
             }
             // compute indent and adjustment ratio, according to
@@ -826,7 +826,7 @@
             int difference = knuthPara.getDifference(i);
             if (line == lines) {
                 difference += par.lineFillerWidth;
-            }    
+            }
             int textAlign = (line < lines)
                 ? textAlignment : textAlignmentLast;
             int indent = (textAlign == EN_CENTER)
@@ -841,7 +841,7 @@
             int end = knuthPara.getEnd(i);
             makeLineBreakPosition(par, start, end, 0, ratio, indent);
         }
-        return true;        
+        return true;
     }
 
     private void makeLineBreakPosition(Paragraph par,
@@ -893,7 +893,7 @@
                                               lineLead));
     }*/
 
-    
+
     /**
      * Phase 2 of Knuth algorithm: find optimal break points.
      * @param alignment alignment in BP direction of the paragraph
@@ -918,9 +918,9 @@
             }
             lineLayoutsList.add(0, llPoss);
         }
-        
+
         setFinished(true);
-    
+
         //Post-process the line breaks found
         return postProcessLineBreaks(alignment, context);
     }
@@ -944,12 +944,12 @@
                                         hyphenationLadderCount.getEnum() == EN_NO_LIMIT
                                         ? 0 : hyphenationLadderCount.getValue(),
                                         this);
-   
-        if (hyphenationProperties.hyphenate.getEnum() == EN_TRUE 
+
+        if (hyphenationProperties.hyphenate.getEnum() == EN_TRUE
                 && fobj.getWrapOption() != EN_NO_WRAP) {
             findHyphenationPoints(currPar);
         }
-   
+
         // first try
         int allowedBreaks;
         if (wrapOption == EN_NO_WRAP) {
@@ -969,7 +969,7 @@
                 // the first try failed
                 log.debug("No set of breaking points found with maxAdjustment = " + maxAdjustment);
             }
-   
+
             // now try something different
             log.debug("Hyphenation possible? " + (hyphenationProperties.hyphenate.getEnum() == EN_TRUE));
             if (hyphenationProperties.hyphenate.getEnum() == EN_TRUE
@@ -980,7 +980,7 @@
                 // try with a higher threshold
                 maxAdjustment = 5;
             }
-   
+
             if ((iBPcount
                  = alg.findBreakingPoints(currPar,
                                           maxAdjustment, false, allowedBreaks)) == 0) {
@@ -998,12 +998,12 @@
                     = alg.findBreakingPoints(currPar,
                                              maxAdjustment, true, allowedBreaks);
             }
-   
+
             // use non-hyphenated breaks, when possible
             lineLayouts.restorePossibilities();
-   
+
             /* extension (not in the XSL FO recommendation): if vertical alignment
-               is justify and the paragraph has only one layout, try using 
+               is justify and the paragraph has only one layout, try using
                shorter or longer lines */
             //TODO This code snippet is disabled. Reenable?
             if (false && alignment == EN_JUSTIFY && textAlignment == EN_JUSTIFY) {
@@ -1048,9 +1048,9 @@
      * @return the newly built element list
      */
     private List postProcessLineBreaks(int alignment, LayoutContext context) {
-    
+
         List returnList = new LinkedList();
-        
+
         for (int p = 0; p < knuthParagraphs.size(); p++) {
             // penalty between paragraphs
             if (p > 0) {
@@ -1061,7 +1061,7 @@
                             new Position(this), penalty, context));
                 }
             }
-        
+
             LineLayoutPossibilities llPoss;
             llPoss = (LineLayoutPossibilities) lineLayoutsList.get(p);
             KnuthSequence seq = (KnuthSequence) knuthParagraphs.get(p);
@@ -1078,10 +1078,10 @@
                     }
                     targetList.add(tempElement);
                 }
-                returnList.addAll(targetList); 
+                returnList.addAll(targetList);
             } else if (seq.isInlineSequence() && alignment == EN_JUSTIFY) {
                 /* justified vertical alignment (not in the XSL FO recommendation):
-                   create a multi-layout sequence whose elements will contain 
+                   create a multi-layout sequence whose elements will contain
                    a conventional Position */
                 Position returnPosition = new LeafPosition(this, p);
                 createElements(returnList, llPoss, returnPosition);
@@ -1107,7 +1107,7 @@
                     }
                     int endIndex
                       = ((LineBreakPosition) llPoss.getChosenPosition(i)).getLeafPos();
-                    // create a list of the FootnoteBodyLM handling footnotes 
+                    // create a list of the FootnoteBodyLM handling footnotes
                     // whose citations are in this line
                     List footnoteList = new LinkedList();
                     ListIterator elementIterator = seq.listIterator(startIndex);
@@ -1138,7 +1138,7 @@
                 }
             }
         }
-        
+
         return returnList;
     }
 
@@ -1286,7 +1286,7 @@
     public int getKeepTogetherStrength() {
         return ((BlockLevelLayoutManager) getParent()).getKeepTogetherStrength();
     }
-    
+
     /** {@inheritDoc} */
     public boolean mustKeepWithPrevious() {
         return getKeepWithPreviousStrength() > KEEP_AUTO;
@@ -1306,7 +1306,7 @@
     public int getKeepWithPreviousStrength() {
         return KEEP_AUTO;
     }
-    
+
     /** {@inheritDoc} */
     public int negotiateBPDAdjustment(int adj, KnuthElement lastElement) {
         LeafPosition pos = (LeafPosition)lastElement.getPosition();
@@ -1331,7 +1331,7 @@
     }
 
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public List getChangedKnuthElements(List oldList, int alignment) {
         List returnList = new LinkedList();
@@ -1354,8 +1354,8 @@
                 MinOptMax contentIPD;
                 if (alignment == EN_JUSTIFY) {
                     contentIPD = new MinOptMax(
-                        lbp.lineWidth - lbp.difference - lbp.availableShrink, 
-                        lbp.lineWidth - lbp.difference, 
+                        lbp.lineWidth - lbp.difference - lbp.availableShrink,
+                        lbp.lineWidth - lbp.difference,
                         lbp.lineWidth - lbp.difference + lbp.availableStretch);
                 } else if (alignment == EN_CENTER) {
                     contentIPD = new MinOptMax(lbp.lineWidth - 2 * lbp.startIndent);
@@ -1397,10 +1397,10 @@
         // find all hyphenation points
         while (currParIterator.hasNext()) {
             firstElement = (KnuthElement) currParIterator.next();
-            // 
+            //
             if (firstElement.getLayoutManager() != currLM) {
                 currLM = (InlineLevelLayoutManager) firstElement.getLayoutManager();
-                if (currLM != null) { 
+                if (currLM != null) {
                     updateList.add(new Update(currLM, currParIterator.previousIndex()));
                 } else {
                     break;
@@ -1409,7 +1409,7 @@
                 break;
             }
             //TODO Something's not right here. See block_hyphenation_linefeed_preserve.xml
-            
+
             // collect word fragments, ignoring auxiliary elements;
             // each word fragment was created by a different TextLM
             if (firstElement.isBox() && !firstElement.isAuxiliary()) {
@@ -1432,7 +1432,7 @@
                     } else if (!nextElement.isAuxiliary()) {
                         // a non-auxiliary non-box KnuthElement: stop
                         // go back to the last box or auxiliary element
-                        currParIterator.previous(); 
+                        currParIterator.previous();
                         break;
                     } else {
                         if (currLM != nextElement.getLayoutManager()) {
@@ -1475,7 +1475,7 @@
         //int iRemovedElements = 0;
 
         while (updateListIterator.hasNext()) {
-            // ask the LMs to apply the changes and return 
+            // ask the LMs to apply the changes and return
             // the new KnuthElements to replace the old ones
             currUpdate = (Update) updateListIterator.next();
             int fromIndex = currUpdate.iFirstIndex;
@@ -1584,11 +1584,11 @@
             } else if ((pos instanceof NonLeafPosition) && pos.generatesAreas()) {
                 addBlockArea(context, pos, isLastPosition);
             } else {
-                /*                
+                /*
                  * pos was the Position inside a penalty item, nothing to do;
                  * or Pos does not generate an area,
                  * i.e. it stand for spaces, borders and padding.
-                 */            
+                 */
             }
         }
         setCurrentArea(null); // ?? necessary
@@ -1605,14 +1605,14 @@
             KnuthElement tempElement = null;
             // the TLM which created the last KnuthElement in this line
             LayoutManager lastLM = null;
-            
+
             LineBreakPosition lbp = (LineBreakPosition) pos;
             int iCurrParIndex;
             iCurrParIndex = lbp.iParIndex;
             KnuthSequence seq = (KnuthSequence) knuthParagraphs.get(iCurrParIndex);
             int iStartElement = lbp.iStartIndex;
             int iEndElement = lbp.getLeafPos();
-            
+
             LineArea lineArea
               = new LineArea((lbp.getLeafPos() < seq.size() - 1
                               ? textAlignment : textAlignmentLast),
@@ -1625,12 +1625,12 @@
             lineArea.addTrait(Trait.SPACE_BEFORE, new Integer(lbp.spaceBefore));
             lineArea.addTrait(Trait.SPACE_AFTER, new Integer(lbp.spaceAfter));
             alignmentContext.resizeLine(lbp.lineHeight, lbp.baseline);
-            
+
             if (seq instanceof Paragraph) {
                 Paragraph currPar = (Paragraph) seq;
                 // ignore the first elements added by the LineLayoutManager
                 iStartElement += (iStartElement == 0) ? currPar.ignoreAtStart : 0;
-                
+
                 // if this is the last line area that for this paragraph,
                 // ignore the last elements added by the LineLayoutManager and
                 // subtract the last-line-end-indent from the area ipd
@@ -1639,10 +1639,10 @@
                     lineArea.setIPD(lineArea.getIPD() - lastLineEndIndent.getValue(this));
                 }
             }
-            
+
             // Remove trailing spaces if allowed so
             if (whiteSpaceTreament == EN_IGNORE_IF_SURROUNDING_LINEFEED
-                || whiteSpaceTreament == EN_IGNORE 
+                || whiteSpaceTreament == EN_IGNORE
                 || whiteSpaceTreament == EN_IGNORE_IF_BEFORE_LINEFEED) {
                 // ignore the last element in the line if it is a KnuthGlue object
                 seqIterator = seq.listIterator(iEndElement);
@@ -1661,10 +1661,10 @@
                     lastLM = tempElement.getLayoutManager();
                 }
             }
-            
+
             // Remove leading spaces if allowed so
             if (whiteSpaceTreament == EN_IGNORE_IF_SURROUNDING_LINEFEED
-                || whiteSpaceTreament == EN_IGNORE 
+                || whiteSpaceTreament == EN_IGNORE
                 || whiteSpaceTreament == EN_IGNORE_IF_AFTER_LINEFEED) {
                 // ignore KnuthGlue and KnuthPenalty objects
                 // at the beginning of the line
@@ -1678,13 +1678,13 @@
             // Add the inline areas to lineArea
             PositionIterator inlinePosIter
               = new KnuthPossPosIter(seq, iStartElement, iEndElement + 1);
-            
+
             iStartElement = lbp.getLeafPos() + 1;
             if (iStartElement == seq.size()) {
                 // advance to next paragraph
                 iStartElement = 0;
             }
-            
+
             LayoutContext lc = new LayoutContext(0);
             lc.setAlignmentContext(alignmentContext);
             lc.setSpaceAdjust(lbp.dAdjust);
@@ -1692,7 +1692,7 @@
             lc.setLeadingSpace(new SpaceSpecifier(true));
             lc.setTrailingSpace(new SpaceSpecifier(false));
             lc.setFlags(LayoutContext.RESOLVE_LEADING_SPACE, true);
-            
+
             /*
              * extension (not in the XSL FO recommendation): if the left and right margins
              * have been optimized, recompute indents and / or adjust ratio, according
@@ -1718,11 +1718,11 @@
                 lineArea.addTrait(Trait.START_INDENT, new Integer(updatedIndent));
             } else if (false && textAlignment == EN_END) {
                 // re-compute indent
-                int updatedIndent = lbp.startIndent 
+                int updatedIndent = lbp.startIndent
                                     + (context.getStackLimitIP().opt - lbp.lineWidth);
                 lineArea.addTrait(Trait.START_INDENT, new Integer(updatedIndent));
             }
-            
+
             setCurrentArea(lineArea);
             setChildContext(lc);
             LayoutManager childLM;
@@ -1732,9 +1732,9 @@
                 lc.setLeadingSpace(lc.getTrailingSpace());
                 lc.setTrailingSpace(new SpaceSpecifier(false));
             }
-            
+
             // when can this be null?
-            // if display-align is distribute, add space after 
+            // if display-align is distribute, add space after
             if (context.getSpaceAfter() > 0
                     && (!context.isLastArea() || !isLastPosition)) {
                 lineArea.setBPD(lineArea.getBPD() + context.getSpaceAfter());
@@ -1742,7 +1742,7 @@
             lineArea.finalise();
             parentLM.addChildArea(lineArea);
     }
-    
+
     /**
      * Add a line with block content
      * @param context the context for adding areas
@@ -1766,13 +1766,13 @@
         if (isLastPosition) {
             lastLM = innerPosition.getLM();
         }
-        
+
         LineArea lineArea = new LineArea();
         setCurrentArea(lineArea);
         LayoutContext lc = new LayoutContext(0);
         lc.setAlignmentContext(alignmentContext);
         setChildContext(lc);
-        
+
         PositionIterator childPosIter = new StackingIter(positionList.listIterator());
         LayoutContext blocklc = new LayoutContext(0);
         blocklc.setLeadingSpace(new SpaceSpecifier(true));
@@ -1810,14 +1810,14 @@
     }
 
     // --------- Property Resolution related functions --------- //
-    
+
     /**
      * {@inheritDoc}
      */
     public boolean getGeneratesBlockArea() {
         return true;
     }
-   
+
     /**
      * {@inheritDoc}
      */

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java Fri Jul 25 05:44:20 2008
@@ -29,7 +29,7 @@
 
     /** logger instance */
     protected static Log log = LogFactory.getLog(LineLayoutPossibilities.class);
-    
+
     private class Possibility {
         private int lineCount;
         private double demerits;
@@ -50,8 +50,8 @@
         }
 
         private void addBreakPosition(Position pos) {
-            // Positions are always added with index 0 because 
-            // they are created backward, from the last one to 
+            // Positions are always added with index 0 because
+            // they are created backward, from the last one to
             // the first one
             breakPositions.add(0, pos);
         }
@@ -74,7 +74,7 @@
         savedPossibilities = new java.util.ArrayList();
         optimumIndex = -1;
     }
- 
+
     public void addPossibility(int ln, double dem) {
         possibilitiesList.add(new Possibility(ln, dem));
         if (possibilitiesList.size() == 1) {
@@ -145,8 +145,8 @@
                 } else {
                     // this should not happen
                     log.error("LineLayoutPossibilities restorePossibilities(),"
-                        + " min= " + getMinLineCount() 
-                        + " max= " + getMaxLineCount() 
+                        + " min= " + getMinLineCount()
+                        + " max= " + getMaxLineCount()
                         + " restored= " + restoredPossibility.getLineCount());
                     return;
                 }
@@ -158,7 +158,7 @@
                 chosenIndex = optimumIndex;
             }
         }
-        //log.debug(">> minLineCount = " + getMinLineCount() 
+        //log.debug(">> minLineCount = " + getMinLineCount()
         //  + " optLineCount = " + getOptLineCount() + " maxLineCount() = " + getMaxLineCount());
     }
 

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -43,13 +43,13 @@
         super(node);
         fobj = node;
     }
-    
+
     /** {@inheritDoc} */
     public InlineArea get(LayoutContext context) {
         curArea = getPageNumberCitationLastInlineArea(parentLM);
         return curArea;
     }
-    
+
     /**
      * if id can be resolved then simply return a word, otherwise
      * return a resolvable area
@@ -71,12 +71,12 @@
             int width = getStringWidth(str);
             text.addWord(str, 0);
             text.setIPD(width);
-            
+
             resolved = true;
         }
-        
+
         updateTextAreaTraits(text);
-        
+
         return text;
     }
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,13 +41,13 @@
     public PageNumberCitationLayoutManager(PageNumberCitation node) {
         super(node);
     }
-    
+
     /** {@inheritDoc} */
     public InlineArea get(LayoutContext context) {
         curArea = getPageNumberCitationInlineArea();
         return curArea;
     }
-    
+
     /**
      * if id can be resolved then simply return a word, otherwise
      * return a resolvable area
@@ -71,9 +71,9 @@
             text.setIPD(width);
         }
         updateTextAreaTraits(text);
-        
+
         return text;
     }
-    
+
 }
 

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,10 +34,10 @@
  * LayoutManager for the fo:page-number formatting object
  */
 public class PageNumberLayoutManager extends LeafNodeLayoutManager {
-    
+
     private PageNumber fobj;
     private Font font;
-    
+
     /**
      * Constructor
      *
@@ -48,7 +48,7 @@
         super(node);
         fobj = node;
     }
-    
+
     /** {@inheritDoc} */
     public void initialize() {
         FontInfo fi = fobj.getFOEventHandler().getFontInfo();
@@ -84,13 +84,13 @@
         text.setBPD(font.getAscender() - font.getDescender());
         text.setBaselineOffset(font.getAscender());
         TraitSetter.addFontTraits(text, font);
-        text.addTrait(Trait.COLOR, fobj.getColor());        
+        text.addTrait(Trait.COLOR, fobj.getColor());
 
         TraitSetter.addTextDecoration(text, fobj.getTextDecoration());
 
         return text;
     }
-    
+
     /** {@inheritDoc} */
     protected InlineArea getEffectiveArea() {
         TextArea baseArea = (TextArea)curArea;
@@ -108,7 +108,7 @@
         updateContent(ta);
         return ta;
     }
-    
+
     private void updateContent(TextArea area) {
         // get the page number of the page actually being built
         area.removeText();
@@ -130,6 +130,6 @@
         }
         return width;
     }
-    
+
 }
 

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTable.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTable.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTable.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,19 +23,19 @@
 
 /**
  * The FOP specific incarnation of the XSL-FO scaled baseline table.
- * All baseline tables are scaled to the font size of the font they 
- * apply to. This interface uses a coordinate system with its origin 
+ * All baseline tables are scaled to the font size of the font they
+ * apply to. This interface uses a coordinate system with its origin
  * where the dominant baseline intersects the start edge of the box.
  * All measurements are in mpt.
  */
 public interface ScaledBaselineTable {
-    
+
     /**
      * Return the dominant baseline identifer for this alignment context.
      * @return the dominant baseline identifier
      */
     int getDominantBaselineIdentifier();
-    
+
     /**
      * Return the writing mode for this aligment context.
      * @return the writing mode
@@ -49,7 +49,7 @@
      * @return the baseline offset
      */
     int getBaseline(int baselineIdentifier);
-    
+
     /**
      * Sets the position of the before and after baselines.
      * This is usually only done for line areas. For other
@@ -59,7 +59,7 @@
      * @param afterBaseline the offset of the after-edge baseline from the dominant baseline
      */
     void setBeforeAndAfterBaselines(int beforeBaseline, int afterBaseline);
-    
+
     /**
      * Return a new baseline table for the given baseline based
      * on the current baseline table.

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTableFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTableFactory.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTableFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTableFactory.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -44,7 +44,7 @@
         return new BasicScaledBaselineTable(font.getAscender(), font.getDescender()
                                     , font.getXHeight(), dominantBaselineIdentifier, writingMode);
     }
-    
+
     /**
      * Creates a new instance of BasicScaledBaselineTable for the given
      * font and writingmode. It assumes an alphabetic baseline.
@@ -55,7 +55,7 @@
     public static ScaledBaselineTable makeFontScaledBaselineTable(Font font, int writingMode) {
         return makeFontScaledBaselineTable(font, EN_ALPHABETIC, writingMode);
     }
-    
+
     /**
      * Creates a new instance of BasicScaledBaselineTable for the given
      * height, baseline and writingmode. This is used for non font based areas like
@@ -71,5 +71,5 @@
         return new BasicScaledBaselineTable(height, 0, height
                                             , dominantBaselineIdentifier, writingMode);
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java Fri Jul 25 05:44:20 2008
@@ -203,7 +203,7 @@
     public void initialize() {
 
         this.foText.resetBuffer();
-        
+
         this.spaceFont = FontSelector.selectFontForCharacterInText(' ', this.foText, this);
 
         // With CID fonts, space isn't neccesary currentFontState.width(32)

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@
  * This is the layout manager for the fo:wrapper formatting object.
  */
 public class WrapperLayoutManager extends LeafNodeLayoutManager {
-    
+
     /**
      * Creates a new LM for fo:wrapper.
      * @param node the fo:wrapper

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.layoutmgr.list;
 
 import java.util.Iterator;
@@ -48,7 +48,7 @@
  * A list block contains list items which are stacked within
  * the list block area..
  */
-public class ListBlockLayoutManager extends BlockStackingLayoutManager 
+public class ListBlockLayoutManager extends BlockStackingLayoutManager
                 implements ConditionalElementListener {
 
     /**
@@ -102,38 +102,38 @@
         foSpaceAfter = new SpaceVal(
                 getListBlockFO().getCommonMarginBlock().spaceAfter, this).getSpace();
         startIndent = getListBlockFO().getCommonMarginBlock().startIndent.getValue(this);
-        endIndent = getListBlockFO().getCommonMarginBlock().endIndent.getValue(this); 
+        endIndent = getListBlockFO().getCommonMarginBlock().endIndent.getValue(this);
     }
 
     private void resetSpaces() {
-        this.discardBorderBefore = false;        
-        this.discardBorderAfter = false;        
-        this.discardPaddingBefore = false;        
+        this.discardBorderBefore = false;
+        this.discardBorderAfter = false;
+        this.discardPaddingBefore = false;
         this.discardPaddingAfter = false;
         this.effSpaceBefore = null;
         this.effSpaceAfter = null;
     }
-    
+
     /** {@inheritDoc} */
     public List getNextKnuthElements(LayoutContext context, int alignment) {
-        resetSpaces(); 
+        resetSpaces();
         List returnList = super.getNextKnuthElements(context, alignment);
 
         //fox:widow-content-limit
-        int widowRowLimit = getListBlockFO().getWidowContentLimit().getValue(); 
+        int widowRowLimit = getListBlockFO().getWidowContentLimit().getValue();
         if (widowRowLimit != 0) {
             ElementListUtils.removeLegalBreaks(returnList, widowRowLimit);
         }
 
         //fox:orphan-content-limit
-        int orphanRowLimit = getListBlockFO().getOrphanContentLimit().getValue(); 
+        int orphanRowLimit = getListBlockFO().getOrphanContentLimit().getValue();
         if (orphanRowLimit != 0) {
             ElementListUtils.removeLegalBreaksFromEnd(returnList, orphanRowLimit);
         }
 
         return returnList;
     }
-   
+
     /** {@inheritDoc} */
     public List getChangedKnuthElements(List oldList, int alignment) {
         //log.debug("LBLM.getChangedKnuthElements>");
@@ -169,7 +169,7 @@
         Position lastPos = null;
 
         // "unwrap" the NonLeafPositions stored in parentIter
-        // and put them in a new list; 
+        // and put them in a new list;
         LinkedList positionList = new LinkedList();
         Position pos;
         while (parentIter.hasNext()) {
@@ -208,17 +208,17 @@
         addMarkersToPage(false, isFirst(firstPos), isLast(lastPos));
 
         // We are done with this area add the background
-        TraitSetter.addBackground(curBlockArea, 
+        TraitSetter.addBackground(curBlockArea,
                 getListBlockFO().getCommonBorderPaddingBackground(),
                 this);
-        TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(), 
+        TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(),
                 effSpaceBefore, effSpaceAfter);
 
         flush();
 
         curBlockArea = null;
         resetSpaces();
-        
+
         checkEndOfLayout(lastPos);
     }
 
@@ -238,30 +238,30 @@
     public Area getParentArea(Area childArea) {
         if (curBlockArea == null) {
             curBlockArea = new Block();
-            
+
             // Set up dimensions
             // Must get dimensions from parent area
             /*Area parentArea =*/ parentLM.getParentArea(curBlockArea);
 
             // set traits
             TraitSetter.setProducerID(curBlockArea, getListBlockFO().getId());
-            TraitSetter.addBorders(curBlockArea, 
-                    getListBlockFO().getCommonBorderPaddingBackground(), 
+            TraitSetter.addBorders(curBlockArea,
+                    getListBlockFO().getCommonBorderPaddingBackground(),
                     discardBorderBefore, discardBorderAfter, false, false, this);
-            TraitSetter.addPadding(curBlockArea, 
-                    getListBlockFO().getCommonBorderPaddingBackground(), 
+            TraitSetter.addPadding(curBlockArea,
+                    getListBlockFO().getCommonBorderPaddingBackground(),
                     discardPaddingBefore, discardPaddingAfter, false, false, this);
             TraitSetter.addMargins(curBlockArea,
-                    getListBlockFO().getCommonBorderPaddingBackground(), 
+                    getListBlockFO().getCommonBorderPaddingBackground(),
                     getListBlockFO().getCommonMarginBlock(),
                     this);
-            TraitSetter.addBreaks(curBlockArea, 
-                    getListBlockFO().getBreakBefore(), 
+            TraitSetter.addBreaks(curBlockArea,
+                    getListBlockFO().getBreakBefore(),
                     getListBlockFO().getBreakAfter());
-            
+
             int contentIPD = referenceIPD - getIPIndents();
             curBlockArea.setIPD(contentIPD);
-            
+
             setCurrentArea(curBlockArea);
         }
         return curBlockArea;
@@ -285,7 +285,7 @@
         strength = Math.max(strength, getParentKeepTogetherStrength());
         return strength;
     }
-    
+
     /** {@inheritDoc} */
     public int getKeepWithNextStrength() {
         return KeepUtil.getCombinedBlockLevelKeepStrength(getListBlockFO().getKeepWithNext());
@@ -300,13 +300,13 @@
     public void notifySpace(RelSide side, MinOptMax effectiveLength) {
         if (RelSide.BEFORE == side) {
             if (log.isDebugEnabled()) {
-                log.debug(this + ": Space " + side + ", " 
+                log.debug(this + ": Space " + side + ", "
                         + this.effSpaceBefore + "-> " + effectiveLength);
             }
             this.effSpaceBefore = effectiveLength;
         } else {
             if (log.isDebugEnabled()) {
-                log.debug(this + ": Space " + side + ", " 
+                log.debug(this + ": Space " + side + ", "
                         + this.effSpaceAfter + "-> " + effectiveLength);
             }
             this.effSpaceAfter = effectiveLength;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.layoutmgr.list;
 
 import java.util.Iterator;
@@ -85,7 +85,7 @@
     protected AbstractListItemPart getPartFO() {
         return (AbstractListItemPart)fobj;
     }
-    
+
     /**
      * Set the x offset of this list item.
      * This offset is used to set the absolute position
@@ -114,7 +114,7 @@
     public void addAreas(PositionIterator parentIter,
                          LayoutContext layoutContext) {
         getParentArea(null);
-        
+
         addId();
 
         LayoutManager childLM;
@@ -125,7 +125,7 @@
         Position lastPos = null;
 
         // "unwrap" the NonLeafPositions stored in parentIter
-        // and put them in a new list; 
+        // and put them in a new list;
         LinkedList positionList = new LinkedList();
         Position pos;
         while (parentIter.hasNext()) {
@@ -154,7 +154,7 @@
         }
 
         addMarkersToPage(true, isFirst(firstPos), isLast(lastPos));
-        
+
         StackingIter childPosIter = new StackingIter(positionList.listIterator());
         while ((childLM = childPosIter.getNextChildLM()) != null) {
             // Add the block areas to Area
@@ -167,11 +167,11 @@
         }
 
         addMarkersToPage(false, isFirst(firstPos), isLast(lastPos));
-        
+
         flush();
 
         curBlockArea = null;
-        
+
         checkEndOfLayout(lastPos);
     }
 
@@ -198,7 +198,7 @@
             //curBlockArea.setHeight();
 
             TraitSetter.setProducerID(curBlockArea, getPartFO().getId());
-            
+
             // Set up dimensions
             Area parentArea = parentLM.getParentArea(curBlockArea);
             int referenceIPD = parentArea.getIPD();
@@ -226,7 +226,7 @@
         strength = Math.max(strength, getParentKeepTogetherStrength());
         return strength;
     }
-    
+
     /** {@inheritDoc} */
     public int getKeepWithNextStrength() {
         return KEEP_AUTO;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,7 +59,7 @@
  * LayoutManager for a list-item FO.
  * The list item contains a list item label and a list item body.
  */
-public class ListItemLayoutManager extends BlockStackingLayoutManager 
+public class ListItemLayoutManager extends BlockStackingLayoutManager
                     implements ConditionalElementListener {
 
     /**
@@ -81,19 +81,19 @@
     private boolean discardPaddingAfter;
     private MinOptMax effSpaceBefore;
     private MinOptMax effSpaceAfter;
-    
+
     private int keepWithNextPendingOnLabel;
     private int keepWithNextPendingOnBody;
 
     private int listItemHeight;
-    
+
     private class ListItemPosition extends Position {
         private int iLabelFirstIndex;
         private int iLabelLastIndex;
         private int iBodyFirstIndex;
         private int iBodyLastIndex;
 
-        public ListItemPosition(LayoutManager lm, int labelFirst, int labelLast, 
+        public ListItemPosition(LayoutManager lm, int labelFirst, int labelLast,
                 int bodyFirst, int bodyLast) {
             super(lm);
             iLabelFirstIndex = labelFirst;
@@ -101,11 +101,11 @@
             iBodyFirstIndex = bodyFirst;
             iBodyLastIndex = bodyLast;
         }
-        
+
         public int getLabelFirstIndex() {
             return iLabelFirstIndex;
         }
-        
+
         public int getLabelLastIndex() {
             return iLabelLastIndex;
         }
@@ -113,11 +113,11 @@
         public int getBodyFirstIndex() {
             return iBodyFirstIndex;
         }
-        
+
         public int getBodyLastIndex() {
             return iBodyLastIndex;
         }
-        
+
         /** {@inheritDoc} */
         public boolean generatesAreas() {
             return true;
@@ -166,7 +166,7 @@
      * @param node the fo:list-item-body FO
      */
     public void setBody(ListItemBody node) {
-        body = new ListItemContentLayoutManager(node); 
+        body = new ListItemContentLayoutManager(node);
         body.setParent(this);
     }
 
@@ -177,25 +177,25 @@
         foSpaceAfter = new SpaceVal(
                 getListItemFO().getCommonMarginBlock().spaceAfter, this).getSpace();
         startIndent = getListItemFO().getCommonMarginBlock().startIndent.getValue(this);
-        endIndent = getListItemFO().getCommonMarginBlock().endIndent.getValue(this); 
+        endIndent = getListItemFO().getCommonMarginBlock().endIndent.getValue(this);
     }
 
     private void resetSpaces() {
-        this.discardBorderBefore = false;        
-        this.discardBorderAfter = false;        
-        this.discardPaddingBefore = false;        
+        this.discardBorderBefore = false;
+        this.discardBorderAfter = false;
+        this.discardPaddingBefore = false;
         this.discardPaddingAfter = false;
         this.effSpaceBefore = null;
         this.effSpaceAfter = null;
     }
-    
+
     /** {@inheritDoc} */
     public List getNextKnuthElements(LayoutContext context, int alignment) {
         referenceIPD = context.getRefIPD();
         LayoutContext childLC;
-        
+
         List returnList = new LinkedList();
-        
+
         if (!breakBeforeServed) {
             try {
                 if (addKnuthElementsForBreakBefore(returnList, context)) {
@@ -207,7 +207,7 @@
         }
 
         addKnuthElementsForSpaceBefore(returnList, alignment);
-        
+
         addKnuthElementsForBorderPaddingBefore(returnList, !firstVisibleMarkServed);
         firstVisibleMarkServed = true;
 
@@ -219,12 +219,12 @@
         childLC.setRefIPD(context.getRefIPD());
         label.initialize();
         labelList = label.getNextKnuthElements(childLC, alignment);
-        
+
         //Space resolution as if the contents were placed in a new reference area
         //(see 6.8.3, XSL 1.0, section on Constraints, last paragraph)
         SpaceResolver.resolveElementList(labelList);
         ElementListObserver.observe(labelList, "list-item-label", label.getPartFO().getId());
-        
+
         context.updateKeepWithPreviousPending(childLC.getKeepWithPreviousPending());
         this.keepWithNextPendingOnLabel = childLC.getKeepWithNextPending();
 
@@ -238,7 +238,7 @@
         //(see 6.8.3, XSL 1.0, section on Constraints, last paragraph)
         SpaceResolver.resolveElementList(bodyList);
         ElementListObserver.observe(bodyList, "list-item-body", body.getPartFO().getId());
-        
+
         context.updateKeepWithPreviousPending(childLC.getKeepWithPreviousPending());
         this.keepWithNextPendingOnBody = childLC.getKeepWithNextPending();
 
@@ -247,7 +247,7 @@
 
         // "wrap" the Position inside each element
         wrapPositionElements(returnedList, returnList, true);
-        
+
         addKnuthElementsForBorderPaddingAfter(returnList, true);
         addKnuthElementsForSpaceAfter(returnList, alignment);
         addKnuthElementsForBreakAfter(returnList, context);
@@ -280,7 +280,7 @@
 
         LinkedList returnList = new LinkedList();
         while ((step = getNextStep(elementLists, start, end, partialHeights)) > 0) {
-            
+
             if (end[0] + 1 == elementLists[0].size()) {
                 keepWithNextActive = Math.max(keepWithNextActive, keepWithNextPendingOnLabel);
             }
@@ -289,10 +289,10 @@
             }
 
             // compute penalty height and box height
-            int penaltyHeight = step 
-                + getMaxRemainingHeight(fullHeights, partialHeights) 
+            int penaltyHeight = step
+                + getMaxRemainingHeight(fullHeights, partialHeights)
                 - totalHeight;
-            
+
             //Additional penalty height from penalties in the source lists
             int additionalPenaltyHeight = 0;
             int stepPenalty = 0;
@@ -307,7 +307,7 @@
                         additionalPenaltyHeight, endEl.getW());
                 stepPenalty = Math.max(stepPenalty, endEl.getP());
             }
-            
+
             int boxHeight = step - addedBoxHeight - penaltyHeight;
             penaltyHeight += additionalPenaltyHeight; //Add AFTER calculating boxHeight!
 
@@ -330,7 +330,7 @@
 
             // add the new elements
             addedBoxHeight += boxHeight;
-            ListItemPosition stepPosition = new ListItemPosition(this, 
+            ListItemPosition stepPosition = new ListItemPosition(this,
                     start[0], end[0], start[1], end[1]);
             if (footnoteList == null) {
                 returnList.add(new KnuthBox(boxHeight, stepPosition, false));
@@ -394,7 +394,7 @@
         if (seqCount == 0) {
             return 0;
         }
-        
+
         // determine next step
         int step;
         if (backupHeights[0] == 0 && backupHeights[1] == 0) {
@@ -426,7 +426,7 @@
     }
 
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public List getChangedKnuthElements(List oldList, int alignment) {
         //log.debug(" LILM.getChanged> label");
@@ -441,10 +441,10 @@
         while (oldListIterator.hasNext()) {
             oldElement = (KnuthElement)oldListIterator.next();
             Position innerPosition = oldElement.getPosition().getPosition();
-            //log.debug(" BLM> unwrapping: " + (oldElement.isBox() 
-            //  ? "box    " : (oldElement.isGlue() ? "glue   " : "penalty")) 
+            //log.debug(" BLM> unwrapping: " + (oldElement.isBox()
+            //  ? "box    " : (oldElement.isGlue() ? "glue   " : "penalty"))
             //  + " creato da " + oldElement.getLayoutManager().getClass().getName());
-            //log.debug(" BLM> unwrapping:         " 
+            //log.debug(" BLM> unwrapping:         "
             //  + oldElement.getPosition().getClass().getName());
             if (innerPosition != null) {
                 // oldElement was created by a descendant of this BlockLM
@@ -508,7 +508,7 @@
 
         addMarkersToPage(true, isFirst(firstPos), isLast(lastPos));
 
-        // use the first and the last ListItemPosition to determine the 
+        // use the first and the last ListItemPosition to determine the
         // corresponding indexes in the original labelList and bodyList
         int labelFirstIndex = ((ListItemPosition) positionList.getFirst()).getLabelFirstIndex();
         int labelLastIndex = ((ListItemPosition) positionList.getLast()).getLabelLastIndex();
@@ -517,17 +517,17 @@
 
         //Determine previous break if any
         int previousBreak = ElementListUtils.determinePreviousBreak(labelList, labelFirstIndex);
-        SpaceResolver.performConditionalsNotification(labelList, 
+        SpaceResolver.performConditionalsNotification(labelList,
                 labelFirstIndex, labelLastIndex, previousBreak);
 
         //Determine previous break if any
         previousBreak = ElementListUtils.determinePreviousBreak(bodyList, bodyFirstIndex);
-        SpaceResolver.performConditionalsNotification(bodyList, 
+        SpaceResolver.performConditionalsNotification(bodyList,
                 bodyFirstIndex, bodyLastIndex, previousBreak);
-        
+
         // add label areas
         if (labelFirstIndex <= labelLastIndex) {
-            KnuthPossPosIter labelIter = new KnuthPossPosIter(labelList, 
+            KnuthPossPosIter labelIter = new KnuthPossPosIter(labelList,
                     labelFirstIndex, labelLastIndex + 1);
             lc.setFlags(LayoutContext.FIRST_AREA, layoutContext.isFirstArea());
             lc.setFlags(LayoutContext.LAST_AREA, layoutContext.isLastArea());
@@ -548,7 +548,7 @@
 
         // add body areas
         if (bodyFirstIndex <= bodyLastIndex) {
-            KnuthPossPosIter bodyIter = new KnuthPossPosIter(bodyList, 
+            KnuthPossPosIter bodyIter = new KnuthPossPosIter(bodyList,
                     bodyFirstIndex, bodyLastIndex + 1);
             lc.setFlags(LayoutContext.FIRST_AREA, layoutContext.isFirstArea());
             lc.setFlags(LayoutContext.LAST_AREA, layoutContext.isLastArea());
@@ -567,17 +567,17 @@
         addMarkersToPage(false, isFirst(firstPos), isLast(lastPos));
 
         // We are done with this area add the background
-        TraitSetter.addBackground(curBlockArea, 
+        TraitSetter.addBackground(curBlockArea,
                 getListItemFO().getCommonBorderPaddingBackground(),
                 this);
-        TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(), 
+        TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(),
                 effSpaceBefore, effSpaceAfter);
 
         flush();
 
         curBlockArea = null;
         resetSpaces();
-        
+
         checkEndOfLayout(lastPos);
     }
 
@@ -610,22 +610,22 @@
 
             // Set up dimensions
             /*Area parentArea =*/ parentLM.getParentArea(curBlockArea);
-            
+
             // set traits
             TraitSetter.setProducerID(curBlockArea, getListItemFO().getId());
-            TraitSetter.addBorders(curBlockArea, 
-                    getListItemFO().getCommonBorderPaddingBackground(), 
+            TraitSetter.addBorders(curBlockArea,
+                    getListItemFO().getCommonBorderPaddingBackground(),
                     discardBorderBefore, discardBorderAfter, false, false, this);
-            TraitSetter.addPadding(curBlockArea, 
-                    getListItemFO().getCommonBorderPaddingBackground(), 
+            TraitSetter.addPadding(curBlockArea,
+                    getListItemFO().getCommonBorderPaddingBackground(),
                     discardPaddingBefore, discardPaddingAfter, false, false, this);
             TraitSetter.addMargins(curBlockArea,
-                    getListItemFO().getCommonBorderPaddingBackground(), 
+                    getListItemFO().getCommonBorderPaddingBackground(),
                     getListItemFO().getCommonMarginBlock(), this);
-            TraitSetter.addBreaks(curBlockArea, 
-                    getListItemFO().getBreakBefore(), 
+            TraitSetter.addBreaks(curBlockArea,
+                    getListItemFO().getBreakBefore(),
                     getListItemFO().getBreakAfter());
-            
+
             int contentIPD = referenceIPD - getIPIndents();
             curBlockArea.setIPD(contentIPD);
 
@@ -669,13 +669,13 @@
     public void notifySpace(RelSide side, MinOptMax effectiveLength) {
         if (RelSide.BEFORE == side) {
             if (log.isDebugEnabled()) {
-                log.debug(this + ": Space " + side + ", " 
+                log.debug(this + ": Space " + side + ", "
                         + this.effSpaceBefore + "-> " + effectiveLength);
             }
             this.effSpaceBefore = effectiveLength;
         } else {
             if (log.isDebugEnabled()) {
-                log.debug(this + ": Space " + side + ", " 
+                log.debug(this + ": Space " + side + ", "
                         + this.effSpaceAfter + "-> " + effectiveLength);
             }
             this.effSpaceAfter = effectiveLength;
@@ -710,6 +710,6 @@
         }
     }
 
-    
+
 }
 

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/ActiveCell.java Fri Jul 25 05:44:20 2008
@@ -173,7 +173,7 @@
      * Returns the actual length of the content represented by the given element. In the
      * case where this element is used as a filler to match a row's fixed height, the
      * value returned by the getW() method will be higher than the actual content.
-     * 
+     *
      * @param el an element
      * @return the actual content length corresponding to the element
      */
@@ -226,7 +226,7 @@
     /**
      * Modifies the cell's element list by putting filler elements, so that the cell's or
      * row's explicit height is always reached.
-     * 
+     *
      * TODO this will work properly only for the first break. Then the limitation
      * explained on http://wiki.apache.org/xmlgraphics-fop/TableLayout/KnownProblems
      * occurs. The list of elements needs to be re-adjusted after each break.
@@ -269,7 +269,7 @@
 
     /**
      * Returns true if this cell ends on the given row.
-     * 
+     *
      * @param rowIndex index of a row in the row-group, zero-based
      * @return true if this cell ends on the given row
      */
@@ -280,7 +280,7 @@
     /**
      * Returns the length of this cell's content not yet included in the steps, plus the
      * cell's borders and paddings if applicable.
-     * 
+     *
      * @return the remaining length, zero if the cell is finished
      */
     int getRemainingLength() {
@@ -341,12 +341,12 @@
         afterNextStep.end = knuthIter.nextIndex() - 1;
         afterNextStep.totalLength = bpBeforeNormal
                 + afterNextStep.contentLength + afterNextStep.penaltyLength
-                + bpAfterTrailing; 
+                + bpAfterTrailing;
     }
 
     /**
      * Returns the minimal step that is needed for this cell to contribute some content.
-     *  
+     *
      * @return the step for this cell's first legal break
      */
     int getFirstStep() {
@@ -363,7 +363,7 @@
      * infinite penalty, plus the cell's content won't be taken into account since the
      * final step will be smaller than the current one (see {@link #signalNextStep(int)}).
      * This actually means that the content will be swallowed.
-     * 
+     *
      * @return the length of last step
      */
     int getLastStep() {
@@ -377,7 +377,7 @@
 
     /**
      * Increases the next step up to the given limit.
-     * 
+     *
      * @param limit the length up to which the next step is allowed to increase
      * @see #signalRowFirstStep(int)
      * @see #signalRowLastStep(int)
@@ -398,7 +398,7 @@
      * Gets the selected first step for the current row. If this cell's first step is
      * smaller, then it may be able to add some more of its content, since there will be
      * no break before the given step anyway.
-     * 
+     *
      * @param firstStep the current row's first step
      */
     void signalRowFirstStep(int firstStep) {
@@ -418,7 +418,7 @@
 
     /**
      * Returns the total length up to the next legal break, not yet included in the steps.
-     * 
+     *
      * @return the total length up to the next legal break (-1 signals no further step)
      */
     int getNextStep() {
@@ -446,7 +446,7 @@
     /**
      * Signals the length of the chosen next step, so that this cell determines whether
      * its own step may be included or not.
-     * 
+     *
      * @param minStep length of the chosen next step
      * @return the break class of the step, if any. One of {@link Constants#EN_AUTO},
      * {@link Constants#EN_COLUMN}, {@link Constants#EN_PAGE},
@@ -487,7 +487,7 @@
     /**
      * Receives indication that the current row is ending, and that (collapse) borders
      * must be updated accordingly.
-     * 
+     *
      * @param rowIndex the index of the ending row
      */
     void endRow(int rowIndex) {
@@ -508,7 +508,7 @@
     /**
      * Returns true if this cell would be finished after the given step. That is, it would
      * be included in the step and the end of its content would be reached.
-     * 
+     *
      * @param step the next step
      * @return true if this cell finishes at the given step
      */
@@ -519,7 +519,7 @@
     /**
      * Creates and returns a CellPart instance for the content of this cell which
      * is included in the next step.
-     * 
+     *
      * @return a CellPart instance
      */
     CellPart createCellPart() {
@@ -557,7 +557,7 @@
     /**
      * Adds the footnotes (if any) that are part of the next step, if this cell
      * contributes content to the next step.
-     * 
+     *
      * @param footnoteList the list to which this cell must add its footnotes
      */
     void addFootnotes(List footnoteList) {

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CellPart.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CellPart.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CellPart.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CellPart.java Fri Jul 25 05:44:20 2008
@@ -44,7 +44,7 @@
 
     /**
      * Creates a new CellPart.
-     * 
+     *
      * @param pgu Primary grid unit
      * @param start starting element
      * @param end ending element

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModel.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModel.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModel.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModel.java Fri Jul 25 05:44:20 2008
@@ -131,7 +131,7 @@
 
     /**
      * Compares the two given styles (see {@link Constants}).
-     * 
+     *
      * @param style1 a style constant
      * @param style2 another style constant
      * @return a value &lt; 0 if style1 has less priority than style2, 0 if both are
@@ -161,7 +161,7 @@
     /**
      * Compares the two given FO ids ({@link Constants}.FO*) in terms of border
      * declaration.
-     * 
+     *
      * @param id1 a FO id ({@link Constants#FO_TABLE}, {@link Constants#FO_TABLE_BODY},
      * etc.)
      * @param id2 another FO id
@@ -178,7 +178,7 @@
      * Returns the border which wins the border conflict resolution. In case the two
      * borders are equivalent (identical, or only the color is different), null is
      * returned.
-     * 
+     *
      * @param border1 a border specification
      * @param border2 another border specification
      * @param discard true if the .conditionality component of the border width must be
@@ -192,7 +192,7 @@
      * Returns the border which wins the border conflict resolution. Same as
      * {@link #determineWinner(BorderSpecification, BorderSpecification, boolean)
      * determineWinner(border1, border2, false)}.
-     * 
+     *
      * @param border1 a border specification
      * @param border2 another border specification
      * @return the winning border, null if the two borders are equivalent

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModelEyeCatching.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModelEyeCatching.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModelEyeCatching.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModelEyeCatching.java Fri Jul 25 05:44:20 2008
@@ -26,7 +26,7 @@
 
 /**
  * Implements the normal "collapse" border model defined in 6.7.10 in XSL 1.0.
- * 
+ *
  * TODO Column groups are not yet checked in this algorithm!
  */
 public class CollapsingBorderModelEyeCatching extends CollapsingBorderModel {

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/ColumnSetup.java Fri Jul 25 05:44:20 2008
@@ -45,9 +45,9 @@
     private Table table;
     private List columns = new java.util.ArrayList();
     private List colWidths = new java.util.ArrayList();
-    
+
     private int maxColIndexReferenced = 0;
-    
+
     /**
      * Main Constructor.
      * @param table the table to construct this column setup for
@@ -57,7 +57,7 @@
         prepareColumns();
         initializeColumnWidths();
     }
-    
+
     private void prepareColumns() {
         List rawCols = table.getColumns();
         if (rawCols != null) {
@@ -124,7 +124,7 @@
             return (TableColumn) columns.get(index - 1);
         }
     }
- 
+
     /** {@inheritDoc} */
     public String toString() {
         return columns.toString();
@@ -138,15 +138,15 @@
             return columns.size();
         }
    }
-    
+
     /** @return an Iterator over all columns */
     public Iterator iterator() {
         return this.columns.iterator();
     }
-    
+
     /*
     private void createColumnsFromFirstRow() {
-        //TODO Create oldColumns from first row here 
+        //TODO Create oldColumns from first row here
         //--> rule 2 in "fixed table layout", see CSS2, 17.5.2
         //Alternative: extend oldColumns on-the-fly, but in this case we need the
         //new property evaluation context so proportional-column-width() works
@@ -159,13 +159,13 @@
 
     /**
      * Initializes the column's widths
-     * 
+     *
      */
     private void initializeColumnWidths() {
-        
+
         TableColumn col;
         Length colWidth;
-        
+
         for (int i = columns.size(); --i >= 0;) {
             if (columns.get(i) != null) {
                 col = (TableColumn) columns.get(i);
@@ -175,21 +175,21 @@
         }
         colWidths.add(0, null);
     }
-    
+
     /**
      * Works out the base unit for resolving proportional-column-width()
      * [p-c-w(x) = x * base_unit_ipd]
-     * 
+     *
      * @param tlm   the TableLayoutManager
      * @return the computed base unit (in millipoint)
      */
     protected double computeTableUnit(TableLayoutManager tlm) {
-        
+
         int sumCols = 0;
         float factors = 0;
         double unit = 0;
-        
-        /* calculate the total width (specified absolute/percentages), 
+
+        /* calculate the total width (specified absolute/percentages),
          * and work out the total number of factors to use to distribute
          * the remaining space (if any)
          */
@@ -204,9 +204,9 @@
                 }
             }
         }
-        
-        /* distribute the remaining space over the accumulated 
-         * factors (if any) 
+
+        /* distribute the remaining space over the accumulated
+         * factors (if any)
          */
         if (factors > 0) {
             if (sumCols < tlm.getContentAreaIPD()) {
@@ -215,10 +215,10 @@
                 log.warn("No space remaining to distribute over columns.");
             }
         }
-        
+
         return unit;
     }
-    
+
     /**
      * @param col column index (1 is first column)
      * @param context the context for percentage based calculations
@@ -258,5 +258,5 @@
         }
         return sum;
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -66,7 +66,7 @@
         int breakBefore = Constants.EN_AUTO;
         TableRow firstRow = rowGroup[0].getTableRow();
         if (firstRow != null) {
-            breakBefore = firstRow.getBreakBefore(); 
+            breakBefore = firstRow.getBreakBefore();
         }
         context.setBreakBefore(BreakUtil.compareBreakClasses(breakBefore,
                 rowGroup[0].getBreakBefore()));
@@ -74,7 +74,7 @@
         int breakAfter = Constants.EN_AUTO;
         TableRow lastRow = rowGroup[rowGroup.length - 1].getTableRow();
         if (lastRow != null) {
-            breakAfter = lastRow.getBreakAfter(); 
+            breakAfter = lastRow.getBreakAfter();
         }
         context.setBreakAfter(BreakUtil.compareBreakClasses(breakAfter,
                 rowGroup[rowGroup.length - 1].getBreakAfter()));
@@ -89,7 +89,7 @@
      * @param bodyType Indicates what kind of body is being processed (BODY, HEADER or FOOTER)
      * @param returnList List to received the generated elements
      */
-    private void createElementsForRowGroup(LayoutContext context, int alignment, 
+    private void createElementsForRowGroup(LayoutContext context, int alignment,
             int bodyType, LinkedList returnList) {
         log.debug("Handling row group with " + rowGroup.length + " rows...");
         EffRow row;
@@ -113,7 +113,7 @@
                     LayoutContext childLC = new LayoutContext(0);
                     childLC.setStackLimitBP(context.getStackLimitBP()); //necessary?
                     childLC.setRefIPD(spanWidth);
-                    
+
                     //Get the element list for the cell contents
                     List elems = primary.getCellLM().getNextKnuthElements(
                                             childLC, alignment);
@@ -131,7 +131,7 @@
     /**
      * Calculate the heights of the rows in the row group, see CSS21, 17.5.3 Table height
      * algorithms.
-     * 
+     *
      * TODO this method will need to be adapted once clarification has been made by the
      * W3C regarding whether borders or border-separation must be included or not
      */
@@ -174,7 +174,7 @@
                     int borderWidths = primary.getBeforeAfterBorderWidth();
                     int padding = 0;
                     CommonBorderPaddingBackground cbpb = primary.getCell()
-                            .getCommonBorderPaddingBackground(); 
+                            .getCommonBorderPaddingBackground();
                     padding += cbpb.getPaddingBefore(false, primary.getCellLM());
                     padding += cbpb.getPaddingAfter(false, primary.getCellLM());
                     int effRowHeight = effectiveCellBPD + padding + borderWidths;
@@ -195,13 +195,13 @@
 //            if (maxCellBPD > row.getExplicitHeight().max) {
 //old:
 //                log.warn(FONode.decorateWithContextInfo(
-//                        "The contents of row " + (row.getIndex() + 1) 
+//                        "The contents of row " + (row.getIndex() + 1)
 //                        + " are taller than they should be (there is a"
 //                        + " block-progression-dimension or height constraint
 //                        + " on the indicated row)."
 //                        + " Due to its contents the row grows"
 //                        + " to " + maxCellBPD + " millipoints, but the row shouldn't get"
-//                        + " any taller than " + row.getExplicitHeight() + " millipoints.", 
+//                        + " any taller than " + row.getExplicitHeight() + " millipoints.",
 //                        row.getTableRow()));
 //new (with events):
 //                BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Factory.create(



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