]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Code cleanup:
authorAndreas L. Delmelle <adelmelle@apache.org>
Thu, 11 Jan 2007 21:03:07 +0000 (21:03 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Thu, 11 Jan 2007 21:03:07 +0000 (21:03 +0000)
- avoid unnecessary calls to getLogger(); LengthBase gets its own logger, LMs log to the AbstractLM logger
- CommonBorderPaddingBackground no longer implements Cloneable

(changes suggested by Richard Wheeldon)

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@495371 13f79535-47bb-0310-9956-ffa450edef68

35 files changed:
src/java/org/apache/fop/datatypes/LengthBase.java
src/java/org/apache/fop/fo/FOText.java
src/java/org/apache/fop/fo/FObj.java
src/java/org/apache/fop/fo/XMLObj.java
src/java/org/apache/fop/fo/expr/LabelEndFunction.java
src/java/org/apache/fop/fo/expr/PropertyInfo.java
src/java/org/apache/fop/fo/extensions/svg/BatikExtensionElementMapping.java
src/java/org/apache/fop/fo/extensions/svg/SVGElement.java
src/java/org/apache/fop/fo/flow/AbstractListItemPart.java
src/java/org/apache/fop/fo/flow/ExternalGraphic.java
src/java/org/apache/fop/fo/flow/Float.java
src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
src/java/org/apache/fop/fo/flow/MultiCase.java
src/java/org/apache/fop/fo/flow/MultiProperties.java
src/java/org/apache/fop/fo/flow/MultiPropertySet.java
src/java/org/apache/fop/fo/flow/MultiSwitch.java
src/java/org/apache/fop/fo/flow/MultiToggle.java
src/java/org/apache/fop/fo/flow/TableAndCaption.java
src/java/org/apache/fop/fo/flow/TableBody.java
src/java/org/apache/fop/fo/flow/TableCaption.java
src/java/org/apache/fop/fo/flow/TableCell.java
src/java/org/apache/fop/fo/flow/TableFObj.java
src/java/org/apache/fop/fo/pagination/Declarations.java
src/java/org/apache/fop/fo/pagination/PageSequence.java
src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java
src/java/org/apache/fop/fo/properties/PageDimensionMaker.java
src/java/org/apache/fop/fo/properties/PropertyMaker.java
src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
src/java/org/apache/fop/render/rtf/FOPRtfAttributes.java

index 7270344fef42f6fc54570e07b93230ef7854b11f..74150ca501cdefb98ba961510811528d43af42aa 100644 (file)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.datatypes;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.PropertyList;
@@ -26,6 +28,7 @@ import org.apache.fop.fo.expr.PropertyException;
 import org.apache.fop.fo.flow.Character;
 import org.apache.fop.fo.flow.ExternalGraphic;
 import org.apache.fop.fo.flow.InstreamForeignObject;
+import org.apache.fop.layoutmgr.inline.LeafNodeLayoutManager;
 
 /**
  * Models a length which can be used as a factor in a percentage length
@@ -60,6 +63,11 @@ public class LengthBase implements PercentBase {
     /** constant for a alignment adjust percent-based length */
     public static final int ALIGNMENT_ADJUST = 12;
 
+    /**
+     * logging instance
+     */
+    protected static Log log = LogFactory.getLog(LengthBase.class);
+
     /**
      * The FO for which this property is to be calculated.
      */
@@ -80,7 +88,7 @@ public class LengthBase implements PercentBase {
      * @param baseType a constant defining the type of teh percent base
      * @throws PropertyException In case an problem occurs while evaluating values
      */
-    public LengthBase(FObj parentFO, PropertyList plist, int baseType) throws PropertyException {
+    public LengthBase(PropertyList plist, int baseType) throws PropertyException {
         this.fobj = plist.getFObj();
         this.baseType = baseType;
         switch (baseType) {
@@ -122,7 +130,7 @@ public class LengthBase implements PercentBase {
             }
             baseLen =  context.getBaseLength(baseType,  fobj);
         } else {
-            fobj.getLogger().error("getBaseLength called without context");
+            log.error("getBaseLength called without context");
         }
         return baseLen;
     }
index f2c4c4e543578375288c929eb29f1d5ce635dba2..2205c0170a8a16c5f7ece888ea112a988c5387c0 100644 (file)
@@ -389,7 +389,7 @@ public class FOText extends FONode {
                 return ca[i];
             }
         default:
-            getLogger().warn("Invalid text-tranform value: " + textTransform);
+            log.warn("Invalid text-tranform value: " + textTransform);
             return ca[i];
         }
     }
@@ -624,6 +624,5 @@ public class FOText extends FONode {
         } else {
             return new String(ca).trim();
         }
-    }
-    
+    }    
 }
