aboutsummaryrefslogtreecommitdiffstats
path: root/test/layoutengine
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2011-03-21 16:46:53 +0000
committerVincent Hennebert <vhennebert@apache.org>2011-03-21 16:46:53 +0000
commit1337f45867b9e8e97da1b4672260b674721a172c (patch)
tree58825e77093df18c7481183d0bc6bcbc60541356 /test/layoutengine
parentc5e6d82c6c6497e17b03a45de2a8883814ef2421 (diff)
downloadxmlgraphics-fop-1337f45867b9e8e97da1b4672260b674721a172c.tar.gz
xmlgraphics-fop-1337f45867b9e8e97da1b4672260b674721a172c.zip
Bugfix: keep-together on a table containing row-spanning cells was not honored
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1083863 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/layoutengine')
-rw-r--r--test/layoutengine/standard-testcases/table_keep-together_row-span.xml69
1 files changed, 69 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/table_keep-together_row-span.xml b/test/layoutengine/standard-testcases/table_keep-together_row-span.xml
new file mode 100644
index 000000000..b751fcaee
--- /dev/null
+++ b/test/layoutengine/standard-testcases/table_keep-together_row-span.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that keep-together works on tables that have a cell spanning several rows.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page"
+ page-height="320pt" page-width="420pt" margin="10pt">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body" font-size="8pt" line-height="10pt">
+ <fo:block>Block</fo:block>
+ <fo:block space-before="245pt">Before the table</fo:block>
+ <fo:table table-layout="fixed" width="100%" id="table" keep-together.within-page="always">
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell id="Cell 1.1" border="1pt solid black" number-rows-spanned="2">
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell id="Cell 1.2" border="1pt solid black">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell id="Cell 2.2" border="1pt solid black">
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="0" xpath="count(//pageViewport[1]//block[@prod-id='table'])"/>
+ <eval expected="62000" xpath="//pageViewport[2]//block[@prod-id='table']/@bpd"/>
+ <eval expected="61000" xpath="//pageViewport[2]//block[@prod-id='Cell 1.1']/@bpd"/>
+ <eval expected="30000" xpath="//pageViewport[2]//block[@prod-id='Cell 1.2']/@bpd"/>
+ <eval expected="30000" xpath="//pageViewport[2]//block[@prod-id='Cell 2.2']/@bpd"/>
+ </checks>
+</testcase>