diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-01-12 11:38:00 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-01-12 11:38:00 +0000 |
commit | b40e787886da748fef8c169973983758def4ef8e (patch) | |
tree | 82dd12068e5737d9d4f44ad9d75c4a403654ffd8 /src/java/org/apache/fop/fo/properties | |
parent | c7569976e4341b50d814bb3d23dd68c0f0265179 (diff) | |
download | xmlgraphics-fop-b40e787886da748fef8c169973983758def4ef8e.tar.gz xmlgraphics-fop-b40e787886da748fef8c169973983758def4ef8e.zip |
No semantical changes, just style.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198252 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/properties')
-rw-r--r-- | src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java b/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java index 848b47981..a3c03f166 100644 --- a/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java +++ b/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.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. @@ -41,7 +41,7 @@ public class IndentPropertyMaker extends CorrespondingPropertyMaker { /** * Create a start-indent or end-indent property maker. - * @param baseMaker + * @param baseMaker the property maker to use */ public IndentPropertyMaker(PropertyMaker baseMaker) { super(baseMaker); @@ -71,6 +71,9 @@ public class IndentPropertyMaker extends CorrespondingPropertyMaker { PropertyList pList = getWMPropertyList(propertyList); // Calculate the values as described in 5.3.2. + Numeric padding = getCorresponding(paddingCorresponding, propertyList).getNumeric(); + Numeric border = getCorresponding(borderWidthCorresponding, propertyList).getNumeric(); + int marginProp = pList.getWritingMode(lr_tb, rl_tb, tb_rl); Numeric margin; // Calculate the absolute margin. @@ -80,10 +83,11 @@ public class IndentPropertyMaker extends CorrespondingPropertyMaker { margin = new FixedLength(0); } else { margin = propertyList.getExplicit(baseMaker.propId).getNumeric(); - margin = NumericOp.subtraction(margin, propertyList.getInherited(baseMaker.propId).getNumeric()); + margin = NumericOp.subtraction(margin, + propertyList.getInherited(baseMaker.propId).getNumeric()); } - margin = NumericOp.subtraction(margin, getCorresponding(paddingCorresponding, propertyList).getNumeric()); - margin = NumericOp.subtraction(margin, getCorresponding(borderWidthCorresponding, propertyList).getNumeric()); + margin = NumericOp.subtraction(margin, padding); + margin = NumericOp.subtraction(margin, border); } else { margin = propertyList.get(marginProp).getNumeric(); } @@ -95,14 +99,13 @@ public class IndentPropertyMaker extends CorrespondingPropertyMaker { } // The corresponding absolute margin-[right|left}. v = NumericOp.addition(v, margin); - v = NumericOp.addition(v, getCorresponding(paddingCorresponding, propertyList).getNumeric()); - v = NumericOp.addition(v, getCorresponding(borderWidthCorresponding, propertyList).getNumeric()); + v = NumericOp.addition(v, padding); + v = NumericOp.addition(v, border); return (Property) v; } private Property getCorresponding(int[] corresponding, PropertyList propertyList) - throws PropertyException - { + throws PropertyException { PropertyList pList = getWMPropertyList(propertyList); int wmcorr = pList.getWritingMode(corresponding[0], corresponding[1], corresponding[2]); return propertyList.get(wmcorr); |