Author: acumiskey
Date: Tue May  6 02:14:47 2008
New Revision: 653718

URL: http://svn.apache.org/viewvc?rev=653718&view=rev
Log:
Merged revisions 
652821-652822,652835,653036,653045,653048,653106,653144,653202,653204,653311,653564
 via svnmerge from 
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk

........
  r652821 | adelmelle | 2008-05-02 17:58:26 +0100 (Fri, 02 May 2008) | 6 lines
  
  Cleanup/Correction after r657673
  -> added missing file FObj.java
  -> pushed retrieve-class-name upwards to AbstractRetrieveMarker as a common 
property
  -> corrected use of property-name "retrieve-class-name" in source and testcase
  -> improved consistency in code-style
........
  r652822 | adelmelle | 2008-05-02 18:00:33 +0100 (Fri, 02 May 2008) | 1 line
  
  Expand imports...
........
  r652835 | adelmelle | 2008-05-02 18:28:25 +0100 (Fri, 02 May 2008) | 3 lines
  
  Bugzilla 42703:
  Fixed a regression introduced by the fix for Bugzilla 44286
........
  r653036 | adelmelle | 2008-05-03 11:21:45 +0100 (Sat, 03 May 2008) | 2 lines
  
  Cleanup: improve code-readibility
........
  r653045 | adelmelle | 2008-05-03 11:51:16 +0100 (Sat, 03 May 2008) | 2 lines
  
  Tweak/correction: save local hash-code (as originally intended...)
........
  r653048 | adelmelle | 2008-05-03 11:55:07 +0100 (Sat, 03 May 2008) | 2 lines
  
  Tweaks: make fobj member final; have default implementations for some methods 
throw an UnsupportedOperationException instead of merely logging an error
........
  r653106 | acumiskey | 2008-05-03 20:07:18 +0100 (Sat, 03 May 2008) | 1 line
  
  Fixed the build. Assignment on final variable fobj.
........
  r653144 | acumiskey | 2008-05-03 22:29:09 +0100 (Sat, 03 May 2008) | 1 line
  
  Fix that preserves the final status of the fobj member variable.
........
  r653202 | adelmelle | 2008-05-04 12:37:31 +0100 (Sun, 04 May 2008) | 2 lines
  
  Change private element-generating methods to add the elements to a passed 
List  (improves code-readability and reduces the amount of temporary LinkedList 
instances)
........
  r653204 | adelmelle | 2008-05-04 14:04:28 +0100 (Sun, 04 May 2008) | 4 lines
  
  Further refinements:
  -> use cached auxiliary position where possible (analogous to BlockStackingLM)
  -> consolidate makeXXXPenalty() helpers
........
  r653311 | jeremias | 2008-05-05 07:50:54 +0100 (Mon, 05 May 2008) | 6 lines
  
  Bugzilla #43650:
  PCL Renderer: Improved page format selection so it doesn't interfere with 
duplex printing.
  Submitted by: Thomas Margreiter <tm.at.felder.at>
  
  Note:
  I've only been able to verify that the change doesn't have any negative 
effects on simplex printers.
........
  r653564 | adelmelle | 2008-05-05 20:27:10 +0100 (Mon, 05 May 2008) | 2 lines
  
  Correction of indentation
........

Modified:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/   (props changed)
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObj.java
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/RetrieveMarker.java
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/properties/CommonHyphenation.java
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/fotree/testcases/table_retrieve-table-marker.fo
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/marker_white-space-treatment_bug42703.xml

Propchange: xmlgraphics/fop/branches/Temp_AFPGOCAResources/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue May  6 02:14:47 2008
@@ -1 +1 @@
-/xmlgraphics/fop/trunk:1-652808
+/xmlgraphics/fop/trunk:1-653716

Modified: 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObj.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObj.java?rev=653718&r1=653717&r2=653718&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObj.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObj.java
 Tue May  6 02:14:47 2008
