cvs commit: xml-fop/src/java/org/apache/fop/fo/expr PropertyParser.java

2004-01-04 Thread pbwest
pbwest  2004/01/04 18:43:11

  Modified:src/java/org/apache/fop/fo/expr Tag: FOP_0-20-0_Alt-Design
PropertyParser.java
  Log:
  Removed redundant casts. Flagged by Eclipse.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.2.2   +7 -12 xml-fop/src/java/org/apache/fop/fo/expr/PropertyParser.java
  
  Index: PropertyParser.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/expr/PropertyParser.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- PropertyParser.java   5 Jul 2003 19:14:07 -   1.1.2.1
  +++ PropertyParser.java   5 Jan 2004 02:43:11 -   1.1.2.2
  @@ -314,8 +314,7 @@
   ((Numeric)prop).add((Numeric)pv);
   break inner;
   case PropertyValue.INTEGER:
  -((Numeric)prop).add((double)
  -(((IntegerType)pv).getInt()));
  +((Numeric)prop).add(((IntegerType)pv).getInt());
   break inner;
   default:
   throw new PropertyException(arithErrorStr());
  @@ -328,8 +327,7 @@
   ((Numeric)prop).subtract((Numeric)pv);
   break inner;
   case PropertyValue.INTEGER:
  -((Numeric)prop).subtract((double)
  - (((IntegerType)pv).getInt()));
  +((Numeric)prop).subtract(((IntegerType)pv).getInt());
   break inner;
   default:
   throw new PropertyException(arithErrorStr());
  @@ -346,7 +344,7 @@
   pv = parseMultiplicativeExpr();
   switch (pv.getType()) {
   case PropertyValue.NUMERIC:
  -prop = ((Numeric)pv).add((double)intVal);
  +prop = ((Numeric)pv).add(intVal);
   break inner;
   case PropertyValue.INTEGER:
   ((IntegerType)prop).setInt(intVal +
  @@ -360,7 +358,7 @@
   pv = parseMultiplicativeExpr();
   switch (pv.getType()) {
   case PropertyValue.NUMERIC:
  -((Numeric)pv).add((double)(-intVal));
  +((Numeric)pv).add(-intVal);
   prop = ((Numeric)pv).negate();
   break inner;
   case PropertyValue.INTEGER:
  @@ -405,8 +403,7 @@
   pv = parseUnaryExpr();
   switch (pv.getType()) {
   case PropertyValue.INTEGER:
  -((Numeric)prop).divide
  -((double)(((IntegerType)pv).getInt()));
  +((Numeric)prop).divide(((IntegerType)pv).getInt());
   break inner;
   case PropertyValue.NUMERIC:
   ((Numeric)prop).divide((Numeric)pv);
  @@ -419,8 +416,7 @@
   pv = parseUnaryExpr();
   switch (pv.getType()) {
   case PropertyValue.INTEGER:
  -((Numeric)prop).mod
  -((double)(((IntegerType)pv).getInt()));
  +((Numeric)prop).mod(((IntegerType)pv).getInt());
   break inner;
   case PropertyValue.NUMERIC:
   ((Numeric)prop).mod((Numeric)pv);
  @@ -433,8 +429,7 @@
   pv = parseUnaryExpr();
   switch (pv.getType()) {
   case PropertyValue.INTEGER:
  -((Numeric)prop).multiply
  -((double)(((IntegerType)pv).getInt()));
  +((Numeric)prop).multiply(((IntegerType)pv).getInt());
   break inner;
   case PropertyValue.NUMERIC:
   ((Numeric)prop).multiply((Numeric)pv);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: xml-fop/src/java/org/apache/fop/fo/expr PropertyParser.java

2003-07-15 Thread vmote
vmote   2003/07/15 09:18:50

  Modified:src/java/org/apache/fop/datatypes FODimension.java
   src/java/org/apache/fop/fo SpaceProperty.java
StringProperty.java TextInfo.java
   src/java/org/apache/fop/fo/expr PropertyParser.java
  Log:
  style changes only
  
  Revision  ChangesPath
  1.3   +4 -2  xml-fop/src/java/org/apache/fop/datatypes/FODimension.java
  
  Index: FODimension.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/FODimension.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FODimension.java  13 Jul 2003 00:59:45 -  1.2
  +++ FODimension.java  15 Jul 2003 16:18:50 -  1.3
  @@ -57,13 +57,15 @@
*/
   public class FODimension {
   
  +/** distance (in millipoints) on the inline-progression-direction */
   public int ipd;
  +/** distance (in millipoints) on the block-progression-direction */
   public int bpd;
   
   /**
* Constructor
  - * @param ipd length (in millipoints ??) of the inline-progression-direction
  - * @param bpd length (in millipoints ??) of the block-progression-direction
  + * @param ipd length (in millipoints) of the inline-progression-direction
  + * @param bpd length (in millipoints) of the block-progression-direction
*/
   public FODimension(int ipd, int bpd) {
   this.ipd = ipd;
  
  
  
  1.2   +35 -11xml-fop/src/java/org/apache/fop/fo/SpaceProperty.java
  
  Index: SpaceProperty.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/SpaceProperty.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SpaceProperty.java11 Mar 2003 13:05:19 -  1.1
  +++ SpaceProperty.java15 Jul 2003 16:18:50 -  1.2
  @@ -3,34 +3,34 @@
* 
*The Apache Software License, Version 1.1
* 
  - * 
  + *
* Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
  - * 
  + *
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
  - * 
  + *
* 1. Redistributions of source code must retain the above copyright notice,
*this list of conditions and the following disclaimer.
  - * 
  + *
* 2. Redistributions in binary form must reproduce the above copyright notice,
*this list of conditions and the following disclaimer in the documentation
*and/or other materials provided with the distribution.
  - * 
  + *
* 3. The end-user documentation included with the redistribution, if any, must
*include the following acknowledgment: This product includes software
*developed by the Apache Software Foundation (http://www.apache.org/).
*Alternately, this acknowledgment may appear in the software itself, if
*and wherever such third-party acknowledgments normally appear.
  - * 
  + *
* 4. The names FOP and Apache Software Foundation must not be used to
*endorse or promote products derived from this software without prior
*written permission. For written permission, please contact
*[EMAIL PROTECTED]
  - * 
  + *
* 5. Products derived from this software may not be called Apache, nor may
*Apache appear in their name, without prior written permission of the
*Apache Software Foundation.
  - * 
  + *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  @@ -42,20 +42,32 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* 
  - * 
  + *
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation and was originally created by
* James Tauber [EMAIL PROTECTED]. For more information on the Apache
* Software Foundation, please see http://www.apache.org/.
  - */ 
  + */
   package org.apache.fop.fo;
   
   import org.apache.fop.datatypes.Space;
   import org.apache.fop.datatypes.LengthRange;
   
  +/**
  + * Base class used for handling properties of the fo:space-before and
  + * fo:space-after variety. It is extended by 
org.apache.fop.fo.properties.GenericSpace,
  + * which is extended by many other properties.
  + */
   public class SpaceProperty