From d907771bb89e90dbd1ef2c06fd83a2f3f699f472 Mon Sep 17 00:00:00 2001 From: Matthias Reischenbacher Date: Thu, 25 May 2017 18:13:08 +0000 Subject: [PATCH] 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 --- .../table/TableCellLayoutManager.java | 2 +- .../table-border-row-span-rl.xml | 92 +++++++++++++++++++ .../table-border-span-rl.xml | 6 +- 3 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 fop/test/layoutengine/standard-testcases/table-border-row-span-rl.xml diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java index eed28ff15..cfa064db6 100644 --- a/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java +++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java @@ -474,7 +474,7 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager { if (level == 1) { addBorder(blocks, y, gridUnits.length - 1, Trait.BORDER_START, border, inFirstColumn, level); - adjustXOffset(blocks[y][gridUnits.length - 1], -borderWidth); + adjustIPD(blocks[y][gridUnits.length - 1], -borderWidth); } else { addBorder(blocks, y, 0, Trait.BORDER_START, border, inFirstColumn, level); 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 @@ + + + + + +

This test checks correct placement of table borders of spanned table cells in right-to-left writing mode.

+
+ + + + + + + + + + + + + + + + + A1 + + + B1,B2 + + + + + A2 + + + + + A3 + + + B3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ 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 @@ - + @@ -109,7 +109,7 @@ - + @@ -127,7 +127,7 @@ - + \ No newline at end of file -- 2.39.5