@@ -427,12 +427,12 @@
      */
     protected boolean isBlockItem(String nsURI, String lName) {
         return (FO_URI.equals(nsURI) 
-                && (lName.equals("block") 
-                        || lName.equals("table") 
-                        || lName.equals("table-and-caption") 
-                        || lName.equals("block-container")
-                        || lName.equals("list-block") 
-                        || lName.equals("float")
+                && ("block".equals(lName)
+                        || "table".equals(lName)
+                        || "table-and-caption".equals(lName)
+                        || "block-container".equals(lName)
+                        || "list-block".equals(lName)
+                        || "float".equals(lName)
                         || isNeutralItem(nsURI, lName)));
     }
 
@@ -446,21 +446,21 @@
      */
     protected boolean isInlineItem(String nsURI, String lName) {
         return (FO_URI.equals(nsURI) 
-                && (lName.equals("bidi-override") 
-                        || lName.equals("character") 
-                        || lName.equals("external-graphic") 
-                        || lName.equals("instream-foreign-object")
-                        || lName.equals("inline") 
-                        || lName.equals("inline-container")
-                        || lName.equals("leader") 
-                        || lName.equals("page-number") 
-                        || lName.equals("page-number-citation")
-                        || lName.equals("page-number-citation-last")
-                        || lName.equals("basic-link")
-                        || (lName.equals("multi-toggle")
+                && ("bidi-override".equals(lName)
+                        || "character".equals(lName)
+                        || "external-graphic".equals(lName)
+                        || "instream-foreign-object".equals(lName)
+                        || "inline".equals(lName)
+                        || "inline-container".equals(lName)
+                        || "leader".equals(lName)
+                        || "page-number".equals(lName)
+                        || "page-number-citation".equals(lName)
+                        || "page-number-citation-last".equals(lName)
+                        || "basic-link".equals(lName)
+                        || ("multi-toggle".equals(lName)
                                 && (getNameId() == FO_MULTI_CASE
                                         || findAncestor(FO_MULTI_CASE) > 0))
-                        || (lName.equals("footnote") 
+                        || ("footnote".equals(lName)
                                 && !isOutOfLineFODescendant)
                         || isNeutralItem(nsURI, lName)));
     }
@@ -487,11 +487,12 @@
      */
     boolean isNeutralItem(String nsURI, String lName) {
         return (FO_URI.equals(nsURI) 
-                && (lName.equals("multi-switch") 
-                        || lName.equals("multi-properties")
-                        || lName.equals("wrapper") 
-                        || (!isOutOfLineFODescendant && lName.equals("float"))
-                        || lName.equals("retrieve-marker")));
+                && ("multi-switch".equals(lName)
+                        || "multi-properties".equals(lName)
+                        || "wrapper".equals(lName)
+                        || (!isOutOfLineFODescendant && "float".equals(lName))
+                        || "retrieve-marker".equals(lName)
+                        || "retrieve-table-marker".equals(lName)));
     }
     
     /**

Modified: 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java?rev=653718&r1=653717&r2=653718&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
 Tue May  6 02:14:47 2008
@@ -116,6 +116,7 @@
             
             if (ancestor.getNameId() == Constants.FO_BLOCK) {
                 currentBlock = (Block) ancestor;
+                nestedBlockStack.push(currentBlock);
             }
         } else if (!nestedBlockStack.isEmpty()) {
             currentBlock = (Block) nestedBlockStack.peek();
@@ -206,9 +207,7 @@
                 /* end of block: clear the references and pop the 
                  * nested block stack */
                 if (!nestedBlockStack.empty()) {
-                    currentBlock = (Block) nestedBlockStack.pop();
-                } else {
-                    currentBlock = null;
+                    nestedBlockStack.pop();
                 }
                 charIter = null;
             }

Modified: 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java?rev=653718&r1=653717&r2=653718&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
 Tue May  6 02:14:47 2008
@@ -23,9 +23,11 @@
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.FObjMixed;
 import org.apache.fop.fo.PropertyList;
+import org.apache.fop.fo.ValidationException;
 import org.apache.fop.fo.flow.table.TableFObj;
 import org.apache.fop.fo.flow.table.Table;
 import org.apache.fop.apps.FOPException;
+import org.xml.sax.Locator;
 
 import java.util.Iterator;
 
@@ -40,6 +42,8 @@
 
     private PropertyList propertyList;
 
+    private String retrieveClassName;
+
     /**
      * Create a new AbstractRetrieveMarker instance that
      * is a child of the given [EMAIL PROTECTED] FONode}
@@ -52,11 +56,26 @@
 
     /**
      * [EMAIL PROTECTED]
+     * <p>XSL Content Model: empty
+     */
+    protected void validateChildNode(Locator loc, String nsURI, String 
localName)
+                throws ValidationException {
+        if (FO_URI.equals(nsURI)) {
+            invalidChildError(loc, nsURI, localName);
+        }
+    }
+
+    /**
+     * [EMAIL PROTECTED]
      * Store a reference to the parent [EMAIL PROTECTED] PropertyList}
      * to be used when the retrieve-marker is resolved.
      */
     public void bind(PropertyList pList) throws FOPException {
         super.bind(pList);
+        this.retrieveClassName = pList.get(PR_RETRIEVE_CLASS_NAME).getString();
+        if (retrieveClassName == null || retrieveClassName.equals("")) {
+            missingPropertyError("retrieve-class-name");
+        }
         this.propertyList = pList.getParentPropertyList();
     }
 
@@ -169,4 +188,14 @@
         }
     }
 
