您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

table_bug44621.xml 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <testcase>
  18. <info>
  19. <p>
  20. This is a testcase for bug #44621: when the width of the after border of a cell, in the
  21. trailing case, is bigger than in the normal case, a wrong sequence of Knuth elements was
  22. generated, leading to some content being swallowed.
  23. </p>
  24. </info>
  25. <fo>
  26. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  27. <fo:layout-master-set>
  28. <fo:simple-page-master master-name="page" page-height="4in" page-width="5in" margin="0.5in">
  29. <fo:region-body background-color="#F0F0F0"/>
  30. </fo:simple-page-master>
  31. </fo:layout-master-set>
  32. <fo:page-sequence master-reference="page" font-size="12pt">
  33. <fo:flow flow-name="xsl-region-body">
  34. <fo:block space-after="10pt">The after borders of the body’s cells, in the trailing case,
  35. are thicker than in the normal case.</fo:block>
  36. <fo:table width="100%" table-layout="fixed"
  37. font-size="8pt" line-height="10pt">
  38. <fo:table-column column-width="proportional-column-width(1)"
  39. number-columns-repeated="2"/>
  40. <fo:table-footer>
  41. <fo:table-cell border="4pt solid blue">
  42. <fo:block>Footer 1.1</fo:block>
  43. </fo:table-cell>
  44. <fo:table-cell border="4pt solid blue">
  45. <fo:block>Footer 1.2</fo:block>
  46. </fo:table-cell>
  47. </fo:table-footer>
  48. <fo:table-body>
  49. <fo:table-row>
  50. <fo:table-cell border="2pt solid black">
  51. <fo:block>Cell 1.1</fo:block>
  52. </fo:table-cell>
  53. <fo:table-cell border="2pt solid black">
  54. <fo:block>Cell 1.2</fo:block>
  55. </fo:table-cell>
  56. </fo:table-row>
  57. <fo:table-row>
  58. <fo:table-cell border="2pt solid black">
  59. <fo:block>Cell 2.1</fo:block>
  60. </fo:table-cell>
  61. <fo:table-cell border="2pt solid black">
  62. <fo:block>Cell 2.2</fo:block>
  63. </fo:table-cell>
  64. </fo:table-row>
  65. </fo:table-body>
  66. </fo:table>
  67. <fo:block space-before="20pt" space-after="10pt">The after border of cell 1, in the normal
  68. case, is thicker than in the trailing case.</fo:block>
  69. <fo:table width="100%" table-layout="fixed"
  70. font-size="8pt" line-height="10pt">
  71. <fo:table-body>
  72. <fo:table-row>
  73. <fo:table-cell border="1pt solid black">
  74. <fo:block>Cell 1</fo:block>
  75. </fo:table-cell>
  76. </fo:table-row>
  77. <fo:table-row>
  78. <fo:table-cell border="2pt solid black">
  79. <fo:block>Cell 2</fo:block>
  80. </fo:table-cell>
  81. </fo:table-row>
  82. </fo:table-body>
  83. </fo:table>
  84. </fo:flow>
  85. </fo:page-sequence>
  86. </fo:root>
  87. </fo>
  88. <checks>
  89. <!-- table 1 -->
  90. <eval expected="39000" xpath="//pageViewport//flow/block[2]/@bpd"/>
  91. <eval expected="39000" xpath="//pageViewport//flow/block[2]/@bpda"/>
  92. <!-- cell 1.1 -->
  93. <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[1]/@bpd"/>
  94. <eval expected="14000" xpath="//pageViewport//flow/block[2]/block[1]/@bpda"/>
  95. <!-- cell 1.2 -->
  96. <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[2]/@bpd"/>
  97. <eval expected="14000" xpath="//pageViewport//flow/block[2]/block[2]/@bpda"/>
  98. <!-- cell 2.1 -->
  99. <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[3]/@bpd"/>
  100. <eval expected="16000" xpath="//pageViewport//flow/block[2]/block[3]/@bpda"/>
  101. <!-- cell 2.2 -->
  102. <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[4]/@bpd"/>
  103. <eval expected="16000" xpath="//pageViewport//flow/block[2]/block[4]/@bpda"/>
  104. <!-- footer 1.1 -->
  105. <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[5]/@bpd"/>
  106. <eval expected="18000" xpath="//pageViewport//flow/block[2]/block[5]/@bpda"/>
  107. <!-- footer 1.2 -->
  108. <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[6]/@bpd"/>
  109. <eval expected="18000" xpath="//pageViewport//flow/block[2]/block[6]/@bpda"/>
  110. <!-- table 2 -->
  111. <eval expected="23500" xpath="//pageViewport//flow/block[4]/@bpd"/>
  112. <eval expected="23500" xpath="//pageViewport//flow/block[4]/@bpda"/>
  113. <!-- cell 1 -->
  114. <eval expected="10000" xpath="//pageViewport//flow/block[4]/block[1]/@bpd"/>
  115. <eval expected="13000" xpath="//pageViewport//flow/block[4]/block[1]/@bpda"/>
  116. <!-- cell 2 -->
  117. <eval expected="10000" xpath="//pageViewport//flow/block[4]/block[2]/@bpd"/>
  118. <eval expected="14000" xpath="//pageViewport//flow/block[4]/block[2]/@bpda"/>
  119. <element-list category="breaker">
  120. <skip>4</skip>
  121. <box w="12000"/>
  122. <penalty w="15000" p="0"/>
  123. <box w="13000"/>
  124. <box w="14000"/>
  125. <skip>6</skip>
  126. <box w="11000"/>
  127. <penalty w="0" p="0"/>
  128. <glue w="500"/>
  129. <box w="12000"/>
  130. <skip>3</skip>
  131. </element-list>
  132. </checks>
  133. </testcase>