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 vh...@apache.org on 2008/07/24 11:37:16 UTC

svn commit: r679326 [17/33] - in /xmlgraphics/fop/trunk: examples/embedding/java/embedding/ examples/embedding/java/embedding/events/ examples/embedding/java/embedding/intermediate/ examples/embedding/java/embedding/model/ examples/embedding/java/embed...

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceResolver.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceResolver.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceResolver.java Thu Jul 24 02:35:34 2008
@@ -37,19 +37,19 @@
 
     /** Logger instance */
     protected static Log log = LogFactory.getLog(SpaceResolver.class);
-    
+
     private UnresolvedListElementWithLength[] firstPart;
     private BreakElement breakPoss;
     private UnresolvedListElementWithLength[] secondPart;
     private UnresolvedListElementWithLength[] noBreak;
-    
+
     private MinOptMax[] firstPartLengths;
     private MinOptMax[] secondPartLengths;
     private MinOptMax[] noBreakLengths;
-    
+
     private boolean isFirst;
     private boolean isLast;
-    
+
     /**
      * Main constructor.
      * @param first Element list before a break (optional)
@@ -58,7 +58,7 @@
      * @param isFirst Resolution at the beginning of a (full) element list
      * @param isLast Resolution at the end of a (full) element list
      */