\ No newline at end of file
index 0d5b1fe657b33e0e7492caf2fd28b6d986bf4b51..53ba255f848cee211e525f10fb5a9fa6ba00fe9e 100644 (file)
@@ -314,7 +314,7 @@ public abstract class FObj extends FONode implements Constants {
                 if (node instanceof FObj
                         || (node instanceof FOText
                                 && ((FOText) node).willCreateArea())) {
-                    getLogger().error(
+                    log.error(
                             "fo:marker must be an initial child: " + mcname);
                     return;
                 } else if (node instanceof FOText) {
@@ -329,7 +329,7 @@ public abstract class FObj extends FONode implements Constants {
         if (!markers.containsKey(mcname)) {
             markers.put(mcname, marker);
         } else {
-            getLogger().error("fo:marker 'marker-class-name' "
+            log.error("fo:marker 'marker-class-name' "
                     + "must be unique for same parent: " + mcname);
         }
     }
@@ -495,7 +495,7 @@ public abstract class FObj extends FONode implements Constants {
             extensionAttachments = new java.util.ArrayList();
         }
         if (log.isDebugEnabled()) {
-            getLogger().debug("ExtensionAttachment of category " 
+            log.debug("ExtensionAttachment of category " 
                     + attachment.getCategory() + " added to " 
                     + getName() + ": " + attachment);
         }
index 5ce81e7b5cc675ff18642f32be5ab79660ce01c3..e2b459192d009db18e93488388f5a3a369e7a0b0 100644 (file)
@@ -187,7 +187,7 @@ public abstract class XMLObj extends FONode implements ObjectBuiltListener {
             // in theory someone might want to embed some defined
             // xml (eg. fo) inside the foreign xml
             // they could use a different namespace
-            getLogger().debug("Invalid element: " + child.getName() + " inside foreign xml markup");
+            log.debug("Invalid element: " + child.getName() + " inside foreign xml markup");
         }
     }
 
index 39e5fafa2d40e2b5cfbba2711bd4d51643eb60dc..8a02d21d660b9cd06778e993be6eb633a79fb16c 100644 (file)
@@ -66,7 +66,7 @@ public class LabelEndFunction extends FunctionBase {
         }
         Length startIndent = pList.get(Constants.PR_START_INDENT).getLength();
 
-        LengthBase base = new LengthBase(pList.getFObj(), pInfo.getPropertyList(),
+        LengthBase base = new LengthBase(pInfo.getPropertyList(),
                                          LengthBase.CONTAINING_REFAREA_WIDTH);
         PercentLength refWidth = new PercentLength(1.0, base);
 
index 08b95628cfd9cda22a40dedf7fe91f9e80755f95..dc104b46553dc125ef1fe890a227b472214182c0 100644 (file)
@@ -47,10 +47,10 @@ public class PropertyInfo {
      * @param plist PropertyList object
      * @param fo FObj
      */
-    public PropertyInfo(PropertyMaker maker, PropertyList plist, FObj fo) {
+    public PropertyInfo(PropertyMaker maker, PropertyList plist) {
         this.maker = maker;
         this.plist = plist;
-        this.fo = fo;
+        this.fo = plist.getParentFObj();
     }
 
     /**
@@ -61,7 +61,7 @@ public class PropertyInfo {
      */
     public PercentBase getPercentBase() throws PropertyException {
         PercentBase pcbase = getFunctionPercentBase();
-        return (pcbase != null) ? pcbase : maker.getPercentBase(fo, plist);
+        return (pcbase != null) ? pcbase : maker.getPercentBase(plist);
     }
 
     /**
index 49394ea3c7302ac008c5e3df3864fefc6ae5da17..cb6e69a13cd832ffdef15e70b7a08a58c93bd460 100644 (file)
@@ -64,7 +64,7 @@ public class BatikExtensionElementMapping extends ElementMapping {
     }
 
     protected void initialize() {
-        if (foObjs == null && batikAvail == true) {
+        if (foObjs == null && batikAvail) {
             // this sets the parser that will be used
             // by default (SVGBrokenLinkProvider)
             // normally the user agent value is used
index a6958acdb0d2e1a13035563d426a446b636f30a1..351327a268f733e9c7c63c6b2034a27c4fb90304 100644 (file)
@@ -101,7 +101,7 @@ public class SVGElement extends SVGObj {
                 //svgdoc.setDocumentURI(baseURL.toString());
             }
         } catch (Exception e) {
-            getLogger().error("Could not set base URL for svg", e);
+            log.error("Could not set base URL for svg", e);
         }
 
         Element e = ((SVGDocument)doc).getRootElement();
index c5277323ebe6b08c0cfefd81ea91ef77cc885b8b..39efce2cd56d8012fa5f3bb2243f45a58a643b66 100644 (file)
@@ -97,7 +97,7 @@ public abstract class AbstractListItemPart extends FObj {
                     .append(" is missing child elements. ")
                     .append("Required Content Model: ")
                     .append(contentModel);
-                getLogger().warn(message.toString());
+                log.warn(message.toString());
             }
         }
     }
index 5925613ba243f11253818372eefd4de76145fc90..f31c43abfeccce8141d2c1a879ec237aad13e8ba 100644 (file)
@@ -67,11 +67,11 @@ public class ExternalGraphic extends AbstractGraphics {
         ImageFactory fact = userAgent.getFactory().getImageFactory();
         FopImage fopimage = fact.getImage(url, userAgent);
         if (fopimage == null) {
-            getLogger().error("Image not available: " + getSrc());
+            log.error("Image not available: " + getSrc());
         } else {
             // load dimensions
             if (!fopimage.load(FopImage.DIMENSIONS)) {
-                getLogger().error("Cannot read image dimensions: " + getSrc());
+                log.error("Cannot read image dimensions: " + getSrc());
             }
             this.intrinsicWidth = fopimage.getIntrinsicWidth();
             this.intrinsicHeight = fopimage.getIntrinsicHeight();
index 48ae864711ca019737fc3093b40dc011d3f3a209..d68264b6401323982adb4721edb39bfaf863bd90 100644 (file)
@@ -46,7 +46,7 @@ public class Float extends FObj {
         super(parent);
         
         if (!notImplementedWarningGiven) {
-            getLogger().warn("fo:float is not yet implemented.");
+            log.warn("fo:float is not yet implemented.");
             notImplementedWarningGiven = true;
         }
     }
index 790785a6b05763aad23bb8ff28711fc99142ef43..43dcd575d5b89c1419a9983fb98dde6d068c299e 100644 (file)
@@ -102,7 +102,7 @@ public class InstreamForeignObject extends AbstractGraphics {
             Point2D csize = new Point2D.Float(-1, -1);
             intrinsicDimensions = child.getDimension(csize);
             if (intrinsicDimensions == null) {
-                getLogger().error("Intrinsic dimensions of "
+                log.error("Intrinsic dimensions of "
                         + " instream-foreign-object could not be determined");
             }
         }
index 898cf370abefae25504181be944f70c20f6667bf..ee87cfdc65375e3763489d45c7c12f9308216db9 100644 (file)
@@ -48,7 +48,7 @@ public class MultiCase extends FObj {
         super(parent);
 
         if (!notImplementedWarningGiven) {
-            getLogger().warn("fo:multi-case is not yet implemented.");
+            log.warn("fo:multi-case is not yet implemented.");
             notImplementedWarningGiven = true;
         }
     }
index 2d94154cdfd47fd12a94e25a73278764cc7b54dc..0443c786f572247947d898f5d4e6215b9ec48323 100644 (file)
@@ -52,7 +52,7 @@ public class MultiProperties extends FObj {
         super(parent);
 
         if (!notImplementedWarningGiven) {
-            getLogger().warn("fo:multi-properties is not yet implemented.");
+            log.warn("fo:multi-properties is not yet implemented.");
             notImplementedWarningGiven = true;
         }
     }
index a647af6b1c3a6dd650ec6088cb7c4531548402db..d15c6b07f516c7d5e8723d81b4e671ab62346013 100644 (file)
@@ -46,7 +46,7 @@ public class MultiPropertySet extends FObj {
         super(parent);
 
         if (!notImplementedWarningGiven) {
-            getLogger().warn("fo:multi-property-set is not yet implemented.");
+            log.warn("fo:multi-property-set is not yet implemented.");
             notImplementedWarningGiven = true;
         }
     }
index 96600daa7abc0f8e83864b662ef3c0ddc5486239..22ba27e9a2e89d2fd810d9a68d540035703547a1 100644 (file)
@@ -50,7 +50,7 @@ public class MultiSwitch extends FObj {
         super(parent);
 
         if (!notImplementedWarningGiven) {
-            getLogger().warn("fo:multi-switch is not yet implemented.");
+            log.warn("fo:multi-switch is not yet implemented.");
             notImplementedWarningGiven = true;
         }
     }
index 971e2754d2a9c1506194d256b5522f76c94b4734..b8466e073af3731241fcfe033eb0330d3382aac8 100644 (file)
@@ -48,7 +48,7 @@ public class MultiToggle extends FObj {
         super(parent);
 
         if (!notImplementedWarningGiven) {
-            getLogger().warn("fo:multi-toggle is not yet implemented.");
+            log.warn("fo:multi-toggle is not yet implemented.");
             notImplementedWarningGiven = true;
         }
     }
index 4e74de8a0c89287402a317705950308b85dd3fd2..748ee0cb30d94671b59110012af26bbc9b1f7104 100644 (file)
@@ -70,7 +70,7 @@ public class TableAndCaption extends FObj {
         super(parent);
 
         if (!notImplementedWarningGiven) {
-            getLogger().warn("fo:table-and-caption is not yet implemented.");
+            log.warn("fo:table-and-caption is not yet implemented.");
             notImplementedWarningGiven = true;
         }
     }
index 57090104661a1df29aa3b60c2d64b77d4e9cda75..891141c2679c9622a4e199866793a503cc7ef640 100644 (file)
@@ -132,7 +132,7 @@ public class TableBody extends TableFObj {
             if (getUserAgent().validateStrictly()) {
                 missingChildElementError("marker* (table-row+|table-cell+)");
             } else {
-                getLogger().error("fo:table-body must not be empty. "
+                log.error("fo:table-body must not be empty. "
                         + "Expected: marker* (table-row+|table-cell+)");
                 getParent().removeChild(this);
             }
index bb6978bb25abbafd52629851041800e944c1d36e..da516060fb430329ad2881e5b0f9822d9e1cf0b8 100644 (file)
@@ -68,7 +68,7 @@ public class TableCaption extends FObj {
         super(parent);
 
         if (!notImplementedWarningGiven) {
-            getLogger().warn("fo:table-caption is not yet implemented.");
+            log.warn("fo:table-caption is not yet implemented.");
             notImplementedWarningGiven = true;
         }
     }
index a54144b9102a8908af32b3ab60e9cb861fc4b537..066d6493a15c204844139ffcd01e26d635dc9a4e 100644 (file)
@@ -110,13 +110,13 @@ public class TableCell extends TableFObj {
             if (getUserAgent().validateStrictly()) {
                 missingChildElementError("marker* (%block;)+");
             } else if (childNodes != null && childNodes.size() > 0) {
-                getLogger().warn("fo:table-cell content that is not "
+                log.warn("fo:table-cell content that is not "
                         + "enclosed by a fo:block will be dropped/ignored.");
             }
         }
         if ((startsRow() || endsRow()) 
                 && getParent().getNameId() == FO_TABLE_ROW ) {
-            getLogger().warn("starts-row/ends-row for fo:table-cells "
+            log.warn("starts-row/ends-row for fo:table-cells "
                     + "non-applicable for children of an fo:table-row.");
         }
         getFOEventHandler().endCell(this);
index 05877bbf22583960aac0714b14beedad25665d1d..65d32b76a63b05f10cf612190d22cf8638e35ea3 100644 (file)
@@ -371,7 +371,7 @@ public abstract class TableFObj extends FObj {
                 int columnIndex = p.getNumeric().getValue();
                 
                 if (columnIndex <= 0) {
-                    fo.getLogger().warn("Specified negative or zero value for "
+                    log.warn("Specified negative or zero value for "
                             + "column-number on " + fo.getName() + ": "
                             + columnIndex + " forced to " 
                             + parent.getCurrentColumnIndex());
@@ -381,7 +381,7 @@ public abstract class TableFObj extends FObj {
                 double tmpIndex = p.getNumeric().getNumericValue();
                 if (tmpIndex - columnIndex > 0.0) {
                     columnIndex = (int) Math.round(tmpIndex);
-                    fo.getLogger().warn("Rounding specified column-number of "
+                    log.warn("Rounding specified column-number of "
                             + tmpIndex + " to " + columnIndex);
                     return new NumberProperty(columnIndex);
                 }
index 4f8273caf5576132b64d536080f0b206d26d8c23..86fa1b3f4d4d8977b4fe53643b5e2665f78e2385 100644 (file)
@@ -85,10 +85,10 @@ public class Declarations extends FObj {
                     if (!"".equals(cp.getColorProfileName())) {
                         addColorProfile(cp);
                     } else {
-                        getLogger().warn("color-profile-name required for color profile");
+                        log.warn("color-profile-name required for color profile");
                     }
                 } else {
-                    getLogger().debug("Ignoring element " + node.getName() 
+                    log.debug("Ignoring element " + node.getName() 
                             + " inside fo:declarations.");
                 }
             }
@@ -102,7 +102,7 @@ public class Declarations extends FObj {
         }
         if (colorProfiles.get(cp.getColorProfileName()) != null) {
             // duplicate names
-            getLogger().warn("Duplicate fo:color-profile profile name: "
+            log.warn("Duplicate fo:color-profile profile name: "
                     + cp.getColorProfileName());
         }
         colorProfiles.put(cp.getColorProfileName(), cp);
index 386ed694b12f494ea6c5666c02ca281785b58306..1e8f1f52b4f6eec5d5510fb775182e1326969686 100644 (file)
@@ -454,8 +454,8 @@ public class PageSequence extends FObj {
             return simplePageMaster;
         }
         boolean isOddPage = ((page % 2) == 1);
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("getNextSimplePageMaster(page=" + page
+        if (log.isDebugEnabled()) {
+            log.debug("getNextSimplePageMaster(page=" + page
                     + " isOdd=" + isOddPage 
                     + " isFirst=" + isFirstPage 
                     + " isLast=" + isLastPage 
index 56b1560120677e17d9a1971c7c090ca5b49fbf1a..e48d0dc646cb37ad2180d3aaae1d5c1a158afdf0 100644 (file)
@@ -201,7 +201,7 @@ public class PageSequenceMaster extends FObj {
                                            + masterName
                                            + "', cannot recover");
                 }
-                getLogger().warn("subsequences exhausted in page-sequence-master '"
+                log.warn("subsequences exhausted in page-sequence-master '"
                                  + masterName
                                  + "', using previous subsequence");
                 currentSubSequence.reset();
index 9b2c8b2efce7a123aaaaf112741f449d24f32c17..f83bf005f7a0db50995066d98fc6a95eb8f20121 100644 (file)
@@ -108,7 +108,7 @@ public class RepeatablePageMasterAlternatives extends FObj
         } else {
             int mr = maximumRepeats.getNumeric().getValue();
             if (mr < 0) {
-                getLogger().debug("negative maximum-repeats: "
+                log.debug("negative maximum-repeats: "
                         + this.maximumRepeats);
                 mr = 0;
             }
index a09b129a30d5a20c5da27357fd4d5983ff215209..1f79d317bb26b17da4bc50cb730e1092f10cb221 100644 (file)
@@ -111,7 +111,7 @@ public class RepeatablePageMasterReference extends FObj
         } else {
             int mr = maximumRepeats.getNumeric().getValue();
             if (mr < 0) {
-                getLogger().debug("negative maximum-repeats: "
+                log.debug("negative maximum-repeats: "
                         + this.maximumRepeats);
                 mr = 0;
             }
index 168a3b145d1544eb2442ed0094bb9d24cbdd8b5e..8697cc978c09de4452ba9f2ec73c082faf0f2813 100755 (executable)
@@ -35,7 +35,7 @@ import org.apache.fop.image.ImageFactory;
  * Stores all common border and padding properties.
  * See Sec. 7.7 of the XSL-FO Standard.
  */
-public class CommonBorderPaddingBackground implements Cloneable {
+public class CommonBorderPaddingBackground {
     /**
      * The "background-attachment" property.
      */
@@ -79,7 +79,7 @@ public class CommonBorderPaddingBackground implements Cloneable {
     /** the "end" edge */ 
     public static final int END = 3;
     
-    public static class BorderInfo implements Cloneable {
+    public static class BorderInfo {
         private int mStyle; // Enum for border style
         private Color mColor; // Border color
         private CondLengthProperty mWidth;
@@ -166,11 +166,11 @@ public class CommonBorderPaddingBackground implements Cloneable {
             ImageFactory fact = userAgent.getFactory().getImageFactory();
             fopimage = fact.getImage(url, userAgent);
             if (fopimage == null) {
-                fobj.getLogger().error("Background image not available: " + backgroundImage);
+                Property.log.error("Background image not available: " + backgroundImage);
             } else {
                 // load dimensions
                 if (!fopimage.load(FopImage.DIMENSIONS)) {
-                    fobj.getLogger().error("Cannot read background image dimensions: " 
+                    Property.log.error("Cannot read background image dimensions: " 
                             + backgroundImage);
                 }
             }
index e6f4ec3936ec3faa2d35d85b7e31bcfc51be93cc..c2eaeedc4080b25f1c9131df274c6ce9d6fdc2a4 100644 (file)
@@ -87,7 +87,7 @@ public class LineHeightPropertyMaker extends SpaceProperty.Maker {
             FObj fo) throws PropertyException {
         Numeric numval = p.getNumeric();
         if (numval != null && numval.getDimension() == 0) {
-            p = new PercentLength(numval.getNumericValue(), getPercentBase(fo, propertyList));
+            p = new PercentLength(numval.getNumericValue(), getPercentBase(propertyList));
             Property spaceProp = super.convertProperty(p, propertyList, fo);
             spaceProp.setSpecifiedValue(String.valueOf(numval.getNumericValue()));
             return spaceProp;
index 8e0ad18ed81d2c906360f083b08a5dcbe296e4c8..b41c3e87b48a373c281571638345988e26d88df2 100644 (file)
@@ -79,13 +79,13 @@ public class PageDimensionMaker extends LengthProperty.Maker {
                                      || refOrientation == -270))) {
                     //set page-width to "auto" = use the fallback from FOUserAgent
                     if (propId == Constants.PR_PAGE_WIDTH) {
-                        fo.getLogger().warn("Both page-width and page-height set to "
+                        Property.log.warn("Both page-width and page-height set to "
                                 + "\"indefinite\". Forcing page-width to \"auto\"");
                         return make(propertyList, fallbackValue, fo);
                     }
                 } else {
                     //set page-height to "auto" = use fallback from FOUserAgent
-                    fo.getLogger().warn("Both page-width and page-height set to "
+                    Property.log.warn("Both page-width and page-height set to "
                             + "\"indefinite\". Forcing page-height to \"auto\"");
                     if (propId == Constants.PR_PAGE_HEIGHT) {
                         return make(propertyList, fallbackValue, fo);
index 900e4b79db49d373ab71bf6812418332287d0375..a5373ef5073649111801ca2f2689035fc43ef986 100644 (file)
@@ -321,11 +321,11 @@ public class PropertyMaker implements Cloneable {
      * @return an object implementing the PercentBase interface.
      * @throws PropertyException if there is a problem while evaluating the base property
      */
-    public PercentBase getPercentBase(FObj fo, PropertyList pl) throws PropertyException {
+    public PercentBase getPercentBase(PropertyList pl) throws PropertyException {
         if (percentBase == -1) {
             return null;
         } else {
-            return new LengthBase(fo, pl, percentBase);
+            return new LengthBase(pl, percentBase);
         }
     }
 
@@ -436,7 +436,7 @@ public class PropertyMaker implements Cloneable {
                 // Override parsePropertyValue in each subclass of Property.Maker
                 newProp = PropertyParser.parse(pvalue,
                                                   new PropertyInfo(this,
-                                                  propertyList, fo));
+                                                  propertyList));
             } 
             if (newProp != null) {
                 newProp = convertProperty(newProp, propertyList, fo);
@@ -501,8 +501,7 @@ public class PropertyMaker implements Cloneable {
                         // Substituted a value: must parse it
                         Property p = PropertyParser.parse(pvalue,
                                                  new PropertyInfo(this,
-                                                                  propertyList,
-                                                                  fo));
+                                                                  propertyList));
                         pret = convertProperty(p, propertyList, fo);
                     }
                 }
index da566ed9148095093a9fdbd6d5d52bd63df8a206..8d63dc05f276c7b070f5448ecdded371a7331ca9 100644 (file)
@@ -71,7 +71,7 @@ public abstract class AbstractBaseLayoutManager
      * @see org.apache.fop.datatypes.PercentBaseContext#getBaseLength(int, FObj)
      */
     public int getBaseLength(int lengthBase, FObj fobj) {
-        if (fobj == getFObj()) {
+        if (fobj == this.fobj) {
             switch (lengthBase) {
             case LengthBase.CONTAINING_BLOCK_WIDTH:
                 return getAncestorBlockAreaIPD();
index 2b5bf3fbf1bccc88e4a1b1c9f9923fd59b4912eb..5397d470d6ca5a063736946f27e3ede013c7d250 100644 (file)
@@ -173,7 +173,7 @@ public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManage
             if (overflow == EN_HIDDEN) {
                 clip = true;
             } else if (overflow == EN_ERROR_IF_OVERFLOW) {
-                fobj.getLogger().error("Object overflows the viewport: clipping");
+                log.error("Object overflows the viewport: clipping");
                 clip = true;
             }
         }
index b730ab0cf7f99ba1b193769b11f7fc205f44bfd2..cb693d056d1140739f44f428f9acf2ddd3a466c8 100644 (file)
@@ -54,7 +54,7 @@ public abstract class LeafNodeLayoutManager extends AbstractLayoutManager
     /**
      * logging instance
      */
-    private static Log log = LogFactory.getLog(LeafNodeLayoutManager.class);
+    protected static Log log = LogFactory.getLog(LeafNodeLayoutManager.class);
 
     /**
      * The inline area that this leafnode will add.
index 56644d1733964ed0ce6d7ac91a8f82dc9284eebd..20100fb7de04012c3c992fdfa7c880d6e3f777fa 100755 (executable)
@@ -90,7 +90,7 @@ public class FOPRtfAttributes extends RtfAttributes {
             // noop
         }
         
-        public int getBaseLength(int lengthBase, FObj fobj) {
+        public int getBaseLength(int lengthBase, FObj fo) {
             return 0;
         }
     }