aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/flow/table/TableFObj.java
diff options
context:
space:
mode:
authorSimon Pepping <spepping@apache.org>2008-04-18 19:07:57 +0000
committerSimon Pepping <spepping@apache.org>2008-04-18 19:07:57 +0000
commita0a75029b98d18c23601745bad7669fb60503fe8 (patch)
treefca65849f4bf3d2ed2c2b0de5b59d2abf86075dc /src/java/org/apache/fop/fo/flow/table/TableFObj.java
parentfa13f5c3f1434e4d0413ed418236b355018679ed (diff)
downloadxmlgraphics-fop-a0a75029b98d18c23601745bad7669fb60503fe8.tar.gz
xmlgraphics-fop-a0a75029b98d18c23601745bad7669fb60503fe8.zip
An implementation of a positive integer property maker. It implements
convertProperty, which is the correct method to implement if one wants to add to the make process. This fixes bug 44619. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@649657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow/table/TableFObj.java')
-rw-r--r--src/java/org/apache/fop/fo/flow/table/TableFObj.java20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/java/org/apache/fop/fo/flow/table/TableFObj.java b/src/java/org/apache/fop/fo/flow/table/TableFObj.java
index 24528f622..9b60de740 100644
--- a/src/java/org/apache/fop/fo/flow/table/TableFObj.java
+++ b/src/java/org/apache/fop/fo/flow/table/TableFObj.java
@@ -117,7 +117,7 @@ public abstract class TableFObj extends FObj {
* PropertyMaker subclass for the column-number property
*
*/
- public static class ColumnNumberPropertyMaker extends NumberProperty.Maker {
+ public static class ColumnNumberPropertyMaker extends NumberProperty.PositiveIntegerMaker {
/**
* Constructor
@@ -153,24 +153,6 @@ public abstract class TableFObj extends FObj {
= (ColumnNumberManagerHolder) propertyList.getParentFObj();
ColumnNumberManager columnIndexManager = parent.getColumnNumberManager();
int columnIndex = p.getNumeric().getValue();
- if (columnIndex <= 0) {
- /* No warning necessary as the spec clearly defines how to handle these cases.
- log.warn("Specified negative or zero value for "
- + "column-number on " + fo.getName() + ": "
- + columnIndex + " forced to "
- + columnIndexManager.getCurrentColumnNumber());*/
- return NumberProperty.getInstance(columnIndexManager.getCurrentColumnNumber());
- } else {
- double tmpIndex = p.getNumeric().getNumericValue();
- if (tmpIndex - columnIndex > 0.0) {
- columnIndex = (int) Math.round(tmpIndex);
- /* No warning necessary as the spec clearly defines how to handle these cases.
- log.warn("Rounding specified column-number of "
- + tmpIndex + " to " + columnIndex);*/
- p = NumberProperty.getInstance(columnIndex);
- }
- }
-
int colSpan = propertyList.get(Constants.PR_NUMBER_COLUMNS_SPANNED)
.getNumeric().getValue();
int i = -1;