From 21e083ea6532254e3af7d85ab047af3511460559 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Sat, 30 Jul 2005 12:47:31 +0000 Subject: [PATCH] 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 --- .../org/apache/fop/fo/properties/FixedLength.java | 14 ++++++++++---- 1 file 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); } /** -- 2.39.5