aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-03-31 10:55:07 +0000
committerGlen Mazza <gmazza@apache.org>2004-03-31 10:55:07 +0000
commita054ab3b7e22af6c163b5d68c04bf5868958a59e (patch)
tree158b4e54cf28f6dd1926de530309ffc2b1ceb3d4 /src/java/org/apache/fop/fo/pagination
parentb0ef412c716311de35850f0d6ae56a1b7f7d8acf (diff)
downloadxmlgraphics-fop-a054ab3b7e22af6c163b5d68c04bf5868958a59e.tar.gz
xmlgraphics-fop-a054ab3b7e22af6c163b5d68c04bf5868958a59e.zip
PR:
Obtained from: Submitted by: Reviewed by: Conversion of Avalon to Commons-Logger. (Will still need to update the examples, which I will take care of next; Jeremias will be modifying the PDF libraries for more efficient use of the CL loggers.) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197474 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination')
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java27
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageSequence.java2
2 files changed, 25 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java b/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java
index f5871c7bd..47a84dab5 100644
--- a/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java
+++ b/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java
@@ -18,21 +18,26 @@
package org.apache.fop.fo.pagination;
-// Avalon
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.commons.logging.Log;
+
/**
* This class uses the 'format', 'groupingSeparator', 'groupingSize',
* and 'letterValue' properties on fo:page-sequence to return a String
* corresponding to the supplied integer page number.
*/
-public class PageNumberGenerator extends AbstractLogEnabled {
+public class PageNumberGenerator {
private String format;
private char groupingSeparator;
private int groupingSize;
private int letterValue;
+ /**
+ * logging instance
+ */
+ protected Log logger = null;
+
// constants
private static final int DECIMAL = 1; // '0*1'
private static final int LOWERALPHA = 2; // 'a'
@@ -102,6 +107,22 @@ public class PageNumberGenerator extends AbstractLogEnabled {
}
/**
+ * Sets the Commons-Logging instance for this class
+ * @param logger The Commons-Logging instance
+ */
+ public void setLogger(Log logger) {
+ this.logger = logger;
+ }
+
+ /**
+ * Returns the Commons-Logging instance for this class
+ * @return The Commons-Logging instance
+ */
+ protected Log getLogger(Log logger) {
+ return logger;
+ }
+
+ /**
* Formats a page number.
* @param number page number to format
* @return the formatted page number as a String
diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java
index 125908705..6f28944e2 100644
--- a/src/java/org/apache/fop/fo/pagination/PageSequence.java
+++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java
@@ -196,7 +196,7 @@ public class PageSequence extends FObj {
this.propertyList.get(PR_GROUPING_SEPARATOR).getCharacter(),
this.propertyList.get(PR_GROUPING_SIZE).getNumber().intValue(),
this.propertyList.get(PR_LETTER_VALUE).getEnum());
- this.pageNumberGenerator.enableLogging(getLogger());
+ this.pageNumberGenerator.setLogger(getLogger());
this.forcePageCount =
this.propertyList.get(PR_FORCE_PAGE_COUNT).getEnum();