aboutsummaryrefslogtreecommitdiffstats
path: root/fop
diff options
context:
space:
mode:
authorMatthias Reischenbacher <matthias@apache.org>2017-05-25 18:13:08 +0000
committerMatthias Reischenbacher <matthias@apache.org>2017-05-25 18:13:08 +0000
commitd907771bb89e90dbd1ef2c06fd83a2f3f699f472 (patch)
tree212178cfd3aeeb209bfe82b0f193a74f3f7fd741 /fop
parent416bcd114ebfae2c8dec56baf8429ec16e9c2bdc (diff)
downloadxmlgraphics-fop-d907771bb89e90dbd1ef2c06fd83a2f3f699f472.tar.gz
xmlgraphics-fop-d907771bb89e90dbd1ef2c06fd83a2f3f699f472.zip
FOP-2570: fix border placement in r-l mode, if there are row spans
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1796180 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fop')
-rw-r--r--fop/test/layoutengine/standard-testcases/table-border-row-span-rl.xml92
-rw-r--r--fop/test/layoutengine/standard-testcases/table-border-span-rl.xml6
2 files changed, 95 insertions, 3 deletions
diff --git a/fop/test/layoutengine/standard-testcases/table-border-row-span-rl.xml b/fop/test/layoutengine/standard-testcases/table-border-row-span-rl.xml
new file mode 100644
index 000000000..97f3bc350
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/table-border-row-span-rl.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ 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: table-border-separate3.xml 627324 2008-02-13 09:35:01Z maxberger $ -->
+<testcase>
+ <info>
+ <p>This test checks correct placement of table borders of spanned table cells in right-to-left writing mode.</p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master margin="20mm" master-name="odd" page-height="148mm" page-width="210mm">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence id="lastpagesequence" master-reference="odd" writing-mode="rl-tb">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:table border-collapse="collapse" table-layout="fixed" width="100%">
+ <fo:table-column column-width="60%"/>
+ <fo:table-column column-width="40%"/>
+ <fo:table-body>
+ <fo:table-row height="8px">
+ <fo:table-cell background-color="#DCDDDE" border-collapse="collapse" border-color="black" border-style="solid" border-width="1px">
+ <fo:block>A1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell background-color="#DCDDDE" border-collapse="collapse" border-color="black" border-style="solid" border-width="1px" number-rows-spanned="2">
+ <fo:block>B1,B2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="8px">
+ <fo:table-cell background-color="#DCDDDE" border-collapse="collapse" border-color="black" border-style="solid" border-width="1px">
+ <fo:block>A2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="8px">
+ <fo:table-cell border-collapse="collapse" border-color="black" border-style="solid" border-width="1px">
+ <fo:block>A3</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border-collapse="collapse" border-color="black" border-style="solid" border-width="1px">
+ <fo:block>B3</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <!-- ************** ROW 1 ************** -->
+ <!-- Border top, bottom, left and right of A1 -->
+ <eval expected="193256" xpath="//flow/block[1]/block[1][.//word = 'A1'][@border-before and @border-after and @border-end and @border-start]/@left-offset"/>
+ <eval expected="-500" xpath="//flow/block[1]/block[1][.//word = 'A1'][@border-before and @border-after and @border-end and @border-start]/@top-offset"/>
+
+ <!-- Border top, left and right of B1 -->
+ <eval expected="500" xpath="//flow/block[1]/block[3][@border-before and not(@border-after) and @border-end and @border-start]/@left-offset"/>
+ <eval expected="-500" xpath="//flow/block[1]/block[3][@border-before and not(@border-after) and @border-end and @border-start]/@top-offset"/>
+
+ <!-- ************** ROW 2 ************** -->
+ <!-- Border top, bottom, left and right of A2 -->
+ <eval expected="193256" xpath="//flow/block[1]/block[2][.//word = 'A2'][@border-before and @border-after and @border-end and @border-start]/@left-offset"/>
+ <eval expected="14900" xpath="//flow/block[1]/block[2][.//word = 'A2'][@border-before and @border-after and @border-end and @border-start]/@top-offset"/>
+
+ <!-- Border bottom, left and right of B2 -->
+ <eval expected="500" xpath="//flow/block[1]/block[4][not(@border-before) and @border-after and @border-end and @border-start]/@left-offset"/>
+ <eval expected="15400" xpath="//flow/block[1]/block[4][not(@border-before) and @border-after and @border-end and @border-start]/@top-offset"/>
+
+ <!-- ************** ROW 3 ************** -->
+ <!-- Border top, bottom, left and right of A3 -->
+ <eval expected="193256" xpath="//flow/block[1]/block[6][.//word = 'A3'][@border-before and @border-after and @border-end and @border-start]/@left-offset"/>
+ <eval expected="30300" xpath="//flow/block[1]/block[6][.//word = 'A3'][@border-before and @border-after and @border-end and @border-start]/@top-offset"/>
+
+ <!-- Border top, bottom, left and right of B3 -->
+ <eval expected="500" xpath="//flow/block[1]/block[7][.//word = 'B3'][@border-before and @border-after and @border-end and @border-start]/@left-offset"/>
+ <eval expected="30300" xpath="//flow/block[1]/block[7][.//word = 'B3'][@border-before and @border-after and @border-end and @border-start]/@top-offset"/>
+ </checks>
+</testcase> \ No newline at end of file
diff --git a/fop/test/layoutengine/standard-testcases/table-border-span-rl.xml b/fop/test/layoutengine/standard-testcases/table-border-span-rl.xml
index 6e0d46ffc..e1d14eed9 100644
--- a/fop/test/layoutengine/standard-testcases/table-border-span-rl.xml
+++ b/fop/test/layoutengine/standard-testcases/table-border-span-rl.xml
@@ -86,7 +86,7 @@
<eval expected="-500" xpath="//flow/block[1]/block[1]/block[1]/block[2][@border-before and @border-after and not(@border-end) and not(@border-start)]/@top-offset"/>
<!-- Border top, bottom and right of TCU 3 -->
- <eval expected="582303" xpath="//flow/block[1]/block[1]/block[1]/block[3][@border-before and @border-after and @border-start and not(@border-end)]/@left-offset"/>
+ <eval expected="582803" xpath="//flow/block[1]/block[1]/block[1]/block[3][@border-before and @border-after and @border-start and not(@border-end)]/@left-offset"/>
<eval expected="-500" xpath="//flow/block[1]/block[1]/block[1]/block[3][@border-before and @border-after and @border-start and not(@border-end)]/@top-offset"/>
@@ -109,7 +109,7 @@
<eval expected="25500" xpath="//flow/block[1]/block[1]/block[1]/block[8][@border-before and @border-after and @border-end and not(@border-start)]/@top-offset"/>
<!-- Border top, bottom and right of TCU 3 -->
- <eval expected="509453" xpath="//flow/block[1]/block[1]/block[1]/block[9][@border-before and @border-after and not(@border-end) and @border-start]/@left-offset"/>
+ <eval expected="509953" xpath="//flow/block[1]/block[1]/block[1]/block[9][@border-before and @border-after and not(@border-end) and @border-start]/@left-offset"/>
<eval expected="25500" xpath="//flow/block[1]/block[1]/block[1]/block[9][@border-before and @border-after and not(@border-end) and @border-start]/@top-offset"/>
<!-- Border top, bottom, left and right of TCU 1 -->
@@ -127,7 +127,7 @@
<eval expected="38500" xpath="//flow/block[1]/block[1]/block[1]/block[13][@border-before and @border-after and @border-end and not(@border-start)]/@top-offset"/>
<!-- Border top, bottom and right of TCU 2 -->
- <eval expected="218051" xpath="//flow/block[1]/block[1]/block[1]/block[14][@border-before and @border-after and @border-start and not(@border-end)]/@left-offset"/>
+ <eval expected="218551" xpath="//flow/block[1]/block[1]/block[1]/block[14][@border-before and @border-after and @border-start and not(@border-end)]/@left-offset"/>
<eval expected="38500" xpath="//flow/block[1]/block[1]/block[1]/block[14][@border-before and @border-after and @border-start and not(@border-end)]/@top-offset"/>
</checks>
</testcase> \ No newline at end of file