Author: spepping
Date: Fri Feb  8 11:20:27 2008
New Revision: 619979

URL: http://svn.apache.org/viewvc?rev=619979&view=rev
Log:
In addKnuthElementsForBorderPaddingXXX, if the returnlist is a
BlockKnuthSequence, the border and padding should be added to the
first or last paragraph inside it, but it is too late to do that
now. At least, avoid adding it to the bpd sequence.

Modified:
    
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java?rev=619979&r1=619978&r2=619979&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
 Fri Feb  8 11:20:27 2008
@@ -548,6 +548,14 @@
      */
     protected void addKnuthElementsForBorderPaddingStart(List returnList) {
         //Border and Padding (start)
+        /**
+         * If the returnlist is a BlockKnuthSequence, the border and padding 
should be added
+         * to the first paragraph inside it, but it is too late to do that now.
+         * At least, avoid adding it to the bpd sequence.
+         */
+        if (returnList instanceof BlockKnuthSequence) {
+            return;
+        }
         CommonBorderPaddingBackground borderAndPadding = 
fobj.getCommonBorderPaddingBackground();
         if (borderAndPadding != null) {
             int ipStart = borderAndPadding.getBorderStartWidth(false)
@@ -564,6 +572,14 @@
      */
     protected void addKnuthElementsForBorderPaddingEnd(List returnList) {
         //Border and Padding (after)
+        /**
+         * If the returnlist is a BlockKnuthSequence, the border and padding 
should be added
+         * to the last paragraph inside it, but it is too late to do that now.
+         * At least, avoid adding it to the bpd sequence.
+         */
+        if (returnList instanceof BlockKnuthSequence) {
+            return;
+        }
         CommonBorderPaddingBackground borderAndPadding = 
fobj.getCommonBorderPaddingBackground();
         if (borderAndPadding != null) {
             int ipEnd = borderAndPadding.getBorderEndWidth(false)



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

Reply via email to