xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47530] Problem with fo:wrapper inside block-container
Date Wed, 15 Jul 2009 20:28:34 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47530


Pablo Ruiz <pablo.ruiz@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |




--- Comment #6 from Pablo Ruiz <pablo.ruiz@gmail.com>  2009-07-15 13:28:32 PST ---
The patch includes some fixes back-ported from turnk.. But the following code
was not at trunk, nor 0.95.. see near the end of the patch.

Also, the problem can be reproduced with 0.95, but bugzilla didnt allow me to
select more than one version.. 

So i'm pretty sure this is a fix needed on trunk..

diff -Nru
fop-0.94-orig/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
fop-0.94-src/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
---
fop-0.94-orig/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
   2007-04-03 21:40:14.000000000 +0200
+++
fop-0.94-src/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
   2009-07-15 04:09:21.000000000 +0200
@@ -65,6 +65,7 @@

     // When viewport should grow with the content.
     private boolean autoHeight = true; 
+    private boolean inlineElementList = false;

     /* holds the (one-time use) fo:block space-before
     and -after properties.  Large fo:blocks are split
@@ -205,6 +206,10 @@
             //(i.e., it depends on content's blockprogression-dimension)" (XSL
1.0, 7.14.1)
             allocBPD = maxbpd;
             autoHeight = true;
+            if (getBlockContainerFO().getReferenceOrientation() == 0) {
+                //Cannot easily inline element list when ref-or="180" 
+                inlineElementList = true;
+            }
         } else {
             allocBPD = height.getValue(this); //this is the content-height
             allocBPD += getBPIndents();
@@ -267,13 +272,22 @@
         addKnuthElementsForBorderPaddingBefore(returnList,
!firstVisibleMarkServed);
         firstVisibleMarkServed = true;

-        if (autoHeight) {
+        if (autoHeight && inlineElementList) {
             //Spaces, border and padding to be repeated at each break
             addPendingMarks(context);

+        LayoutManager tmpLM;
             BlockLevelLayoutManager curLM; // currently active LM
             BlockLevelLayoutManager prevLM = null; // previously active LM
-            while ((curLM = (BlockLevelLayoutManager) getChildLM()) != null) {
+            while ((tmpLM = (LayoutManager) getChildLM()) != null) {
+        if (!(tmpLM instanceof BlockLevelLayoutManager)) {
+                    log.error("area of type: "+ tmpLM.getClass().getName() + "
not allowed under flow - ignoring");
+                    tmpLM.setFinished(true);
+                    continue;
+            }
+
+        curLM = (BlockLevelLayoutManager)tmpLM;
+
                 LayoutContext childLC = new LayoutContext(0);
                 childLC.copyPendingMarksFrom(context);
                 // curLM is a ?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message