From 798e64660c8b1f91404a9ea12822760c659715d5 Mon Sep 17 00:00:00 2001 From: Christian Geisert Date: Mon, 25 Nov 2002 19:43:42 +0000 Subject: [PATCH] Fixes bug from previous Perfomance tuning patch Submitted by: Henrik Olsson 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/apache/fop/layout/BorderAndPadding.java b/src/org/apache/fop/layout/BorderAndPadding.java index 5afbf9aa0..130a339b3 100644 --- a/src/org/apache/fop/layout/BorderAndPadding.java +++ b/src/org/apache/fop/layout/BorderAndPadding.java @@ -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); } } -- 2.39.5