You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

table_row-height_break.xml 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 test checks that a forced break is still taken into account when the minimal height of a
  21. row is not reached yet.
  22. </p>
  23. </info>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  26. <fo:layout-master-set>
  27. <fo:simple-page-master master-name="page" page-height="4in" page-width="5in" margin="0.5in">
  28. <fo:region-body/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="page">
  32. <fo:flow flow-name="xsl-region-body">
  33. <fo:block>The first row of the following table has a fixed height, and a forced break
  34. occurs before this height is reached.</fo:block>
  35. <fo:table width="100%" table-layout="fixed"
  36. border-collapse="separate" border="4pt solid black">
  37. <fo:table-body>
  38. <fo:table-row block-progression-dimension.minimum="40pt">
  39. <fo:table-cell border="4pt solid red">
  40. <fo:block>Cell 1</fo:block>
  41. <fo:block break-before="page">Should be on a new page</fo:block>
  42. </fo:table-cell>
  43. <fo:table-cell border="4pt solid blue">
  44. <fo:block>Cell 2</fo:block>
  45. </fo:table-cell>
  46. </fo:table-row>
  47. <fo:table-row block-progression-dimension.minimum="50pt">
  48. <fo:table-cell border="4pt solid blue">
  49. <fo:block>Cell 3</fo:block>
  50. </fo:table-cell>
  51. <fo:table-cell border="4pt solid blue">
  52. <fo:block>Cell 4</fo:block>
  53. </fo:table-cell>
  54. </fo:table-row>
  55. </fo:table-body>
  56. </fo:table>
  57. </fo:flow>
  58. </fo:page-sequence>
  59. </fo:root>
  60. </fo>
  61. <checks>
  62. <!-- page 1 -->
  63. <eval expected="44000" xpath="//pageViewport[1]//flow/block[2]/@bpd"/>
  64. <eval expected="48000" xpath="//pageViewport[1]//flow/block[2]/@bpda"/>
  65. <eval expected="40000" xpath="//pageViewport[1]//flow/block[2]/block[1]/@bpd"/>
  66. <eval expected="44000" xpath="//pageViewport[1]//flow/block[2]/block[1]/@bpda"/>
  67. <eval expected="Cell 1" xpath="//pageViewport[1]//flow/block[2]/block[1]//text"/>
  68. <eval expected="40000" xpath="//pageViewport[1]//flow/block[2]/block[2]/@bpd"/>
  69. <eval expected="44000" xpath="//pageViewport[1]//flow/block[2]/block[2]/@bpda"/>
  70. <eval expected="Cell 2" xpath="//pageViewport[1]//flow/block[2]/block[2]//text"/>
  71. <!-- page 2 -->
  72. <eval expected="90800" xpath="//pageViewport[2]//flow/block[1]/@bpd"/>
  73. <eval expected="94800" xpath="//pageViewport[2]//flow/block[1]/@bpda"/>
  74. <eval expected="28800" xpath="//pageViewport[2]//flow/block[1]/block[1]/@bpd"/>
  75. <eval expected="32800" xpath="//pageViewport[2]//flow/block[1]/block[1]/@bpda"/>
  76. <eval expected="Should be on a new" xpath="//pageViewport[2]//flow/block[1]/block[1]//text"/>
  77. <eval expected="28800" xpath="//pageViewport[2]//flow/block[1]/block[2]/@bpd"/>
  78. <eval expected="32800" xpath="//pageViewport[2]//flow/block[1]/block[2]/@bpda"/>
  79. <eval expected="" xpath="//pageViewport[2]//flow/block[1]/block[2]//text"/>
  80. <eval expected="50000" xpath="//pageViewport[2]//flow/block[1]/block[3]/@bpd"/>
  81. <eval expected="58000" xpath="//pageViewport[2]//flow/block[1]/block[3]/@bpda"/>
  82. <eval expected="50000" xpath="//pageViewport[2]//flow/block[1]/block[4]/@bpd"/>
  83. <eval expected="58000" xpath="//pageViewport[2]//flow/block[1]/block[4]/@bpda"/>
  84. </checks>
  85. </testcase>