aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-07-30 12:47:31 +0000
committerJeremias Maerki <jeremias@apache.org>2005-07-30 12:47:31 +0000
commit21e083ea6532254e3af7d85ab047af3511460559 (patch)
tree44925c1845705b4bd233feaa241c55ff5ff1573f /src/java/org
parentc41da723fb1f9804df6bb2150240692c4554ce1f (diff)
downloadxmlgraphics-fop-21e083ea6532254e3af7d85ab047af3511460559.tar.gz
xmlgraphics-fop-21e083ea6532254e3af7d85ab047af3511460559.zip
Add support for "mpt" (millipoints, non-standard!!!)
Reenabled warning message for unrecognized units. Otherwise, you simply get a zero value and don't know why. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@226500 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/fo/properties/FixedLength.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/fo/properties/FixedLength.java b/src/java/org/apache/fop/fo/properties/FixedLength.java
index 62852ae06..cba009e57 100644
--- a/src/java/org/apache/fop/fo/properties/FixedLength.java
+++ b/src/java/org/apache/fop/fo/properties/FixedLength.java
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -68,6 +68,9 @@ public class FixedLength extends LengthProperty {
} else if (unit.equals("pt")) {
// Do nothing.
// dvalue = dvalue;
+ } else if (unit.equals("mpt")) { //mpt is non-standard!!! mpt=millipoints
+ // Do nothing.
+ // dvalue = dvalue;
} else if (unit.equals("pc")) {
dvalue = dvalue * 12;
/*
@@ -78,10 +81,13 @@ public class FixedLength extends LengthProperty {
dvalue = dvalue * assumedResolution;
} else {
dvalue = 0;
- //log.error("unknown length unit '" + unit
- // + "'");
+ log.error("Unknown length unit '" + unit + "'");
+ }
+ if (unit.equals("mpt")) {
+ millipoints = (int)dvalue;
+ } else {
+ millipoints = (int)(dvalue * 1000);
}
- millipoints = (int)(dvalue * 1000);
}
/**