diff options
author | Manuel Mall <manuel@apache.org> | 2005-10-07 08:55:22 +0000 |
---|---|---|
committer | Manuel Mall <manuel@apache.org> | 2005-10-07 08:55:22 +0000 |
commit | 2ae0a968ee9de3880e0cf03a1c505e2f296108a5 (patch) | |
tree | d21fa15aa17ff4247a5fae927b9a9c393a91ba87 /test | |
parent | e4796389dec62db384cee2610c5ec7011341ba2c (diff) | |
download | xmlgraphics-fop-2ae0a968ee9de3880e0cf03a1c505e2f296108a5.tar.gz xmlgraphics-fop-2ae0a968ee9de3880e0cf03a1c505e2f296108a5.zip |
Update to support border and padding and alignments on inline fos
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@307055 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
52 files changed, 5709 insertions, 292 deletions
diff --git a/test/layoutengine/disabled-testcases.txt b/test/layoutengine/disabled-testcases.txt index 078a3e068..dfb38521e 100644 --- a/test/layoutengine/disabled-testcases.txt +++ b/test/layoutengine/disabled-testcases.txt @@ -1,5 +1,5 @@ -character_background-image.xml block-container_reference-orientation_bug36391.xml +block_font-family_asian.xml block_font-stretch.xml block_padding_2.xml block_space-before_space-after_2.xml @@ -9,7 +9,7 @@ block_word-spacing_text-align_justify.xml external-graphic_oversized.xml inline-block_keep-together.xml inline_block_nested_3.xml -inline_border_padding.xml +inline_border_padding_block_nested.xml inline-container_block_nested.xml inline-container_border_padding.xml inline_letter-spacing.xml @@ -23,6 +23,7 @@ list-item_space-before_space-after_2.xml page-breaking_4.xml page-breaking_6.xml page-height_indefinite_simple.xml +page-number-citation_background-image.xml page-number-citation_complex_1.xml page-number-citation_complex_2.xml page-number_initial-page-number_2.xml diff --git a/test/layoutengine/testcases/basic-link_background-image.xml b/test/layoutengine/testcases/basic-link_background-image.xml index ce3c7bdd6..7ec697ffa 100644 --- a/test/layoutengine/testcases/basic-link_background-image.xml +++ b/test/layoutengine/testcases/basic-link_background-image.xml @@ -42,7 +42,7 @@ </fo> <checks> <eval expected="197376" xpath="//flow/block/lineArea/inlineparent/@ipd"/> - <eval expected="92100" xpath="//flow/block/lineArea/inlineparent/@bpd"/> - <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=75648,vertical=23010" xpath="//flow/block/lineArea/inlineparent/@background"/> + <eval expected="88800" xpath="//flow/block/lineArea/inlineparent/@bpd"/> + <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=75648,vertical=21360" xpath="//flow/block/lineArea/inlineparent/@background"/> </checks> </testcase> diff --git a/test/layoutengine/testcases/block_basic_2.xml b/test/layoutengine/testcases/block_basic_2.xml index f27c04585..84e485e24 100644 --- a/test/layoutengine/testcases/block_basic_2.xml +++ b/test/layoutengine/testcases/block_basic_2.xml @@ -56,18 +56,24 @@ <skip>3</skip> </element-list> - <eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/> - <eval expected="14400" xpath="//flow/block[2]/lineArea/@bpd"/> - <eval expected="14400" xpath="//flow/block[3]/lineArea/@bpd"/> - <eval expected="14400" xpath="//flow/block[4]/lineArea/@bpd"/> - <eval expected="14400" xpath="//flow/block[5]/lineArea/@bpd"/> - <eval expected="14400" xpath="//flow/block[6]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[4]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[5]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[6]/lineArea/@bpd"/> - <eval expected="10266" xpath="//flow/block[1]/lineArea/text/@vpos"/> - <eval expected="10266" xpath="//flow/block[2]/lineArea/text/@vpos"/> - <eval expected="10266" xpath="//flow/block[3]/lineArea/text/@vpos"/> - <eval expected="10266" xpath="//flow/block[4]/lineArea/text/@vpos"/> - <eval expected="10266" xpath="//flow/block[5]/lineArea/inlineparent/text/@vpos"/> - <eval expected="10266" xpath="//flow/block[6]/lineArea/char/@vpos"/> + <eval expected="0" xpath="//flow/block[1]/lineArea/text/@offset"/> + <eval expected="8616" xpath="//flow/block[1]/lineArea/text/@baseline"/> + <eval expected="0" xpath="//flow/block[2]/lineArea/text/@offset"/> + <eval expected="8616" xpath="//flow/block[2]/lineArea/text/@baseline"/> + <eval expected="0" xpath="//flow/block[3]/lineArea/text/@offset"/> + <eval expected="8616" xpath="//flow/block[3]/lineArea/text/@baseline"/> + <eval expected="0" xpath="//flow/block[4]/lineArea/text/@offset"/> + <eval expected="8616" xpath="//flow/block[4]/lineArea/text/@baseline"/> + <eval expected="0" xpath="//flow/block[5]/lineArea/inlineparent/@offset"/> + <eval expected="8616" xpath="//flow/block[5]/lineArea/inlineparent/text/@baseline"/> + <eval expected="0" xpath="//flow/block[6]/lineArea/char/@offset"/> + <eval expected="8616" xpath="//flow/block[6]/lineArea/char/@baseline"/> </checks> </testcase> diff --git a/test/layoutengine/testcases/block_line-height.xml b/test/layoutengine/testcases/block_line-height.xml index 5908e14ce..03bec53cc 100644 --- a/test/layoutengine/testcases/block_line-height.xml +++ b/test/layoutengine/testcases/block_line-height.xml @@ -55,20 +55,69 @@ </fo:root> </fo> <checks> - <eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/> - <eval expected="17280" xpath="//flow/block[1]/block[1]/lineArea/@bpd"/> - <eval expected="12000" xpath="//flow/block[1]/block[2]/lineArea/@bpd"/> - <eval expected="18000" xpath="//flow/block[2]/lineArea/@bpd"/> - <eval expected="18000" xpath="//flow/block[2]/block[1]/lineArea/@bpd"/> - <eval expected="18000" xpath="//flow/block[2]/block[2]/lineArea/@bpd"/> - <eval expected="20000" xpath="//flow/block[3]/lineArea/@bpd"/> - <eval expected="20000" xpath="//flow/block[3]/block[1]/lineArea/@bpd"/> - <eval expected="20000" xpath="//flow/block[3]/block[2]/lineArea/@bpd"/> - <eval expected="18000" xpath="//flow/block[4]/lineArea/@bpd"/> - <eval expected="21600" xpath="//flow/block[4]/block[1]/lineArea/@bpd"/> - <eval expected="15000" xpath="//flow/block[4]/block[2]/lineArea/@bpd"/> - <eval expected="13000" xpath="//flow/block[5]/lineArea/@bpd"/> - <eval expected="13000" xpath="//flow/block[5]/block[1]/lineArea/@bpd"/> - <eval expected="13000" xpath="//flow/block[5]/block[2]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/> + <eval expected="14400" xpath="//flow/block[1]/lineArea/@bpda"/> + <eval expected="1650" xpath="//flow/block[1]/lineArea/@space-before"/> + <eval expected="1650" xpath="//flow/block[1]/lineArea/@space-after"/> + <eval expected="13319" xpath="//flow/block[1]/block[1]/lineArea/@bpd"/> + <eval expected="17279" xpath="//flow/block[1]/block[1]/lineArea/@bpda"/> + <eval expected="1980" xpath="//flow/block[1]/block[1]/lineArea/@space-before"/> + <eval expected="1980" xpath="//flow/block[1]/block[1]/lineArea/@space-after"/> + <eval expected="9250" xpath="//flow/block[1]/block[2]/lineArea/@bpd"/> + <eval expected="12000" xpath="//flow/block[1]/block[2]/lineArea/@bpda"/> + <eval expected="1375" xpath="//flow/block[1]/block[2]/lineArea/@space-before"/> + <eval expected="1375" xpath="//flow/block[1]/block[2]/lineArea/@space-after"/> + + <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/> + <eval expected="18000" xpath="//flow/block[2]/lineArea/@bpda"/> + <eval expected="3450" xpath="//flow/block[2]/lineArea/@space-before"/> + <eval expected="3450" xpath="//flow/block[2]/lineArea/@space-after"/> + <eval expected="13319" xpath="//flow/block[2]/block[1]/lineArea/@bpd"/> + <eval expected="17999" xpath="//flow/block[2]/block[1]/lineArea/@bpda"/> + <eval expected="2340" xpath="//flow/block[2]/block[1]/lineArea/@space-before"/> + <eval expected="2340" xpath="//flow/block[2]/block[1]/lineArea/@space-after"/> + <eval expected="9250" xpath="//flow/block[2]/block[2]/lineArea/@bpd"/> + <eval expected="18000" xpath="//flow/block[2]/block[2]/lineArea/@bpda"/> + <eval expected="4375" xpath="//flow/block[2]/block[2]/lineArea/@space-before"/> + <eval expected="4375" xpath="//flow/block[2]/block[2]/lineArea/@space-after"/> + + <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/> + <eval expected="20000" xpath="//flow/block[3]/lineArea/@bpda"/> + <eval expected="4450" xpath="//flow/block[3]/lineArea/@space-before"/> + <eval expected="4450" xpath="//flow/block[3]/lineArea/@space-after"/> + <eval expected="13319" xpath="//flow/block[3]/block[1]/lineArea/@bpd"/> + <eval expected="19999" xpath="//flow/block[3]/block[1]/lineArea/@bpda"/> + <eval expected="3340" xpath="//flow/block[3]/block[1]/lineArea/@space-before"/> + <eval expected="3340" xpath="//flow/block[3]/block[1]/lineArea/@space-after"/> + <eval expected="9250" xpath="//flow/block[3]/block[2]/lineArea/@bpd"/> + <eval expected="20000" xpath="//flow/block[3]/block[2]/lineArea/@bpda"/> + <eval expected="5375" xpath="//flow/block[3]/block[2]/lineArea/@space-before"/> + <eval expected="5375" xpath="//flow/block[3]/block[2]/lineArea/@space-after"/> + + <eval expected="11100" xpath="//flow/block[4]/lineArea/@bpd"/> + <eval expected="18000" xpath="//flow/block[4]/lineArea/@bpda"/> + <eval expected="3450" xpath="//flow/block[4]/lineArea/@space-before"/> + <eval expected="3450" xpath="//flow/block[4]/lineArea/@space-after"/> + <eval expected="13319" xpath="//flow/block[4]/block[1]/lineArea/@bpd"/> + <eval expected="21599" xpath="//flow/block[4]/block[1]/lineArea/@bpda"/> + <eval expected="4140" xpath="//flow/block[4]/block[1]/lineArea/@space-before"/> + <eval expected="4140" xpath="//flow/block[4]/block[1]/lineArea/@space-after"/> + <eval expected="9250" xpath="//flow/block[4]/block[2]/lineArea/@bpd"/> + <eval expected="15000" xpath="//flow/block[4]/block[2]/lineArea/@bpda"/> + <eval expected="2875" xpath="//flow/block[4]/block[2]/lineArea/@space-before"/> + <eval expected="2875" xpath="//flow/block[4]/block[2]/lineArea/@space-after"/> + + <eval expected="11100" xpath="//flow/block[5]/lineArea/@bpd"/> + <eval expected="13000" xpath="//flow/block[5]/lineArea/@bpda"/> + <eval expected="950" xpath="//flow/block[5]/lineArea/@space-before"/> + <eval expected="950" xpath="//flow/block[5]/lineArea/@space-after"/> + <eval expected="13319" xpath="//flow/block[5]/block[1]/lineArea/@bpd"/> + <eval expected="13001" xpath="//flow/block[5]/block[1]/lineArea/@bpda"/> + <eval expected="-159" xpath="//flow/block[5]/block[1]/lineArea/@space-before"/> + <eval expected="-159" xpath="//flow/block[5]/block[1]/lineArea/@space-after"/> + <eval expected="9250" xpath="//flow/block[5]/block[2]/lineArea/@bpd"/> + <eval expected="13000" xpath="//flow/block[5]/block[2]/lineArea/@bpda"/> + <eval expected="1875" xpath="//flow/block[5]/block[2]/lineArea/@space-before"/> + <eval expected="1875" xpath="//flow/block[5]/block[2]/lineArea/@space-after"/> </checks> </testcase> diff --git a/test/layoutengine/testcases/character_background-color.xml b/test/layoutengine/testcases/character_background-color.xml new file mode 100755 index 000000000..a95d2cf50 --- /dev/null +++ b/test/layoutengine/testcases/character_background-color.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:character with background-color property. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </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" font-size="10pt"> + <fo:block background-color="silver"> + To <fo:character background-color="yellow" character="e" />mphasize a character highlight it. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="color=#ffff00" xpath="//flow/block[1]/lineArea/char/@background"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/character_background-image.xml b/test/layoutengine/testcases/character_background-image.xml index d71072076..8dc1f4361 100644 --- a/test/layoutengine/testcases/character_background-image.xml +++ b/test/layoutengine/testcases/character_background-image.xml @@ -18,7 +18,7 @@ <testcase> <info> <p> - This test checks background image on a character. + This test checks fo:character with background-image property. </p> </info> <variables> @@ -33,13 +33,16 @@ </fo:layout-master-set> <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> - <fo:block> - <fo:character font-size="96pt" character="A" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img" /> + <fo:block font-size="24pt"> + <fo:character font-size="96pt" character="A" background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img" /> + <fo:character font-size="48pt" character="g" background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img" /> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </fo> <checks> + <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=8976,vertical=21360" xpath="//flow/block[1]/lineArea/char[1]/@background"/> + <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=-9696,vertical=-840" xpath="//flow/block[1]/lineArea/char[2]/@background"/> </checks> </testcase> diff --git a/test/layoutengine/testcases/character_border_padding.xml b/test/layoutengine/testcases/character_border_padding.xml new file mode 100755 index 000000000..a5c6f6f7a --- /dev/null +++ b/test/layoutengine/testcases/character_border_padding.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:character with border and padding properties. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true" language="en"> + <fo:flow flow-name="xsl-region-body" font-size="10pt"> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt"> + To <fo:character border="solid 1pt red" background-color="yellow" character="e"/>mphasize a letter we give it a 1pt border. + </fo:block> + <fo:block background-color="silver" margin="10pt 0pt 10pt 0pt"> + To really <fo:character border="solid 5pt red" padding="5pt" background-color="yellow" character="e"/>mphasize a letter we give it a 5pt border and padding. + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt"> + To <fo:character border-style="solid" border-width="1pt 2pt 3pt 4pt" border-color="red" padding="1pt 2pt 3pt 4pt" background-color="yellow" character="c"/>onfuse give it unsymmetric borders and padding. + </fo:block> + <fo:block background-color="silver" margin="10pt 0pt 10pt 0pt" font-size="20pt"> + Big <fo:character border="solid 5pt red" padding="5pt" background-color="yellow" font-size="8pt" character="b"/>order but a smaller font. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="7180" xpath="//flow/block[2]/lineArea/char/@baseline"/> + <eval expected="0" xpath="//flow/block[2]/lineArea/char/@offset"/> + <eval expected="5560" xpath="//flow/block[2]/lineArea/char/@ipd"/> + <eval expected="7560" xpath="//flow/block[2]/lineArea/char/@ipda"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/char/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/char/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/char/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/char/@border-start"/> + + <eval expected="7180" xpath="//flow/block[5]/lineArea/char/@baseline"/> + <eval expected="0" xpath="//flow/block[5]/lineArea/char/@offset"/> + <eval expected="5560" xpath="//flow/block[5]/lineArea/char/@ipd"/> + <eval expected="25560" xpath="//flow/block[5]/lineArea/char/@ipda"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/char/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/char/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/char/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/char/@border-start"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/char/@padding-after"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/char/@padding-before"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/char/@padding-end"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/char/@padding-start"/> + + <eval expected="7180" xpath="//flow/block[8]/lineArea/char/@baseline"/> + <eval expected="0" xpath="//flow/block[8]/lineArea/char/@offset"/> + <eval expected="5000" xpath="//flow/block[8]/lineArea/char/@ipd"/> + <eval expected="17000" xpath="//flow/block[8]/lineArea/char/@ipda"/> + <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[8]/lineArea/char/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea/char/@border-before"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[8]/lineArea/char/@border-end"/> + <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[8]/lineArea/char/@border-start"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea/char/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea/char/@padding-before"/> + <eval expected="2000" xpath="//flow/block[8]/lineArea/char/@padding-end"/> + <eval expected="4000" xpath="//flow/block[8]/lineArea/char/@padding-start"/> + + <eval expected="5744" xpath="//flow/block[11]/lineArea/char/@baseline"/> + <eval expected="8616" xpath="//flow/block[11]/lineArea/char/@offset"/> + <eval expected="4448" xpath="//flow/block[11]/lineArea/char/@ipd"/> + <eval expected="24448" xpath="//flow/block[11]/lineArea/char/@ipda"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/char/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/char/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/char/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/char/@border-start"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/char/@padding-after"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/char/@padding-before"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/char/@padding-end"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/char/@padding-start"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/character_vertical-align.xml b/test/layoutengine/testcases/character_vertical-align.xml new file mode 100755 index 000000000..60f15505e --- /dev/null +++ b/test/layoutengine/testcases/character_vertical-align.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:character with vertical-align property. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + vertical-align<fo:character font-size="10pt" background-color="yellow" character="=" />not specified + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + vertical-align<fo:character font-size="10pt" vertical-align="baseline" background-color="yellow" character="=" />baseline + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + vertical-align<fo:character font-size="10pt" vertical-align="top" background-color="yellow" character="=" />top + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + vertical-align<fo:character font-size="10pt" vertical-align="middle" background-color="yellow" character="=" />middle + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + vertical-align<fo:character font-size="10pt" vertical-align="bottom" background-color="yellow" character="=" />bottom + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="7180" xpath="//flow/block[2]/lineArea/char/@offset"/> + <eval expected="7180" xpath="//flow/block[5]/lineArea/char/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea/char/@offset"/> + <eval expected="4565" xpath="//flow/block[11]/lineArea/char/@offset"/> + <eval expected="9250" xpath="//flow/block[14]/lineArea/char/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/external-graphic_border_padding.xml b/test/layoutengine/testcases/external-graphic_border_padding.xml index 43ff49649..a05c367b9 100644 --- a/test/layoutengine/testcases/external-graphic_border_padding.xml +++ b/test/layoutengine/testcases/external-graphic_border_padding.xml @@ -49,7 +49,7 @@ <eval expected="46080" xpath="//flow/block[1]/lineArea/viewport/@ipd"/> <eval expected="46080" xpath="//flow/block[1]/lineArea/viewport/@bpd"/> <eval expected="96080" xpath="//flow/block[1]/lineArea/viewport/@bpda"/> - <eval expected="1650" xpath="//flow/block[1]/lineArea/viewport/@offset"/> + <eval expected="0" xpath="//flow/block[1]/lineArea/viewport/@offset"/> <eval expected="20000 30000 20000 30000" xpath="//flow/block[1]/lineArea/viewport/@bap"/> <eval expected="color=#ffffff" xpath="//flow/block[1]/lineArea/viewport/@background"/> <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/> @@ -65,7 +65,7 @@ <eval expected="46080" xpath="//flow/block[2]/lineArea/viewport/@ipd"/> <eval expected="46080" xpath="//flow/block[2]/lineArea/viewport/@bpd"/> <eval expected="96080" xpath="//flow/block[2]/lineArea/viewport/@bpda"/> - <eval expected="23690" xpath="//flow/block[2]/lineArea/viewport/@offset"/> + <eval expected="4440" xpath="//flow/block[2]/lineArea/viewport/@offset"/> <eval expected="20000 30000 20000 30000" xpath="//flow/block[2]/lineArea/viewport/@bap"/> <eval expected="color=#ffffff" xpath="//flow/block[2]/lineArea/viewport/@background"/> <eval expected="(solid,#000000,5000)" xpath="//flow/block[2]/lineArea/viewport/@border-before"/> diff --git a/test/layoutengine/testcases/footnote_basic.xml b/test/layoutengine/testcases/footnote_basic.xml index 41395bd77..888c0b1c6 100644 --- a/test/layoutengine/testcases/footnote_basic.xml +++ b/test/layoutengine/testcases/footnote_basic.xml @@ -69,7 +69,7 @@ <!-- the footnote --> <eval expected="360000" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/@ipd"/> <eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/@bpd"/> - <eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/lineArea/@bpd"/> + <eval expected="11100" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/lineArea/@bpd"/> <eval expected="1" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/lineArea/inlineparent/text"/> <eval expected="6000" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/lineArea/inlineparent/text/@font-size"/> <eval expected="I'm a footnote!" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/lineArea/text[1]"/> diff --git a/test/layoutengine/testcases/footnote_footnote-separator.xml b/test/layoutengine/testcases/footnote_footnote-separator.xml index 2eb4a41f8..4bfdb64e1 100644 --- a/test/layoutengine/testcases/footnote_footnote-separator.xml +++ b/test/layoutengine/testcases/footnote_footnote-separator.xml @@ -79,13 +79,13 @@ <eval expected="360000" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/@ipd"/> <eval expected="3" xpath="count(//pageViewport[1]/page/regionViewport/regionBody/footnote/block)"/> <eval expected="7400" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/@bpd"/> - <eval expected="7200" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/block[1]/lineArea/@bpd"/> + <eval expected="5550" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/block[1]/lineArea/@bpd"/> <eval expected="I'm a block serving as a footnote separator. I'm on page 1." xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/block[1]/lineArea"/> <eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[2]/@bpd"/> - <eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[2]/lineArea/@bpd"/> + <eval expected="11100" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[2]/lineArea/@bpd"/> <eval expected="1I'm a footnote!" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[2]/lineArea"/> <eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[3]/@bpd"/> - <eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[3]/lineArea/@bpd"/> + <eval expected="11100" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[3]/lineArea/@bpd"/> <eval expected="2I'm another footnote!" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[3]/lineArea"/> <!-- page break checks --> <eval expected="filling 10..." xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[last()]/lineArea"/> @@ -102,10 +102,10 @@ <eval expected="2" xpath="count(//pageViewport[3]/page/regionViewport/regionBody/footnote/block)"/> <eval expected="360000" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[1]/@ipd"/> <eval expected="7400" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[1]/@bpd"/> - <eval expected="7200" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[1]/block[1]/lineArea/@bpd"/> + <eval expected="5550" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[1]/block[1]/lineArea/@bpd"/> <eval expected="I'm a block serving as a footnote separator. I'm on page 3." xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[1]/block[1]/lineArea"/> <eval expected="14400" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[2]/@bpd"/> - <eval expected="14400" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[2]/lineArea/@bpd"/> + <eval expected="11100" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[2]/lineArea/@bpd"/> <eval expected="I come from an empty block at the end of the flow!" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[2]/lineArea"/> </checks> </testcase> diff --git a/test/layoutengine/testcases/inline_alignment-adjust_1.xml b/test/layoutengine/testcases/inline_alignment-adjust_1.xml new file mode 100755 index 000000000..ac6a6233f --- /dev/null +++ b/test/layoutengine/testcases/inline_alignment-adjust_1.xml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level alignment-adjust. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" background-color="yellow">alignment-adjust not specified</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="auto" background-color="yellow">alignment-adjust="auto"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="baseline" background-color="yellow">alignment-adjust="baseline"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="before-edge" background-color="yellow">alignment-adjust="before-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="text-before-edge" background-color="yellow">alignment-adjust="text-before-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="central" background-color="yellow">alignment-adjust="central"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="middle" background-color="yellow">alignment-adjust="middle"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="after-edge" background-color="yellow">alignment-adjust="after-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="text-after-edge" background-color="yellow">alignment-adjust="text-after-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="ideographic" background-color="yellow">alignment-adjust="ideographic"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="alphabetic" background-color="yellow">alignment-adjust="alphabetic"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="hanging" background-color="yellow">alignment-adjust="hanging"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="mathematical" background-color="yellow">alignment-adjust="mathematical"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="top" background-color="yellow">alignment-adjust="top"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="bottom" background-color="yellow">alignment-adjust="bottom"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="text-top" background-color="yellow">alignment-adjust="text-top"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="text-bottom" background-color="yellow">alignment-adjust="text-bottom"</fo:inline> After + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="2872" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="10052" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="10052" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="5427" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="5487" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="802" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="802" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/> + <eval expected="802" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/> + <eval expected="2872" xpath="//flow/block[32]/lineArea[1]/inlineparent/@offset"/> + <eval expected="8616" xpath="//flow/block[35]/lineArea[1]/inlineparent/@offset"/> + <eval expected="6462" xpath="//flow/block[38]/lineArea[1]/inlineparent/@offset"/> + <eval expected="10052" xpath="//flow/block[41]/lineArea[1]/inlineparent/@offset"/> + <eval expected="802" xpath="//flow/block[44]/lineArea[1]/inlineparent/@offset"/> + <eval expected="10052" xpath="//flow/block[47]/lineArea[1]/inlineparent/@offset"/> + <eval expected="802" xpath="//flow/block[50]/lineArea[1]/inlineparent/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_alignment-adjust_2.xml b/test/layoutengine/testcases/inline_alignment-adjust_2.xml new file mode 100755 index 000000000..fd21545b2 --- /dev/null +++ b/test/layoutengine/testcases/inline_alignment-adjust_2.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level alignment-adjust. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="0pt" background-color="yellow">alignment-adjust="0pt"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="0%" background-color="yellow">alignment-adjust="0%"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="3pt" background-color="yellow">alignment-adjust="3pt"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="-3pt" background-color="yellow">alignment-adjust="-3pt"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="30%" background-color="yellow">alignment-adjust="30%"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-adjust="-30%" background-color="yellow">alignment-adjust="-30%"</fo:inline> After + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="12950" xpath="//flow/block[2]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/> + <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/> + + <eval expected="12950" xpath="//flow/block[5]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/> + <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/> + + <eval expected="13078" xpath="//flow/block[8]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-after"/> + <eval expected="128" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="128" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/> + + <eval expected="15122" xpath="//flow/block[11]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/> + <eval expected="5872" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/> + + <eval expected="13678" xpath="//flow/block[14]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-after"/> + <eval expected="728" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="728" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/> + + <eval expected="15722" xpath="//flow/block[17]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/> + <eval expected="6472" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_alignment-baseline_1.xml b/test/layoutengine/testcases/inline_alignment-baseline_1.xml new file mode 100755 index 000000000..128fd6b00 --- /dev/null +++ b/test/layoutengine/testcases/inline_alignment-baseline_1.xml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level alignment-baseline. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" background-color="yellow">alignment-baseline not specified</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="auto" background-color="yellow">alignment-baseline="auto"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="baseline" background-color="yellow">alignment-baseline="baseline"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="before-edge" background-color="yellow">alignment-baseline="before-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="text-before-edge" background-color="yellow">alignment-baseline="text-before-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="central" background-color="yellow">alignment-baseline="central"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="middle" background-color="yellow">alignment-baseline="middle"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="after-edge" background-color="yellow">alignment-baseline="after-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="text-after-edge" background-color="yellow">alignment-baseline="text-after-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="ideographic" background-color="yellow">alignment-baseline="ideographic"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="alphabetic" background-color="yellow">alignment-baseline="alphabetic"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="hanging" background-color="yellow">alignment-baseline="hanging"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="mathematical" background-color="yellow">alignment-baseline="mathematical"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="top" background-color="yellow">alignment-baseline="top"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="bottom" background-color="yellow">alignment-baseline="bottom"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="text-top" background-color="yellow">alignment-baseline="text-top"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before <fo:inline font-size="10pt" alignment-baseline="text-bottom" background-color="yellow">alignment-baseline="text-bottom"</fo:inline> After + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="2872" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="1850" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="1826" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="3700" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="3700" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/> + <eval expected="3700" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/> + <eval expected="2872" xpath="//flow/block[32]/lineArea[1]/inlineparent/@offset"/> + <eval expected="574" xpath="//flow/block[35]/lineArea[1]/inlineparent/@offset"/> + <eval expected="1436" xpath="//flow/block[38]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[41]/lineArea[1]/inlineparent/@offset"/> + <eval expected="3700" xpath="//flow/block[44]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[47]/lineArea[1]/inlineparent/@offset"/> + <eval expected="3700" xpath="//flow/block[50]/lineArea[1]/inlineparent/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_alignment-baseline_2.xml b/test/layoutengine/testcases/inline_alignment-baseline_2.xml new file mode 100755 index 000000000..f5559f435 --- /dev/null +++ b/test/layoutengine/testcases/inline_alignment-baseline_2.xml @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level alignment-baseline. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" background-color="yellow">alignment-baseline not specified</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="auto" background-color="yellow">alignment-baseline="auto"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="baseline" background-color="yellow">alignment-baseline="baseline"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="before-edge" background-color="yellow">alignment-baseline="before-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="text-before-edge" background-color="yellow">alignment-baseline="text-before-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="central" background-color="yellow">alignment-baseline="central"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="middle" background-color="yellow">alignment-baseline="middle"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="after-edge" background-color="yellow">alignment-baseline="after-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="text-after-edge" background-color="yellow">alignment-baseline="text-after-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="ideographic" background-color="yellow">alignment-baseline="ideographic"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="alphabetic" background-color="yellow">alignment-baseline="alphabetic"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="hanging" background-color="yellow">alignment-baseline="hanging"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="mathematical" background-color="yellow">alignment-baseline="mathematical"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="top" background-color="yellow">alignment-baseline="top"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="bottom" background-color="yellow">alignment-baseline="bottom"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="text-top" background-color="yellow">alignment-baseline="text-top"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + Before <fo:inline font-size="14pt" alignment-baseline="text-bottom" background-color="yellow">alignment-baseline="text-bottom"</fo:inline> After + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/> + <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/> + + <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/> + <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/> + + <eval expected="2872" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/> + <eval expected="2872" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/> + + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/> + + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/> + + <eval expected="1850" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/> + <eval expected="1850" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/> + + <eval expected="1826" xpath="//flow/block[20]/lineArea[1]/text[1]/@offset"/> + <eval expected="1826" xpath="//flow/block[20]/lineArea[1]/text[2]/@offset"/> + + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/text[2]/@offset"/> + + <eval expected="3700" xpath="//flow/block[26]/lineArea[1]/text[1]/@offset"/> + <eval expected="3700" xpath="//flow/block[26]/lineArea[1]/text[2]/@offset"/> + + <eval expected="3700" xpath="//flow/block[29]/lineArea[1]/text[1]/@offset"/> + <eval expected="3700" xpath="//flow/block[29]/lineArea[1]/text[2]/@offset"/> + + <eval expected="2872" xpath="//flow/block[32]/lineArea[1]/text[1]/@offset"/> + <eval expected="2872" xpath="//flow/block[32]/lineArea[1]/text[2]/@offset"/> + + <eval expected="574" xpath="//flow/block[35]/lineArea[1]/text[1]/@offset"/> + <eval expected="574" xpath="//flow/block[35]/lineArea[1]/text[2]/@offset"/> + + <eval expected="1436" xpath="//flow/block[38]/lineArea[1]/text[1]/@offset"/> + <eval expected="1436" xpath="//flow/block[38]/lineArea[1]/text[2]/@offset"/> + + <eval expected="0" xpath="//flow/block[41]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[41]/lineArea[1]/text[2]/@offset"/> + + <eval expected="0" xpath="//flow/block[44]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[44]/lineArea[1]/text[2]/@offset"/> + + <eval expected="0" xpath="//flow/block[47]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[47]/lineArea[1]/text[2]/@offset"/> + + <eval expected="3700" xpath="//flow/block[50]/lineArea[1]/text[1]/@offset"/> + <eval expected="3700" xpath="//flow/block[50]/lineArea[1]/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_alignment-baseline_3.xml b/test/layoutengine/testcases/inline_alignment-baseline_3.xml new file mode 100755 index 000000000..77cc07167 --- /dev/null +++ b/test/layoutengine/testcases/inline_alignment-baseline_3.xml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level alignment-baseline. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" background-color="yellow">alignment-baseline not specified</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="auto" background-color="yellow">alignment-baseline="auto"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="baseline" background-color="yellow">alignment-baseline="baseline"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="before-edge" background-color="yellow">alignment-baseline="before-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="text-before-edge" background-color="yellow">alignment-baseline="text-before-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="central" background-color="yellow">alignment-baseline="central"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="middle" background-color="yellow">alignment-baseline="middle"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="after-edge" background-color="yellow">alignment-baseline="after-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="text-after-edge" background-color="yellow">alignment-baseline="text-after-edge"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="ideographic" background-color="yellow">alignment-baseline="ideographic"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="alphabetic" background-color="yellow">alignment-baseline="alphabetic"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="hanging" background-color="yellow">alignment-baseline="hanging"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="mathematical" background-color="yellow">alignment-baseline="mathematical"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="top" background-color="yellow">alignment-baseline="top"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="bottom" background-color="yellow">alignment-baseline="bottom"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="text-top" background-color="yellow">alignment-baseline="text-top"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + <fo:inline font-size="14pt">B</fo:inline>efore <fo:inline font-size="10pt" alignment-baseline="text-bottom" background-color="yellow">alignment-baseline="text-bottom"</fo:inline> After + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="2872" xpath="//flow/block[8]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="1436" xpath="//flow/block[14]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="2361" xpath="//flow/block[17]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="2349" xpath="//flow/block[20]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="3700" xpath="//flow/block[23]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="3286" xpath="//flow/block[26]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="3286" xpath="//flow/block[29]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="2872" xpath="//flow/block[32]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="1723" xpath="//flow/block[35]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="2154" xpath="//flow/block[38]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="0" xpath="//flow/block[41]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="3700" xpath="//flow/block[44]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="1436" xpath="//flow/block[47]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="3286" xpath="//flow/block[50]/lineArea[1]/inlineparent[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_alignment-baseline_4.xml b/test/layoutengine/testcases/inline_alignment-baseline_4.xml new file mode 100755 index 000000000..794c81e5a --- /dev/null +++ b/test/layoutengine/testcases/inline_alignment-baseline_4.xml @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level alignment-baseline for nested inlines. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true" font-family="sans-serif"> + <fo:flow flow-name="xsl-region-body"> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big + <fo:inline font-size="50%" + background-color="yellow">alphabetic + <fo:inline font-size="150%" background-color="red">alphabetic</fo:inline> + </fo:inline> + Big <fo:inline font-size="8pt">Baseline table unchanged</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big + <fo:inline font-size="50%" + dominant-baseline="reset-size" + background-color="yellow">alphabetic + <fo:inline font-size="150%" background-color="red">alphabetic</fo:inline> + </fo:inline> + Big <fo:inline font-size="8pt">Baseline table changed</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big + <fo:inline font-size="50%" + alignment-baseline="hanging" + background-color="yellow">hanging + <fo:inline font-size="50%" background-color="red" alignment-baseline="middle">middle</fo:inline> + </fo:inline> + Big <fo:inline font-size="8pt">Baseline table unchanged</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big + <fo:inline font-size="50%" + dominant-baseline="reset-size" + alignment-baseline="hanging" + background-color="yellow">hanging + <fo:inline font-size="50%" background-color="red" alignment-baseline="middle">middle</fo:inline> + </fo:inline> + Big <fo:inline font-size="8pt">Baseline table changed</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big + <fo:inline font-size="50%" + alignment-baseline="text-before-edge" + background-color="yellow">text-before-edge + <fo:inline font-size="150%" background-color="red" alignment-baseline="after-edge">after-edge</fo:inline> + </fo:inline> + Big <fo:inline font-size="8pt">Baseline table unchanged</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big + <fo:inline font-size="50%" + dominant-baseline="reset-size" + alignment-baseline="text-before-edge" + background-color="yellow">text-before-edge + <fo:inline font-size="150%" background-color="red" alignment-baseline="after-edge">after-edge</fo:inline> + </fo:inline> + Big <fo:inline font-size="8pt">Baseline table changed</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big + <fo:inline font-size="25%" + alignment-baseline="central" + background-color="yellow">central + <fo:inline font-size="150%" + alignment-baseline="text-before-edge" + background-color="red">text-before-edge + <fo:inline font-size="200%" background-color="green">alphabetic</fo:inline> + </fo:inline> + </fo:inline> + Big <fo:inline font-size="8pt">Baseline table unchanged</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big + <fo:inline font-size="25%" + dominant-baseline="reset-size" + alignment-baseline="central" + background-color="yellow">central + <fo:inline font-size="150%" + alignment-baseline="text-before-edge" + background-color="red">text-before-edge + <fo:inline font-size="200%" background-color="green">alphabetic</fo:inline> + </fo:inline> + </fo:inline> + Big <fo:inline font-size="8pt">Baseline table changed</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big + <fo:inline font-size="25%" + dominant-baseline="reset-size" + alignment-baseline="central" + background-color="yellow">central + <fo:inline font-size="150%" + dominant-baseline="reset-size" + alignment-baseline="text-before-edge" + background-color="red">text-before-edge + <fo:inline font-size="200%" background-color="green">alphabetic</fo:inline> + </fo:inline> + </fo:inline> + Big <fo:inline font-size="8pt">Baseline table changed twice</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big + <fo:inline font-size="50%" + dominant-baseline="reset-size" + alignment-baseline="before-edge" + background-color="yellow">before-edge + <fo:inline font-size="150%" background-color="red" alignment-baseline="after-edge">after-edge</fo:inline> + </fo:inline> + Big <fo:inline font-size="8pt">This is over constraint</fo:inline> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="22200" xpath="//flow/block[2]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/> + <eval expected="8616" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-4308" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/> + + <eval expected="22200" xpath="//flow/block[5]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/> + <eval expected="8616" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-4308" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/> + + <eval expected="22200" xpath="//flow/block[8]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/> + <eval expected="1723" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="6494" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/> + + <eval expected="22200" xpath="//flow/block[11]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/> + <eval expected="1723" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="2739" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/> + + <eval expected="22200" xpath="//flow/block[14]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="5550" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/> + + <eval expected="27750" xpath="//flow/block[17]/lineArea[1]/@bpd"/> + <eval expected="5550" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/> + <eval expected="5550" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-5550" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="5550" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/> + + <eval expected="22200" xpath="//flow/block[20]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[1]/@offset"/> + <eval expected="8325" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-8325" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/> + <eval expected="4308" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[2]/@offset"/> + + <eval expected="22491" xpath="//flow/block[23]/lineArea[1]/@bpd"/> + <eval expected="291" xpath="//flow/block[23]/lineArea[1]/text[1]/@offset"/> + <eval expected="8616" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/> + <eval expected="-8616" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/> + <eval expected="291" xpath="//flow/block[23]/lineArea[1]/text[2]/@offset"/> + + <eval expected="22200" xpath="//flow/block[26]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[1]/@offset"/> + <eval expected="8325" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/> + <eval expected="-6462" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[2]/@offset"/> + + <eval expected="27750" xpath="//flow/block[29]/lineArea[1]/@bpd"/> + <eval expected="5550" xpath="//flow/block[29]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-5550" xpath="//flow/block[29]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="5550" xpath="//flow/block[29]/lineArea[1]/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_background-color.xml b/test/layoutengine/testcases/inline_background-color.xml new file mode 100755 index 000000000..7b5fcdb03 --- /dev/null +++ b/test/layoutengine/testcases/inline_background-color.xml @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:inline with background-color properties. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </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" font-size="10pt"> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + To <fo:inline background-color="yellow">emphasize a phrase</fo:inline> highlight it. + </fo:block> + <fo:block background-color="silver" text-align="end" margin="1pt 0pt 1pt 0pt"> + To <fo:inline background-color="yellow">emphasize a phrase</fo:inline> highlight it with text-align="end". + </fo:block> + <fo:block background-color="silver" text-align="justify" margin="1pt 0pt 1pt 0pt"> + To <fo:inline background-color="yellow">emphasize a phrase</fo:inline> highlight it with text-align="justify". + </fo:block> + <fo:block background-color="silver" text-align="center" margin="1pt 0pt 1pt 0pt"> + To <fo:inline background-color="yellow">emphasize a phrase</fo:inline> highlight it with text-align="center". + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt"> + This demonstrates a long inline + <fo:inline background-color="yellow">which stretches over multiple lines to + show how the highlight extends from line to line while + correctly honouring the text-align (not specified) property</fo:inline> + back to normal + </fo:block> + <fo:block background-color="silver" text-align="end" margin="1pt 0pt 1pt 0pt"> + This demonstrates a long inline + <fo:inline background-color="yellow">which stretches over multiple lines to + show how the highlight extends from line to line while + correctly honouring the text-align="end" property</fo:inline> + back to normal + </fo:block> + <fo:block background-color="silver" text-align="justify" margin="1pt 0pt 1pt 0pt"> + This demonstrates a long inline + <fo:inline background-color="yellow">which stretches over multiple lines to + show how the highlight extends from line to line while + correctly honouring the text-align="justify" property</fo:inline> + back to normal + </fo:block> + <fo:block background-color="silver" text-align="center" margin="1pt 0pt 1pt 0pt"> + This demonstrates a long inline + <fo:inline background-color="yellow">which stretches over multiple lines to + show how the highlight extends from line to line while + correctly honouring the text-align="center" property</fo:inline> + back to normal + </fo:block> + <fo:block background-color="silver" text-align="center" margin="1pt 0pt 1pt 0pt"> + Nested inline highlights + <fo:inline background-color="yellow" font-size="10pt">this is 10pt text + <fo:inline font-size="14pt">nested within is 14pt text</fo:inline> + followed by 10pt text</fo:inline> + back to normal + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="90040" xpath="//flow/block[2]/lineArea/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[2]/lineArea/inlineparent/@background"/> + + <eval expected="90040" xpath="//flow/block[5]/lineArea/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[5]/lineArea/inlineparent/@background"/> + + <eval expected="90040" xpath="//flow/block[8]/lineArea/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[8]/lineArea/inlineparent/@background"/> + + <eval expected="90040" xpath="//flow/block[11]/lineArea/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[11]/lineArea/inlineparent/@background"/> + + <eval expected="188950" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[14]/lineArea[1]/inlineparent/@background"/> + <eval expected="313470" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[14]/lineArea[2]/inlineparent/@background"/> + <eval expected="145610" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[14]/lineArea[3]/inlineparent/@background"/> + + <eval expected="188950" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[17]/lineArea[1]/inlineparent/@background"/> + <eval expected="313470" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[17]/lineArea[2]/inlineparent/@background"/> + <eval expected="109650" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[17]/lineArea[3]/inlineparent/@background"/> + + <eval expected="199793" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[20]/lineArea[1]/inlineparent/@background"/> + <eval expected="350000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[20]/lineArea[2]/inlineparent/@background"/> + <eval expected="118530" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[20]/lineArea[3]/inlineparent/@background"/> + + <eval expected="128370" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[23]/lineArea[1]/inlineparent/@background"/> + <eval expected="269560" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[23]/lineArea[2]/inlineparent/@background"/> + <eval expected="225250" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[23]/lineArea[3]/inlineparent/@background"/> + + <eval expected="151184" xpath="//flow/block[26]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[26]/lineArea[1]/inlineparent/@background"/> + <eval expected="81704" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/@ipd"/> + <eval expected="161644" xpath="//flow/block[26]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[26]/lineArea[2]/inlineparent/@background"/> + <eval expected="67704" xpath="//flow/block[26]/lineArea[2]/inlineparent/inlineparent/@ipd"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_background-image.xml b/test/layoutengine/testcases/inline_background-image.xml index 92f3c31f3..570be1d8d 100644 --- a/test/layoutengine/testcases/inline_background-image.xml +++ b/test/layoutengine/testcases/inline_background-image.xml @@ -42,7 +42,7 @@ </fo> <checks> <eval expected="197376" xpath="//flow/block/lineArea/inlineparent/@ipd"/> - <eval expected="92100" xpath="//flow/block/lineArea/inlineparent/@bpd"/> - <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=75648,vertical=23010" xpath="//flow/block/lineArea/inlineparent/@background"/> + <eval expected="88800" xpath="//flow/block/lineArea/inlineparent/@bpd"/> + <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=75648,vertical=21360" xpath="//flow/block/lineArea/inlineparent/@background"/> </checks> </testcase> diff --git a/test/layoutengine/testcases/inline_baseline-shift_1.xml b/test/layoutengine/testcases/inline_baseline-shift_1.xml new file mode 100755 index 000000000..723abfc9d --- /dev/null +++ b/test/layoutengine/testcases/inline_baseline-shift_1.xml @@ -0,0 +1,164 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level baseline-shift. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="baseline" + background-color="yellow">baseline-shift="baseline"</fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="sub" + background-color="yellow">baseline-shift="sub"</fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="super" + background-color="yellow">baseline-shift="super"</fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="0pt" + background-color="yellow">baseline-shift="0pt"</fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="0%" + background-color="yellow">baseline-shift="0%"</fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="3pt" + background-color="yellow">baseline-shift="3pt"</fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="-3pt" + background-color="yellow">baseline-shift="-3pt"</fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="30%" + background-color="yellow">baseline-shift="30%"</fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="-30%" + background-color="yellow">baseline-shift="-30%"</fo:inline> + After + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="12950" xpath="//flow/block[2]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/> + <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/> + + <eval expected="14737" xpath="//flow/block[5]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/> + <eval expected="5487" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/> + + <eval expected="17400" xpath="//flow/block[8]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-after"/> + <eval expected="4450" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="4450" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/> + + <eval expected="12950" xpath="//flow/block[11]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/> + <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/> + + <eval expected="12950" xpath="//flow/block[14]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/> + <eval expected="2872" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/> + + <eval expected="13078" xpath="//flow/block[17]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-after"/> + <eval expected="128" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="128" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/> + + <eval expected="15122" xpath="//flow/block[20]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[20]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[20]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[1]/@offset"/> + <eval expected="5872" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[2]/@offset"/> + + <eval expected="15118" xpath="//flow/block[23]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[23]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[23]/lineArea[1]/@space-after"/> + <eval expected="2168" xpath="//flow/block[23]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="2168" xpath="//flow/block[23]/lineArea[1]/text[2]/@offset"/> + + <eval expected="17162" xpath="//flow/block[26]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[26]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[26]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[1]/@offset"/> + <eval expected="7912" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_baseline-shift_2.xml b/test/layoutengine/testcases/inline_baseline-shift_2.xml new file mode 100755 index 000000000..6bc6d60bc --- /dev/null +++ b/test/layoutengine/testcases/inline_baseline-shift_2.xml @@ -0,0 +1,171 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level baseline-shift. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="sub" + background-color="yellow">sub + <fo:inline font-size="8pt" + baseline-shift="sub" + background-color="red">sub + </fo:inline>sub + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="sub" + background-color="yellow">sub + <fo:inline font-size="8pt" + baseline-shift="super" + background-color="red">super + </fo:inline>sub + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="super" + background-color="yellow">super + <fo:inline font-size="8pt" + baseline-shift="super" + background-color="red">super + </fo:inline>super + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="super" + background-color="yellow">super + <fo:inline font-size="8pt" + baseline-shift="sub" + background-color="red">sub + </fo:inline>super + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + baseline-shift="30%" + background-color="yellow">30% + <fo:inline font-size="8pt" + baseline-shift="-50%" + background-color="red">-50% + </fo:inline>30% + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="18pt" + baseline-shift="super" + background-color="yellow">super + <fo:inline font-size="24pt" + baseline-shift="sub" + background-color="red">sub + <fo:inline font-size="30pt" + baseline-shift="super" + background-color="green">super + </fo:inline>sub + </fo:inline>super + </fo:inline> + After + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="16415" xpath="//flow/block[2]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/> + <eval expected="5487" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="3528" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/> + + <eval expected="14737" xpath="//flow/block[5]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/> + <eval expected="5487" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-3794" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/> + + <eval expected="21194" xpath="//flow/block[8]/lineArea[1]/@bpd"/> + <eval expected="8244" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/> + <eval expected="3794" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-3794" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="8244" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/> + + <eval expected="17400" xpath="//flow/block[11]/lineArea[1]/@bpd"/> + <eval expected="4450" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="3528" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="4450" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/> + + <eval expected="15118" xpath="//flow/block[14]/lineArea[1]/@bpd"/> + <eval expected="2168" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="7436" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="2168" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/> + + <eval expected="39060" xpath="//flow/block[17]/lineArea[1]/@bpd"/> + <eval expected="25086" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/> + <eval expected="14892" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="1968" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/> + <eval expected="-16860" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="25086" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_baseline-shift_3.xml b/test/layoutengine/testcases/inline_baseline-shift_3.xml new file mode 100755 index 000000000..eee8906b7 --- /dev/null +++ b/test/layoutengine/testcases/inline_baseline-shift_3.xml @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level baseline-shift. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + alignment-baseline="middle" + dominant-baseline="middle" + background-color="yellow">middle + <fo:inline font-size="8pt" + baseline-shift="sub" + background-color="red">sub + </fo:inline>middle + </fo:inline> + After <fo:inline font-size="8pt">Baseline table changed</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + alignment-baseline="middle" + dominant-baseline="middle" + background-color="yellow">middle + <fo:inline font-size="8pt" + baseline-shift="super" + background-color="red">super + </fo:inline>middle + </fo:inline> + After <fo:inline font-size="8pt">Baseline table changed</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + alignment-baseline="text-after-edge" + dominant-baseline="text-after-edge" + background-color="yellow">text-after-edge + <fo:inline font-size="8pt" + baseline-shift="30%" + background-color="red">30% + </fo:inline>text-after-edge + </fo:inline> + After <fo:inline font-size="8pt">Baseline table changed</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + alignment-baseline="text-before-edge" + dominant-baseline="text-before-edge" + background-color="yellow">text-before-edge + <fo:inline font-size="8pt" + baseline-shift="-50%" + background-color="red">-50% + </fo:inline>text-before-edge + </fo:inline> + After <fo:inline font-size="8pt">Baseline table changed</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + alignment-baseline="middle" + background-color="yellow">middle + <fo:inline font-size="8pt" + baseline-shift="sub" + background-color="red">sub + </fo:inline>middle + </fo:inline> + After <fo:inline font-size="8pt">Baseline table unchanged</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + alignment-baseline="middle" + background-color="yellow">middle + <fo:inline font-size="8pt" + baseline-shift="super" + background-color="red">super + </fo:inline>middle + </fo:inline> + After <fo:inline font-size="8pt">Baseline table unchanged</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + alignment-baseline="text-after-edge" + background-color="yellow">text-after-edge + <fo:inline font-size="8pt" + baseline-shift="30%" + background-color="red">30% + </fo:inline>text-after-edge + </fo:inline> + After <fo:inline font-size="8pt">Baseline table unchanged</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + Before + <fo:inline font-size="10pt" + alignment-baseline="text-before-edge" + background-color="yellow">text-before-edge + <fo:inline font-size="8pt" + baseline-shift="-50%" + background-color="red">-50% + </fo:inline>text-before-edge + </fo:inline> + After <fo:inline font-size="8pt">Baseline table unchanged</fo:inline> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="14846" xpath="//flow/block[2]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/> + <eval expected="1826" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="5620" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/> + + <eval expected="12950" xpath="//flow/block[5]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/> + <eval expected="1826" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-1702" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/> + + <eval expected="12950" xpath="//flow/block[8]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/> + <eval expected="3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-1750" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/> + + <eval expected="13400" xpath="//flow/block[11]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="6000" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/> + + <eval expected="12950" xpath="//flow/block[14]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/> + <eval expected="1826" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="3528" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/> + + <eval expected="14918" xpath="//flow/block[17]/lineArea[1]/@bpd"/> + <eval expected="1968" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/> + <eval expected="3794" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-3794" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="1968" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/> + + <eval expected="12950" xpath="//flow/block[20]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[1]/@offset"/> + <eval expected="3700" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-2992" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[2]/@offset"/> + + <eval expected="17708" xpath="//flow/block[23]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="10308" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_baseline-shift_4.xml b/test/layoutengine/testcases/inline_baseline-shift_4.xml new file mode 100755 index 000000000..87055ac0e --- /dev/null +++ b/test/layoutengine/testcases/inline_baseline-shift_4.xml @@ -0,0 +1,184 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level baseline-shift. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt"> + Before + <fo:inline font-size="50%" + alignment-baseline="central" + baseline-shift="6pt" + background-color="yellow">6pt central + </fo:inline> + <fo:inline font-size="50%" + alignment-baseline="central" + background-color="orange">central + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt"> + Before + <fo:inline font-size="50%" + alignment-baseline="central" + baseline-shift="-6pt" + background-color="yellow">-6pt central + </fo:inline> + <fo:inline font-size="50%" + alignment-baseline="central" + background-color="orange">central + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt"> + Before + <fo:inline font-size="50%" + alignment-baseline="central" + baseline-shift="sub" + background-color="yellow">sub + <fo:inline font-size="150%" + alignment-baseline="text-before-edge" + background-color="red">text-before-edge + <fo:inline font-size="6pt" + background-color="green">Baseline unchanged</fo:inline> + </fo:inline>central + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt"> + Before + <fo:inline font-size="50%" + alignment-baseline="central" + baseline-shift="super" + background-color="yellow">super + <fo:inline font-size="150%" + alignment-baseline="text-after-edge" + background-color="red">text-after-edge + <fo:inline font-size="6pt" + background-color="green">Baseline unchanged</fo:inline> + </fo:inline>central + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt"> + Before + <fo:inline font-size="50%" + alignment-baseline="central" + baseline-shift="sub" + background-color="yellow">sub + <fo:inline font-size="150%" + dominant-baseline="text-before-edge" + background-color="red">text-before-edge + <fo:inline font-size="6pt" + background-color="green">Baseline changed</fo:inline> + </fo:inline>central + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt"> + Before + <fo:inline font-size="50%" + alignment-baseline="central" + baseline-shift="super" + background-color="yellow">super + <fo:inline font-size="150%" + dominant-baseline="text-after-edge" + background-color="red">text-after-edge + <fo:inline font-size="6pt" + background-color="green">Baseline changed</fo:inline> + </fo:inline>central + </fo:inline> + After + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="17100" xpath="//flow/block[2]/lineArea[1]/@bpd"/> + <eval expected="2300" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent[1]/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent[1]/text[1]/@offset"/> + <eval expected="6000" xpath="//flow/block[2]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent[2]/text[1]/@offset"/> + <eval expected="2300" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/> + + <eval expected="17100" xpath="//flow/block[5]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/> + <eval expected="9700" xpath="//flow/block[5]/lineArea[1]/inlineparent[1]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent[1]/text[1]/@offset"/> + <eval expected="3700" xpath="//flow/block[5]/lineArea[1]/inlineparent[2]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent[2]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/> + + <eval expected="16892" xpath="//flow/block[8]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/> + <eval expected="5792" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="1436" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/> + + <eval expected="23168" xpath="//flow/block[11]/lineArea[1]/@bpd"/> + <eval expected="8368" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/> + <eval expected="3700" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-3700" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="5136" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="8368" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/> + + <eval expected="14800" xpath="//flow/block[14]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/> + <eval expected="5792" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-2872" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/> + + <eval expected="22340" xpath="//flow/block[17]/lineArea[1]/@bpd"/> + <eval expected="7540" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/> + <eval expected="2872" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-2872" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/text/@offset"/> + <eval expected="5550" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/text[2]/@offset"/> + <eval expected="7540" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_border_padding.xml b/test/layoutengine/testcases/inline_border_padding.xml index 474191416..08cabc67c 100644 --- a/test/layoutengine/testcases/inline_border_padding.xml +++ b/test/layoutengine/testcases/inline_border_padding.xml @@ -24,25 +24,117 @@ <fo> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> <fo:layout-master-set> - <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> - <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:page-sequence master-reference="normal" white-space-collapse="true" language="en"> <fo:flow flow-name="xsl-region-body" font-size="10pt"> - <fo:block background-color="yellow" margin="0pt"> - Start of file + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt"> + To <fo:inline border="solid 1pt red" background-color="yellow">emphasize</fo:inline> a word we give it a 1pt border and a background. </fo:block> - <fo:block background-color="silver" margin="0pt"> - Normal text <fo:inline border="solid 5pt red" padding="5pt" background-color="white">inline with border="solid 5pt red" padding="5pt"</fo:inline> normal finish + <fo:block background-color="silver" margin="10pt 0pt 10pt 0pt"> + Demonstrates a big border <fo:inline border="solid 5pt red" padding="5pt" background-color="yellow">inline with border="solid 5pt red" padding="5pt"</fo:inline> extending over the small allocation rectangle to the top and bottom. </fo:block> - <fo:block background-color="yellow" margin="0pt"> - End of file + <fo:block background-color="silver" margin="10pt 0pt 10pt 0pt"> + Demonstrates <fo:inline border-style="solid" border-width="1pt 2pt 3pt 4pt" border-color="red" padding="1pt 2pt 3pt 4pt" background-color="yellow">unsymmetric borders and padding</fo:inline> but the baselines should align. + </fo:block> + <fo:block background-color="silver" margin="10pt 0pt 10pt 0pt" font-size="20pt"> + Big border <fo:inline border="solid 5pt red" padding="5pt" background-color="yellow" font-size="8pt">with a smaller font</fo:inline> but the baselines should align. + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt"> + This demonstrates correct line breaking of a fo:inline because it does fit nicely.. + This demonstrates correct line breaking of a fo:inline because it does fit <fo:inline border="solid 1pt red" padding-start="2pt" padding-end="2pt" background-color="yellow">nicely.. + Not really as we started a fo:inline with border/padding just before the word "nicely" which forces it to the next line.</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt"> + Demonstrates nested + <fo:inline border="solid 2pt red" padding-start="2pt" padding-end="2pt" background-color="yellow">inlines + <fo:inline border="solid 1pt green" padding-start="2pt" padding-end="2pt" background-color="orange">finishing together + </fo:inline> + </fo:inline> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </fo> <checks> + <eval expected="48350" xpath="//flow/block[2]/lineArea/inlineparent/@ipd"/> + <eval expected="50350" xpath="//flow/block[2]/lineArea/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/inlineparent/@border-start"/> + + <eval expected="208190" xpath="//flow/block[5]/lineArea/inlineparent/@ipd"/> + <eval expected="228190" xpath="//flow/block[5]/lineArea/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/inlineparent/@border-start"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/inlineparent/@padding-after"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/inlineparent/@padding-start"/> + + <eval expected="151170" xpath="//flow/block[8]/lineArea/inlineparent/@ipd"/> + <eval expected="163170" xpath="//flow/block[8]/lineArea/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[8]/lineArea/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[8]/lineArea/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[8]/lineArea/inlineparent/@border-start"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea/inlineparent/@padding-before"/> + <eval expected="2000" xpath="//flow/block[8]/lineArea/inlineparent/@padding-end"/> + <eval expected="4000" xpath="//flow/block[8]/lineArea/inlineparent/@padding-start"/> + + <eval expected="64464" xpath="//flow/block[11]/lineArea/inlineparent/@ipd"/> + <eval expected="84464" xpath="//flow/block[11]/lineArea/inlineparent/@ipda"/> + <eval expected="8616" xpath="//flow/block[11]/lineArea/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/inlineparent/@border-start"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-after"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/inlineparent/@padding-start"/> + + <eval expected="340710" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="343710" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="2000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-start"/> + <eval expected="193840" xpath="//flow/block[14]/lineArea[4]/inlineparent/@ipd"/> + <eval expected="196840" xpath="//flow/block[14]/lineArea[4]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[4]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[4]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[4]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[4]/inlineparent/@border-end"/> + <eval expected="2000" xpath="//flow/block[14]/lineArea[4]/inlineparent/@padding-end"/> + + <eval expected="118830" xpath="//flow/block[17]/lineArea/inlineparent/@ipd"/> + <eval expected="126830" xpath="//flow/block[17]/lineArea/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[17]/lineArea/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[17]/lineArea/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[17]/lineArea/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[17]/lineArea/inlineparent/@border-start"/> + <eval expected="2000" xpath="//flow/block[17]/lineArea/inlineparent/@padding-end"/> + <eval expected="2000" xpath="//flow/block[17]/lineArea/inlineparent/@padding-start"/> + <eval expected="78930" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@ipd"/> + <eval expected="84930" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@offset"/> + <eval expected="(solid,#008000,1000)" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@border-after"/> + <eval expected="(solid,#008000,1000)" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@border-before"/> + <eval expected="(solid,#008000,1000)" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@border-end"/> + <eval expected="(solid,#008000,1000)" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@border-start"/> + <eval expected="2000" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@padding-end"/> + <eval expected="2000" xpath="//flow/block[17]/lineArea/inlineparent/inlineparent/@padding-start"/> </checks> </testcase> diff --git a/test/layoutengine/testcases/inline_border_padding_block_nested.xml b/test/layoutengine/testcases/inline_border_padding_block_nested.xml new file mode 100755 index 000000000..60fca3d16 --- /dev/null +++ b/test/layoutengine/testcases/inline_border_padding_block_nested.xml @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:inlines with border and padding properties and nested inner blocks. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true" language="en"> + <fo:flow flow-name="xsl-region-body" font-size="10pt"> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt"> + Before inline + <fo:inline border="solid 1pt red" padding="2pt" background-color="yellow"><fo:block>starting with a block</fo:block> + after block</fo:inline> + After inline + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt"> + Before inline + <fo:inline border="solid 1pt red" padding="2pt" background-color="yellow">before block + <fo:block>having a block at the end of an inline</fo:block></fo:inline> + After inline + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt"> + Before inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="2pt" + padding-end.length="2pt" + background-color="yellow">before block + <fo:block>As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:block> + after block</fo:inline> + After inline + </fo:block> + <!-- This test currently fails with a ClassCastException on this commented out block + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt"> + Before inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="2pt" + padding-start.conditionality="retain" + padding-end.length="2pt" + padding-end.conditionality="retain" + background-color="yellow">before block + <fo:block>As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:block> + after block</fo:inline> + After inline with conditionality="retain" + </fo:block> + --> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="347000" xpath="//flow/block[2]/lineArea[1]/inlineblockparent/@ipd"/> + <eval expected="350000" xpath="//flow/block[2]/lineArea[1]/inlineblockparent/@ipda"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineblockparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineblockparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineblockparent/@border-start"/> + <eval expected="2000" xpath="//flow/block[2]/lineArea[1]/inlineblockparent/@padding-after"/> + <eval expected="2000" xpath="//flow/block[2]/lineArea[1]/inlineblockparent/@padding-before"/> + <eval expected="2000" xpath="//flow/block[2]/lineArea[1]/inlineblockparent/@padding-start"/> + <eval expected="48910" xpath="//flow/block[2]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="51910" xpath="//flow/block[2]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="1375" xpath="//flow/block[2]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="2000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="2000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="2000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-end"/> + + <eval expected="54470" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="57470" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="1375" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="2000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="2000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="2000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="347000" xpath="//flow/block[5]/lineArea[2]/inlineblockparent/@ipd"/> + <eval expected="350000" xpath="//flow/block[5]/lineArea[2]/inlineblockparent/@ipda"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineblockparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineblockparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineblockparent/@border-end"/> + <eval expected="2000" xpath="//flow/block[5]/lineArea[2]/inlineblockparent/@padding-after"/> + <eval expected="2000" xpath="//flow/block[5]/lineArea[2]/inlineblockparent/@padding-before"/> + <eval expected="2000" xpath="//flow/block[5]/lineArea[2]/inlineblockparent/@padding-end"/> + + <eval expected="54470" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="57470" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="1375" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="2000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="350000" xpath="//flow/block[8]/lineArea[2]/inlineblockparent/@ipd"/> + <eval expected="350000" xpath="//flow/block[8]/lineArea[2]/inlineblockparent/@ipda"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineblockparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineblockparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineblockparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineblockparent/@padding-before"/> + <eval expected="46130" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="49130" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="1375" xpath="//flow/block[8]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="2000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-end"/> + + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_border_padding_conditionality_1.xml b/test/layoutengine/testcases/inline_border_padding_conditionality_1.xml new file mode 100755 index 000000000..744b6b33f --- /dev/null +++ b/test/layoutengine/testcases/inline_border_padding_conditionality_1.xml @@ -0,0 +1,398 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:inlines with border and padding properties and conditionality. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true" language="en"> + <fo:flow flow-name="xsl-region-body" font-size="10pt"> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align not set .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="end"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="end" .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="justify"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="justify" .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="center"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="center" .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align not set .conditionality="discard". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="end"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="end" .conditionality="discard". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="justify"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="justify" .conditionality="discard". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="center"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="center" .conditionality="discard". + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="255100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="265100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="335720" xpath="//flow/block[2]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="345720" xpath="//flow/block[2]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="35570" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="45570" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="255100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="265100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="335720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="345720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="35570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="45570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="259229" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="269229" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="340000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="350000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="35570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="45570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="216190" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="226190" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="299050" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="309050" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="111150" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="121150" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="255100" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="261100" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="335720" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="335720" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="35570" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="39570" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="255100" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="261100" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="335720" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="335720" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="35570" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="39570" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="262613" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="268613" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="350000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="350000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="35570" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="39570" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="216190" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="222190" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="310170" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="310170" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="100030" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="104030" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-end"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_border_padding_conditionality_2.xml b/test/layoutengine/testcases/inline_border_padding_conditionality_2.xml new file mode 100755 index 000000000..bb9b50ab5 --- /dev/null +++ b/test/layoutengine/testcases/inline_border_padding_conditionality_2.xml @@ -0,0 +1,311 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:inlines with border and padding properties and conditionality retain. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true" language="en"> + <fo:flow flow-name="xsl-region-body" font-size="10pt"> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align not set padding .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="end"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="end" padding .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="justify"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="justify" padding .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="center"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="center" padding .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="center"> + Multi-line fo:inline + <fo:inline border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow" + linefeed-treatment="preserve">As far as the laws of mathematics refer to reality, + they are not certain, and as far as they are certain, + they do not refer to reality - Albert Einstein</fo:inline> + text-align="center" .conditionality="retain" linefeed-treatment="preserve". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="center"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow" + linefeed-treatment="preserve">As far as the laws of mathematics refer to reality, + they are not certain, and as far as they are certain, + they do not refer to reality - Albert Einstein</fo:inline> + text-align="center" .conditionality="discard" linefeed-treatment="preserve". + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="255100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="264100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="335720" xpath="//flow/block[2]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="343720" xpath="//flow/block[2]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="35570" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="44570" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="255100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="264100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="335720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="343720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="35570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="44570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="260075" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="269075" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="342000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="350000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="35570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="44570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="237870" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="246870" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="317940" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="325940" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="70580" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="79580" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="183960" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="193960" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="255680" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="265680" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="186750" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="196750" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="172840" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="178840" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="266800" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="266800" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="186750" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="190750" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-end"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_border_padding_hyphenate.xml b/test/layoutengine/testcases/inline_border_padding_hyphenate.xml new file mode 100755 index 000000000..b2a0444ad --- /dev/null +++ b/test/layoutengine/testcases/inline_border_padding_hyphenate.xml @@ -0,0 +1,399 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:inlines with border and padding properties and hyphenation. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true" language="en"> + <fo:flow flow-name="xsl-region-body" font-size="10pt"> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="start" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="start" .conditionality="discard". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="end" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="end" .conditionality="discard". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="justify" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="justify" .conditionality="discard". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="center" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="center" .conditionality="discard". + </fo:block> + + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="start" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="start" .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="end" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="end" .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="justify" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="justify" .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="center" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">As far as the laws of mathematics refer to reality, they are not certain, + and as far as they are certain, they do not refer to reality - Albert Einstein</fo:inline> + text-align="center" .conditionality="retain". + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="255100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="261100" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="335720" xpath="//flow/block[2]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="335720" xpath="//flow/block[2]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="35570" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="39570" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="255100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="261100" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="335720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="335720" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="35570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="39570" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="262613" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="268613" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="350000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="350000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="35570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="39570" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="216190" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="222190" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="310170" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="310170" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="100030" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="104030" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="255100" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="265100" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="335720" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="345720" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="35570" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="45570" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="255100" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="265100" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="335720" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="345720" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="35570" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="45570" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="259229" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="269229" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="340000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="350000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="35570" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="45570" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="216190" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="226190" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="299050" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="309050" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="111150" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="121150" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-start"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_border_padding_hyphenate_de.xml b/test/layoutengine/testcases/inline_border_padding_hyphenate_de.xml new file mode 100755 index 000000000..06bfae0ea --- /dev/null +++ b/test/layoutengine/testcases/inline_border_padding_hyphenate_de.xml @@ -0,0 +1,399 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inlines with border and padding properties and hyphenation. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true" language="de"> + <fo:flow flow-name="xsl-region-body" font-size="10pt"> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="start" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz + Donaudampfschiffahrtselektrizitaetenhauptbetriebswerkbauunterbeamtengesellschaft</fo:inline> + text-align="start" .conditionality="discard". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="end" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz + Donaudampfschiffahrtselektrizitaetenhauptbetriebswerkbauunterbeamtengesellschaft</fo:inline> + text-align="end" .conditionality="discard". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="justify" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz + Donaudampfschiffahrtselektrizitaetenhauptbetriebswerkbauunterbeamtengesellschaft</fo:inline> + text-align="justify" .conditionality="discard". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="center" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-end-width.length="1pt" + padding="1pt" + padding-start.length="5pt" + padding-end.length="3pt" + background-color="yellow">Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz + Donaudampfschiffahrtselektrizitaetenhauptbetriebswerkbauunterbeamtengesellschaft</fo:inline> + text-align="center" .conditionality="discard". + </fo:block> + + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="start" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz + Donaudampfschiffahrtselektrizitaetenhauptbetriebswerkbauunterbeamtengesellschaft</fo:inline> + text-align="start" .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="end" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz + Donaudampfschiffahrtselektrizitaetenhauptbetriebswerkbauunterbeamtengesellschaft</fo:inline> + text-align="end" .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="justify" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz + Donaudampfschiffahrtselektrizitaetenhauptbetriebswerkbauunterbeamtengesellschaft</fo:inline> + text-align="justify" .conditionality="retain". + </fo:block> + <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt" text-align="center" hyphenate="true"> + Multi-line fo:inline + <fo:inline + border="solid 1pt red" + border-start-width.length="1pt" + border-start-width.conditionality="retain" + border-end-width.length="1pt" + border-end-width.conditionality="retain" + padding="1pt" + padding-start.length="5pt" + padding-start.conditionality="retain" + padding-end.length="3pt" + padding-end.conditionality="retain" + background-color="yellow">Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz + Donaudampfschiffahrtselektrizitaetenhauptbetriebswerkbauunterbeamtengesellschaft</fo:inline> + text-align="center" .conditionality="retain". + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="250110" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="256110" xpath="//flow/block[2]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="348490" xpath="//flow/block[2]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="348490" xpath="//flow/block[2]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="91710" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="95710" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[2]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="250110" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="256110" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="348490" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="348490" xpath="//flow/block[5]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="91710" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="95710" xpath="//flow/block[5]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[5]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="250110" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="256110" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[8]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="349999" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="349999" xpath="//flow/block[8]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="91710" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="95710" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="238440" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="244440" xpath="//flow/block[11]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="320690" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="320690" xpath="//flow/block[11]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="131180" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="135180" xpath="//flow/block[11]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[11]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[11]/lineArea[3]/inlineparent/@padding-end"/> + + <eval expected="250110" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="260110" xpath="//flow/block[14]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[14]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="336820" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="346820" xpath="//flow/block[14]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[14]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="103380" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="113380" xpath="//flow/block[14]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[14]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="250110" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="260110" xpath="//flow/block[17]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[17]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="336820" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="346820" xpath="//flow/block[17]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[17]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="103380" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="113380" xpath="//flow/block[17]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[17]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[17]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="250110" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="260110" xpath="//flow/block[20]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[20]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="340000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="350000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[20]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="103380" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="113380" xpath="//flow/block[20]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[20]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[20]/lineArea[3]/inlineparent/@padding-start"/> + + <eval expected="238440" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipd"/> + <eval expected="248440" xpath="//flow/block[23]/lineArea[1]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[1]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[23]/lineArea[1]/inlineparent/@padding-start"/> + <eval expected="320690" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipd"/> + <eval expected="330690" xpath="//flow/block[23]/lineArea[2]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[2]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[2]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[23]/lineArea[2]/inlineparent/@padding-start"/> + <eval expected="131180" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipd"/> + <eval expected="141180" xpath="//flow/block[23]/lineArea[3]/inlineparent/@ipda"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[3]/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[23]/lineArea[3]/inlineparent/@border-start"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-before"/> + <eval expected="3000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[23]/lineArea[3]/inlineparent/@padding-start"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_dominant-baseline_1.xml b/test/layoutengine/testcases/inline_dominant-baseline_1.xml new file mode 100755 index 000000000..550bca8cb --- /dev/null +++ b/test/layoutengine/testcases/inline_dominant-baseline_1.xml @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level dominant-baseline. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + <fo:inline dominant-baseline="auto">Before <fo:inline font-size="10pt" background-color="yellow">dominant-baseline="auto"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + <fo:inline dominant-baseline="no-change">Before <fo:inline font-size="10pt" background-color="yellow">dominant-baseline="no-change"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + <fo:inline dominant-baseline="ideographic">Before <fo:inline font-size="10pt" background-color="yellow">dominant-baseline="ideographic"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + <fo:inline dominant-baseline="alphabetic">Before <fo:inline font-size="10pt" background-color="yellow">dominant-baseline="alphabetic"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + <fo:inline dominant-baseline="hanging">Before <fo:inline font-size="10pt" background-color="yellow">dominant-baseline="hanging"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + <fo:inline dominant-baseline="mathematical">Before <fo:inline font-size="10pt" background-color="yellow">dominant-baseline="mathematical"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + <fo:inline dominant-baseline="central">Before <fo:inline font-size="10pt" background-color="yellow">dominant-baseline="central"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + <fo:inline dominant-baseline="middle">Before <fo:inline font-size="10pt" background-color="yellow">dominant-baseline="middle"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + <fo:inline dominant-baseline="text-after-edge">Before <fo:inline font-size="10pt" background-color="yellow">dominant-baseline="text-after-edge"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="14pt"> + <fo:inline dominant-baseline="text-before-edge">Before <fo:inline font-size="10pt" background-color="yellow">dominant-baseline="text-before-edge"</fo:inline> After</fo:inline> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="12950" xpath="//flow/block[2]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[2]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[5]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[5]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[8]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[8]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[11]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[11]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[14]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[14]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="574" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[17]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[17]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="1436" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[20]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[20]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[20]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="1850" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[23]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[23]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[23]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="1826" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[26]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[26]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[26]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/> + <eval expected="3700" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[29]/lineArea[1]/@bpd"/> + <eval expected="1925" xpath="//flow/block[29]/lineArea[1]/@space-before"/> + <eval expected="1925" xpath="//flow/block[29]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/inlineparent/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_dominant-baseline_2.xml b/test/layoutengine/testcases/inline_dominant-baseline_2.xml new file mode 100755 index 000000000..1d863bfc1 --- /dev/null +++ b/test/layoutengine/testcases/inline_dominant-baseline_2.xml @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level dominant-baseline. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + <fo:inline dominant-baseline="auto">Before <fo:inline font-size="14pt" background-color="yellow">dominant-baseline="auto"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + <fo:inline dominant-baseline="no-change">Before <fo:inline font-size="14pt" background-color="yellow">dominant-baseline="no-change"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + <fo:inline dominant-baseline="ideographic">Before <fo:inline font-size="14pt" background-color="yellow">dominant-baseline="ideographic"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + <fo:inline dominant-baseline="alphabetic">Before <fo:inline font-size="14pt" background-color="yellow">dominant-baseline="alphabetic"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + <fo:inline dominant-baseline="hanging">Before <fo:inline font-size="14pt" background-color="yellow">dominant-baseline="hanging"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + <fo:inline dominant-baseline="mathematical">Before <fo:inline font-size="14pt" background-color="yellow">dominant-baseline="mathematical"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + <fo:inline dominant-baseline="central">Before <fo:inline font-size="14pt" background-color="yellow">dominant-baseline="central"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + <fo:inline dominant-baseline="middle">Before <fo:inline font-size="14pt" background-color="yellow">dominant-baseline="middle"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + <fo:inline dominant-baseline="text-after-edge">Before <fo:inline font-size="14pt" background-color="yellow">dominant-baseline="text-after-edge"</fo:inline> After</fo:inline> + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="10pt"> + <fo:inline dominant-baseline="text-before-edge">Before <fo:inline font-size="14pt" background-color="yellow">dominant-baseline="text-before-edge"</fo:inline> After</fo:inline> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="12950" xpath="//flow/block[2]/lineArea[1]/@bpd"/> + <eval expected="1375" xpath="//flow/block[2]/lineArea[1]/@space-before"/> + <eval expected="1375" xpath="//flow/block[2]/lineArea[1]/@space-after"/> + <eval expected="2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="-2872" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[5]/lineArea[1]/@bpd"/> + <eval expected="1375" xpath="//flow/block[5]/lineArea[1]/@space-before"/> + <eval expected="1375" xpath="//flow/block[5]/lineArea[1]/@space-after"/> + <eval expected="2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="-2872" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[8]/lineArea[1]/@bpd"/> + <eval expected="1375" xpath="//flow/block[8]/lineArea[1]/@space-before"/> + <eval expected="1375" xpath="//flow/block[8]/lineArea[1]/@space-after"/> + <eval expected="3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="-3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[11]/lineArea[1]/@bpd"/> + <eval expected="1375" xpath="//flow/block[11]/lineArea[1]/@space-before"/> + <eval expected="1375" xpath="//flow/block[11]/lineArea[1]/@space-after"/> + <eval expected="2872" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="-2872" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[14]/lineArea[1]/@bpd"/> + <eval expected="1375" xpath="//flow/block[14]/lineArea[1]/@space-before"/> + <eval expected="1375" xpath="//flow/block[14]/lineArea[1]/@space-after"/> + <eval expected="574" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="-574" xpath="//flow/block[14]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[17]/lineArea[1]/@bpd"/> + <eval expected="1375" xpath="//flow/block[17]/lineArea[1]/@space-before"/> + <eval expected="1375" xpath="//flow/block[17]/lineArea[1]/@space-after"/> + <eval expected="1436" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="-1436" xpath="//flow/block[17]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[20]/lineArea[1]/@bpd"/> + <eval expected="1375" xpath="//flow/block[20]/lineArea[1]/@space-before"/> + <eval expected="1375" xpath="//flow/block[20]/lineArea[1]/@space-after"/> + <eval expected="1850" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="-1850" xpath="//flow/block[20]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[23]/lineArea[1]/@bpd"/> + <eval expected="1375" xpath="//flow/block[23]/lineArea[1]/@space-before"/> + <eval expected="1375" xpath="//flow/block[23]/lineArea[1]/@space-after"/> + <eval expected="1826" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="-1826" xpath="//flow/block[23]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[26]/lineArea[1]/@bpd"/> + <eval expected="1375" xpath="//flow/block[26]/lineArea[1]/@space-before"/> + <eval expected="1375" xpath="//flow/block[26]/lineArea[1]/@space-after"/> + <eval expected="3700" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/> + <eval expected="-3700" xpath="//flow/block[26]/lineArea[1]/inlineparent/inlineparent/@offset"/> + + <eval expected="12950" xpath="//flow/block[29]/lineArea[1]/@bpd"/> + <eval expected="1375" xpath="//flow/block[29]/lineArea[1]/@space-before"/> + <eval expected="1375" xpath="//flow/block[29]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/inlineparent/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_dominant-baseline_3.xml b/test/layoutengine/testcases/inline_dominant-baseline_3.xml new file mode 100755 index 000000000..8b1056f62 --- /dev/null +++ b/test/layoutengine/testcases/inline_dominant-baseline_3.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level dominant-baseline. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt"> + Before + <fo:inline font-size="50%" + dominant-baseline="central" + background-color="yellow">central + <fo:inline font-size="50%" + background-color="red">Baseline changed</fo:inline> + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt"> + Before + <fo:inline font-size="50%" + dominant-baseline="text-before-edge" + background-color="yellow">text-before-edge + <fo:inline font-size="50%" + background-color="red">Baseline changed</fo:inline> + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt"> + Before + <fo:inline font-size="50%" + dominant-baseline="text-after-edge" + background-color="yellow">text-after-edge + <fo:inline font-size="150%" + background-color="red">Baseline changed</fo:inline> + </fo:inline> + After + </fo:block> + <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="16pt"> + Before + <fo:inline font-size="50%" + dominant-baseline="middle" + background-color="yellow">middle + <fo:inline font-size="150%" + dominant-baseline="hanging" + background-color="red">hanging + <fo:inline font-size="75%" + background-color="green">Baseline changed + </fo:inline> + </fo:inline> + </fo:inline> + After + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="14800" xpath="//flow/block[2]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/> + <eval expected="5744" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="1850" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/> + + <eval expected="14800" xpath="//flow/block[5]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/> + <eval expected="5744" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/> + + <eval expected="14800" xpath="//flow/block[8]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/> + <eval expected="5744" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-3700" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/> + + <eval expected="15018" xpath="//flow/block[11]/lineArea[1]/@bpd"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/> + <eval expected="5744" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/text[1]/@offset"/> + <eval expected="-1826" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_vertical-align_1.xml b/test/layoutengine/testcases/inline_vertical-align_1.xml new file mode 100755 index 000000000..1ff5ca2f1 --- /dev/null +++ b/test/layoutengine/testcases/inline_vertical-align_1.xml @@ -0,0 +1,148 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level vertical align. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline font-size="10pt" background-color="yellow">vertical-align not specified</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline font-size="10pt" vertical-align="baseline" background-color="yellow">vertical-align="baseline"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline font-size="10pt" vertical-align="top" background-color="yellow">vertical-align="top"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline font-size="10pt" vertical-align="text-top" background-color="yellow">vertical-align="text-top"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline font-size="10pt" vertical-align="middle" background-color="yellow">vertical-align="middle"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline font-size="10pt" vertical-align="text-bottom" background-color="yellow">vertical-align="text-bottom"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline font-size="10pt" vertical-align="bottom" background-color="yellow">vertical-align="bottom"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline font-size="10pt" vertical-align="super" background-color="yellow">vertical-align="super"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline font-size="10pt" vertical-align="sub" background-color="yellow">vertical-align="sub"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline vertical-align="super" background-color="yellow">vertical-align="super"</fo:inline> After + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Before <fo:inline vertical-align="sub" background-color="yellow">vertical-align="sub"</fo:inline> After + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="18500" xpath="//flow/block[2]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[2]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[2]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/> + <eval expected="7180" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/> + + <eval expected="18500" xpath="//flow/block[5]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[5]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[5]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/> + <eval expected="7180" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/> + + <eval expected="18500" xpath="//flow/block[8]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[8]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[8]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/> + + <eval expected="18500" xpath="//flow/block[11]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[11]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[11]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[1]/text[2]/@offset"/> + + <eval expected="18500" xpath="//flow/block[14]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[14]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[14]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[1]/@offset"/> + <eval expected="4565" xpath="//flow/block[14]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[1]/text[2]/@offset"/> + + <eval expected="18500" xpath="//flow/block[17]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[17]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[17]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/text[1]/@offset"/> + <eval expected="9250" xpath="//flow/block[17]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[17]/lineArea[1]/text[2]/@offset"/> + + <eval expected="18500" xpath="//flow/block[20]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[20]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[20]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[1]/@offset"/> + <eval expected="9250" xpath="//flow/block[20]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[20]/lineArea[1]/text[2]/@offset"/> + + <eval expected="21780" xpath="//flow/block[23]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[23]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[23]/lineArea[1]/@space-after"/> + <eval expected="3280" xpath="//flow/block[23]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[23]/lineArea[1]/inlineparent/@offset"/> + <eval expected="3280" xpath="//flow/block[23]/lineArea[1]/text[2]/@offset"/> + + <eval expected="19045" xpath="//flow/block[26]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[26]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[26]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[1]/@offset"/> + <eval expected="9795" xpath="//flow/block[26]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[26]/lineArea[1]/text[2]/@offset"/> + + <eval expected="28960" xpath="//flow/block[29]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[29]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[29]/lineArea[1]/@space-after"/> + <eval expected="10460" xpath="//flow/block[29]/lineArea[1]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[29]/lineArea[1]/inlineparent/@offset"/> + <eval expected="10460" xpath="//flow/block[29]/lineArea[1]/text[2]/@offset"/> + + <eval expected="23730" xpath="//flow/block[32]/lineArea[1]/@bpd"/> + <eval expected="2750" xpath="//flow/block[32]/lineArea[1]/@space-before"/> + <eval expected="2750" xpath="//flow/block[32]/lineArea[1]/@space-after"/> + <eval expected="0" xpath="//flow/block[32]/lineArea[1]/text[1]/@offset"/> + <eval expected="5230" xpath="//flow/block[32]/lineArea[1]/inlineparent/@offset"/> + <eval expected="0" xpath="//flow/block[32]/lineArea[1]/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_vertical-align_2.xml b/test/layoutengine/testcases/inline_vertical-align_2.xml new file mode 100755 index 000000000..53749b355 --- /dev/null +++ b/test/layoutengine/testcases/inline_vertical-align_2.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inline level vertical align. + This example is taken from the spec section 7.13. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5.5in" page-height="7.5in"> + <fo:region-body/> + </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:block background-color="yellow" margin="2pt 0pt 2pt 0pt" font-size="10pt"> + This is a longer line that provides a context for the line with images aligned on it. + Before edge <fo:external-graphic src="url(../../resources/images/arrow_down_small.png)" vertical-align="top" /><fo:external-graphic src="url(../../resources/images/arrow_down_large.png)" vertical-align="top" />, + after edge <fo:external-graphic src="url(../../resources/images/arrow_up_small.png)" vertical-align="bottom" /><fo:external-graphic src="url(../../resources/images/arrow_up_medium.png)" vertical-align="bottom" />, + middle <fo:external-graphic src="url(../../resources/images/arrow_up_down_small.png)" vertical-align="middle" />, + none <fo:external-graphic src="url(../../resources/images/line_medium.png)" />. + And this is a line of text that follows the line with the objects aligned on it. + </fo:block> + <fo:block background-color="yellow" margin="2pt 0pt 2pt 0pt" font-size="10pt"> + This is a longer line that provides a context for the line with images aligned on it. + Before edge <fo:external-graphic src="url(../../resources/images/arrow_down_small.png)" vertical-align="top" /><fo:external-graphic src="url(../../resources/images/arrow_down_large.png)" vertical-align="top" />, + after edge <fo:external-graphic src="url(../../resources/images/arrow_up_small.png)" vertical-align="bottom" /><fo:external-graphic src="url(../../resources/images/arrow_up_medium.png)" vertical-align="bottom" />, + middle <fo:external-graphic src="url(../../resources/images/arrow_up_down_small.png)" vertical-align="middle" />. + And this is a line of text that follows the line with the objects aligned on it. + </fo:block> + <fo:block background-color="yellow" margin="2pt 0pt 2pt 0pt" font-size="10pt"> + This is a longer line that provides a context for the line with images aligned on it. + Before edge <fo:external-graphic src="url(../../resources/images/arrow_down_small.png)" vertical-align="top" /><fo:external-graphic src="url(../../resources/images/arrow_down_large.png)" vertical-align="top" />, + after edge <fo:external-graphic src="url(../../resources/images/arrow_up_small.png)" vertical-align="bottom" /><fo:external-graphic src="url(../../resources/images/arrow_up_medium.png)" vertical-align="bottom" />. + And this is a line of text that follows the line with the objects aligned on it. + </fo:block> + <fo:block background-color="yellow" margin="2pt 0pt 2pt 0pt" font-size="10pt"> + This is a longer line that provides a context for the line with images aligned on it. + Before edge <fo:external-graphic src="url(../../resources/images/arrow_down_small.png)" vertical-align="top" /><fo:external-graphic src="url(../../resources/images/arrow_down_medium.png)" vertical-align="top" />, + after edge <fo:external-graphic src="url(../../resources/images/arrow_up_small.png)" vertical-align="bottom" /><fo:external-graphic src="url(../../resources/images/arrow_up_large.png)" vertical-align="bottom" />. + And this is a line of text that follows the line with the objects aligned on it. + </fo:block> + <fo:block background-color="yellow" margin="2pt 0pt 2pt 0pt" font-size="10pt"> + This is a longer line that provides a context for the line with images aligned on it. + Before edge <fo:external-graphic src="url(../../resources/images/arrow_down_small.png)" vertical-align="top" /><fo:external-graphic src="url(../../resources/images/arrow_down_medium.png)" vertical-align="top" />, + after edge <fo:external-graphic src="url(../../resources/images/arrow_up_small.png)" vertical-align="bottom" /><fo:external-graphic src="url(../../resources/images/arrow_up_large.png)" vertical-align="bottom" />, + middle <fo:external-graphic src="url(../../resources/images/arrow_up_down_small.png)" vertical-align="middle" />. + And this is a line of text that follows the line with the objects aligned on it. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="48812" xpath="//flow/block[2]/lineArea[2]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[2]/viewport[1]/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[2]/viewport[2]/@offset"/> + <eval expected="48812" xpath="//flow/block[2]/lineArea[2]/text[2]/@offset"/> + <eval expected="35995" xpath="//flow/block[2]/lineArea[2]/viewport[3]/@offset"/> + <eval expected="17998" xpath="//flow/block[2]/lineArea[2]/viewport[4]/@offset"/> + <eval expected="48812" xpath="//flow/block[2]/lineArea[2]/text[3]/@offset"/> + <eval expected="34379" xpath="//flow/block[2]/lineArea[2]/viewport[5]/@offset"/> + <eval expected="48812" xpath="//flow/block[2]/lineArea[2]/text[4]/@offset"/> + <eval expected="0" xpath="//flow/block[2]/lineArea[2]/viewport[6]/@offset"/> + <eval expected="48812" xpath="//flow/block[2]/lineArea[2]/text[5]/@offset"/> + + <eval expected="14433" xpath="//flow/block[5]/lineArea[2]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[2]/viewport[1]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[2]/viewport[2]/@offset"/> + <eval expected="14433" xpath="//flow/block[5]/lineArea[2]/text[2]/@offset"/> + <eval expected="35995" xpath="//flow/block[5]/lineArea[2]/viewport[3]/@offset"/> + <eval expected="17998" xpath="//flow/block[5]/lineArea[2]/viewport[4]/@offset"/> + <eval expected="14433" xpath="//flow/block[5]/lineArea[2]/text[3]/@offset"/> + <eval expected="0" xpath="//flow/block[5]/lineArea[2]/viewport[5]/@offset"/> + <eval expected="14433" xpath="//flow/block[5]/lineArea[2]/text[4]/@offset"/> + + <eval expected="0" xpath="//flow/block[8]/lineArea[2]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[2]/viewport[1]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[2]/viewport[2]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[2]/text[2]/@offset"/> + <eval expected="35995" xpath="//flow/block[8]/lineArea[2]/viewport[3]/@offset"/> + <eval expected="17998" xpath="//flow/block[8]/lineArea[2]/viewport[4]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea[2]/text[3]/@offset"/> + + <eval expected="0" xpath="//flow/block[11]/lineArea[2]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[2]/viewport[1]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[2]/viewport[2]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[2]/text[2]/@offset"/> + <eval expected="35995" xpath="//flow/block[11]/lineArea[2]/viewport[3]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[2]/viewport[4]/@offset"/> + <eval expected="0" xpath="//flow/block[11]/lineArea[2]/text[3]/@offset"/> + + <eval expected="14433" xpath="//flow/block[14]/lineArea[2]/text[1]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[2]/viewport[1]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[2]/viewport[2]/@offset"/> + <eval expected="14433" xpath="//flow/block[14]/lineArea[2]/text[2]/@offset"/> + <eval expected="35995" xpath="//flow/block[14]/lineArea[2]/viewport[3]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[2]/viewport[4]/@offset"/> + <eval expected="14433" xpath="//flow/block[14]/lineArea[2]/text[3]/@offset"/> + <eval expected="0" xpath="//flow/block[14]/lineArea[2]/viewport[5]/@offset"/> + <eval expected="14433" xpath="//flow/block[14]/lineArea[2]/text[4]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/instream-foreign-object_border_padding.xml b/test/layoutengine/testcases/instream-foreign-object_border_padding.xml index 51c1ffa0a..16d89eb22 100644 --- a/test/layoutengine/testcases/instream-foreign-object_border_padding.xml +++ b/test/layoutengine/testcases/instream-foreign-object_border_padding.xml @@ -63,7 +63,7 @@ <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@ipd"/> <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@bpd"/> <eval expected="70000" xpath="//flow/block[1]/lineArea/viewport/@bpda"/> - <eval expected="1650" xpath="//flow/block[1]/lineArea/viewport/@offset"/> + <eval expected="0" xpath="//flow/block[1]/lineArea/viewport/@offset"/> <eval expected="20000 30000 20000 30000" xpath="//flow/block[1]/lineArea/viewport/@bap"/> <eval expected="color=#ffffff" xpath="//flow/block[1]/lineArea/viewport/@background"/> <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/> @@ -79,7 +79,7 @@ <eval expected="20000" xpath="//flow/block[2]/lineArea/viewport/@ipd"/> <eval expected="20000" xpath="//flow/block[2]/lineArea/viewport/@bpd"/> <eval expected="70000" xpath="//flow/block[2]/lineArea/viewport/@bpda"/> - <eval expected="15550" xpath="//flow/block[2]/lineArea/viewport/@offset"/> + <eval expected="1800" xpath="//flow/block[2]/lineArea/viewport/@offset"/> <eval expected="20000 30000 20000 30000" xpath="//flow/block[2]/lineArea/viewport/@bap"/> <eval expected="color=#ffffff" xpath="//flow/block[2]/lineArea/viewport/@background"/> <eval expected="(solid,#000000,5000)" xpath="//flow/block[2]/lineArea/viewport/@border-before"/> diff --git a/test/layoutengine/testcases/leader_alignment-baseline.xml b/test/layoutengine/testcases/leader_alignment-baseline.xml new file mode 100755 index 000000000..630d40e88 --- /dev/null +++ b/test/layoutengine/testcases/leader_alignment-baseline.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:leader with different alignment-baseline values. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block> + <fo:leader leader-length="36pt" leader-pattern="dots" alignment-baseline="baseline" background-color="yellow"/> + dots baseline + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="solid" alignment-baseline="baseline" background-color="yellow"/> + rule solid baseline + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="double" alignment-baseline="baseline" background-color="yellow"/> + rule double baseline + </fo:block> + <fo:block> + <!-- use content currently causes a ClassCastException + <fo:leader leader-length="36pt" leader-pattern="use-content" alignment-baseline="baseline" background-color="yellow">x</fo:leader> + use-content x baseline + --> + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="dots" alignment-baseline="before-edge" background-color="yellow"/> + dots before-edge + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="solid" alignment-baseline="before-edge" background-color="yellow"/> + rule solid before-edge + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="double" alignment-baseline="before-edge" background-color="yellow"/> + rule double before-edge + </fo:block> + <fo:block> + <!-- use content currently causes a ClassCastException + <fo:leader leader-length="36pt" leader-pattern="use-content" alignment-baseline="before-edge" background-color="yellow">x</fo:leader> + use-content x before-edge + --> + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="dots" alignment-baseline="middle" background-color="yellow"/> + dots middle + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="solid" alignment-baseline="middle" background-color="yellow"/> + rule solid middle + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="double" alignment-baseline="middle" background-color="yellow"/> + rule double middle + </fo:block> + <fo:block> + <!-- use content currently causes a ClassCastException + <fo:leader leader-length="36pt" leader-pattern="use-content" alignment-baseline="middle" background-color="yellow">x</fo:leader> + use-content x middle + --> + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="dots" alignment-baseline="after-edge" background-color="yellow"/> + dots after-edge + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="solid" alignment-baseline="after-edge" background-color="yellow"/> + rule solid after-edge + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="double" alignment-baseline="after-edge" background-color="yellow"/> + rule double after-edge + </fo:block> + <fo:block> + <!-- use content currently causes a ClassCastException + <fo:leader leader-length="36pt" leader-pattern="use-content" alignment-baseline="after-edge" background-color="yellow">x</fo:leader> + use-content x after-edge + --> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[1]/lineArea/inlineparent/@ipd"/> + <eval expected="5280" xpath="//flow/block[1]/lineArea/inlineparent/@offset"/> + + <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[2]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[2]/lineArea/leader/@ipd"/> + <eval expected="7616" xpath="//flow/block[2]/lineArea/leader/@offset"/> + + <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[3]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[3]/lineArea/leader/@ipd"/> + <eval expected="7616" xpath="//flow/block[3]/lineArea/leader/@offset"/> + + <eval expected="11100" xpath="//flow/block[5]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[5]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[5]/lineArea/inlineparent/@ipd"/> + <eval expected="0" xpath="//flow/block[5]/lineArea/inlineparent/@offset"/> + + <eval expected="11100" xpath="//flow/block[6]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[6]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[6]/lineArea/leader/@ipd"/> + <eval expected="0" xpath="//flow/block[6]/lineArea/leader/@offset"/> + + <eval expected="11100" xpath="//flow/block[7]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[7]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[7]/lineArea/leader/@ipd"/> + <eval expected="0" xpath="//flow/block[7]/lineArea/leader/@offset"/> + + <eval expected="11100" xpath="//flow/block[9]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[9]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[9]/lineArea/inlineparent/@ipd"/> + <eval expected="3810" xpath="//flow/block[9]/lineArea/inlineparent/@offset"/> + + <eval expected="11100" xpath="//flow/block[10]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[10]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[10]/lineArea/leader/@ipd"/> + <eval expected="4978" xpath="//flow/block[10]/lineArea/leader/@offset"/> + + <eval expected="11100" xpath="//flow/block[11]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[11]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[11]/lineArea/leader/@ipd"/> + <eval expected="4978" xpath="//flow/block[11]/lineArea/leader/@offset"/> + + <eval expected="11100" xpath="//flow/block[13]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[13]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[13]/lineArea/inlineparent/@ipd"/> + <eval expected="7764" xpath="//flow/block[13]/lineArea/inlineparent/@offset"/> + + <eval expected="11100" xpath="//flow/block[14]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[14]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[14]/lineArea/leader/@ipd"/> + <eval expected="10100" xpath="//flow/block[14]/lineArea/leader/@offset"/> + + <eval expected="11100" xpath="//flow/block[15]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[15]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[15]/lineArea/leader/@ipd"/> + <eval expected="10100" xpath="//flow/block[15]/lineArea/leader/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/leader_background-color.xml b/test/layoutengine/testcases/leader_background-color.xml new file mode 100755 index 000000000..05dd381a7 --- /dev/null +++ b/test/layoutengine/testcases/leader_background-color.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:leader with background-color + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block> + <fo:leader leader-length="36pt" leader-pattern="dots" background-color="yellow"/> + dots yellow background + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="solid" background-color="yellow"/> + rule solid yellow background + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="double" background-color="yellow"/> + rule double yellow background + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="space" background-color="yellow"/> + space yellow background + </fo:block> + <fo:block> + <!-- use content currently causes a ClassCastException + <fo:leader leader-length="36pt" leader-pattern="use-content" background-color="yellow">x</fo:leader> + use-content x yellow background + --> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[1]/lineArea/inlineparent/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[1]/lineArea/inlineparent/@background"/> + + <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[2]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[2]/lineArea/leader/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[2]/lineArea/leader/@background"/> + + <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[3]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[3]/lineArea/leader/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[3]/lineArea/leader/@background"/> + + <eval expected="11100" xpath="//flow/block[4]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[4]/lineArea/@ipd"/> + <eval expected="36000" xpath="//flow/block[4]/lineArea/space/@ipd"/> + <eval expected="color=#ffff00" xpath="//flow/block[4]/lineArea/space/@background"/> + + </checks> +</testcase> diff --git a/test/layoutengine/testcases/leader_border_padding.xml b/test/layoutengine/testcases/leader_border_padding.xml new file mode 100755 index 000000000..6c0c99a75 --- /dev/null +++ b/test/layoutengine/testcases/leader_border_padding.xml @@ -0,0 +1,256 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:leader with border and padding + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block> + <fo:leader leader-length="36pt" leader-pattern="dots" border="solid 1pt red"/> + dots solid 1pt red border + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="solid" border="solid 1pt red"/> + rule solid solid 1pt red border + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="double" border="solid 1pt red"/> + rule double solid 1pt red border + </fo:block> + <fo:block> + <fo:leader leader-length="36pt" leader-pattern="space" border="solid 1pt red"/> + space solid 1pt red border + </fo:block> + <fo:block> + <!-- use content currently causes a ClassCastException + <fo:leader leader-length="36pt" leader-pattern="use-content" border="solid 1pt red">x</fo:leader> + use-content x solid 1pt red border + --> + </fo:block> + <fo:block margin="10pt 0pt 10pt 0pt"> + <fo:leader leader-length="36pt" leader-pattern="dots" border="solid 5pt red" padding="5pt"/> + dots solid 5pt red border 5pt padding + </fo:block> + <fo:block margin="10pt 0pt 10pt 0pt"> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="solid" border="solid 5pt red" padding="5pt"/> + rule solid solid 5pt red border 5pt padding + </fo:block> + <fo:block margin="10pt 0pt 10pt 0pt"> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="double" border="solid 5pt red" padding="5pt"/> + rule double solid 5pt red border 5pt padding + </fo:block> + <fo:block margin="10pt 0pt 10pt 0pt"> + <fo:leader leader-length="36pt" leader-pattern="space" border="solid 5pt red" padding="5pt"/> + space solid 5pt red border 5pt padding + </fo:block> + <fo:block margin="10pt 0pt 10pt 0pt"> + <!-- use content currently causes a ClassCastException + <fo:leader leader-length="36pt" leader-pattern="use-content" border="solid 5pt red" padding="5pt">x</fo:leader> + use-content x solid 5pt red border 5pt padding + --> + </fo:block> + <fo:block margin="2pt 0pt 2pt 0pt"> + <fo:leader leader-length="36pt" leader-pattern="dots" border-style="solid" border-width="1pt 2pt 3pt 4pt" border-color="red" padding="1pt 2pt 3pt 4pt"/> + dots uneven border and padding + </fo:block> + <fo:block margin="2pt 0pt 2pt 0pt"> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="solid" border-style="solid" border-width="1pt 2pt 3pt 4pt" border-color="red" padding="1pt 2pt 3pt 4pt"/> + rule solid uneven border and padding + </fo:block> + <fo:block margin="2pt 0pt 2pt 0pt"> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="double" border-style="solid" border-width="1pt 2pt 3pt 4pt" border-color="red" padding="1pt 2pt 3pt 4pt"/> + rule double uneven border and padding + </fo:block> + <fo:block margin="2pt 0pt 2pt 0pt"> + <fo:leader leader-length="36pt" leader-pattern="space" border-style="solid" border-width="1pt 2pt 3pt 4pt" border-color="red" padding="1pt 2pt 3pt 4pt"/> + space uneven border and padding + </fo:block> + <fo:block margin="2pt 0pt 2pt 0pt"> + <!-- use content currently causes a ClassCastException + <fo:leader leader-length="36pt" leader-pattern="use-content" border-style="solid" border-width="1pt 2pt 3pt 4pt" border-color="red" padding="1pt 2pt 3pt 4pt">x</fo:leader> + use-content x uneven border and padding + --> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/> + <eval expected="34000" xpath="//flow/block[1]/lineArea/inlineparent/@ipd"/> + <eval expected="36000" xpath="//flow/block[1]/lineArea/inlineparent/@ipda"/> + <eval expected="5280" xpath="//flow/block[1]/lineArea/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/inlineparent/@border-start"/> + + <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[2]/lineArea/@ipd"/> + <eval expected="34000" xpath="//flow/block[2]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[2]/lineArea/leader/@ipda"/> + <eval expected="7616" xpath="//flow/block[2]/lineArea/leader/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/leader/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/leader/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/leader/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/leader/@border-start"/> + + <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[3]/lineArea/@ipd"/> + <eval expected="34000" xpath="//flow/block[3]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[3]/lineArea/leader/@ipda"/> + <eval expected="7616" xpath="//flow/block[3]/lineArea/leader/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea/leader/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea/leader/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea/leader/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea/leader/@border-start"/> + + <eval expected="11100" xpath="//flow/block[4]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[4]/lineArea/@ipd"/> + <eval expected="34000" xpath="//flow/block[4]/lineArea/space/@ipd"/> + <eval expected="36000" xpath="//flow/block[4]/lineArea/space/@ipda"/> + <eval expected="8615" xpath="//flow/block[4]/lineArea/space/@offset"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea/space/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea/space/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea/space/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea/space/@border-start"/> + + <eval expected="11100" xpath="//flow/block[7]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[7]/lineArea/@ipd"/> + <eval expected="16000" xpath="//flow/block[7]/lineArea/inlineparent/@ipd"/> + <eval expected="36000" xpath="//flow/block[7]/lineArea/inlineparent/@ipda"/> + <eval expected="5280" xpath="//flow/block[7]/lineArea/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[7]/lineArea/inlineparent/@border-start"/> + <eval expected="5000" xpath="//flow/block[7]/lineArea/inlineparent/@padding-after"/> + <eval expected="5000" xpath="//flow/block[7]/lineArea/inlineparent/@padding-before"/> + <eval expected="5000" xpath="//flow/block[7]/lineArea/inlineparent/@padding-end"/> + <eval expected="5000" xpath="//flow/block[7]/lineArea/inlineparent/@padding-start"/> + + <eval expected="11100" xpath="//flow/block[10]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[10]/lineArea/@ipd"/> + <eval expected="16000" xpath="//flow/block[10]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[10]/lineArea/leader/@ipda"/> + <eval expected="7616" xpath="//flow/block[10]/lineArea/leader/@offset"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[10]/lineArea/leader/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[10]/lineArea/leader/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[10]/lineArea/leader/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[10]/lineArea/leader/@border-start"/> + <eval expected="5000" xpath="//flow/block[10]/lineArea/leader/@padding-after"/> + <eval expected="5000" xpath="//flow/block[10]/lineArea/leader/@padding-before"/> + <eval expected="5000" xpath="//flow/block[10]/lineArea/leader/@padding-end"/> + <eval expected="5000" xpath="//flow/block[10]/lineArea/leader/@padding-start"/> + + <eval expected="11100" xpath="//flow/block[13]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[13]/lineArea/@ipd"/> + <eval expected="16000" xpath="//flow/block[13]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[13]/lineArea/leader/@ipda"/> + <eval expected="7616" xpath="//flow/block[13]/lineArea/leader/@offset"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[13]/lineArea/leader/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[13]/lineArea/leader/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[13]/lineArea/leader/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[13]/lineArea/leader/@border-start"/> + <eval expected="5000" xpath="//flow/block[13]/lineArea/leader/@padding-after"/> + <eval expected="5000" xpath="//flow/block[13]/lineArea/leader/@padding-before"/> + <eval expected="5000" xpath="//flow/block[13]/lineArea/leader/@padding-end"/> + <eval expected="5000" xpath="//flow/block[13]/lineArea/leader/@padding-start"/> + + <eval expected="11100" xpath="//flow/block[16]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[16]/lineArea/@ipd"/> + <eval expected="16000" xpath="//flow/block[16]/lineArea/space/@ipd"/> + <eval expected="36000" xpath="//flow/block[16]/lineArea/space/@ipda"/> + <eval expected="8615" xpath="//flow/block[16]/lineArea/space/@offset"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[16]/lineArea/space/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[16]/lineArea/space/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[16]/lineArea/space/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[16]/lineArea/space/@border-start"/> + <eval expected="5000" xpath="//flow/block[16]/lineArea/space/@padding-after"/> + <eval expected="5000" xpath="//flow/block[16]/lineArea/space/@padding-before"/> + <eval expected="5000" xpath="//flow/block[16]/lineArea/space/@padding-end"/> + <eval expected="5000" xpath="//flow/block[16]/lineArea/space/@padding-start"/> + + <eval expected="11100" xpath="//flow/block[22]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[22]/lineArea/@ipd"/> + <eval expected="24000" xpath="//flow/block[22]/lineArea/inlineparent/@ipd"/> + <eval expected="36000" xpath="//flow/block[22]/lineArea/inlineparent/@ipda"/> + <eval expected="5280" xpath="//flow/block[22]/lineArea/inlineparent/@offset"/> + <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[22]/lineArea/inlineparent/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[22]/lineArea/inlineparent/@border-before"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[22]/lineArea/inlineparent/@border-end"/> + <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[22]/lineArea/inlineparent/@border-start"/> + <eval expected="3000" xpath="//flow/block[22]/lineArea/inlineparent/@padding-after"/> + <eval expected="1000" xpath="//flow/block[22]/lineArea/inlineparent/@padding-before"/> + <eval expected="2000" xpath="//flow/block[22]/lineArea/inlineparent/@padding-end"/> + <eval expected="4000" xpath="//flow/block[22]/lineArea/inlineparent/@padding-start"/> + + <eval expected="11100" xpath="//flow/block[25]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[25]/lineArea/@ipd"/> + <eval expected="24000" xpath="//flow/block[25]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[25]/lineArea/leader/@ipda"/> + <eval expected="7616" xpath="//flow/block[25]/lineArea/leader/@offset"/> + <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[25]/lineArea/leader/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[25]/lineArea/leader/@border-before"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[25]/lineArea/leader/@border-end"/> + <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[25]/lineArea/leader/@border-start"/> + <eval expected="3000" xpath="//flow/block[25]/lineArea/leader/@padding-after"/> + <eval expected="1000" xpath="//flow/block[25]/lineArea/leader/@padding-before"/> + <eval expected="2000" xpath="//flow/block[25]/lineArea/leader/@padding-end"/> + <eval expected="4000" xpath="//flow/block[25]/lineArea/leader/@padding-start"/> + + <eval expected="11100" xpath="//flow/block[28]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[28]/lineArea/@ipd"/> + <eval expected="24000" xpath="//flow/block[28]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[28]/lineArea/leader/@ipda"/> + <eval expected="7616" xpath="//flow/block[28]/lineArea/leader/@offset"/> + <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[28]/lineArea/leader/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[28]/lineArea/leader/@border-before"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[28]/lineArea/leader/@border-end"/> + <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[28]/lineArea/leader/@border-start"/> + <eval expected="3000" xpath="//flow/block[28]/lineArea/leader/@padding-after"/> + <eval expected="1000" xpath="//flow/block[28]/lineArea/leader/@padding-before"/> + <eval expected="2000" xpath="//flow/block[28]/lineArea/leader/@padding-end"/> + <eval expected="4000" xpath="//flow/block[28]/lineArea/leader/@padding-start"/> + + <eval expected="11100" xpath="//flow/block[31]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[31]/lineArea/@ipd"/> + <eval expected="24000" xpath="//flow/block[31]/lineArea/space/@ipd"/> + <eval expected="36000" xpath="//flow/block[31]/lineArea/space/@ipda"/> + <eval expected="8615" xpath="//flow/block[31]/lineArea/space/@offset"/> + <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[31]/lineArea/space/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[31]/lineArea/space/@border-before"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[31]/lineArea/space/@border-end"/> + <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[31]/lineArea/space/@border-start"/> + <eval expected="3000" xpath="//flow/block[31]/lineArea/space/@padding-after"/> + <eval expected="1000" xpath="//flow/block[31]/lineArea/space/@padding-before"/> + <eval expected="2000" xpath="//flow/block[31]/lineArea/space/@padding-end"/> + <eval expected="4000" xpath="//flow/block[31]/lineArea/space/@padding-start"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/leader_leader-pattern_dots.xml b/test/layoutengine/testcases/leader_leader-pattern_dots.xml index d5ac49b92..55af7c317 100644 --- a/test/layoutengine/testcases/leader_leader-pattern_dots.xml +++ b/test/layoutengine/testcases/leader_leader-pattern_dots.xml @@ -35,23 +35,23 @@ Default dots pattern </fo:block> <fo:block> - <fo:leader leader-pattern="dots" leader-pattern-width="use-font-metrics"/> + <fo:leader leader-pattern="dots" leader-pattern-width="use-font-metrics" background-color="yellow"/> leader-pattern-width="use-font-metrics" </fo:block> <fo:block> - <fo:leader leader-pattern="dots" leader-length="20mm" leader-pattern-width="5mm"/> + <fo:leader leader-pattern="dots" leader-length="20mm" leader-pattern-width="5mm" background-color="yellow"/> leader-length="20mm" leader-pattern-width="5mm" </fo:block> <fo:block> - <fo:leader leader-pattern="dots" leader-length="20%" leader-pattern-width="5mm"/> + <fo:leader leader-pattern="dots" leader-length="20%" leader-pattern-width="5mm" background-color="yellow"/> leader-length="20%" leader-pattern-width="5mm" </fo:block> <fo:block> - <fo:leader leader-pattern="dots" leader-pattern-width="1pt"/> + <fo:leader leader-pattern="dots" leader-pattern-width="1pt" background-color="yellow"/> leader-pattern-width="1pt" </fo:block> <fo:block> - <fo:leader leader-pattern="dots" leader-length="20%" leader-pattern-width="5%"/> + <fo:leader leader-pattern="dots" leader-length="20%" leader-pattern-width="5%" background-color="yellow"/> leader-length="20%" leader-pattern-width="5%" </fo:block> </fo:flow> @@ -59,29 +59,29 @@ </fo:root> </fo> <checks> - <eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/> <eval expected="12000" xpath="//flow/block[1]/lineArea/inlineparent/@ipd"/> <eval expected="3" xpath="count(//flow/block[1]/lineArea/inlineparent/text)"/> - <eval expected="14400" xpath="//flow/block[2]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[2]/lineArea/@ipd"/> <eval expected="12000" xpath="//flow/block[2]/lineArea/inlineparent/@ipd"/> <eval expected="3" xpath="count(//flow/block[2]/lineArea/inlineparent/text)"/> - <eval expected="14400" xpath="//flow/block[3]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[3]/lineArea/@ipd"/> <eval expected="56692" xpath="//flow/block[3]/lineArea/inlineparent/@ipd"/> <eval expected="4" xpath="count(//flow/block[3]/lineArea/inlineparent/text)"/> <eval expected="4" xpath="count(//flow/block[3]/lineArea/inlineparent/space)"/> - <eval expected="14400" xpath="//flow/block[4]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[4]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[4]/lineArea/@ipd"/> <eval expected="72000" xpath="//flow/block[4]/lineArea/inlineparent/@ipd"/> <eval expected="5" xpath="count(//flow/block[4]/lineArea/inlineparent/text)"/> <eval expected="5" xpath="count(//flow/block[4]/lineArea/inlineparent/space)"/> - <eval expected="14400" xpath="//flow/block[5]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[5]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[5]/lineArea/@ipd"/> <eval expected="12000" xpath="//flow/block[5]/lineArea/inlineparent/@ipd"/> <eval expected="3" xpath="count(//flow/block[5]/lineArea/inlineparent/text)"/> - <eval expected="14400" xpath="//flow/block[6]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[6]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[6]/lineArea/@ipd"/> <eval expected="72000" xpath="//flow/block[6]/lineArea/inlineparent/@ipd"/> <eval expected="4" xpath="count(//flow/block[6]/lineArea/inlineparent/text)"/> diff --git a/test/layoutengine/testcases/leader_leader-pattern_rule.xml b/test/layoutengine/testcases/leader_leader-pattern_rule.xml index 4e65823fa..bfba5ea26 100644 --- a/test/layoutengine/testcases/leader_leader-pattern_rule.xml +++ b/test/layoutengine/testcases/leader_leader-pattern_rule.xml @@ -31,169 +31,146 @@ <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:block> - <fo:leader leader-pattern="rule"/> + <fo:leader leader-length="36pt" leader-pattern="rule" background-color="yellow"/> No rule-style given </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="none"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="none" background-color="yellow"/> rule-style="none" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="dotted"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="dotted" background-color="yellow"/> rule-style="dotted" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="dashed"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="dashed" background-color="yellow"/> rule-style="dashed" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="solid"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="solid" background-color="yellow"/> rule-style="solid" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="double"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="double" background-color="yellow"/> rule-style="double" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="groove"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="groove" background-color="yellow"/> rule-style="groove" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="ridge"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="ridge" background-color="yellow"/> rule-style="ridge" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="dotted" rule-thickness="3pt"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="dotted" rule-thickness="3pt" background-color="yellow"/> rule-style="dotted" rule-thickness="3pt" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="dashed" rule-thickness="3pt"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="dashed" rule-thickness="3pt" background-color="yellow"/> rule-style="dashed" rule-thickness="3pt" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="solid" rule-thickness="3pt"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="solid" rule-thickness="3pt" background-color="yellow"/> rule-style="solid" rule-thickness="3pt" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="double" rule-thickness="3pt"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="double" rule-thickness="3pt" background-color="yellow"/> rule-style="double" rule-thickness="3pt" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="groove" rule-thickness="3pt"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="groove" rule-thickness="3pt" background-color="yellow"/> rule-style="groove" rule-thickness="3pt" </fo:block> <fo:block> - <fo:leader leader-pattern="rule" rule-style="ridge" rule-thickness="3pt"/> + <fo:leader leader-length="36pt" leader-pattern="rule" rule-style="ridge" rule-thickness="3pt" background-color="yellow"/> rule-style="ridge" rule-thickness="3pt" </fo:block> - <fo:block> - <fo:leader leader-pattern="rule" alignment-baseline="middle"/> - No rule-style given alignment-baseline="middle" - </fo:block> - <fo:block> - <fo:leader leader-pattern="rule" rule-style="none" alignment-baseline="middle"/> - rule-style="none" alignment-baseline="middle" - </fo:block> - <fo:block> - <fo:leader leader-pattern="rule" rule-style="dotted" alignment-baseline="middle"/> - rule-style="dotted" alignment-baseline="middle" - </fo:block> - <fo:block> - <fo:leader leader-pattern="rule" rule-style="dashed" alignment-baseline="middle"/> - rule-style="dashed" alignment-baseline="middle" - </fo:block> - <fo:block> - <fo:leader leader-pattern="rule" rule-style="solid" alignment-baseline="middle"/> - rule-style="solid" alignment-baseline="middle" - </fo:block> - <fo:block> - <fo:leader leader-pattern="rule" rule-style="double" alignment-baseline="middle"/> - rule-style="double" alignment-baseline="middle" - </fo:block> - <fo:block> - <fo:leader leader-pattern="rule" rule-style="groove" alignment-baseline="middle"/> - rule-style="groove" alignment-baseline="middle" - </fo:block> - <fo:block> - <fo:leader leader-pattern="rule" rule-style="ridge" alignment-baseline="middle"/> - rule-style="ridge" alignment-baseline="middle" - </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </fo> <checks> - <eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[1]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[1]/lineArea/leader/@ipd"/> <eval expected="solid" xpath="//flow/block[1]/lineArea/leader/@ruleStyle"/> <eval expected="1000" xpath="//flow/block[1]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[2]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[2]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[2]/lineArea/leader/@ipd"/> - <eval expected="--NYI--" xpath="//flow/block[2]/lineArea/leader/@ruleStyle"/> - <eval expected="1000" xpath="//flow/block[2]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[3]/lineArea/@bpd"/> + <eval expected="36000" xpath="//flow/block[2]/lineArea/space/@ipd"/> + + <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[3]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[3]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[3]/lineArea/leader/@ipd"/> <eval expected="dotted" xpath="//flow/block[3]/lineArea/leader/@ruleStyle"/> <eval expected="1000" xpath="//flow/block[3]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[4]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[4]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[4]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[4]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[4]/lineArea/leader/@ipd"/> <eval expected="dashed" xpath="//flow/block[4]/lineArea/leader/@ruleStyle"/> <eval expected="1000" xpath="//flow/block[4]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[5]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[5]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[5]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[5]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[5]/lineArea/leader/@ipd"/> <eval expected="solid" xpath="//flow/block[5]/lineArea/leader/@ruleStyle"/> <eval expected="1000" xpath="//flow/block[5]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[6]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[6]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[6]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[6]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[6]/lineArea/leader/@ipd"/> <eval expected="double" xpath="//flow/block[6]/lineArea/leader/@ruleStyle"/> <eval expected="1000" xpath="//flow/block[6]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[7]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[7]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[7]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[7]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[7]/lineArea/leader/@ipd"/> <eval expected="groove" xpath="//flow/block[7]/lineArea/leader/@ruleStyle"/> <eval expected="1000" xpath="//flow/block[7]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[8]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[8]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[8]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[8]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[8]/lineArea/leader/@ipd"/> <eval expected="ridge" xpath="//flow/block[8]/lineArea/leader/@ruleStyle"/> <eval expected="1000" xpath="//flow/block[8]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[9]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[9]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[9]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[9]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[9]/lineArea/leader/@ipd"/> <eval expected="dotted" xpath="//flow/block[9]/lineArea/leader/@ruleStyle"/> <eval expected="3000" xpath="//flow/block[9]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[10]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[10]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[10]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[10]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[10]/lineArea/leader/@ipd"/> <eval expected="dashed" xpath="//flow/block[10]/lineArea/leader/@ruleStyle"/> <eval expected="3000" xpath="//flow/block[10]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[11]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[11]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[11]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[11]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[11]/lineArea/leader/@ipd"/> <eval expected="solid" xpath="//flow/block[11]/lineArea/leader/@ruleStyle"/> <eval expected="3000" xpath="//flow/block[11]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[12]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[12]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[12]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[12]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[12]/lineArea/leader/@ipd"/> <eval expected="double" xpath="//flow/block[12]/lineArea/leader/@ruleStyle"/> <eval expected="3000" xpath="//flow/block[12]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[13]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[13]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[13]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[13]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[13]/lineArea/leader/@ipd"/> <eval expected="groove" xpath="//flow/block[13]/lineArea/leader/@ruleStyle"/> <eval expected="3000" xpath="//flow/block[13]/lineArea/leader/@ruleThickness"/> - <eval expected="14400" xpath="//flow/block[14]/lineArea/@bpd"/> + + <eval expected="11100" xpath="//flow/block[14]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[14]/lineArea/@ipd"/> - <eval expected="12000" xpath="//flow/block[14]/lineArea/leader/@ipd"/> + <eval expected="36000" xpath="//flow/block[14]/lineArea/leader/@ipd"/> <eval expected="ridge" xpath="//flow/block[14]/lineArea/leader/@ruleStyle"/> <eval expected="3000" xpath="//flow/block[14]/lineArea/leader/@ruleThickness"/> - <!-- No checks for the "alignment-baseline=..." section as this property is currently - not supported --> </checks> </testcase> diff --git a/test/layoutengine/testcases/leader_leader-pattern_space.xml b/test/layoutengine/testcases/leader_leader-pattern_space.xml index e82dfa680..61ee71e7d 100644 --- a/test/layoutengine/testcases/leader_leader-pattern_space.xml +++ b/test/layoutengine/testcases/leader_leader-pattern_space.xml @@ -47,13 +47,13 @@ </fo:root> </fo> <checks> - <eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/> <eval expected="12000" xpath="//flow/block[1]/lineArea/space/@ipd"/> - <eval expected="14400" xpath="//flow/block[2]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[2]/lineArea/@ipd"/> <eval expected="36000" xpath="//flow/block[2]/lineArea/space/@ipd"/> - <eval expected="14400" xpath="//flow/block[3]/lineArea/@bpd"/> + <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/> <eval expected="360000" xpath="//flow/block[3]/lineArea/@ipd"/> <eval expected="18000" xpath="//flow/block[3]/lineArea/space/@ipd"/> </checks> diff --git a/test/layoutengine/testcases/leader_leader-pattern_use-content.xml b/test/layoutengine/testcases/leader_leader-pattern_use-content.xml index 00b0d97fd..0a297ee3a 100644 --- a/test/layoutengine/testcases/leader_leader-pattern_use-content.xml +++ b/test/layoutengine/testcases/leader_leader-pattern_use-content.xml @@ -31,24 +31,12 @@ <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:block> - <fo:leader leader-pattern="use-content"/> - Default dots pattern + <fo:leader leader-length="36pt" leader-pattern="use-content">x</fo:leader> + Content is "x" </fo:block> <fo:block> - <fo:leader leader-pattern="use-content" leader-pattern-width="use-font-metrics"/> - leader-pattern-width="use-font-metrics" - </fo:block> - <fo:block> - <fo:leader leader-pattern="use-content" leader-length="20mm" leader-pattern-width="5mm"/> - leader-length="20mm" leader-pattern-width="5mm" - </fo:block> - <fo:block> - <fo:leader leader-pattern="use-content" leader-pattern-width="1pt"/> - leader-pattern-width="1pt" - </fo:block> - <fo:block> - <fo:leader leader-pattern="use-content" leader-pattern-width="5%"/> - leader-pattern-width="5%" + <fo:leader leader-length="36pt" leader-pattern="use-content"><fo:inline background-color="yellow">=></fo:inline></fo:leader> + Content is "=>" with background </fo:block> </fo:flow> </fo:page-sequence> diff --git a/test/layoutengine/testcases/leader_toc.xml b/test/layoutengine/testcases/leader_toc.xml new file mode 100755 index 000000000..c8b85ce1b --- /dev/null +++ b/test/layoutengine/testcases/leader_toc.xml @@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:leader in a typical table of content scenario. + This example is taken from the spec section 6.6.1.1.4 + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block text-align-last="justify"> + <fo:basic-link internal-destination="N4">1. Chapter</fo:basic-link> + <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt" + leader-length.maximum="100%" leader-pattern="dots"> + </fo:leader> + <fo:page-number-citation ref-id="N4"> + </fo:page-number-citation> + </fo:block> + <fo:block start-indent="10mm" text-align-last="justify"> + <fo:basic-link internal-destination="N11">1.1 Section</fo:basic-link> + <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt" + leader-length.maximum="100%" leader-pattern="dots"> + </fo:leader> + <fo:page-number-citation ref-id="N11"> + </fo:page-number-citation> + </fo:block> + <fo:block start-indent="10mm" text-align-last="justify"> + <fo:basic-link internal-destination="N19">1.2 Section</fo:basic-link> + <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt" + leader-length.maximum="100%" leader-pattern="dots"> + </fo:leader> + <fo:page-number-citation ref-id="N19"> + </fo:page-number-citation> + </fo:block> + <fo:block text-align-last="justify"> + <fo:basic-link internal-destination="N28">2. Chapter</fo:basic-link> + <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt" + leader-length.maximum="100%" leader-pattern="dots"> + </fo:leader> + <fo:page-number-citation ref-id="N28"> + </fo:page-number-citation> + </fo:block> + <fo:block start-indent="10mm" text-align-last="justify"> + <fo:basic-link internal-destination="N35">2.1 Section</fo:basic-link> + <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt" + leader-length.maximum="100%" leader-pattern="dots"> + </fo:leader> + <fo:page-number-citation ref-id="N35"> + </fo:page-number-citation> + </fo:block> + <fo:block start-indent="10mm" text-align-last="justify"> + <fo:basic-link internal-destination="N43">2.2 Section</fo:basic-link> + <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt" + leader-length.maximum="100%" leader-pattern="dots"> + </fo:leader> + <fo:page-number-citation ref-id="N43"> + </fo:page-number-citation> + </fo:block> + + <fo:block id="N4">1. Chapter + </fo:block> + + <fo:block>Text + </fo:block> + + <fo:block id="N11">1.1 Section + </fo:block> + + <fo:block>Text + </fo:block> + + <fo:block id="N19">1.2 Section + </fo:block> + + <fo:block>Text + </fo:block> + + <fo:block id="N28">2. Chapter + </fo:block> + + <fo:block>Text + </fo:block> + + <fo:block id="N35">2.1 Section + </fo:block> + + <fo:block>Text + </fo:block> + + <fo:block id="N43">2.2 Section + </fo:block> + + <fo:block>Text + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/> + <eval expected="268268" xpath="//flow/block[1]/lineArea/inlineparent[2]/@ipd"/> + <eval expected="5280" xpath="//flow/block[1]/lineArea/inlineparent[2]/@offset"/> + + <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/> + <eval expected="331654" xpath="//flow/block[2]/lineArea/@ipd"/> + <eval expected="236051" xpath="//flow/block[2]/lineArea/inlineparent[2]/@ipd"/> + <eval expected="5280" xpath="//flow/block[2]/lineArea/inlineparent[2]/@offset"/> + + <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/> + <eval expected="331654" xpath="//flow/block[3]/lineArea/@ipd"/> + <eval expected="236051" xpath="//flow/block[3]/lineArea/inlineparent[2]/@ipd"/> + <eval expected="5280" xpath="//flow/block[3]/lineArea/inlineparent[2]/@offset"/> + + <eval expected="11100" xpath="//flow/block[4]/lineArea/@bpd"/> + <eval expected="360000" xpath="//flow/block[4]/lineArea/@ipd"/> + <eval expected="268268" xpath="//flow/block[4]/lineArea/inlineparent[2]/@ipd"/> + <eval expected="5280" xpath="//flow/block[4]/lineArea/inlineparent[2]/@offset"/> + + <eval expected="11100" xpath="//flow/block[5]/lineArea/@bpd"/> + <eval expected="331654" xpath="//flow/block[5]/lineArea/@ipd"/> + <eval expected="236051" xpath="//flow/block[5]/lineArea/inlineparent[2]/@ipd"/> + <eval expected="5280" xpath="//flow/block[5]/lineArea/inlineparent[2]/@offset"/> + + <eval expected="11100" xpath="//flow/block[6]/lineArea/@bpd"/> + <eval expected="331654" xpath="//flow/block[6]/lineArea/@ipd"/> + <eval expected="236051" xpath="//flow/block[6]/lineArea/inlineparent[2]/@ipd"/> + <eval expected="5280" xpath="//flow/block[6]/lineArea/inlineparent[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/page-number-citation_background-color.xml b/test/layoutengine/testcases/page-number-citation_background-color.xml new file mode 100755 index 000000000..2edf06916 --- /dev/null +++ b/test/layoutengine/testcases/page-number-citation_background-color.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:page-number-citation with background-color property. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </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" font-size="10pt" id="ref"> + <fo:block background-color="silver" id="ref"> + To emphasize a page number citation <fo:page-number-citation ref-id="ref" background-color="yellow" /> highlight it. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="color=#ffff00" xpath="//flow/block[1]/lineArea/text[2]/@background"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/page-number-citation_background-image.xml b/test/layoutengine/testcases/page-number-citation_background-image.xml new file mode 100755 index 000000000..4cbf84105 --- /dev/null +++ b/test/layoutengine/testcases/page-number-citation_background-image.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:page-number-citation with background-image property. + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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"> + <fo:region-body/> + </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:block font-size="24pt" id="ref"> + Page number citation <fo:page-number-citation font-size="96pt" ref-id="ref" background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img" /> + Page number citation <fo:page-number-citation font-size="48pt" ref-id="ref" background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img" /> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- currently not working because of late ipd adjustment after the image is positioned --> + <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=3648,vertical=21360" xpath="//flow/block[1]/lineArea/text[2]/@background"/> + <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=-9696,vertical=-840" xpath="//flow/block[1]/lineArea/text[4]/@background"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/page-number-citation_border_padding.xml b/test/layoutengine/testcases/page-number-citation_border_padding.xml new file mode 100755 index 000000000..7512c1e94 --- /dev/null +++ b/test/layoutengine/testcases/page-number-citation_border_padding.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:page-number-citation with border and padding properties. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true" language="en"> + <fo:flow flow-name="xsl-region-body" font-size="10pt"> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" id="ref"> + Page number citation <fo:page-number-citation ref-id="ref" border="solid 1pt red" background-color="yellow" /> with a 1pt border. + </fo:block> + <fo:block background-color="silver" margin="10pt 0pt 10pt 0pt"> + Page number citation <fo:page-number-citation ref-id="ref" border="solid 5pt red" padding="5pt" background-color="yellow" /> with 5pt border and padding. + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt"> + Page number citation <fo:page-number-citation ref-id="ref" border-style="solid" border-width="1pt 2pt 3pt 4pt" border-color="red" padding="1pt 2pt 3pt 4pt" background-color="yellow" character="c"/> with unsymmetric borders and padding. + </fo:block> + <fo:block background-color="silver" margin="10pt 0pt 10pt 0pt" font-size="20pt"> + Page number citation <fo:page-number-citation ref-id="ref" border="solid 5pt red" padding="5pt" background-color="yellow" font-size="8pt" character="b"/> with border and padding in a smaller font. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="7180" xpath="//flow/block[2]/lineArea/text[2]/@baseline"/> + <eval expected="0" xpath="//flow/block[2]/lineArea/text[2]/@offset"/> + <eval expected="5560" xpath="//flow/block[2]/lineArea/text[2]/@ipd"/> + <eval expected="7560" xpath="//flow/block[2]/lineArea/text[2]/@ipda"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-start"/> + + <eval expected="7180" xpath="//flow/block[5]/lineArea/text[2]/@baseline"/> + <eval expected="0" xpath="//flow/block[5]/lineArea/text[2]/@offset"/> + <eval expected="5560" xpath="//flow/block[5]/lineArea/text[2]/@ipd"/> + <eval expected="25560" xpath="//flow/block[5]/lineArea/text[2]/@ipda"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-start"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-after"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-before"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-end"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-start"/> + + <eval expected="7180" xpath="//flow/block[8]/lineArea/text[2]/@baseline"/> + <eval expected="0" xpath="//flow/block[8]/lineArea/text[2]/@offset"/> + <eval expected="5560" xpath="//flow/block[8]/lineArea/text[2]/@ipd"/> + <eval expected="17560" xpath="//flow/block[8]/lineArea/text[2]/@ipda"/> + <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[8]/lineArea/text[2]/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea/text[2]/@border-before"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[8]/lineArea/text[2]/@border-end"/> + <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[8]/lineArea/text[2]/@border-start"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea/text[2]/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea/text[2]/@padding-before"/> + <eval expected="2000" xpath="//flow/block[8]/lineArea/text[2]/@padding-end"/> + <eval expected="4000" xpath="//flow/block[8]/lineArea/text[2]/@padding-start"/> + + <eval expected="5744" xpath="//flow/block[11]/lineArea/text[2]/@baseline"/> + <eval expected="8616" xpath="//flow/block[11]/lineArea/text[2]/@offset"/> + <eval expected="4448" xpath="//flow/block[11]/lineArea/text[2]/@ipd"/> + <eval expected="24448" xpath="//flow/block[11]/lineArea/text[2]/@ipda"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-start"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-after"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-before"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-end"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-start"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/page-number-citation_vertical-align.xml b/test/layoutengine/testcases/page-number-citation_vertical-align.xml new file mode 100755 index 000000000..be9bbb707 --- /dev/null +++ b/test/layoutengine/testcases/page-number-citation_vertical-align.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:page-number-citation with vertical-align property. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt" id="ref"> + Page citation <fo:page-number-citation ref-id="ref" font-size="10pt" background-color="yellow" /> vertical-align not specified + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Page citation <fo:page-number-citation ref-id="ref" font-size="10pt" vertical-align="baseline" background-color="yellow" /> vertical-align="baseline" + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Page citation <fo:page-number-citation ref-id="ref" font-size="10pt" vertical-align="top" background-color="yellow" /> vertical-align="top" + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Page citation <fo:page-number-citation ref-id="ref" font-size="10pt" vertical-align="middle" background-color="yellow" /> vertical-align="middle" + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Page citation <fo:page-number-citation ref-id="ref" font-size="10pt" vertical-align="bottom" background-color="yellow" /> vertical-align="bottom" + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="7180" xpath="//flow/block[2]/lineArea/text[2]/@offset"/> + <eval expected="7180" xpath="//flow/block[5]/lineArea/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea/text[2]/@offset"/> + <eval expected="4565" xpath="//flow/block[11]/lineArea/text[2]/@offset"/> + <eval expected="9250" xpath="//flow/block[14]/lineArea/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/page-number_background-color.xml b/test/layoutengine/testcases/page-number_background-color.xml new file mode 100755 index 000000000..c052bb4c4 --- /dev/null +++ b/test/layoutengine/testcases/page-number_background-color.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:page-number with background-color property. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </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" font-size="10pt"> + <fo:block background-color="silver"> + To emphasize a page number <fo:page-number background-color="yellow" /> highlight it. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="color=#ffff00" xpath="//flow/block[1]/lineArea/text[2]/@background"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/page-number_background-image.xml b/test/layoutengine/testcases/page-number_background-image.xml new file mode 100755 index 000000000..08d2e1484 --- /dev/null +++ b/test/layoutengine/testcases/page-number_background-image.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:page-number with background-image property. + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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"> + <fo:region-body/> + </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:block font-size="24pt"> + Page <fo:page-number font-size="96pt" background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img" /> + Page <fo:page-number font-size="48pt" background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img" /> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=3648,vertical=21360" xpath="//flow/block[1]/lineArea/text[2]/@background"/> + <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=-9696,vertical=-840" xpath="//flow/block[1]/lineArea/text[4]/@background"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/page-number_border_padding.xml b/test/layoutengine/testcases/page-number_border_padding.xml new file mode 100755 index 000000000..c099d1c1e --- /dev/null +++ b/test/layoutengine/testcases/page-number_border_padding.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:page-number with border and padding properties. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="5pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true" language="en"> + <fo:flow flow-name="xsl-region-body" font-size="10pt"> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt"> + Page number <fo:page-number border="solid 1pt red" background-color="yellow" /> with a 1pt border. + </fo:block> + <fo:block background-color="silver" margin="10pt 0pt 10pt 0pt"> + Page number <fo:page-number border="solid 5pt red" padding="5pt" background-color="yellow" /> with 5pt border and padding. + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt"> + Page number <fo:page-number border-style="solid" border-width="1pt 2pt 3pt 4pt" border-color="red" padding="1pt 2pt 3pt 4pt" background-color="yellow" character="c"/> with unsymmetric borders and padding. + </fo:block> + <fo:block background-color="silver" margin="10pt 0pt 10pt 0pt" font-size="20pt"> + Page number <fo:page-number border="solid 5pt red" padding="5pt" background-color="yellow" font-size="8pt" character="b"/> with border and padding in a smaller font. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="7180" xpath="//flow/block[2]/lineArea/text[2]/@baseline"/> + <eval expected="0" xpath="//flow/block[2]/lineArea/text[2]/@offset"/> + <eval expected="5560" xpath="//flow/block[2]/lineArea/text[2]/@ipd"/> + <eval expected="7560" xpath="//flow/block[2]/lineArea/text[2]/@ipda"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-before"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-end"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea/text[2]/@border-start"/> + + <eval expected="7180" xpath="//flow/block[5]/lineArea/text[2]/@baseline"/> + <eval expected="0" xpath="//flow/block[5]/lineArea/text[2]/@offset"/> + <eval expected="5560" xpath="//flow/block[5]/lineArea/text[2]/@ipd"/> + <eval expected="25560" xpath="//flow/block[5]/lineArea/text[2]/@ipda"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[5]/lineArea/text[2]/@border-start"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-after"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-before"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-end"/> + <eval expected="5000" xpath="//flow/block[5]/lineArea/text[2]/@padding-start"/> + + <eval expected="7180" xpath="//flow/block[8]/lineArea/text[2]/@baseline"/> + <eval expected="0" xpath="//flow/block[8]/lineArea/text[2]/@offset"/> + <eval expected="5560" xpath="//flow/block[8]/lineArea/text[2]/@ipd"/> + <eval expected="17560" xpath="//flow/block[8]/lineArea/text[2]/@ipda"/> + <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[8]/lineArea/text[2]/@border-after"/> + <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea/text[2]/@border-before"/> + <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[8]/lineArea/text[2]/@border-end"/> + <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[8]/lineArea/text[2]/@border-start"/> + <eval expected="3000" xpath="//flow/block[8]/lineArea/text[2]/@padding-after"/> + <eval expected="1000" xpath="//flow/block[8]/lineArea/text[2]/@padding-before"/> + <eval expected="2000" xpath="//flow/block[8]/lineArea/text[2]/@padding-end"/> + <eval expected="4000" xpath="//flow/block[8]/lineArea/text[2]/@padding-start"/> + + <eval expected="5744" xpath="//flow/block[11]/lineArea/text[2]/@baseline"/> + <eval expected="8616" xpath="//flow/block[11]/lineArea/text[2]/@offset"/> + <eval expected="4448" xpath="//flow/block[11]/lineArea/text[2]/@ipd"/> + <eval expected="24448" xpath="//flow/block[11]/lineArea/text[2]/@ipda"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-after"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-before"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-end"/> + <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[11]/lineArea/text[2]/@border-start"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-after"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-before"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-end"/> + <eval expected="5000" xpath="//flow/block[11]/lineArea/text[2]/@padding-start"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/page-number_vertical-align.xml b/test/layoutengine/testcases/page-number_vertical-align.xml new file mode 100755 index 000000000..f436bbd30 --- /dev/null +++ b/test/layoutengine/testcases/page-number_vertical-align.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 fo:page-number with vertical-align property. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </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:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Page <fo:page-number font-size="10pt" background-color="yellow" /> vertical-align not specified + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Page <fo:page-number font-size="10pt" vertical-align="baseline" background-color="yellow" /> vertical-align="baseline" + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Page <fo:page-number font-size="10pt" vertical-align="top" background-color="yellow" /> vertical-align="top" + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Page <fo:page-number font-size="10pt" vertical-align="middle" background-color="yellow" /> vertical-align="middle" + </fo:block> + <fo:block background-color="silver" margin="2pt 0pt 2pt 0pt" font-size="20pt"> + Page <fo:page-number font-size="10pt" vertical-align="bottom" background-color="yellow" /> vertical-align="bottom" + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="7180" xpath="//flow/block[2]/lineArea/text[2]/@offset"/> + <eval expected="7180" xpath="//flow/block[5]/lineArea/text[2]/@offset"/> + <eval expected="0" xpath="//flow/block[8]/lineArea/text[2]/@offset"/> + <eval expected="4565" xpath="//flow/block[11]/lineArea/text[2]/@offset"/> + <eval expected="9250" xpath="//flow/block[14]/lineArea/text[2]/@offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/table-cell_background-image.xml b/test/layoutengine/testcases/table-cell_background-image.xml index dbb9cd42f..f64663990 100644 --- a/test/layoutengine/testcases/table-cell_background-image.xml +++ b/test/layoutengine/testcases/table-cell_background-image.xml @@ -1,130 +1,130 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2005 The Apache Software Foundation
-
- Licensed 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 relative positioned background images on a fo:table-cell.
- </p>
- </info>
- <variables>
- <img>../../resources/images/box1.png</img>
- </variables>
- <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="15pt">
- <fo:region-body/>
- </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 border-collapse="separate">
- <fo:table-column />
- <fo:table-column />
- <fo:table-column />
- <fo:table-body>
- <fo:table-row>
- <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="blue"
- background-image="##img"
- background-position-horizontal="right"
- background-repeat="no-repeat">
- <fo:block>image in top right corner</fo:block>
- </fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="green"
- background-image="##img"
- background-position-horizontal="right"
- background-position-vertical="center"
- background-repeat="no-repeat">
- <fo:block>image in center right</fo:block>
- </fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="yellow"
- background-image="##img"
- background-position-horizontal="right"
- background-position-vertical="bottom"
- background-repeat="no-repeat">
- <fo:block>image in bottom right corner</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="yellow"
- background-image="##img"
- background-position-horizontal="center"
- background-repeat="no-repeat">
- <fo:block>image in top center</fo:block>
- </fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="blue"
- background-image="##img"
- background-position-horizontal="center"
- background-position-vertical="center"
- background-repeat="no-repeat">
- <fo:block>image in center</fo:block>
- </fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="green"
- background-image="##img"
- background-position-horizontal="center"
- background-position-vertical="bottom"
- background-repeat="no-repeat">
- <fo:block>image in bottom center</fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="green"
- background-image="##img"
- background-repeat="no-repeat">
- <fo:block>image in top left</fo:block>
- </fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="yellow"
- background-image="##img"
- background-position-vertical="center"
- background-repeat="no-repeat">
- <fo:block>image in center left</fo:block>
- </fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="blue"
- background-image="##img"
- background-position-vertical="bottom"
- background-repeat="no-repeat">
- <fo:block>image in bottom left</fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- </fo:flow>
- </fo:page-sequence>
- </fo:root>
- </fo>
- <checks>
- <!-- first cell in row 1 -->
- <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=0" xpath="//flow/block/block[1]/@background"/>
- <!-- second cell in row 1 -->
- <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=28495" xpath="//flow/block/block[2]/@background"/>
- <!-- third cell in row 1 -->
- <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=56991" xpath="//flow/block/block[3]/@background"/>
- <!-- first cell in row 2 -->
- <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=0" xpath="//flow/block/block[4]/@background"/>
- <!-- second cell in row 2 -->
- <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=28495" xpath="//flow/block/block[5]/@background"/>
- <!-- third cell in row 2 -->
- <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=56991" xpath="//flow/block/block[6]/@background"/>
- <!-- first cell in row 3 -->
- <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=0" xpath="//flow/block/block[7]/@background"/>
- <!-- second cell in row 3 -->
- <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=28495" xpath="//flow/block/block[8]/@background"/>
- <!-- third cell in row 3 -->
- <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=56991" xpath="//flow/block/block[9]/@background"/>
- </checks>
-</testcase>
\ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 relative positioned background images on a fo:table-cell. + </p> + </info> + <variables> + <img>../../resources/images/box1.png</img> + </variables> + <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="15pt"> + <fo:region-body/> + </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 border-collapse="separate"> + <fo:table-column /> + <fo:table-column /> + <fo:table-column /> + <fo:table-body> + <fo:table-row> + <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="blue" + background-image="##img" + background-position-horizontal="right" + background-repeat="no-repeat"> + <fo:block>image in top right corner</fo:block> + </fo:table-cell> + <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="green" + background-image="##img" + background-position-horizontal="right" + background-position-vertical="center" + background-repeat="no-repeat"> + <fo:block>image in center right</fo:block> + </fo:table-cell> + <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="yellow" + background-image="##img" + background-position-horizontal="right" + background-position-vertical="bottom" + background-repeat="no-repeat"> + <fo:block>image in bottom right corner</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="yellow" + background-image="##img" + background-position-horizontal="center" + background-repeat="no-repeat"> + <fo:block>image in top center</fo:block> + </fo:table-cell> + <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="blue" + background-image="##img" + background-position-horizontal="center" + background-position-vertical="center" + background-repeat="no-repeat"> + <fo:block>image in center</fo:block> + </fo:table-cell> + <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="green" + background-image="##img" + background-position-horizontal="center" + background-position-vertical="bottom" + background-repeat="no-repeat"> + <fo:block>image in bottom center</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="green" + background-image="##img" + background-repeat="no-repeat"> + <fo:block>image in top left</fo:block> + </fo:table-cell> + <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="yellow" + background-image="##img" + background-position-vertical="center" + background-repeat="no-repeat"> + <fo:block>image in center left</fo:block> + </fo:table-cell> + <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="blue" + background-image="##img" + background-position-vertical="bottom" + background-repeat="no-repeat"> + <fo:block>image in bottom left</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- first cell in row 1 --> + <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=0" xpath="//flow/block/block[1]/@background"/> + <!-- second cell in row 1 --> + <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=28495" xpath="//flow/block/block[2]/@background"/> + <!-- third cell in row 1 --> + <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=56991" xpath="//flow/block/block[3]/@background"/> + <!-- first cell in row 2 --> + <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=0" xpath="//flow/block/block[4]/@background"/> + <!-- second cell in row 2 --> + <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=28495" xpath="//flow/block/block[5]/@background"/> + <!-- third cell in row 2 --> + <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=56991" xpath="//flow/block/block[6]/@background"/> + <!-- first cell in row 3 --> + <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=0" xpath="//flow/block/block[7]/@background"/> + <!-- second cell in row 3 --> + <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=28495" xpath="//flow/block/block[8]/@background"/> + <!-- third cell in row 3 --> + <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=56991" xpath="//flow/block/block[9]/@background"/> + </checks> +</testcase> |