+    /**
+     * Return the value for the <code>retrieve-class-name</code>
+     * property
+     *
+     * @return the value for retrieve-class-name
+     */
+    public String getRetrieveClassName() {
+        return this.retrieveClassName;
+    }
+
 }

Modified: 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/RetrieveMarker.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/RetrieveMarker.java?rev=653718&r1=653717&r2=653718&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/RetrieveMarker.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/RetrieveMarker.java
 Tue May  6 02:14:47 2008
@@ -19,12 +19,9 @@
 
 package org.apache.fop.fo.flow;
 
-import java.util.Iterator;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.PropertyList;
-import org.apache.fop.fo.ValidationException;
 import org.xml.sax.Locator;
 import org.xml.sax.Attributes;
 
@@ -37,7 +34,6 @@
 public class RetrieveMarker extends AbstractRetrieveMarker {
 
     // The value of properties relevant for fo:retrieve-marker.
-    private String retrieveClassName;
     private int retrievePosition;
     private int retrieveBoundary;
     // End of property values
@@ -46,7 +42,7 @@
      * Create a new RetrieveMarker instance that is a
      * child of the given [EMAIL PROTECTED] FONode}.
      *
-     * @param parent [EMAIL PROTECTED] FONode} that is the parent of this 
object
+     * @param parent the parent [EMAIL PROTECTED] FONode}
      */
     public RetrieveMarker(FONode parent) {
         super(parent);
@@ -72,47 +68,34 @@
 
     /** [EMAIL PROTECTED] */
     public void bind(PropertyList pList) throws FOPException {
-
-        retrieveClassName = pList.get(PR_RETRIEVE_CLASS_NAME).getString();
-        retrievePosition = pList.get(PR_RETRIEVE_POSITION).getEnum();
-        retrieveBoundary = pList.get(PR_RETRIEVE_BOUNDARY).getEnum();
-
-        if (retrieveClassName == null || retrieveClassName.equals("")) {
-            missingPropertyError("retrieve-class-name");
-        }
         super.bind(pList);
+        this.retrievePosition = pList.get(PR_RETRIEVE_POSITION).getEnum();
+        this.retrieveBoundary = pList.get(PR_RETRIEVE_BOUNDARY).getEnum();
     }
 
     /**
-     * [EMAIL PROTECTED]
-     * XSL Content Model: empty
-     */
-    protected void validateChildNode(Locator loc, String nsURI, String 
localName)
-                throws ValidationException {
-        if (FO_URI.equals(nsURI)) {
-            invalidChildError(loc, nsURI, localName);
-        }
-    }
-
-    /**
-     * @return the "retrieve-class-name" property.
-     */
-    public String getRetrieveClassName() {
-        return retrieveClassName;
-    }
-
-    /**
-     * @return the "retrieve-position" property (enum value).
+     * Return the value for the <code>retrieve-position</code>
+     * property
+     * @return  the value for retrieve-position-within-table; one of
+     *              [EMAIL PROTECTED] org.apache.fop.fo.Constants#EN_FSWP},
+     *              [EMAIL PROTECTED] org.apache.fop.fo.Constants#EN_FIC},
+     *              [EMAIL PROTECTED] org.apache.fop.fo.Constants#EN_LSWP},
+     *              [EMAIL PROTECTED] org.apache.fop.fo.Constants#EN_LEWP}.
      */
     public int getRetrievePosition() {
-        return retrievePosition;
+        return this.retrievePosition;
     }
 
     /**
-     * @return the "retrieve-boundary" property (enum value).
+     * Return the value for the <code>retrieve-boundary</code>
+     * property
+     * @return  the value for retrieve-boundary-within-table; one of
+     *              [EMAIL PROTECTED] org.apache.fop.fo.Constants#EN_PAGE},
+     *              [EMAIL PROTECTED] 
org.apache.fop.fo.Constants#EN_PAGE_SEQUENCE},
+     *              [EMAIL PROTECTED] org.apache.fop.fo.Constants#EN_DOCUMENT}.
      */
     public int getRetrieveBoundary() {
-        return retrieveBoundary;
+        return this.retrieveBoundary;
     }
 
     /** [EMAIL PROTECTED] */

Modified: 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java?rev=653718&r1=653717&r2=653718&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java
 Tue May  6 02:14:47 2008
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-/* $Id:$ */
+/* $Id$ */
 package org.apache.fop.fo.flow;
 
 import org.apache.fop.fo.FONode;
@@ -30,8 +30,7 @@
  */
 public class RetrieveTableMarker extends AbstractRetrieveMarker {
 
-    // The value of properties relevant for fo:retrieve-marker.
-    private String retrieveClassName;
+    // The value of properties relevant for fo:retrieve-table-marker.
     private int retrievePositionWithinTable;
     private int retrieveBoundaryWithinTable;
     // end property values
@@ -46,7 +45,11 @@
         super(parent);
     }
 
-    /** [EMAIL PROTECTED] */
+    /**
+     * [EMAIL PROTECTED]
+     * <i>NOTE: An <code>fo:retrieve-table-marker</code> is only permitted as 
a descendant
+     * of an <code>fo:table-header</code> or an 
<code>fo:table-footer</code>.</i>
+     */
     public void processNode(String elementName, Locator locator, Attributes 
attlist, PropertyList pList) throws FOPException {
         if (findAncestor(FO_TABLE_HEADER) < 0
                 && findAncestor(FO_TABLE_FOOTER) < 0) {
@@ -59,18 +62,13 @@
 
     /** [EMAIL PROTECTED] */
     public void bind(PropertyList pList) throws FOPException {
-        this.retrieveClassName = pList.get(PR_RETRIEVE_CLASS_NAME).getString();
+        super.bind(pList);
         this.retrievePositionWithinTable
                 = pList.get(PR_RETRIEVE_POSITION_WITHIN_TABLE).getEnum();
         this.retrieveBoundaryWithinTable
                 = pList.get(PR_RETRIEVE_BOUNDARY_WITHIN_TABLE).getEnum();
     }
 
-    /** [EMAIL PROTECTED] */
-    public String getRetrieveClassName() {
-        return this.retrieveClassName;
-    }
-
     /**
      * Return the value for the <code>retrieve-position-within-table</code>
      * property

Modified: 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/properties/CommonHyphenation.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/properties/CommonHyphenation.java?rev=653718&r1=653717&r2=653718&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/properties/CommonHyphenation.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/properties/CommonHyphenation.java
 Tue May  6 02:14:47 2008
@@ -203,7 +203,7 @@
     
     /** [EMAIL PROTECTED] */
     public int hashCode() {
-        if (hash == 0) {
+        if (this.hash == 0) {
             int hash = 17;
             hash = 37 * hash + (language == null ? 0 : language.hashCode());
             hash = 37 * hash + (script == null ? 0 : script.hashCode());
@@ -215,8 +215,9 @@
                 (hyphenationPushCharacterCount == null ? 0 : 
hyphenationPushCharacterCount.hashCode());
             hash = 37 * hash + 
                 (hyphenationRemainCharacterCount == null ? 0 : 
hyphenationRemainCharacterCount.hashCode());
+            this.hash = hash;
         }
-        return hash;
+        return this.hash;
     }
     
 }

Modified: 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java?rev=653718&r1=653717&r2=653718&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
 Tue May  6 02:14:47 2008
@@ -29,7 +29,7 @@
  * The base class for nearly all LayoutManagers.
  * Provides the functionality for merging the [EMAIL PROTECTED] LayoutManager}
  * and the [EMAIL PROTECTED] org.apache.fop.datatypes.PercentBaseContext} 
interfaces
- * into a common base calls for all higher LayoutManagers.
+ * into a common base class for all higher LayoutManagers.
  */
 public abstract class AbstractBaseLayoutManager 
     implements LayoutManager, PercentBaseContext {
@@ -39,7 +39,7 @@
     /** Indicator if this LM generates block areas */
     protected boolean generatesBlockArea = false;
     /** The formatting object for this LM */
-    protected FObj fobj = null;
+    protected final FObj fobj;
 
     /**
      * logging instance
@@ -50,6 +50,7 @@
      * Abstract base layout manager.
      */
     public AbstractBaseLayoutManager() {
+        fobj = null;
     }
 
     /**
@@ -58,7 +59,7 @@
      * @param fo the formatting object for this layout manager
      */
     public AbstractBaseLayoutManager(FObj fo) {
-        fobj = fo;
+        this.fobj = fo;
         setGeneratesReferenceArea(fo.generatesReferenceAreas());
         if (getGeneratesReferenceArea()) {
             setGeneratesBlockArea(true);
@@ -67,9 +68,7 @@
 
     // --------- Property Resolution related functions --------- //
     
-    /**
-     * [EMAIL PROTECTED] 
-     */
+    /** [EMAIL PROTECTED] */
     public int getBaseLength(int lengthBase, FObj fobj) {
         if (fobj == this.fobj) {
             switch (lengthBase) {
@@ -82,7 +81,7 @@
             case LengthBase.CONTAINING_REFAREA_WIDTH:
                 return getReferenceAreaIPD();
             default:
-                log.error(new Exception("Unknown base type for LengthBase:" + 
lengthBase));
+                log.error("Unknown base type for LengthBase:" + lengthBase);
                 return 0;
             }
         } else {
@@ -112,9 +111,7 @@
             }
             lm = lm.getParent();
         }
-        if (lm == null) {
-            log.error("No parent LM found");
-        }
+        log.error("No parent LM found");
         return 0;
     }
 
@@ -131,9 +128,7 @@
             }
             lm = lm.getParent();
         }
-        if (lm == null) {
-            log.error("No parent LM found");
-        }
+        log.error("No parent LM found");
         return 0;
     }
 