-    private SpaceResolver(List first, BreakElement breakPoss, List second, 
+    private SpaceResolver(List first, BreakElement breakPoss, List second,
             boolean isFirst, boolean isLast) {
         this.isFirst = isFirst;
         this.isLast = isLast;
@@ -95,14 +95,14 @@
         if (breakPoss != null) {
             if (breakPoss.getPendingAfterMarks() != null) {
                 if (log.isTraceEnabled()) {
-                    log.trace("    adding pending before break: " 
+                    log.trace("    adding pending before break: "
                             + breakPoss.getPendingAfterMarks());
                 }
                 first.addAll(0, breakPoss.getPendingAfterMarks());
             }
             if (breakPoss.getPendingBeforeMarks() != null) {
                 if (log.isTraceEnabled()) {
-                    log.trace("    adding pending after break: " 
+                    log.trace("    adding pending after break: "
                             + breakPoss.getPendingBeforeMarks());
                 }
                 second.addAll(0, breakPoss.getPendingBeforeMarks());
@@ -134,7 +134,7 @@
         }
         resolve();
     }
-    
+
     private String toString(Object[] arr1, Object[] arr2) {
         if (arr1.length != arr2.length) {
             new IllegalArgumentException("The length of both arrays must be equal");
@@ -151,7 +151,7 @@
         sb.append("]");
         return sb.toString();
     }
-    
+
     private void removeConditionalBorderAndPadding(
                 UnresolvedListElement[] elems, MinOptMax[] lengths, boolean reverse) {
         for (int i = 0; i < elems.length; i++) {
@@ -175,7 +175,7 @@
             log.trace("-->Resulting list: " + toString(elems, lengths));
         }
     }
-    
+
     private void performSpaceResolutionRule1(UnresolvedListElement[] elems, MinOptMax[] lengths,
                     boolean reverse) {
         for (int i = 0; i < elems.length; i++) {
@@ -204,14 +204,14 @@
         }
     }
 
-    private void performSpaceResolutionRules2to3(UnresolvedListElement[] elems, 
+    private void performSpaceResolutionRules2to3(UnresolvedListElement[] elems,
             MinOptMax[] lengths, int start, int end) {
         if (log.isTraceEnabled()) {
             log.trace("rule 2-3: " + start + "-" + end);
         }
         SpaceElement space;
         int remaining;
-        
+
         //Rule 2 (4.3.1, XSL 1.0)
         boolean hasForcing = false;
         remaining = 0;
@@ -237,7 +237,7 @@
                 space = (SpaceElement)elems[i];
                 if (!space.isForcing()) {
                     if (log.isDebugEnabled()) {
-                        log.debug("Nulling non-forcing space-specifier using 4.3.1, rule 2: " 
+                        log.debug("Nulling non-forcing space-specifier using 4.3.1, rule 2: "
                                 + elems[i]);
                     }
                     lengths[i] = null;
@@ -245,7 +245,7 @@
             }
             return; //If rule is triggered skip rule 3
         }
-        
+
         //Rule 3 (4.3.1, XSL 1.0)
         //Determine highes precedence
         int highestPrecedence = Integer.MIN_VALUE;
@@ -269,8 +269,8 @@
             space = (SpaceElement)elems[i];
             if (space.getPrecedence() != highestPrecedence) {
                 if (log.isDebugEnabled()) {
-                    log.debug("Nulling space-specifier with precedence " 
-                            + space.getPrecedence() + " using 4.3.1, rule 3: " 
+                    log.debug("Nulling space-specifier with precedence "
+                            + space.getPrecedence() + " using 4.3.1, rule 3: "
                             + elems[i]);
                 }
                 lengths[i] = null;
@@ -295,7 +295,7 @@
             if (space.getLength().opt < greatestOptimum) {
                 if (log.isDebugEnabled()) {
                     log.debug("Nulling space-specifier with smaller optimum length "
-                            + "using 4.3.1, rule 3: " 
+                            + "using 4.3.1, rule 3: "
                             + elems[i]);
                 }
                 lengths[i] = null;
@@ -318,7 +318,7 @@
             max = Math.min(max, space.getLength().max);
             if (remaining > 1) {
                 if (log.isDebugEnabled()) {
-                    log.debug("Nulling non-last space-specifier using 4.3.1, rule 3, second part: " 
+                    log.debug("Nulling non-last space-specifier using 4.3.1, rule 3, second part: "
                             + elems[i]);
                 }
                 lengths[i] = null;
@@ -334,7 +334,7 @@
             log.trace("-->Resulting list: " + toString(elems, lengths));
         }
     }
-    
+
     private void performSpaceResolutionRules2to3(UnresolvedListElement[] elems,
             MinOptMax[] lengths) {
         int start = 0;
@@ -354,15 +354,15 @@
             start = i;
         }
     }
-    
+
     private boolean hasFirstPart() {
         return firstPart != null && firstPart.length > 0;
     }
-    
+
     private boolean hasSecondPart() {
         return secondPart != null && secondPart.length > 0;
     }
-    
+
     private void resolve() {
         if (breakPoss != null) {
             if (hasFirstPart()) {
@@ -387,7 +387,7 @@
                 removeConditionalBorderAndPadding(firstPart, firstPartLengths, true);
                 performSpaceResolutionRule1(firstPart, firstPartLengths, true);
             }
-            
+
             if (hasFirstPart()) {
                 //Now that we've handled isFirst/isLast conditions, we need to look at the
                 //active part in its normal order so swap it back.
@@ -408,7 +408,7 @@
             performSpaceResolutionRules2to3(secondPart, secondPartLengths);
         }
     }
-    
+
     private MinOptMax sum(MinOptMax[] lengths) {
         MinOptMax sum = new MinOptMax();
         for (int i = 0; i < lengths.length; i++) {
@@ -418,7 +418,7 @@
         }
         return sum;
     }
-    
+
     private void generate(ListIterator iter) {
         MinOptMax noBreakLength = new MinOptMax();
         MinOptMax glue1; //space before break possibility if break occurs
@@ -427,12 +427,12 @@
         glue1 = sum(firstPartLengths);
         glue3 = sum(secondPartLengths);
         noBreakLength = sum(noBreakLengths);
-        
+
         //This doesn't produce the right glue2
         //glue2 = new MinOptMax(noBreakLength);
         //glue2.subtract(glue1);
         //glue2.subtract(glue3);
-        
+
         int glue2w = noBreakLength.opt - glue1.opt - glue3.opt;
         int glue2stretch = (noBreakLength.max - noBreakLength.opt);
         int glue2shrink = (noBreakLength.opt - noBreakLength.min);
@@ -440,34 +440,34 @@
         glue2stretch -= glue3.max - glue3.opt;
         glue2shrink -= glue1.opt - glue1.min;
         glue2shrink -= glue3.opt - glue3.min;
-        
+
         boolean hasPrecedingNonBlock = false;
         if (log.isDebugEnabled()) {
-            log.debug("noBreakLength=" + noBreakLength 
-                    + ", glue1=" + glue1 
-                    + ", glue2=" + glue2w + "+" + glue2stretch + "-" + glue2shrink 
+            log.debug("noBreakLength=" + noBreakLength
+                    + ", glue1=" + glue1
+                    + ", glue2=" + glue2w + "+" + glue2stretch + "-" + glue2shrink
                     + ", glue3=" + glue3);
         }
         if (breakPoss != null) {
             boolean forcedBreak = breakPoss.isForcedBreak();
             if (glue1.isNonZero()) {
-                iter.add(new KnuthPenalty(0, KnuthPenalty.INFINITE, 
+                iter.add(new KnuthPenalty(0, KnuthPenalty.INFINITE,
                         false, (Position)null, true));
-                iter.add(new KnuthGlue(glue1.opt, glue1.max - glue1.opt, glue1.opt - glue1.min, 
+                iter.add(new KnuthGlue(glue1.opt, glue1.max - glue1.opt, glue1.opt - glue1.min,
                         (Position)null, true));
                 if (forcedBreak) {
                     //Otherwise, the preceding penalty and glue will be cut off
                     iter.add(new KnuthBox(0, (Position)null, true));
                 }
             }
-            iter.add(new KnuthPenalty(breakPoss.getPenaltyWidth(), breakPoss.getPenaltyValue(), 
-                    false, breakPoss.getBreakClass(), 
+            iter.add(new KnuthPenalty(breakPoss.getPenaltyWidth(), breakPoss.getPenaltyValue(),
+                    false, breakPoss.getBreakClass(),
                     new SpaceHandlingBreakPosition(this, breakPoss), false));
             if (breakPoss.getPenaltyValue() <= -KnuthPenalty.INFINITE) {
                 return; //return early. Not necessary (even wrong) to add additional elements
             }
             if (glue2w != 0 || glue2stretch != 0 || glue2shrink != 0) {
-                iter.add(new KnuthGlue(glue2w, glue2stretch, glue2shrink, 
+                iter.add(new KnuthGlue(glue2w, glue2stretch, glue2shrink,
                         (Position)null, true));
             }
         } else {
@@ -483,9 +483,9 @@
             iter.add(new KnuthBox(0, pos, true));
         }
         if (glue3.isNonZero()) {
-            iter.add(new KnuthPenalty(0, KnuthPenalty.INFINITE, 
+            iter.add(new KnuthPenalty(0, KnuthPenalty.INFINITE,
                     false, (Position)null, true));
-            iter.add(new KnuthGlue(glue3.opt, glue3.max - glue3.opt, glue3.opt - glue3.min, 
+            iter.add(new KnuthGlue(glue3.opt, glue3.max - glue3.opt, glue3.opt - glue3.min,
                     (Position)null, true));
             hasPrecedingNonBlock = true;
         }
@@ -494,7 +494,7 @@
             iter.add(new KnuthBox(0, (Position)null, true));
         }
     }
-    
+
     /**
      * Position class for break possibilities. It is used to notify layout manager about the
      * effective spaces and conditional lengths.
@@ -503,11 +503,11 @@
 
         private SpaceResolver resolver;
         private Position originalPosition;
-        
+
         /**
          * Main constructor.
          * @param resolver the space resolver that provides the info about the actual situation
-         * @param breakPoss the original break possibility that creates this Position 
+         * @param breakPoss the original break possibility that creates this Position
          */
         public SpaceHandlingBreakPosition(SpaceResolver resolver, BreakElement breakPoss) {
             super(null);
@@ -518,18 +518,18 @@
                 this.originalPosition = this.originalPosition.getPosition();
             }
         }
-        
+
         /** @return the space resolver */
         public SpaceResolver getSpaceResolver() {
             return this.resolver;
         }
-        
+
         /**
          * Notifies all affected layout managers about the current situation in the part to be
          * handled for area generation.
          * @param isBreakSituation true if this is a break situation.
          * @param side defines to notify about the situation whether before or after the break.
-         *             May be null if isBreakSituation is null. 
+         *             May be null if isBreakSituation is null.
          */
         public void notifyBreakSituation(boolean isBreakSituation, RelSide side) {
             if (isBreakSituation) {
@@ -548,7 +548,7 @@
                 }
             }
         }
-        
+
         /** {@inheritDoc} */
         public String toString() {
             StringBuffer sb = new StringBuffer();
@@ -558,7 +558,7 @@
             return sb.toString();
         }
 
-        /** 
+        /**
          * @return the original Position instance set at the BreakElement that this Position was
          *         created for.
          */
@@ -566,7 +566,7 @@
             return this.originalPosition;
         }
     }
-    
+
     /**
      * Position class for no-break situations. It is used to notify layout manager about the
      * effective spaces and conditional lengths.
@@ -574,7 +574,7 @@
     public static class SpaceHandlingPosition extends Position {
 
         private SpaceResolver resolver;
-        
+
         /**
          * Main constructor.
          * @param resolver the space resolver that provides the info about the actual situation
@@ -583,12 +583,12 @@
             super(null);
             this.resolver = resolver;
         }
-        
+
         /** @return the space resolver */
         public SpaceResolver getSpaceResolver() {
             return this.resolver;
         }
-        
+
         /**
          * Notifies all affected layout managers about the current situation in the part to be
          * handled for area generation.
@@ -601,7 +601,7 @@
                 resolver.secondPart[i].notifyLayoutManager(resolver.secondPartLengths[i]);
             }
         }
-        
+
         /** {@inheritDoc} */
         public String toString() {
             StringBuffer sb = new StringBuffer();
@@ -609,7 +609,7 @@
             return sb.toString();
         }
     }
-    
+
     /**
      * Resolves unresolved elements applying the space resolution rules defined in 4.3.1.
      * @param elems the element list
@@ -673,7 +673,7 @@
                     unresolvedSecond = unresolvedFirst;
                     unresolvedFirst = swapList;
                 }
-                
+
                 log.debug("----start space resolution (first=" + first + ", last=" + last + ")...");
                 SpaceResolver resolver = new SpaceResolver(
                         unresolvedFirst, breakPoss, unresolvedSecond, first, last);
@@ -689,7 +689,7 @@
             first = false;
         }
     }
-    
+
     /**
      * Inspects an effective element list and notifies all layout managers about the state of
      * the spaces and conditional lengths.
@@ -699,7 +699,7 @@
      * @param prevBreak index of the the break possibility just before this part (used to
      *                  identify a break condition, lastBreak <= 0 represents a no-break condition)
      */
-    public static void performConditionalsNotification(List effectiveList, 
+    public static void performConditionalsNotification(List effectiveList,
             int startElementIndex, int endElementIndex, int prevBreak) {
         KnuthElement el = null;
         if (prevBreak > 0) {
@@ -710,7 +710,7 @@
         if (el != null && el.isPenalty()) {
             Position pos = el.getPosition();
             if (pos instanceof SpaceResolver.SpaceHandlingBreakPosition) {
-                beforeBreak = (SpaceResolver.SpaceHandlingBreakPosition)pos; 
+                beforeBreak = (SpaceResolver.SpaceHandlingBreakPosition)pos;
                 beforeBreak.notifyBreakSituation(true, RelSide.BEFORE);
             }
         }
@@ -718,7 +718,7 @@
         if (el != null && el.isPenalty()) {
             Position pos = el.getPosition();
             if (pos instanceof SpaceResolver.SpaceHandlingBreakPosition) {
-                afterBreak = (SpaceResolver.SpaceHandlingBreakPosition)pos; 
+                afterBreak = (SpaceResolver.SpaceHandlingBreakPosition)pos;
                 afterBreak.notifyBreakSituation(true, RelSide.AFTER);
             }
         }
@@ -735,7 +735,7 @@
             }
         }
     }
-    
-    
+
+
 
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/SpaceSpecifier.java Thu Jul 24 02:35:34 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.
@@ -52,7 +52,7 @@
         try {
             SpaceSpecifier ss = (SpaceSpecifier) super.clone();
             ss.startsReferenceArea = startsReferenceArea;
-            ss.hasForcing = hasForcing;            
+            ss.hasForcing = hasForcing;
             // Clone the vector, but share the objects in it!
             ss.spaceVals = new ArrayList();
             ss.spaceVals.addAll(spaceVals);
@@ -152,7 +152,7 @@
         }
         return resolvedSpace;
     }
-    
+
     public String toString() {
         return "Space Specifier (resolved at begin/end of ref. area:):\n" +
             resolve(false).toString() + "\n" +

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java Thu Jul 24 02:35:34 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;
 
 import java.util.LinkedList;
@@ -66,7 +66,7 @@
      * @param node static-content FO
      * @param reg side region to layout into
      */
-    public StaticContentLayoutManager(PageSequenceLayoutManager pslm, 
+    public StaticContentLayoutManager(PageSequenceLayoutManager pslm,
             StaticContent node, SideRegion reg) {
         super(node);
         setParent(pslm);
@@ -80,11 +80,11 @@
      * @param node static-content FO
      * @param block the block to layout into
      */
-    public StaticContentLayoutManager(PageSequenceLayoutManager pslm, 
+    public StaticContentLayoutManager(PageSequenceLayoutManager pslm,
             StaticContent node, Block block) {
         super(node);
         setParent(pslm);
-        targetBlock = block; 
+        targetBlock = block;
     }
 
     /** {@inheritDoc} */
@@ -98,7 +98,7 @@
         setContentAreaIPD(context.getRefIPD());
         setContentAreaBPD(context.getStackLimitBP().opt);
 
-        //TODO Copied from elsewhere. May be worthwhile to factor out the common parts. 
+        //TODO Copied from elsewhere. May be worthwhile to factor out the common parts.
         // currently active LM
         BlockLevelLayoutManager curLM;
         BlockLevelLayoutManager prevLM = null;
@@ -122,7 +122,7 @@
 
             // get elements from curLM
             returnedList = curLM.getNextKnuthElements(childLC, alignment);
-            //log.debug("FLM.getNextKnuthElements> returnedList.size() = " 
+            //log.debug("FLM.getNextKnuthElements> returnedList.size() = "
             //    + returnedList.size());
 
             // "wrap" the Position inside each element
@@ -148,8 +148,8 @@
                     if (prevLM.mustKeepWithNext()
                         || curLM.mustKeepWithPrevious()) {
                         // add an infinite penalty to forbid a break between blocks
-                        returnList.add(new KnuthPenalty(0, 
-                                KnuthElement.INFINITE, false, 
+                        returnList.add(new KnuthPenalty(0,
+                                KnuthElement.INFINITE, false,
                                 new Position(this), false));
                     } else if (!((KnuthElement) ListUtil.getLast(returnList))
                             .isGlue()) {
@@ -180,9 +180,9 @@
             return returnList;
         }
     }
-    
+
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {
         AreaAdditionUtil.addAreas(this, parentIter, layoutContext);
@@ -246,10 +246,10 @@
         if (breaker.isOverflow()) {
             if (!autoHeight) {
                 String page = getPSLM().getCurrentPage().getPageViewport().getPageNumberString();
-                
+
                 BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider.get(
                         getStaticContentFO().getUserAgent().getEventBroadcaster());
-                boolean canRecover = (regionFO.getOverflow() != EN_ERROR_IF_OVERFLOW); 
+                boolean canRecover = (regionFO.getOverflow() != EN_ERROR_IF_OVERFLOW);
                 boolean needClip = (regionFO.getOverflow() == Constants.EN_HIDDEN
                         || regionFO.getOverflow() == Constants.EN_ERROR_IF_OVERFLOW);
                 eventProducer.regionOverflow(this, regionFO.getName(),
@@ -259,7 +259,7 @@
             }
         }
     }
-    
+
     /**
      * Convenience method that returns the Static Content node.
      * @return the static content node
@@ -268,13 +268,13 @@
         return (StaticContent) fobj;
     }
 
-    private class StaticContentBreaker extends AbstractBreaker {       
+    private class StaticContentBreaker extends AbstractBreaker {
         private StaticContentLayoutManager lm;
         private int displayAlign;
         private int ipd;
         private int overflow = 0;
-        
-        public StaticContentBreaker(StaticContentLayoutManager lm, int ipd, 
+
+        public StaticContentBreaker(StaticContentLayoutManager lm, int ipd,
                 int displayAlign) {
             this.lm = lm;
             this.ipd = ipd;
@@ -290,7 +290,7 @@
             }
             ElementListObserver.observe(elementList, "static-content", elementListID);
         }
-        
+
         /** {@inheritDoc} */
         protected boolean isPartOverflowRecoveryActivated() {
             //For side regions, this must be disabled because of wanted overflow.
@@ -300,11 +300,11 @@
         public boolean isOverflow() {
             return (this.overflow != 0);
         }
-        
+
         public int getOverflowAmount() {
             return this.overflow;
         }
-        
+
         /** {@inheritDoc} */
         protected PageBreakingLayoutListener createLayoutListener() {
             return new PageBreakingLayoutListener() {
@@ -314,7 +314,7 @@
                         StaticContentBreaker.this.overflow = amount;
                     }
                 }
-                
+
             };
         }
 
@@ -327,7 +327,7 @@
             lc.setRefIPD(ipd);
             return lc;
         }
-        
+
         protected List getNextKnuthElements(LayoutContext context, int alignment) {
             LayoutManager curLM; // currently active LM
             List returnList = new LinkedList();
@@ -339,7 +339,7 @@
                 childLC.setWritingMode(context.getWritingMode());
 
                 List returnedList = null;
-                //The following is a HACK! Ignore leading and trailing white space 
+                //The following is a HACK! Ignore leading and trailing white space
                 boolean ignore = curLM instanceof TextLayoutManager;
                 if (!curLM.isFinished()) {
                     returnedList = curLM.getNextKnuthElements(childLC, alignment);
@@ -356,39 +356,39 @@
         protected int getCurrentDisplayAlign() {
             return displayAlign;
         }
-        
+
         protected boolean hasMoreContent() {
             return !lm.isFinished();
         }
-        
+
         protected void addAreas(PositionIterator posIter, LayoutContext context) {
-            AreaAdditionUtil.addAreas(lm, posIter, context);    
+            AreaAdditionUtil.addAreas(lm, posIter, context);
         }
-        
-        protected void doPhase3(PageBreakingAlgorithm alg, int partCount, 
+
+        protected void doPhase3(PageBreakingAlgorithm alg, int partCount,
                 BlockSequence originalList, BlockSequence effectiveList) {
             if (partCount > 1) {
                 PageBreakPosition pos = (PageBreakPosition)alg.getPageBreaks().getFirst();
                 int firstPartLength = ElementListUtils.calcContentLength(effectiveList,
                         effectiveList.ignoreAtStart, pos.getLeafPos());
-                overflow += alg.totalWidth - firstPartLength;        
-            }         
-            //Rendering all parts (not just the first) at once for the case where the parts that 
+                overflow += alg.totalWidth - firstPartLength;
+            }
+            //Rendering all parts (not just the first) at once for the case where the parts that
             //overflow should be visible.
             alg.removeAllPageBreaks();
             //Directly add areas after finding the breaks
             this.addAreas(alg, 1, originalList, effectiveList);
         }
-        
+
         protected void finishPart(PageBreakingAlgorithm alg, PageBreakPosition pbp) {
             //nop for static content
         }
-        
+
         protected LayoutManager getCurrentChildLM() {
             return null; //TODO NYI
         }
-    } 
-    
+    }
+
     /**
      * Returns the IPD of the content area
      * @return the IPD of the content area
@@ -396,12 +396,12 @@
     public int getContentAreaIPD() {
         return contentAreaIPD;
     }
-   
+
     /** {@inheritDoc} */
     protected void setContentAreaIPD(int contentAreaIPD) {
         this.contentAreaIPD = contentAreaIPD;
     }
-    
+
     /**
      * Returns the BPD of the content area
      * @return the BPD of the content area
@@ -409,16 +409,16 @@
     public int getContentAreaBPD() {
         return contentAreaBPD;
     }
-    
+
     private void setContentAreaBPD(int contentAreaBPD) {
         this.contentAreaBPD = contentAreaBPD;
     }
-    
+
     /** {@inheritDoc} */
     public int getKeepTogetherStrength() {
         return KEEP_AUTO;
     }
-    
+
     /** {@inheritDoc} */
     public int getKeepWithNextStrength() {
         return KEEP_AUTO;
@@ -428,6 +428,6 @@
     public int getKeepWithPreviousStrength() {
         return KEEP_AUTO;
     }
-    
+
 }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TopLevelLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TopLevelLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TopLevelLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TopLevelLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -29,7 +29,7 @@
 
     /**
      * Activate the layout of this page sequence.
-     * PageViewports corresponding to each page generated by this 
+     * PageViewports corresponding to each page generated by this
      * page sequence will be created and sent to the AreaTreeModel
      * for rendering.
      */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TraitSetter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TraitSetter.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TraitSetter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/TraitSetter.java Thu Jul 24 02:35:34 2008
@@ -42,7 +42,7 @@
 
     /** logger */
     protected static Log log = LogFactory.getLog(TraitSetter.class);
-    
+
     /**
      * Sets border and padding traits on areas.
      * @param area area to set the traits on
@@ -73,18 +73,18 @@
         }
 
         addBorderTrait(area, bpProps, bNotFirst,
-                       CommonBorderPaddingBackground.START, 
+                       CommonBorderPaddingBackground.START,
                        BorderProps.SEPARATE, Trait.BORDER_START);
 
-        addBorderTrait(area, bpProps, bNotLast, 
+        addBorderTrait(area, bpProps, bNotLast,
                        CommonBorderPaddingBackground.END,
                        BorderProps.SEPARATE, Trait.BORDER_END);
 
-        addBorderTrait(area, bpProps, false, 
+        addBorderTrait(area, bpProps, false,
                        CommonBorderPaddingBackground.BEFORE,
                        BorderProps.SEPARATE, Trait.BORDER_BEFORE);
 
-        addBorderTrait(area, bpProps, false, 
+        addBorderTrait(area, bpProps, false,
                        CommonBorderPaddingBackground.AFTER,
                        BorderProps.SEPARATE, Trait.BORDER_AFTER);
     }
@@ -182,7 +182,7 @@
      * @param borderAfter the resolved after border
      * @param borderStart the resolved start border
      * @param borderEnd the resolved end border
-     * @param outer 4 boolean values indicating if the side represents the 
+     * @param outer 4 boolean values indicating if the side represents the
      *     table's outer border. Order: before, after, start, end
      */
     public static void addCollapsingBorders(Area area,
@@ -207,7 +207,7 @@
         }
     }
 
-    private static void addPadding(Area area, CommonBorderPaddingBackground bordProps, 
+    private static void addPadding(Area area, CommonBorderPaddingBackground bordProps,
                                 PercentBaseContext context) {
         addPadding(area, bordProps, false, false, false, false, context);
     }
@@ -228,32 +228,32 @@
                 boolean discardBefore, boolean discardAfter,
                 boolean discardStart, boolean discardEnd,
                 PercentBaseContext context) {
-        int padding = bordProps.getPadding(CommonBorderPaddingBackground.BEFORE, 
+        int padding = bordProps.getPadding(CommonBorderPaddingBackground.BEFORE,
                 discardBefore, context);
         if (padding != 0) {
             area.addTrait(Trait.PADDING_BEFORE, new java.lang.Integer(padding));
         }
 
-        padding = bordProps.getPadding(CommonBorderPaddingBackground.AFTER, 
+        padding = bordProps.getPadding(CommonBorderPaddingBackground.AFTER,
                 discardAfter, context);
         if (padding != 0) {
             area.addTrait(Trait.PADDING_AFTER, new java.lang.Integer(padding));
         }
 
-        padding = bordProps.getPadding(CommonBorderPaddingBackground.START, 
+        padding = bordProps.getPadding(CommonBorderPaddingBackground.START,
                 discardStart, context);
         if (padding != 0) {
             area.addTrait(Trait.PADDING_START, new java.lang.Integer(padding));
         }
 
-        padding = bordProps.getPadding(CommonBorderPaddingBackground.END, 
+        padding = bordProps.getPadding(CommonBorderPaddingBackground.END,
                 discardEnd, context);
         if (padding != 0) {
             area.addTrait(Trait.PADDING_END, new java.lang.Integer(padding));
         }
 
     }
-    
+
     private static BorderProps getBorderProps(CommonBorderPaddingBackground bordProps, int side) {
         int width = bordProps.getBorderWidth(side, false);
         if (width != 0) {
@@ -289,17 +289,17 @@
      * background-position-horizontal/vertical to ensure the background images are
      * correctly placed. Indeed the placement of images must be made WRT the
      * column/body/row and not the cell.
-     * 
+     *
      * <p>Note: The area's IPD and BPD must be set before calling this method.</p>
-     * 
+     *
      * <p>TODO the regular
      * {@link #addBackground(Area, CommonBorderPaddingBackground, PercentBaseContext)}
      * method should be used instead, and a means to retrieve the original area's
      * dimensions must be found.</p>
-     * 
+     *
      * <p>TODO the placement of images in the x- or y-direction will be incorrect if
      * background-repeat is set for that direction.</p>
-     * 
+     *
      * @param area the area to set the traits on
      * @param backProps the background properties
      * @param context Property evaluation context
@@ -310,7 +310,7 @@
      * @param referenceIPD value to use as a reference for percentage calculation
      * @param referenceBPD value to use as a reference for percentage calculation
      */
-    public static void addBackground(Area area, 
+    public static void addBackground(Area area,
             CommonBorderPaddingBackground backProps,
             PercentBaseContext context,
             int ipdShift, int bpdShift, int referenceIPD, int referenceBPD) {
@@ -325,7 +325,7 @@
             back.setImageInfo(backProps.getImageInfo());
             back.setRepeat(backProps.backgroundRepeat);
             if (backProps.backgroundPositionHorizontal != null) {
-                if (back.getRepeat() == Constants.EN_NOREPEAT 
+                if (back.getRepeat() == Constants.EN_NOREPEAT
                         || back.getRepeat() == Constants.EN_REPEATY) {
                     if (area.getIPD() > 0) {
                         PercentBaseContext refContext = new SimplePercentBaseContext(context,
@@ -343,7 +343,7 @@
                 }
             }
             if (backProps.backgroundPositionVertical != null) {
-                if (back.getRepeat() == Constants.EN_NOREPEAT 
+                if (back.getRepeat() == Constants.EN_NOREPEAT
                         || back.getRepeat() == Constants.EN_REPEATX) {
                     if (area.getBPD() > 0) {
                         PercentBaseContext refContext = new SimplePercentBaseContext(context,
@@ -373,7 +373,7 @@
      * @param backProps the background properties
      * @param context Property evaluation context
      */
-    public static void addBackground(Area area, 
+    public static void addBackground(Area area,
                                      CommonBorderPaddingBackground backProps,
                                      PercentBaseContext context) {
         if (!backProps.hasBackground()) {
@@ -387,14 +387,14 @@
             back.setImageInfo(backProps.getImageInfo());
             back.setRepeat(backProps.backgroundRepeat);
             if (backProps.backgroundPositionHorizontal != null) {
-                if (back.getRepeat() == Constants.EN_NOREPEAT 
+                if (back.getRepeat() == Constants.EN_NOREPEAT
                         || back.getRepeat() == Constants.EN_REPEATY) {
                     if (area.getIPD() > 0) {
                         int width = area.getIPD();
                         width += backProps.getPaddingStart(false, context);
                         width += backProps.getPaddingEnd(false, context);
                         back.setHoriz(backProps.backgroundPositionHorizontal.getValue(
-                                new SimplePercentBaseContext(context, 
+                                new SimplePercentBaseContext(context,
                                     LengthBase.IMAGE_BACKGROUND_POSITION_HORIZONTAL,
                                     (width - back.getImageInfo().getSize().getWidthMpt())
                                 )
@@ -408,14 +408,14 @@
                 }
             }
             if (backProps.backgroundPositionVertical != null) {
-                if (back.getRepeat() == Constants.EN_NOREPEAT 
+                if (back.getRepeat() == Constants.EN_NOREPEAT
                         || back.getRepeat() == Constants.EN_REPEATX) {
                     if (area.getBPD() > 0) {
                         int height = area.getBPD();
                         height += backProps.getPaddingBefore(false, context);
                         height += backProps.getPaddingAfter(false, context);
                         back.setVertical(backProps.backgroundPositionVertical.getValue(
-                                new SimplePercentBaseContext(context, 
+                                new SimplePercentBaseContext(context,
                                      LengthBase.IMAGE_BACKGROUND_POSITION_VERTICAL,
                                      (height - back.getImageInfo().getSize().getHeightMpt())
                                 )
@@ -450,7 +450,7 @@
         if (startIndent != 0) {
             area.addTrait(Trait.START_INDENT, new Integer(startIndent));
         }
-        
+
         int spaceStart = startIndent
                             - bpProps.getBorderStartWidth(false)
                             - bpProps.getPaddingStart(false, context);
@@ -488,7 +488,7 @@
     }
 
     /**
-     * Returns the effective space length of a resolved space specifier based on the adjustment 
+     * Returns the effective space length of a resolved space specifier based on the adjustment
      * value.
      * @param adjust the adjustment value
      * @param space the space specifier
@@ -506,7 +506,7 @@
         }
         return sp;
     }
-    
+
     /**
      * Adds traits for space-before and space-after to an area.
      * @param area the target area
@@ -514,7 +514,7 @@
      * @param spaceBefore the space-before space specifier
      * @param spaceAfter the space-after space specifier
      */
-    public static void addSpaceBeforeAfter(Area area, double adjust, 
+    public static void addSpaceBeforeAfter(Area area, double adjust,
             MinOptMax spaceBefore, MinOptMax spaceAfter) {
         int space;
         space = getEffectiveSpace(adjust, spaceBefore);
@@ -526,7 +526,7 @@
             area.addTrait(Trait.SPACE_AFTER, new Integer(space));
         }
     }
-    
+
     /**
      * Sets the traits for breaks on an area.
      * @param area the area to set the traits on.
@@ -539,7 +539,7 @@
         area.addTrait(Trait.BREAK_BEFORE, new Integer(breakBefore));
         */
     }
-    
+
     /**
      * Adds font traits to an area
      * @param area the target are
@@ -549,7 +549,7 @@
         area.addTrait(Trait.FONT, font.getFontTriplet());
         area.addTrait(Trait.FONT_SIZE, new Integer(font.getFontSize()));
     }
-    
+
     /**
      * Adds the text-decoration traits to the area.
      * @param area the area to set the traits on
@@ -575,9 +575,9 @@
             }
         }
     }
-    
+
     /**
-     * Sets the producer's ID as a trait on the area. This can be used to track back the 
+     * Sets the producer's ID as a trait on the area. This can be used to track back the
      * generating FO node.
      * @param area the area to set the traits on
      * @param id the ID to set

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/UnresolvedListElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/UnresolvedListElement.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/UnresolvedListElement.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/UnresolvedListElement.java Thu Jul 24 02:35:34 2008
@@ -31,10 +31,10 @@
     public UnresolvedListElement(Position position) {
         super(position);
     }
-    
+
     /** @return true if the element is conditional (conditionality="discard") */
     public abstract boolean isConditional();
-    
+
     /** @return the layout manager that created this ListElement */
     protected LayoutManager getOriginatingLayoutManager() {
         Position pos = getPosition();
@@ -43,5 +43,5 @@
         }
         return pos.getLM();
     }
-    
+
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java Thu Jul 24 02:35:34 2008
@@ -31,13 +31,13 @@
 
     /** Logger instance */
     protected static Log log = LogFactory.getLog(UnresolvedListElementWithLength.class);
-    
+
     private MinOptMax length;
     private boolean conditional;
     private RelSide side;
     private boolean isFirst;
     private boolean isLast;
-    
+
     /**
      * Main constructor
      * @param position the Position instance needed by the addAreas stage of the LMs.
@@ -47,7 +47,7 @@
      * @param isFirst true if this is a space-before of the first area generated.
      * @param isLast true if this is a space-after of the last area generated.
      */
-    public UnresolvedListElementWithLength(Position position, MinOptMax length, 
+    public UnresolvedListElementWithLength(Position position, MinOptMax length,
             RelSide side,
             boolean conditional, boolean isFirst, boolean isLast) {
         super(position);
@@ -57,32 +57,32 @@
         this.isFirst = isFirst;
         this.isLast = isLast;
     }
-    
+
     /** {@inheritDoc} */
     public boolean isConditional() {
         return this.conditional;
     }
-    
+
     /** @return the space as resolved MinOptMax instance */
     public MinOptMax getLength() {
         return this.length;
     }
-    
+
     /** @return the side this element was generated for */
     public RelSide getSide() {
         return this.side;
     }
-    
+
     /** @return true if this is a space-before of the first area generated. */
     public boolean isFirst() {
         return this.isFirst;
     }
-    
+
     /** @return true if this is a space-after of the last area generated. */
     public boolean isLast() {
         return this.isLast;
     }
-    
+
     /**
      * Called to notify the affected layout manager about the effective length after resolution.
      * This method is called once before each call to the layout manager's addAreas() method.
@@ -90,7 +90,7 @@
      *                        zero effective length)
      */
     public abstract void notifyLayoutManager(MinOptMax effectiveLength);
-    
+
     /** {@inheritDoc} */
     public String toString() {
         StringBuffer sb = new StringBuffer();
@@ -109,5 +109,5 @@
         }
         return sb.toString();
     }
-    
+
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java Thu Jul 24 02:35:34 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,14 +34,14 @@
 
 
 /**
- * LayoutManager handling the common tasks for the fo:instream-foreign-object 
+ * LayoutManager handling the common tasks for the fo:instream-foreign-object
  * and fo:external-graphics formatting objects
  */
 public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManager {
-    
+
     /**
      * Constructor.
-     * 
+     *
      * @param node
      *            the formatting object that creates this area
      */
@@ -67,17 +67,17 @@
         Rectangle placement = imageLayout.getPlacement();
 
         CommonBorderPaddingBackground borderProps = fobj.getCommonBorderPaddingBackground();
-        
+
         //Determine extra BPD from borders and padding
         int beforeBPD = borderProps.getPadding(CommonBorderPaddingBackground.BEFORE, false, this);
         beforeBPD += borderProps.getBorderWidth(CommonBorderPaddingBackground.BEFORE, false);
-        
+
         placement.y += beforeBPD;
-        
+
         //Determine extra IPD from borders and padding
         int startIPD = borderProps.getPadding(CommonBorderPaddingBackground.START, false, this);
         startIPD += borderProps.getBorderWidth(CommonBorderPaddingBackground.START, false);
-        
+
         placement.x += startIPD;
 
         Area viewportArea = getChildArea();
@@ -101,7 +101,7 @@
 
         return vp;
     }
-    
+
     /** {@inheritDoc} */
     public List getNextKnuthElements(LayoutContext context,
                                            int alignment) {
@@ -109,7 +109,7 @@
         setCurrentArea(areaCurrent);
         return super.getNextKnuthElements(context, alignment);
     }
-    
+
     /** {@inheritDoc} */
     protected AlignmentContext makeAlignmentContext(LayoutContext context) {
         final AbstractGraphics fobj = (AbstractGraphics)this.fobj;
@@ -129,11 +129,11 @@
      * @return the appropriate area
      */
     protected abstract Area getChildArea();
-    
+
     // --------- Property Resolution related functions --------- //
-    
+
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public int getBaseLength(int lengthBase, FObj fobj) {
         switch (lengthBase) {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java Thu Jul 24 02:35:34 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,10 +43,10 @@
     protected AbstractPageNumberCitation fobj;
     /** Font for the page-number-citation */
     protected Font font;
-    
+
     /** Indicates whether the page referred to by the citation has been resolved yet */
     protected boolean resolved = false;
-    
+
     /**
      * Constructor
      *
@@ -57,7 +57,7 @@
         super(node);
         fobj = node;
     }
-    
+
     /** {@inheritDoc} */
     public void initialize() {
         FontInfo fi = fobj.getFOEventHandler().getFontInfo();
@@ -86,10 +86,10 @@
         curArea = getPageNumberCitationInlineArea();
         return curArea;
     }
-    
+
     /**
      * {@inheritDoc}
-     *                                                                      , LayoutContext) 
+     *                                                                      , LayoutContext)
      */
     public void addAreas(PositionIterator posIter, LayoutContext context) {
         super.addAreas(posIter, context);
@@ -97,7 +97,7 @@
             getPSLM().addUnresolvedArea(fobj.getRefId(), (Resolvable) curArea);
         }
     }
-    
+
     /**
      * If id can be resolved then simply return a word, otherwise
      * return a resolvable area
@@ -124,12 +124,12 @@
             text.setIPD(width);
         }
         updateTextAreaTraits(text);
-        
+
         return text;
     }
-    
+
     /**
-     * Updates the traits for the generated text area. 
+     * Updates the traits for the generated text area.
      * @param text the text area
      */
     protected void updateTextAreaTraits(TextArea text) {
@@ -140,7 +140,7 @@
         text.addTrait(Trait.COLOR, fobj.getColor());
         TraitSetter.addTextDecoration(text, fobj.getTextDecoration());
     }
-    
+
     /**
      * @param str string to be measured
      * @return width (in millipoints ??) of the string

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java Thu Jul 24 02:35:34 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.
@@ -47,9 +47,9 @@
     private ScaledBaselineTable scaledBaselineTable = null;
     private ScaledBaselineTable actualBaselineTable = null;
     private AlignmentContext parentAlignmentContext = null;
-    
+
     /**
-     * Creates a new instance of AlignmentContext 
+     * Creates a new instance of AlignmentContext
      * for graphics areas.
      * @param height the total height of the area
      * @param alignmentAdjust the alignment-adjust property
@@ -64,7 +64,7 @@
                             , Length baselineShift
                             , int dominantBaseline
                             , AlignmentContext parentAlignmentContext) {
-        
+
         this.areaHeight = height;
         this.lineHeight = height;
         this.xHeight = height;
@@ -95,18 +95,18 @@
                 break;
         }
         actualBaselineTable = ScaledBaselineTableFactory.makeGraphicsScaledBaselineTable(
-                                                            height, 
-                                                            dominantBaselineIdentifier, 
+                                                            height,
+                                                            dominantBaselineIdentifier,
                                                             scaledBaselineTable.getWritingMode());
         if (newScaledBaselineTableRequired) {
             scaledBaselineTable = ScaledBaselineTableFactory.makeGraphicsScaledBaselineTable(
-                                                            height, 
-                                                            dominantBaselineIdentifier, 
+                                                            height,
+                                                            dominantBaselineIdentifier,
                                                             scaledBaselineTable.getWritingMode());
         }
         setAlignmentAdjust(alignmentAdjust);
     }
-    
+
     /**
      * Creates a new instance of AlignmentContext
      * @param font the font
@@ -153,17 +153,17 @@
                 dominantBaselineIdentifier = dominantBaseline;
                 break;
         }
-        actualBaselineTable = ScaledBaselineTableFactory.makeFontScaledBaselineTable(font, 
-                                                            dominantBaselineIdentifier, 
+        actualBaselineTable = ScaledBaselineTableFactory.makeFontScaledBaselineTable(font,
+                                                            dominantBaselineIdentifier,
                                                             scaledBaselineTable.getWritingMode());
         if (newScaledBaselineTableRequired) {
-            scaledBaselineTable = ScaledBaselineTableFactory.makeFontScaledBaselineTable(font, 
-                                    dominantBaselineIdentifier, 
+            scaledBaselineTable = ScaledBaselineTableFactory.makeFontScaledBaselineTable(font,
+                                    dominantBaselineIdentifier,
                                     scaledBaselineTable.getWritingMode());
         }
         setAlignmentAdjust(alignmentAdjust);
     }
-    
+
     /**
      * Creates a new instance of AlignmentContext based simply
      * on the font and the writing mode.
@@ -176,14 +176,14 @@
         this.lineHeight = lineHeight;
         this.xHeight = font.getXHeight();
         this.parentAlignmentContext = null;
-        this.scaledBaselineTable 
+        this.scaledBaselineTable
                     = ScaledBaselineTableFactory.makeFontScaledBaselineTable(font, writingMode);
         this.actualBaselineTable = scaledBaselineTable;
         this.alignmentBaselineIdentifier = getDominantBaselineIdentifier();
         this.alignmentPoint = font.getAscender();
         this.baselineShiftValue = 0;
     }
-    
+
     /**
      * Returns the alignment point for this context.
      * This is the point on the start edge of the area this context
@@ -251,7 +251,7 @@
         int beforeEdge = actualBaselineTable.getBaseline(EN_BEFORE_EDGE);
         switch (alignmentAdjust.getEnum()) {
             case EN_AUTO:
-                alignmentPoint = beforeEdge 
+                alignmentPoint = beforeEdge
                                     - actualBaselineTable.getBaseline(alignmentBaselineIdentifier);
                 break;
             case EN_BASELINE:
@@ -267,7 +267,7 @@
             case EN_ALPHABETIC:
             case EN_HANGING:
             case EN_MATHEMATICAL:
-                alignmentPoint = beforeEdge 
+                alignmentPoint = beforeEdge
                                     - actualBaselineTable.getBaseline(alignmentAdjust.getEnum());
                 break;
             default:
@@ -294,7 +294,7 @@
     public int getDominantBaselineIdentifier() {
         return scaledBaselineTable.getDominantBaselineIdentifier();
     }
-    
+
     /**
      * Return the writing mode.
      * @return the writing mode
@@ -302,7 +302,7 @@
     public int getWritingMode() {
         return scaledBaselineTable.getWritingMode();
     }
-    
+
     /**
      * Calculates the baseline shift value based on the baseline-shift
      * property value.
@@ -392,11 +392,11 @@
     public int getTotalAlignmentBaselineOffset(int alignmentBaselineId) {
         int offset = baselineShiftValue;
         if (parentAlignmentContext != null) {
-            offset = parentAlignmentContext.getTotalBaselineOffset() 
+            offset = parentAlignmentContext.getTotalBaselineOffset()
                     + parentAlignmentContext.getScaledBaselineTable()
                         .getBaseline(alignmentBaselineId)
                     + baselineShiftValue;
-        } 
+        }
         return offset;
     }
 
@@ -432,7 +432,7 @@
     public int getHeight() {
         return areaHeight;
     }
-    
+
     /**
      * Return the line height of the context.
      * @return the height
@@ -440,7 +440,7 @@
     public int getLineHeight() {
         return lineHeight;
     }
-    
+
     /**
      * The altitude of the context that is the height above the
      * alignment point.
@@ -458,7 +458,7 @@
     public int getDepth() {
         return getHeight() - alignmentPoint;
     }
-    
+
     /**
      * The x height of the context.
      * @return the x height
@@ -466,7 +466,7 @@
     public int getXHeight() {
         return this.xHeight;
     }
-    
+
     /**
      * Resizes the line as specified. Assumes that the new alignment point
      * is on the dominant baseline, that is this function should be called for
@@ -480,7 +480,7 @@
         scaledBaselineTable.setBeforeAndAfterBaselines(alignmentPoint
                                                         , alignmentPoint - areaHeight);
     }
-    
+
     /**
      * Returns the offset from the before-edge of the parent to
      * this context.
@@ -495,7 +495,7 @@
         }
         return offset;
     }
-    
+
     /**
      * Returns an indication if we still use the initial baseline table.
      * The initial baseline table is the table generated by the Line LM.
@@ -506,11 +506,11 @@
                || (scaledBaselineTable == parentAlignmentContext.getScaledBaselineTable()
                     && parentAlignmentContext.usesInitialBaselineTable());
     }
-    
+
     private boolean isHorizontalWritingMode() {
         return (getWritingMode() == EN_LR_TB || getWritingMode() == EN_RL_TB);
     }
-    
+
     /** {@inheritDoc} */
     public String toString() {
         StringBuffer sb = new StringBuffer(64);
@@ -521,5 +521,5 @@
         sb.append(" bs=" + baselineShiftValue);
         return sb.toString();
     }
-    
+
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicLinkLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicLinkLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicLinkLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicLinkLayoutManager.java Thu Jul 24 02:35:34 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.

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicScaledBaselineTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicScaledBaselineTable.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicScaledBaselineTable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BasicScaledBaselineTable.java Thu Jul 24 02:35:34 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,12 +44,12 @@
     private int dominantBaselineOffset;
     private int beforeEdgeOffset;
     private int afterEdgeOffset;
-    
+
     private static final float HANGING_BASELINE_FACTOR = 0.8f;
     private static final float MATHEMATICAL_BASELINE_FACTOR = 0.5f;
 
     /**
-     * 
+     *
      * Creates a new instance of BasicScaledBaselineTable for the given
      * altitude, depth, xHeight, baseline and writingmode.
      * @param altitude the height of the box or the font ascender
@@ -72,7 +72,7 @@
         this.beforeEdgeOffset = altitude - dominantBaselineOffset;
         this.afterEdgeOffset = depth - dominantBaselineOffset;
     }
-    
+
     /**
      * Return the dominant baseline for this baseline table.
      * @return the dominant baseline
@@ -80,7 +80,7 @@
     public int getDominantBaselineIdentifier() {
         return this.dominantBaselineIdentifier;
     }
-    
+
     /**
      * Return the writing mode for this baseline table.
      * @return the writing mode
@@ -132,11 +132,11 @@
         }
         return offset;
     }
-    
+
     private boolean isHorizontalWritingMode() {
         return writingMode == EN_LR_TB || writingMode == EN_RL_TB;
     }
-    
+
     /**
      * Return the baseline offset measured from the font's default
      * baseline for the given baseline.
@@ -171,9 +171,9 @@
         }
         return offset;
     }
-    
+
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public void setBeforeAndAfterBaselines(int beforeBaseline, int afterBaseline) {
         beforeEdgeOffset = beforeBaseline;
@@ -184,7 +184,7 @@
      * {@inheritDoc}
      */
     public ScaledBaselineTable deriveScaledBaselineTable(int baselineIdentifier) {
-        BasicScaledBaselineTable bac 
+        BasicScaledBaselineTable bac
             = new BasicScaledBaselineTable(altitude, depth, xHeight
                                             , baselineIdentifier, this.writingMode);
         return bac;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BidiLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BidiLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BidiLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/BidiLayoutManager.java Thu Jul 24 02:35:34 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.

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/CharacterLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -57,10 +57,10 @@
     public CharacterLayoutManager(Character node) {
         super(node);
     }
-    
+
     /** {@inheritDoc} */
     public void initialize() {
-        Character fobj = (Character)this.fobj;        
+        Character fobj = (Character)this.fobj;
         font = FontSelector.selectFontForCharacter(fobj, this);
         SpaceVal ls = SpaceVal.makeLetterSpacing(fobj.getLetterSpacing());
         letterSpaceIPD = ls.getSpace();
@@ -101,7 +101,7 @@
         }
 
         Character fobj = (Character)this.fobj;
-        
+
         ipd = new MinOptMax(font.getCharWidth(fobj.getCharacter()));
 
         curArea.setIPD(ipd.opt);
@@ -120,7 +120,7 @@
                                     , context.getAlignmentContext());
 
         addKnuthElementsForBorderPaddingStart(seq);
-        
+
         // create the AreaInfo object to store the computed values
         areaInfo = new AreaInfo((short) 0, ipd, false, alignmentContext);
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -176,7 +176,7 @@
         return holder;
     }
 
-    /** 
+    /**
      * {@inheritDoc}
      **/
     public void addChildArea(Area childArea) {
@@ -315,13 +315,13 @@
                                               int alignment) {
         return null;
     }
-    
+
     public PageSequenceLayoutManager getPSLM() {
         return parentLM.getPSLM();
     }
 
     // --------- Property Resolution related functions --------- //
-    
+
     /**
      * Returns the IPD of the content area
      * @return the IPD of the content area
@@ -329,7 +329,7 @@
     public int getContentAreaIPD() {
         return holder.getIPD();
     }
-   
+
     /**
      * Returns the BPD of the content area
      * @return the BPD of the content area
@@ -337,7 +337,7 @@
     public int getContentAreaBPD() {
         return holder.getBPD();
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -351,7 +351,7 @@
     public boolean getGeneratesBlockArea() {
         return getGeneratesLineArea() || holder instanceof Block;
     }
-   
+
     /**
      * {@inheritDoc}
      */
@@ -365,6 +365,6 @@
     public Position notifyPos(Position pos) {
         return pos;
     }
-   
+
 }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -28,10 +28,10 @@
  * LayoutManager for the fo:external-graphic formatting object
  */
 public class ExternalGraphicLayoutManager extends AbstractGraphicsLayoutManager {
-    
+
     /**
      * Constructor.
-     * 
+     *
      * @param node
      *            the fo:external-graphic formatting object that creates the
      *            area
@@ -44,6 +44,6 @@
     protected Area getChildArea() {
         return new Image(((ExternalGraphic) fobj).getSrc());
     }
-    
+
 }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/FootnoteLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/FootnoteLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/FootnoteLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/FootnoteLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -60,7 +60,7 @@
         super(node);
         footnote = node;
     }
-    
+
     /** {@inheritDoc} */
     public void initialize() {
         // create an InlineStackingLM handling the fo:inline child of fo:footnote
@@ -120,7 +120,7 @@
     }
 
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public List getChangedKnuthElements(List oldList,
                                               int alignment) {
@@ -131,7 +131,7 @@
 
 
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public void addAreas(PositionIterator posIter, LayoutContext context) {
         // "Unwrap" the NonLeafPositions stored in posIter and put
@@ -144,11 +144,11 @@
                 positionList.add(pos.getPosition());
             }
         }
-        
-        // FootnoteLM does not create any area, 
+
+        // FootnoteLM does not create any area,
         // so the citationLM child will add directly to the FootnoteLM parent area
         citationLM.setParent(getParent());
-        
+
         // make the citationLM add its areas
         LayoutContext childContext = new LayoutContext(context);
         StackingIter childPosIter = new StackingIter(positionList.listIterator());

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/HyphContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/HyphContext.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/HyphContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/HyphContext.java Thu Jul 24 02:35:34 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.inline;
 
 /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ICLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ICLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ICLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ICLayoutManager.java Thu Jul 24 02:35:34 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.

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java Thu Jul 24 02:35:34 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.
@@ -35,10 +35,10 @@
  * Helper class which calculates the size and position in the viewport of an image.
  */
 public class ImageLayout implements Constants {
-    
+
     /** logging instance */
     protected static Log log = LogFactory.getLog(ImageLayout.class);
-    
+
     //Input
     private GraphicsProperties props;
     private PercentBaseContext percentBaseContext;
@@ -48,7 +48,7 @@
     private Rectangle placement;
     private Dimension viewportSize = new Dimension(-1, -1);
     private boolean clip;
-    
+
     /**
      * Main constructor
      * @param props the properties for the image
@@ -60,7 +60,7 @@
         this.props = props;
         this.percentBaseContext = percentBaseContext;
         this.intrinsicSize = intrinsicSize;
-        
+
         doLayout();
     }
 
@@ -72,7 +72,7 @@
 
         int bpd = -1;
         int ipd = -1;
-        
+
         len = props.getBlockProgressionDimension().getOptimum(percentBaseContext).getLength();
         if (len.getEnum() != EN_AUTO) {
             bpd = len.getValue(percentBaseContext);
@@ -155,7 +155,7 @@
         } else {
             constrainedIntrinsicSize = intrinsicSize;
         }
-        
+
         //Derive content extents where not explicit
         Dimension adjustedDim = adjustContentSize(cwidth, cheight, constrainedIntrinsicSize);
         cwidth = adjustedDim.width;
@@ -190,10 +190,10 @@
         this.viewportSize.setSize(ipd, bpd);
         this.placement = new Rectangle(xoffset, yoffset, cwidth, cheight);
     }
-    
+
     private int constrainExtent(int extent, LengthRangeProperty range, Length contextExtent) {
-        boolean mayScaleUp = (contextExtent.getEnum() != EN_SCALE_DOWN_TO_FIT); 
-        boolean mayScaleDown = (contextExtent.getEnum() != EN_SCALE_UP_TO_FIT); 
+        boolean mayScaleUp = (contextExtent.getEnum() != EN_SCALE_DOWN_TO_FIT);
+        boolean mayScaleDown = (contextExtent.getEnum() != EN_SCALE_UP_TO_FIT);
         Length len;
         len = range.getMaximum(percentBaseContext).getLength();
         if (len.getEnum() != EN_AUTO) {
@@ -211,7 +211,7 @@
         }
         return extent;
     }
-    
+
     private Dimension constrain(Dimension size) {
         Dimension adjusted = new Dimension(size);
         int effWidth = constrainExtent(size.width,
@@ -235,7 +235,7 @@
         }
         return adjusted;
     }
-    
+
     private Dimension adjustContentSize(
             final int cwidth, final int cheight,
             Dimension defaultSize) {
@@ -249,14 +249,14 @@
                 if (defaultSize.height == 0) {
                     dim.width = 0;
                 } else {
-                    dim.width = (int)(defaultSize.width * (double)cheight 
+                    dim.width = (int)(defaultSize.width * (double)cheight
                             / defaultSize.height);
                 }
             } else if (cheight == -1) {
                 if (defaultSize.width == 0) {
                     dim.height = 0;
                 } else {
-                    dim.height = (int)(defaultSize.height * (double)cwidth 
+                    dim.height = (int)(defaultSize.height * (double)cwidth
                             / defaultSize.width);
                 }
             } else {
@@ -278,7 +278,7 @@
         }
         return dim;
     }
-    
+
     /**
      * Given the ipd and the content width calculates the
      * required x offset based on the text-align property
@@ -336,7 +336,7 @@
     public Rectangle getPlacement() {
         return this.placement;
     }
-    
+
     /**
      * Returns the size of the image's viewport.
      * @return the viewport size (in millipoints)
@@ -344,7 +344,7 @@
     public Dimension getViewportSize() {
         return this.viewportSize;
     }
-    
+
     /**
      * Returns the size of the image's intrinsic (natural) size.
      * @return the intrinsic size (in millipoints)
@@ -352,7 +352,7 @@
     public Dimension getIntrinsicSize() {
         return this.intrinsicSize;
     }
-    
+
     /**
      * Indicates whether the image is clipped.
      * @return true if the image shall be clipped
@@ -360,5 +360,5 @@
     public boolean isClipped() {
         return this.clip;
     }
-    
+
 }
\ No newline at end of file



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