]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fixes bug from previous Perfomance tuning patch
authorChristian Geisert <chrisg@apache.org>
Mon, 25 Nov 2002 19:43:42 +0000 (19:43 +0000)
committerChristian Geisert <chrisg@apache.org>
Mon, 25 Nov 2002 19:43:42 +0000 (19:43 +0000)
Submitted by: Henrik Olsson <henrik.olsson@intentia.se>

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@195628 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/layout/BorderAndPadding.java

index 5afbf9aa05a449b15257110a517edb33ffa83f23..130a339b34d443e020cdffda503b3edb498108d2 100644 (file)
@@ -19,7 +19,7 @@ public class BorderAndPadding implements Cloneable {
     //ResolvedCondLength is long, mask wiht 0x100000000 != 0 is bDiscard
     // mask wiht 0xFFFFFFFF is iLength
     static final long bDiscard_MASK = 0x100000000L;
-    static final long iLength_MASK = 0xFFFFFFFFL;
+    static final long iLength_MASK =  0x0FFFFFFFFL;
     private static final long new_ResolvedCondLength(CondLength length) {
         return (length.isDiscard()?bDiscard_MASK:0) + length.mvalue();
     }
@@ -75,11 +75,11 @@ public class BorderAndPadding implements Cloneable {
     }
 
     public void setPaddingLength(int side, int iLength) {
-        padding[side] = iLength + padding[side]&bDiscard_MASK;
+        padding[side] = iLength + (padding[side] & bDiscard_MASK);
     }
 
     public void setBorderLength(int side, int iLength) {
-        borderInfo[side].mWidth = iLength + borderInfo[side].mWidth&bDiscard_MASK;
+        borderInfo[side].mWidth = iLength + (borderInfo[side].mWidth & bDiscard_MASK);
     }
 
     public int getBorderLeftWidth(boolean bDiscard) {
@@ -141,7 +141,7 @@ public class BorderAndPadding implements Cloneable {
     }
 
     private int getPadding(int side, boolean bDiscard) {
-        return (int)( padding[side]&iLength_MASK);
+        return (int)(padding[side]&iLength_MASK);
     }
 
 }