You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/04/25 11:04:11 UTC
svn commit: r651544 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
Author: acumiskey
Date: Fri Apr 25 02:04:06 2008
New Revision: 651544
URL: http://svn.apache.org/viewvc?rev=651544&view=rev
Log:
Removed the tab characters that were causing a big moan from eclipse
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java?rev=651544&r1=651543&r2=651544&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java Fri Apr 25 02:04:06 2008
@@ -198,50 +198,61 @@
}
/**
- * Return the number of table units which are included in this
- * length specification.
- * This will always be 0 unless the property specification used
- * the proportional-column-width() function (only on table
- * column FOs).
- * <p>If this value is not 0, the actual value of the Length cannot
- * be known without looking at all of the columns in the table to
- * determine the value of a "table-unit".
- * @return The number of table units which are included in this
- * length specification.
+ * Return the number of table units which are included in this length
+ * specification. This will always be 0 unless the property specification
+ * used the proportional-column-width() function (only on table column FOs).
+ * <p>
+ * If this value is not 0, the actual value of the Length cannot be known
+ * without looking at all of the columns in the table to determine the value
+ * of a "table-unit".
+ *
+ * @return The number of table units which are included in this length
+ * specification.
*/
public double getTableUnits() {
- double tu1 = 0.0, tu2 = 0.0;
- if (op1 instanceof RelativeNumericProperty) {
- tu1 = ((RelativeNumericProperty) op1).getTableUnits();
- } else if (op1 instanceof TableColLength) {
- tu1 = ((TableColLength) op1).getTableUnits();
- }
- if (op2 instanceof RelativeNumericProperty) {
- tu2 = ((RelativeNumericProperty) op2).getTableUnits();
- } else if (op2 instanceof TableColLength) {
- tu2 = ((TableColLength) op2).getTableUnits();
- }
- if (tu1 != 0.0 && tu2 != 0.0) {
- switch (operation) {
- case ADDITION: return tu1 + tu2;
- case SUBTRACTION: return tu1 - tu2;
- case MULTIPLY: return tu1 * tu2;
- case DIVIDE: return tu1 / tu2;
- case MODULO: return tu1 % tu2;
- case MIN: return Math.min(tu1, tu2);
- case MAX: return Math.max(tu1, tu2);
- default: assert false;
- }
- } else if (tu1 != 0.0) {
- switch (operation) {
- case NEGATE: return -tu1;
- case ABS: return Math.abs(tu1);
- default: return tu1;
- }
- } else if (tu2 != 0.0){
- return tu2;
- }
- return 0.0;
+ double tu1 = 0.0, tu2 = 0.0;
+ if (op1 instanceof RelativeNumericProperty) {
+ tu1 = ((RelativeNumericProperty) op1).getTableUnits();
+ } else if (op1 instanceof TableColLength) {
+ tu1 = ((TableColLength) op1).getTableUnits();
+ }
+ if (op2 instanceof RelativeNumericProperty) {
+ tu2 = ((RelativeNumericProperty) op2).getTableUnits();
+ } else if (op2 instanceof TableColLength) {
+ tu2 = ((TableColLength) op2).getTableUnits();
+ }
+ if (tu1 != 0.0 && tu2 != 0.0) {
+ switch (operation) {
+ case ADDITION:
+ return tu1 + tu2;
+ case SUBTRACTION:
+ return tu1 - tu2;
+ case MULTIPLY:
+ return tu1 * tu2;
+ case DIVIDE:
+ return tu1 / tu2;
+ case MODULO:
+ return tu1 % tu2;
+ case MIN:
+ return Math.min(tu1, tu2);
+ case MAX:
+ return Math.max(tu1, tu2);
+ default:
+ assert false;
+ }
+ } else if (tu1 != 0.0) {
+ switch (operation) {
+ case NEGATE:
+ return -tu1;
+ case ABS:
+ return Math.abs(tu1);
+ default:
+ return tu1;
+ }
+ } else if (tu2 != 0.0) {
+ return tu2;
+ }
+ return 0.0;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org
Re: svn commit: r651544 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
Posted by Adrian Cumiskey <ad...@gmail.com>.
Better luck next time guys... ;-)
Jeremias Maerki wrote:
> Me, too. Had a conflict when I tried to commit. Hehe.
>
> On 25.04.2008 11:07:24 Andreas Delmelle wrote:
>> On Apr 25, 2008, at 11:04, acumiskey@apache.org wrote:
>>> Author: acumiskey
>>> Date: Fri Apr 25 02:04:06 2008
>>> New Revision: 651544
>>>
>>> URL: http://svn.apache.org/viewvc?rev=651544&view=rev
>>> Log:
>>> Removed the tab characters that were causing a big moan from eclipse
>> Heh, was just about to do the same, but you beat me to it... :-)
>>
>> Cheers
>>
>> Andreas
>
>
>
>
> Jeremias Maerki
>
>
Re: svn commit: r651544 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Me, too. Had a conflict when I tried to commit. Hehe.
On 25.04.2008 11:07:24 Andreas Delmelle wrote:
> On Apr 25, 2008, at 11:04, acumiskey@apache.org wrote:
> > Author: acumiskey
> > Date: Fri Apr 25 02:04:06 2008
> > New Revision: 651544
> >
> > URL: http://svn.apache.org/viewvc?rev=651544&view=rev
> > Log:
> > Removed the tab characters that were causing a big moan from eclipse
>
> Heh, was just about to do the same, but you beat me to it... :-)
>
> Cheers
>
> Andreas
Jeremias Maerki
Re: svn commit: r651544 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
Posted by Andreas Delmelle <an...@telenet.be>.
On Apr 25, 2008, at 11:04, acumiskey@apache.org wrote:
> Author: acumiskey
> Date: Fri Apr 25 02:04:06 2008
> New Revision: 651544
>
> URL: http://svn.apache.org/viewvc?rev=651544&view=rev
> Log:
> Removed the tab characters that were causing a big moan from eclipse
Heh, was just about to do the same, but you beat me to it... :-)
Cheers
Andreas