diff options
author | Jeremias Maerki <jeremias@apache.org> | 2009-02-03 16:28:21 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2009-02-03 16:28:21 +0000 |
commit | 46334ec875bcbbd0fba0370a62c8446c2a038f12 (patch) | |
tree | 3c93767c51188ce2f3c7b680607288f9d4abeb6a /test | |
parent | 68c5f3f3247622b7ea102f42cdeaf481a33579d7 (diff) | |
parent | 34856199208b84891a449d0d97fd11e0803f8e8f (diff) | |
download | xmlgraphics-fop-46334ec875bcbbd0fba0370a62c8446c2a038f12.tar.gz xmlgraphics-fop-46334ec875bcbbd0fba0370a62c8446c2a038f12.zip |
Merge from Trunk revisions 735029 - 740275.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@740340 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
3 files changed, 292 insertions, 2 deletions
diff --git a/test/fotree/testcases/table-row-marker_bug46567.fo b/test/fotree/testcases/table-row-marker_bug46567.fo new file mode 100644 index 000000000..4ee580dc0 --- /dev/null +++ b/test/fotree/testcases/table-row-marker_bug46567.fo @@ -0,0 +1,57 @@ +<?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$ --> +<!-- + see: http://issues.apache.org/bugzilla/show_bug.cgi?id=46567 + Note: no real checks, should just run through without an error +--> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="15cm" page-width="15cm" margin="1cm"> + <fo:region-body background-color="#F0F0F0" margin-top="1cm"/> + <fo:region-before extent="1cm"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:static-content flow-name="xsl-region-before"> + <fo:retrieve-marker retrieve-class-name="marker-in-table" + retrieve-position="first-starting-within-page" retrieve-boundary="page"/> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:table table-layout="fixed" width="100%"> + <fo:table-header> + <fo:table-cell><fo:block>Header 1</fo:block></fo:table-cell> + <fo:table-cell><fo:block>Header 2</fo:block></fo:table-cell> + </fo:table-header> + <fo:table-body> + <fo:table-row> + <fo:marker marker-class-name="marker-in-table"><fo:block>The marker from the + table</fo:block></fo:marker> + <fo:table-cell><fo:block>Cell 1.1</fo:block></fo:table-cell> + <fo:table-cell><fo:block>Cell 1.2</fo:block></fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell><fo:block>Cell 2.1</fo:block></fo:table-cell> + <fo:table-cell><fo:block>Cell 2.2</fo:block></fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/test/java/org/apache/fop/config/BaseUserConfigTestCase.java b/test/java/org/apache/fop/config/BaseUserConfigTestCase.java index 4a450a788..5c803317e 100644 --- a/test/java/org/apache/fop/config/BaseUserConfigTestCase.java +++ b/test/java/org/apache/fop/config/BaseUserConfigTestCase.java @@ -23,14 +23,16 @@ import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; +import org.xml.sax.SAXException; + import org.apache.avalon.framework.configuration.Configuration; import org.apache.avalon.framework.configuration.ConfigurationException; import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.apache.fop.apps.FOUserAgent; import org.apache.fop.render.pdf.BasePDFTestCase; -import org.xml.sax.SAXException; /** * Basic runtime test for FOP's font configuration. It is used to verify that @@ -66,7 +68,7 @@ public abstract class BaseUserConfigTestCase extends BasePDFTestCase { final File baseDir = getBaseDir(); final String fontFOFilePath = getFontFOFilePath(); File foFile = new File(baseDir, fontFOFilePath); - final boolean dumpOutput = true; + final boolean dumpOutput = false; FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); convertFO(foFile, foUserAgent, dumpOutput); } diff --git a/test/layoutengine/standard-testcases/fox_disable-column-balancing.xml b/test/layoutengine/standard-testcases/fox_disable-column-balancing.xml new file mode 100644 index 000000000..ad9743ab6 --- /dev/null +++ b/test/layoutengine/standard-testcases/fox_disable-column-balancing.xml @@ -0,0 +1,231 @@ +<?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 fox:disable-column-balancing. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" + font-size="10pt" line-height="12pt"> + <fo:layout-master-set> + <fo:simple-page-master page-height="250pt" page-width="200pt" master-name="page"> + <fo:region-body margin-right="3pt" margin-left="3pt" margin-bottom="14pt" + margin-top="8pt" column-count="2"/> + </fo:simple-page-master> + </fo:layout-master-set> + <!-- sequence 1: column balancing disabled --> + <fo:page-sequence master-reference="page" background-color="#AAAAAA"> + <fo:flow flow-name="xsl-region-body" background-color="#80F010" + fox:disable-column-balancing="true"> + <fo:block background-color="#10F010">AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA + AAA</fo:block> + <fo:block background-color="#20E020">BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB + BBB BBB</fo:block> + <fo:block background-color="#80D030">CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC + CCC CCC</fo:block> + <fo:block background-color="#30C040">DDD DDD DDD DDD DDD DDD DDD DDD DDD DDD DDD + DDD DDD</fo:block> + <fo:block background-color="#90B050">EEE EEE EEE EEE EEE EEE EEE EEE EEE EEE EEE + EEE EEE EEE EEE</fo:block> + <fo:block background-color="#40A060">FFF FFF FFF FFF FFF FFF FFF FFF FFF FFF FFF + FFF FFF FFF FFF</fo:block> + <fo:block background-color="#A09070">GGG GGG GGG GGG GGG GGG GGG GGG GGG GGG GGG + GGG</fo:block> + <fo:block background-color="#508080">HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH + HHH HHH</fo:block> + <fo:block background-color="#B07090">III III III III III III III III III III III + III III III III III III III III III III III</fo:block> + <fo:block background-color="#6060A0">JJJ JJJ JJJ JJJ JJJ JJJ JJJ JJJ JJJ JJJ JJJ + JJJ JJJ JJJ JJJ JJJ</fo:block> + <fo:block span="all" id="span1" background-color="#C050B0">KKK KKK KKK KKK KKK KKK + KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK + KKK</fo:block> + <fo:block background-color="#7040C0">LLL LLL LLL LLL LLL LLL LLL LLL LLL LLL LLL + LLL LLL LLL</fo:block> + <fo:block background-color="#D0F010">MMM MMM MMM MMM MMM MMM MMM MMM MMM + MMM</fo:block> + <fo:block background-color="#8030D0">NNN NNN NNN NNN NNN NNN NNN NNN NNN NNN NNN + NNN NNN</fo:block> + <fo:block background-color="#E020E0">OOO OOO OOO OOO OOO OOO OOO OOO OOO OOO + OOO</fo:block> + <fo:block background-color="#9010F0">PPP PPP PPP PPP PPP PPP PPP PPP PPP PPP + PPP</fo:block> + <fo:block background-color="#F0F010">QQQ QQQ QQQ QQQ QQQ QQQ QQQ QQQ + QQQ</fo:block> + <fo:block background-color="#A0E020">RRR RRR RRR RRR RRR RRR RRR RRR RRR RRR RRR + RRR RRR</fo:block> + <fo:block background-color="#10D030">SSS SSS SSS SSS SSS SSS SSS SSS SSS SSS SSS + SSS SSS</fo:block> + <fo:block background-color="#B0C040">TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT + TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT</fo:block> + <fo:block span="all" id="span2" background-color="#20B050">UUU UUU UUU UUU UUU UUU + UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU + UUU UUU UUU UUU</fo:block> + <fo:block background-color="#C0A060">VVV VVV VVV VVV VVV VVV VVV VVV VVV VVV VVV + VVV</fo:block> + <fo:block background-color="#309070">WWW WWW WWW WWW WWW WWW WWW WWW WWW + WWW</fo:block> + <fo:block background-color="#D08080">XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX + XXX XXX XXX</fo:block> + <fo:block background-color="#407090">YYY YYY YYY YYY YYY YYY YYY YYY YYY YYY YYY + YYY YYY</fo:block> + <fo:block background-color="#E060A0">ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ + ZZZ ZZZ ZZZ ZZZ</fo:block> + </fo:flow> + </fo:page-sequence> + <!-- sequence 2: column balancing enabled --> + <fo:page-sequence master-reference="page" initial-page-number="1" background-color="#AAAAAA"> + <fo:flow flow-name="xsl-region-body" background-color="#80F010" + fox:disable-column-balancing="false"> + <fo:block background-color="#10F010">AAA AAA AAA AAA AAA AAA AAA AAA AAA + AAA</fo:block> + <fo:block background-color="#20E020">BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB + BBB</fo:block> + <fo:block background-color="#80D030">CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC + CCC</fo:block> + <fo:block background-color="#30C040">DDD DDD DDD DDD DDD DDD DDD DDD DDD DDD + DDD</fo:block> + <fo:block background-color="#90B050">EEE EEE EEE EEE EEE EEE EEE EEE EEE EEE EEE + EEE EEE</fo:block> + <fo:block background-color="#40A060">FFF FFF FFF FFF FFF FFF FFF FFF FFF FFF FFF + FFF FFF</fo:block> + <fo:block background-color="#A09070">GGG GGG GGG GGG GGG GGG GGG GGG GGG + GGG</fo:block> + <fo:block background-color="#508080">HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH + HHH HHH</fo:block> + <fo:block background-color="#B07090">III III III III III III III III III III III + III III III III III III III III III III III III III III III III III</fo:block> + <fo:block background-color="#6060A0">JJJ JJJ JJJ JJJ JJJ JJJ JJJ JJJ JJJ JJJ JJJ + JJJ JJJ JJJ JJJ JJJ</fo:block> + <fo:block span="all" id="span3" background-color="#C050B0">KKK KKK KKK KKK KKK KKK + KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK + KKK</fo:block> + <fo:block background-color="#7040C0">LLL LLL LLL LLL LLL LLL LLL LLL LLL LLL LLL + LLL LLL LLL</fo:block> + <fo:block background-color="#D0F010">MMM MMM MMM MMM MMM MMM MMM MMM MMM + MMM</fo:block> + <fo:block background-color="#8030D0">NNN NNN NNN NNN NNN NNN NNN NNN NNN + NNN NNN NNN NNN</fo:block> + <fo:block background-color="#E020E0">OOO OOO OOO OOO OOO OOO OOO OOO OOO + OOO OOO</fo:block> + <fo:block background-color="#9010F0">PPP PPP PPP PPP PPP PPP PPP PPP PPP + PPP PPP PPP PPP PPP PPP</fo:block> + <fo:block background-color="#F0F010">QQQ QQQ QQQ QQQ QQQ QQQ QQQ QQQ QQQ + QQQ QQQ</fo:block> + <fo:block background-color="#A0E020">RRR RRR RRR RRR RRR RRR RRR RRR RRR RRR + RRR</fo:block> + <fo:block background-color="#10D030">SSS SSS SSS SSS SSS SSS SSS SSS SSS SSS + SSS</fo:block> + <fo:block background-color="#B0C040">TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT + TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT</fo:block> + <fo:block span="all" id="span4" background-color="#20B050">UUU UUU UUU UUU UUU UUU + UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU + UUU UUU</fo:block> + <fo:block background-color="#C0A060">VVV VVV VVV VVV VVV VVV VVV VVV VVV VVV VVV + VVV</fo:block> + <fo:block background-color="#309070">WWW WWW WWW WWW WWW WWW WWW WWW WWW + WWW</fo:block> + <fo:block background-color="#D08080">XXX XXX XXX XXX XXX XXX XXX XXX XXX + XXX XXX XXX XXX XXX</fo:block> + <fo:block background-color="#407090">YYY YYY YYY YYY YYY YYY YYY YYY YYY + YYY YYY YYY YYY</fo:block> + <fo:block background-color="#E060A0">ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ + ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ</fo:block> + </fo:flow> + </fo:page-sequence> + <!-- sequence 3: mixed --> + <fo:page-sequence master-reference="page" initial-page-number="1" background-color="#AAAAAA"> + <fo:flow flow-name="xsl-region-body" background-color="#80F010"> + <fo:block background-color="#10F010">AAA AAA AAA AAA AAA AAA AAA AAA AAA + AAA</fo:block> + <fo:block background-color="#20E020">BBB BBB + BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB</fo:block> + <fo:block background-color="#80D030">CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC + CCC CCC</fo:block> + <fo:block background-color="#30C040">DDD DDD DDD DDD DDD DDD DDD DDD DDD DDD + DDD</fo:block> + <fo:block background-color="#90B050">EEE EEE EEE EEE EEE EEE EEE EEE EEE + EEE EEE EEE EEE</fo:block> + <fo:block background-color="#40A060">FFF FFF FFF FFF FFF FFF FFF FFF FFF + FFF FFF FFF FFF</fo:block> + <fo:block background-color="#A09070">GGG GGG GGG GGG GGG GGG GGG GGG GGG + GGG</fo:block> + <fo:block background-color="#508080">HHH HHH HHH HHH HHH HHH HHH HHH HHH + HHH HHH</fo:block> + <fo:block background-color="#B07090">III III III III III III III III III + III III III III III III III III III III III</fo:block> + <fo:block background-color="#6060A0">JJJ JJJ JJJ JJJ JJJ JJJ JJJ JJJ JJJ + JJJ JJJ JJJ JJJ JJJ JJJ JJJ</fo:block> + <fo:block span="all" id="span5" fox:disable-column-balancing="true" + background-color="#C050B0">KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK + KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK KKK</fo:block> + <fo:block background-color="#7040C0">LLL LLL LLL LLL LLL LLL LLL LLL LLL LLL LLL + LLL LLL LLL</fo:block> + <fo:block background-color="#D0F010">MMM MMM MMM MMM MMM MMM MMM MMM MMM + MMM</fo:block> + <fo:block background-color="#8030D0">NNN NNN NNN NNN NNN NNN NNN NNN NNN + NNN NNN NNN NNN</fo:block> + <fo:block background-color="#E020E0">OOO OOO OOO OOO OOO OOO OOO OOO OOO + OOO OOO</fo:block> + <fo:block background-color="#9010F0">PPP PPP PPP PPP PPP PPP PPP PPP PPP + PPP PPP PPP PPP PPP PPP</fo:block> + <fo:block background-color="#F0F010">QQQ QQQ QQQ QQQ QQQ QQQ QQQ QQQ QQQ + QQQ QQQ</fo:block> + <fo:block background-color="#A0E020">RRR RRR RRR RRR RRR RRR RRR RRR RRR + RRR RRR RRR RRR</fo:block> + <fo:block background-color="#10D030">SSS SSS SSS SSS SSS SSS SSS SSS SSS + SSS SSS SSS SSS</fo:block> + <fo:block background-color="#B0C040">TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT + TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT TTT + TTT</fo:block> + <fo:block span="all" id="span6" background-color="#20B050">UUU UUU UUU UUU UUU UUU + UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU UUU + UUU UUU</fo:block> + <fo:block background-color="#C0A060">VVV VVV VVV VVV VVV VVV VVV VVV VVV VVV VVV + VVV</fo:block> + <fo:block background-color="#309070">WWW WWW WWW WWW WWW WWW WWW WWW WWW + WWW</fo:block> + <fo:block background-color="#D08080">XXX XXX XXX XXX XXX XXX XXX XXX XXX + XXX XXX XXX XXX XXX</fo:block> + <fo:block background-color="#407090">YYY YYY YYY YYY YYY YYY YYY YYY YYY + YYY YYY YYY YYY</fo:block> + <fo:block background-color="#E060A0">ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ + ZZZ ZZZ ZZZ ZZZ ZZZ ZZZ</fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="0" xpath="//pageSequence[1]/pageViewport[2]//span[1]/flow[2]/@bpd"/> + <eval expected="12000" xpath="//pageSequence[1]/pageViewport[3]//span[2]/@bpd"/> + <!-- TODO Replace with the following test once bugs affecting multiple columns have been + corrected + <eval expected="0" xpath="count(//pageSequence[1]/pageViewport[3]//block[@prod-id='span2'])"/> + --> + + <eval expected="24000" xpath="//pageSequence[2]/pageViewport[2]//span[1]/flow[2]/@bpd"/> + <eval expected="84000" xpath="//pageSequence[2]/pageViewport[3]//span[1]/flow[2]/@bpd"/> + + <eval expected="0" xpath="//pageSequence[3]/pageViewport[2]//span[1]/flow[2]/@bpd"/> + <eval expected="180000" xpath="//pageSequence[3]/pageViewport[3]//span[1]/flow[2]/@bpd"/> + </checks> +</testcase> |