@@ -176,9 +171,7 @@
             }
             lm = lm.getParent();
         }
-        if (lm == null) {
-            log.error("No parent LM found");
-        }
+        log.error("No parent LM found");
         return 0;
     }
 
@@ -195,31 +188,31 @@
             }
             lm = lm.getParent();
         }
-        if (lm == null) {
-            log.error("No parent LM found");
-        }
+        log.error("No parent LM found");
         return 0;
     }
 
     /**
      * [EMAIL PROTECTED]
+     * <i>NOTE: Should be overridden by subclasses.
+     * Default implementation throws an 
<code>UnsupportedOperationException</code>.</i>
      */
     public int getContentAreaIPD() {
-        log.error("getContentAreaIPD called when it should have been 
overwritten");
-        return 0;
+        throw new UnsupportedOperationException(
+                "getContentAreaIPD() called when it should have been 
overridden");
     }
    
     /**
      * [EMAIL PROTECTED]
+     * <i>NOTE: Should be overridden by subclasses.
+     * Default implementation throws an 
<code>UnsupportedOperationException</code>.</i>
      */
     public int getContentAreaBPD() {
-        log.error("getContentAreaBPD called when it should have been 
overwritten");
-        return 0;
+        throw new UnsupportedOperationException(
+                "getContentAreaBPD() called when it should have been 
overridden");
     }
     
-    /**
-     * [EMAIL PROTECTED]
-     */
+    /** [EMAIL PROTECTED] */
     public boolean getGeneratesReferenceArea() {
         return generatesReferenceArea;
     }
@@ -234,9 +227,7 @@
         this.generatesReferenceArea = generatesReferenceArea;
     }
    
-    /**
-     * [EMAIL PROTECTED]
-     */
+    /** [EMAIL PROTECTED] */
     public boolean getGeneratesBlockArea() {
         return generatesBlockArea;
     }
@@ -250,9 +241,7 @@
         this.generatesBlockArea = generatesBlockArea;
     }
    
-    /**
-     * [EMAIL PROTECTED]
-     */
+    /** [EMAIL PROTECTED] */
     public boolean getGeneratesLineArea() {
         return false;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to