]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Implemented reset method for changing IPD
authorVincent Hennebert <vhennebert@apache.org>
Thu, 2 Sep 2010 17:34:43 +0000 (17:34 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Thu, 2 Sep 2010 17:34:43 +0000 (17:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@992029 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
test/layoutengine/standard-testcases/flow_changing-ipd_table-after-break.xml

index 2b432d0d4de1840bb3888a042acec3c2d18316db..7e343697add07ebc940f479b98f9dc826e257639 100644 (file)
@@ -552,4 +552,11 @@ public class TableLayoutManager extends BlockStackingLayoutManager
         }
     }
 
+    /** {@inheritDoc} */
+    public void reset() {
+        super.reset();
+        curBlockArea = null;
+        tableUnit = 0.0;
+    }
+
 }
index 956563e20c9e08b01fbe669f3efcb5c18b5415ea..1b10d722c6b4cf8ab0954e5d7fdac3c8fe54dafa 100644 (file)
           <fo:table table-layout="fixed" width="100%">
             <fo:table-body>
               <fo:table-row>
-                <fo:table-cell>
-                  <fo:block>After the table 1</fo:block>
+                <fo:table-cell border="1pt solid black">
+                  <fo:block>Cell 1.1</fo:block>
+                </fo:table-cell>
+                <fo:table-cell border="1pt solid black">
+                  <fo:block>Cell 1.2</fo:block>
                 </fo:table-cell>
               </fo:table-row>
               <fo:table-row>
-                <fo:table-cell>
-                  <fo:block>After the table 2</fo:block>
+                <fo:table-cell border="1pt solid black">
+                  <fo:block>Cell 2.1</fo:block>
+                </fo:table-cell>
+                <fo:table-cell border="1pt solid black">
+                  <fo:block>Cell 2.2</fo:block>
                 </fo:table-cell>
               </fo:table-row>
             </fo:table-body>
   <checks>
     <eval expected="Block before the page break." xpath="//pageViewport[1]//flow/block[2]//text"/>
     <eval expected="Block after the page break."  xpath="//pageViewport[2]//flow/block[1]//text"/>
-    <eval expected="After the table 1"            xpath="//pageViewport[2]//flow/block[2]/block[1]//text"/>
-    <eval expected="After the table 2"            xpath="//pageViewport[2]//flow/block[2]/block[2]//text"/>
+    <eval expected="400000"                       xpath="//pageViewport[2]//flow/block[2]/@ipd"/>
+    <eval expected="199000"                       xpath="//pageViewport[2]//flow/block[2]/block[1]/@ipd"/>
+    <eval expected="Cell 1.1"                     xpath="//pageViewport[2]//flow/block[2]/block[1]//text"/>
+    <eval expected="199000"                       xpath="//pageViewport[2]//flow/block[2]/block[2]/@ipd"/>
+    <eval expected="Cell 1.2"                     xpath="//pageViewport[2]//flow/block[2]/block[2]//text"/>
+    <eval expected="Cell 2.1"                     xpath="//pageViewport[2]//flow/block[2]/block[3]//text"/>
+    <eval expected="Cell 2.2"                     xpath="//pageViewport[2]//flow/block[2]/block[4]//text"/>
   </checks>
 </testcase>