Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

page-breaking_3.xml 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 normal breaking. It is a regression test for a special situation
  21. that causes/caused an ArrayOutOfBoundException when the block was broken over to a second page.
  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="simple" page-height="6cm" page-width="21cm">
  28. <fo:region-body/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="simple">
  32. <fo:flow flow-name="xsl-region-body">
  33. <fo:block-container height="5cm">
  34. <fo:block/>
  35. </fo:block-container>
  36. <fo:block line-height="10pt" background-color="orange"
  37. white-space-collapse="false" white-space-treatment="preserve" linefeed-treatment="preserve" wrap-option="no-wrap">
  38. line1
  39. line2
  40. line3
  41. </fo:block>
  42. </fo:flow>
  43. </fo:page-sequence>
  44. </fo:root>
  45. </fo>
  46. <checks>
  47. <!-- contents must be broken to the next page to show the bug. -->
  48. <eval expected="2" xpath="count(//pageViewport)"/>
  49. <eval expected="" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/lineArea[1]"/>
  50. <eval expected="line1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/lineArea[2]"/>
  51. <eval expected="line2" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea[1]"/>
  52. <eval expected="line3" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea[2]"/>
  53. </checks>
  54. </testcase>