diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-11-06 13:33:12 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-11-06 13:33:12 +0000 |
commit | 9013b27ff94fb3bf49e5e2576c7d1a167c922d8b (patch) | |
tree | c998bdb08e71fe225cb582886f3406caef1d4652 /test | |
parent | 7fa5e7067421af756f6cf24d45d415ecf8531547 (diff) | |
download | xmlgraphics-fop-9013b27ff94fb3bf49e5e2576c7d1a167c922d8b.tar.gz xmlgraphics-fop-9013b27ff94fb3bf49e5e2576c7d1a167c922d8b.zip |
Bugfix: Fixed bug when the sum of column widths of a table is larger than the specified widths. The table width was not adjusted.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@471725 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/layoutengine/standard-testcases/table_table-layout_fixed_3.xml | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/table_table-layout_fixed_3.xml b/test/layoutengine/standard-testcases/table_table-layout_fixed_3.xml new file mode 100644 index 000000000..e8925f91e --- /dev/null +++ b/test/layoutengine/standard-testcases/table_table-layout_fixed_3.xml @@ -0,0 +1,88 @@ +<?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 tables with table-layout="fixed" and when width is set but is less + than the sum of all column widths. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="20pt"> + <fo:region-body margin="0pt" background-color="lightgray"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:flow flow-name="xsl-region-body"> + <fo:table table-layout="fixed" width="100%" border-collapse="separate" + border="solid 5pt red" border-separation.inline-progression-direction="10pt"> + <fo:table-column column-width="90pt"/> + <fo:table-column column-width="90pt"/> + <fo:table-column column-width="90pt"/> + <fo:table-column column-width="60pt"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell border="solid 2.5pt"> + <fo:block>cell1</fo:block> + </fo:table-cell> + <fo:table-cell border="solid 2.5pt" background-color="yellow"> + <fo:block>cell2</fo:block> + </fo:table-cell> + <fo:table-cell border="solid 2.5pt"> + <fo:block>cell3</fo:block> + </fo:table-cell> + <fo:table-cell border="solid 2.5pt" background-color="yellow"> + <fo:block>cell4</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell background-color="orange"> + <fo:block>cell5</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>cell6</fo:block> + </fo:table-cell> + <fo:table-cell background-color="orange"> + <fo:block>cell7</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>cell8</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="340000" xpath="//flow/block[1]/@ipda"/> + <eval expected="330000" xpath="//flow/block[1]/@ipd"/> + <eval expected="80000" xpath="//flow/block[1]/block[1]/@ipda"/> + <eval expected="7500" xpath="//flow/block[1]/block[1]/@left-offset"/> + <eval expected="80000" xpath="//flow/block[1]/block[2]/@ipda"/> + <eval expected="97500" xpath="//flow/block[1]/block[2]/@left-offset"/> + <eval expected="80000" xpath="//flow/block[1]/block[3]/@ipda"/> + <eval expected="187500" xpath="//flow/block[1]/block[3]/@left-offset"/> + <eval expected="50000" xpath="//flow/block[1]/block[4]/@ipda"/> + <eval expected="277500" xpath="//flow/block[1]/block[4]/@left-offset"/> + </checks> +</testcase> |