]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Testcase which currently shows two bugs:
authorJeremias Maerki <jeremias@apache.org>
Thu, 28 Jul 2005 21:19:44 +0000 (21:19 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 28 Jul 2005 21:19:44 +0000 (21:19 +0000)
- Padding is not correctly handled when adding areas on tables.
- display-align doesn't work as expected in conjunction with border and/or padding.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225889 13f79535-47bb-0310-9956-ffa450edef68

test/layoutengine/testcases/table-cell7.xml [new file with mode: 0644]

diff --git a/test/layoutengine/testcases/table-cell7.xml b/test/layoutengine/testcases/table-cell7.xml
new file mode 100644 (file)
index 0000000..5f979da
--- /dev/null
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+  Copyright 2005 The Apache Software Foundation\r
+\r
+  Licensed under the Apache License, Version 2.0 (the "License");\r
+  you may not use this file except in compliance with the License.\r
+  You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+  Unless required by applicable law or agreed to in writing, software\r
+  distributed under the License is distributed on an "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  See the License for the specific language governing permissions and\r
+  limitations under the License.\r
+-->\r
+<!-- $Id$ -->\r
+<testcase>\r
+  <info>\r
+    <p>\r
+      This test checks certain aspects of the area tree generation for table-cells.\r
+    </p>\r
+  </info>\r
+  <fo>\r
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">\r
+      <fo:layout-master-set>\r
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">\r
+          <fo:region-body/>\r
+        </fo:simple-page-master>\r
+      </fo:layout-master-set>\r
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">\r
+        <fo:flow flow-name="xsl-region-body">\r
+          <fo:table table-layout="fixed" border-collapse="separate">\r
+            <fo:table-column column-width="100%"/>\r
+            <fo:table-body>\r
+              <fo:table-cell starts-row="true">\r
+                <fo:block>plain block</fo:block>\r
+              </fo:table-cell>\r
+              <fo:table-cell starts-row="true" border="solid 5pt" background-color="yellow">\r
+                <fo:block>cell with border</fo:block>\r
+              </fo:table-cell>\r
+              <fo:table-cell starts-row="true" padding="5pt">\r
+                <fo:block background-color="orange">cell with padding</fo:block>\r
+              </fo:table-cell>\r
+              <fo:table-cell starts-row="true" border="solid 5pt" padding="5pt" background-color="yellow">\r
+                <fo:block background-color="orange">cell with border and padding</fo:block>\r
+              </fo:table-cell>\r
+              <fo:table-cell starts-row="true" border="solid 5pt" height="30pt" display-align="center">\r
+                <fo:block>cell with border and height</fo:block>\r
+              </fo:table-cell>\r
+              <fo:table-cell starts-row="true" padding="5pt" height="30pt" display-align="center" background-color="yellow">\r
+                <fo:block background-color="orange">cell with padding and height</fo:block>\r
+              </fo:table-cell>\r
+            </fo:table-body>\r
+          </fo:table>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <!-- row 1 -->\r
+    <eval expected="360000" xpath="//flow/block[1]/block[1]/@ipd"/>\r
+    <eval expected="360000" xpath="//flow/block[1]/block[1]/@ipda"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/@bpd"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/@bpda"/>\r
+    <eval expected="360000" xpath="//flow/block[1]/block[1]/block[1]/@ipd"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@bpd"/>\r
+\r
+    <!-- row 2 -->\r
+    <eval expected="5000" xpath="//flow/block[1]/block[2]/@left-offset"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[2]/@top-offset"/>\r
+    <eval expected="350000" xpath="//flow/block[1]/block[2]/@ipd"/>\r
+    <eval expected="360000" xpath="//flow/block[1]/block[2]/@ipda"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[2]/@bpd"/>\r
+    <eval expected="24400" xpath="//flow/block[1]/block[2]/@bpda"/>\r
+    <eval expected="350000" xpath="//flow/block[1]/block[2]/block[1]/@ipd"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[2]/block[1]/@bpd"/>\r
+\r
+    <!-- row 3 -->\r
+    <eval expected="5000" xpath="//flow/block[1]/block[3]/@left-offset"/>\r
+    <eval expected="38800" xpath="//flow/block[1]/block[3]/@top-offset"/>\r
+    <eval expected="350000" xpath="//flow/block[1]/block[3]/@ipd"/>\r
+    <eval expected="360000" xpath="//flow/block[1]/block[3]/@ipda"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[3]/@bpd"/>\r
+    <eval expected="24400" xpath="//flow/block[1]/block[3]/@bpda"/>\r
+    <eval expected="350000" xpath="//flow/block[1]/block[3]/block[1]/@ipd"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[3]/block[1]/@bpd"/>\r
+\r
+    <!-- row 4 -->\r
+    <eval expected="10000" xpath="//flow/block[1]/block[4]/@left-offset"/>\r
+    <eval expected="63200" xpath="//flow/block[1]/block[4]/@top-offset"/>\r
+    <eval expected="340000" xpath="//flow/block[1]/block[4]/@ipd"/>\r
+    <eval expected="360000" xpath="//flow/block[1]/block[4]/@ipda"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[4]/@bpd"/>\r
+    <eval expected="34400" xpath="//flow/block[1]/block[4]/@bpda"/>\r
+    <eval expected="340000" xpath="//flow/block[1]/block[4]/block[1]/@ipd"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[4]/block[1]/@bpd"/>\r
+\r
+    <!-- row 5 -->\r
+    <eval expected="5000" xpath="//flow/block[1]/block[5]/@left-offset"/>\r
+    <eval expected="97600" xpath="//flow/block[1]/block[5]/@top-offset"/>\r
+    <eval expected="350000" xpath="//flow/block[1]/block[5]/@ipd"/>\r
+    <eval expected="360000" xpath="//flow/block[1]/block[5]/@ipda"/>\r
+    <eval expected="30000" xpath="//flow/block[1]/block[5]/@bpd"/>\r
+    <eval expected="40000" xpath="//flow/block[1]/block[5]/@bpda"/>\r
+    <eval expected="7800" xpath="//flow/block[1]/block[5]/block[1]/@bpd"/> <!--spacer-->\r
+    <eval expected="350000" xpath="//flow/block[1]/block[5]/block[2]/@ipd"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[5]/block[2]/@bpd"/>\r
+    \r
+    <!-- row 6 -->\r
+    <eval expected="5000" xpath="//flow/block[1]/block[6]/@left-offset"/>\r
+    <eval expected="137600" xpath="//flow/block[1]/block[6]/@top-offset"/>\r
+    <eval expected="350000" xpath="//flow/block[1]/block[6]/@ipd"/>\r
+    <eval expected="360000" xpath="//flow/block[1]/block[6]/@ipda"/>\r
+    <eval expected="30000" xpath="//flow/block[1]/block[6]/@bpd"/>\r
+    <eval expected="40000" xpath="//flow/block[1]/block[6]/@bpda"/>\r
+    <eval expected="7800" xpath="//flow/block[1]/block[6]/block[1]/@bpd"/> <!--spacer-->\r
+    <eval expected="350000" xpath="//flow/block[1]/block[6]/block[2]/@ipd"/>\r
+    <eval expected="14400" xpath="//flow/block[1]/block[6]/block[2]/@bpd"/>\r
+  </checks>\r
+</testcase>\r