diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-05-12 08:58:21 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-05-12 08:58:21 +0000 |
commit | df8430fb6c4d776b404455baeb5c56617b54f0db (patch) | |
tree | bd76246c5b3753f40e7510c1200a4c98520751b3 /test/layoutengine | |
parent | d972250786d5575d56a55aede884e9df46450c60 (diff) | |
download | xmlgraphics-fop-df8430fb6c4d776b404455baeb5c56617b54f0db.tar.gz xmlgraphics-fop-df8430fb6c4d776b404455baeb5c56617b54f0db.zip |
Merged revisions 654783,654849,654869,654946,654982,655085,655093,655275,655281,655285,655309,655349,655370 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r654783 | vhennebert | 2008-05-09 13:30:40 +0100 (Fri, 09 May 2008) | 3 lines
Checkstyle and minor typo fixes
Set svn:keywords and svn:eol-style properties on new files
........
r654849 | acumiskey | 2008-05-09 16:14:37 +0100 (Fri, 09 May 2008) | 1 line
Unwanted list self concatenation :).
........
r654869 | acumiskey | 2008-05-09 17:13:47 +0100 (Fri, 09 May 2008) | 1 line
Moved the instantiation of the FontManager to the constructor along with all the other aggregated objects.
........
r654946 | adelmelle | 2008-05-09 22:40:14 +0100 (Fri, 09 May 2008) | 6 lines
Bugzilla 44794:
Added support for page-number-citation and page-number-citation-last of fo:inline.
Corrected behavior for page-number-citation-last of fo:block - forward references properly resolved.
(+ support for page-number-citation-last on list-related FOs)
........
r654982 | acumiskey | 2008-05-10 00:47:28 +0100 (Sat, 10 May 2008) | 1 line
Checkstyle cleanup and javadoc
........
r655085 | adelmelle | 2008-05-10 14:44:09 +0100 (Sat, 10 May 2008) | 5 lines
Tweaks:
-> remove split in CommonFont: font-size is resolved early, so no need anymore for CachedCommonFont
-> allow disabling the PropertyCache via a system property (just in case...)
........
r655093 | adelmelle | 2008-05-10 15:23:56 +0100 (Sat, 10 May 2008) | 1 line
Correction: set default to true...
........
r655275 | maxberger | 2008-05-11 08:30:55 +0100 (Sun, 11 May 2008) | 1 line
made sure warning for missing glyphs is emitted in all cases
........
r655281 | maxberger | 2008-05-11 10:01:31 +0100 (Sun, 11 May 2008) | 1 line
Support character-by-character font-selection strategy on fo:character element
........
r655285 | maxberger | 2008-05-11 10:17:07 +0100 (Sun, 11 May 2008) | 1 line
Forgot to update testcases
........
r655309 | adelmelle | 2008-05-11 13:22:22 +0100 (Sun, 11 May 2008) | 3 lines
Make the LM clean up on end-of-layout, if possible.
Added clearChildNodes() method to FObj to release the reference to the FO's children.
........
r655349 | spepping | 2008-05-11 19:05:51 +0100 (Sun, 11 May 2008) | 2 lines
The spec requires rounding, not truncating
........
r655370 | adelmelle | 2008-05-11 22:03:41 +0100 (Sun, 11 May 2008) | 1 line
Avoid creation of unnecessary dummy areas.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@655445 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/layoutengine')
3 files changed, 196 insertions, 5 deletions
diff --git a/test/layoutengine/disabled-testcases.xml b/test/layoutengine/disabled-testcases.xml index c17457a3d..476db249e 100644 --- a/test/layoutengine/disabled-testcases.xml +++ b/test/layoutengine/disabled-testcases.xml @@ -189,11 +189,6 @@ placed correctly.</description> </testcase> <testcase> - <name>page-number-citation-last: FOs spanning multiple pages are not properly handled.</name> - <file>page-number-citation-last_basic.xml</file> - <description>Resolution of forward references does not wait until an FO is fully finished when an FO spans multiple pages.</description> - </testcase> - <testcase> <name>IDs are not working on all FO elements</name> <file>page-number-citation_complex_1.xml</file> <description>The "id" attributes are not properly handled for all block-level FO elements.</description> diff --git a/test/layoutengine/standard-testcases/page-number-citation_bugzilla44794.xml b/test/layoutengine/standard-testcases/page-number-citation_bugzilla44794.xml new file mode 100644 index 000000000..7875c7321 --- /dev/null +++ b/test/layoutengine/standard-testcases/page-number-citation_bugzilla44794.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<testcase> + <info> + <p> + This test checks page-number-citation and page-number-citation-last on block and inline + </p> + </info> + <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="3in" + margin="20pt"> + <fo:region-body background-color="yellow"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true"> + <fo:flow flow-name="xsl-region-body"> + + <fo:block id="outer-block1"> + block: <fo:page-number-citation ref-id="block-inline1"/> to <fo:page-number-citation-last ref-id="block-inline1"/>. + </fo:block> + <fo:block id="outer-block2"> + inline: <fo:page-number-citation ref-id="inline1"/> to <fo:page-number-citation-last ref-id="inline1"/>. + </fo:block> + + <fo:block id="outer-block3" border="0.5pt solid black"> + <fo:block id="block-inline1" border="0.5pt solid black" space-after.optimum="2em">text<fo:inline id="inline1" >XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX</fo:inline>text</fo:block> + </fo:block> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="normal"> + <fo:flow flow-name="xsl-region-body" font-size="8pt"> + <fo:block id="outer-block4"> + inline: <fo:page-number-citation ref-id="inline1" /> to <fo:page-number-citation-last ref-id="inline1" /> + </fo:block> + <fo:block id="outer-block5"> + block: <fo:page-number-citation ref-id="block-inline1" /> to <fo:page-number-citation-last ref-id="block-inline1" /> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <true fail-msg="Wrong page-number-citation for block before" xpath="'1' = (//block[@prod-id='outer-block1']//word)[2]"/> + <true fail-msg="Wrong page-number-citation-last for block before" xpath="'2' = (//block[@prod-id='outer-block1']//word)[4]"/> + <true fail-msg="Wrong page-number-citation for inline before" xpath="'1' = (//block[@prod-id='outer-block2']//word)[2]"/> + <true fail-msg="Wrong page-number-citation-last for inline before" xpath="'2' = (//block[@prod-id='outer-block2']//word)[4]"/> + <true fail-msg="Wrong page-number-citation for block after" xpath="'1' = (//block[@prod-id='outer-block5']//word)[2]"/> + <true fail-msg="Wrong page-number-citation-last for block after" xpath="'2' = (//block[@prod-id='outer-block5']//word)[4]"/> + <true fail-msg="Wrong page-number-citation for inline after" xpath="'1' = (//block[@prod-id='outer-block4']//word)[2]"/> + <true fail-msg="Wrong page-number-citation-last for inline after" xpath="'2' = (//block[@prod-id='outer-block4']//word)[4]"/> + </checks> +</testcase> diff --git a/test/layoutengine/standard-testcases/page-number-citation_list.xml b/test/layoutengine/standard-testcases/page-number-citation_list.xml new file mode 100644 index 000000000..70205ee04 --- /dev/null +++ b/test/layoutengine/standard-testcases/page-number-citation_list.xml @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<testcase> + <info> + <p> + This test checks page-number-citations of list-block, list-item, + list-item-label and list-item-body. + </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="2in" + margin="20pt"> + <fo:region-body background-color="yellow"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true"> + <fo:flow flow-name="xsl-region-body"> + <fo:list-block id="list1" provisional-distance-between-starts="50pt" provisional-label-separation="5pt"> + <fo:list-item id="item1"> + <fo:list-item-label id="item1-label" end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body id="item1-body" start-indent="body-start()"> + <fo:block>here is text in the list item body</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item id="item2"> + <fo:list-item-label id="item2-label" end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body id="item2-body" start-indent="body-start()"> + <fo:block>here is text in the list item body</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item id="item3"> + <fo:list-item-label id="item3-label" end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body id="item3-body" start-indent="body-start()"> + <fo:block>here is text in the list item body</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item id="item4"> + <fo:list-item-label id="item4-label" end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body id="item4-body" start-indent="body-start()"> + <fo:block>here is text in the list item body</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item id="item5"> + <fo:list-item-label id="item5-label" end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body id="item5-body" start-indent="body-start()"> + <fo:block>here is text in the list item body</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item id="item6"> + <fo:list-item-label id="item6-label" end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body id="item6-body" start-indent="body-start()"> + <fo:block>here is text in the list item body</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item id="item7"> + <fo:list-item-label id="item7-label" end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body id="item7-body" start-indent="body-start()"> + <fo:block>here is text in the list item body</fo:block> + <fo:block>here is text in the list item body</fo:block> + <fo:block>here is text in the list item body</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item id="item8"> + <fo:list-item-label id="item8-label" end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body id="item8-body" start-indent="body-start()"> + <fo:block>here is text in the list item body</fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="normal"> + <fo:flow flow-name="xsl-region-body" font-size="8pt"> + <fo:block><fo:page-number-citation ref-id="list1"/></fo:block> + <fo:block><fo:page-number-citation-last ref-id="list1"/></fo:block> + <fo:block><fo:page-number-citation ref-id="item1"/></fo:block> + <fo:block><fo:page-number-citation ref-id="item1-label"/></fo:block> + <fo:block><fo:page-number-citation ref-id="item1-body"/></fo:block> + <fo:block><fo:page-number-citation-last ref-id="item7-body"/></fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <true fail-msg="Wrong page-number-citation for list-block" xpath="'1' = //pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]"/> + <true fail-msg="Wrong page-number-citation-last for list-block" xpath="'2' = //pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[2]"/> + <true fail-msg="Wrong page-number-citation for list-item" xpath="'1' = //pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[3]"/> + <true fail-msg="Wrong page-number-citation for list-item-label" xpath="'1' = //pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[4]"/> + <true fail-msg="Wrong page-number-citation for list-item-body" xpath="'1' = //pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[5]"/> + <true fail-msg="Wrong page-number-citation-last for list-item-body" xpath="'2' = //pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[6]"/> + </checks> +</testcase> |