aboutsummaryrefslogtreecommitdiffstats
path: root/test/layoutengine
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-04-12 08:58:46 +0000
committerJeremias Maerki <jeremias@apache.org>2006-04-12 08:58:46 +0000
commit001c8a9e479b1e14ec5940978ff7714ddd27a4bb (patch)
tree4c707ac150b3a8308236a686a5d9844019fe4dc9 /test/layoutengine
parent027ffa3e6e558b7c446ce3b02c5fd9d663aec9ff (diff)
downloadxmlgraphics-fop-001c8a9e479b1e14ec5940978ff7714ddd27a4bb.tar.gz
xmlgraphics-fop-001c8a9e479b1e14ec5940978ff7714ddd27a4bb.zip
Adding a test case that demonstrates a problem with forward references and page-number-citation. The reference's width is adjusted, but not the whole line. Some code in the area tree tries to adjust word- and letter-spacing but it does not seem to be working properly.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@393420 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/layoutengine')
-rw-r--r--test/layoutengine/disabled-testcases.xml5
-rw-r--r--test/layoutengine/standard-testcases/page-number-citation_forward-ref.xml46
2 files changed, 51 insertions, 0 deletions
diff --git a/test/layoutengine/disabled-testcases.xml b/test/layoutengine/disabled-testcases.xml
index a4c883aaa..84f8bc5cd 100644
--- a/test/layoutengine/disabled-testcases.xml
+++ b/test/layoutengine/disabled-testcases.xml
@@ -226,6 +226,11 @@
placed correctly.</description>
</testcase>
<testcase>
+ <name>page-number-citation: Forward references not adjusted properly</name>
+ <file>page-number-citation_forward-ref.xml</file>
+ <description>Forward references are not properly adjusted when they are resolved.</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_forward-ref.xml b/test/layoutengine/standard-testcases/page-number-citation_forward-ref.xml
new file mode 100644
index 000000000..81d70aaac
--- /dev/null
+++ b/test/layoutengine/standard-testcases/page-number-citation_forward-ref.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2006 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, especially the width adjustment after a forward reference is resolved.
+ </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="master1" page-width="5in" page-height="1in">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="master1" white-space-collapse="true">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block id="first">This block has id="first".</fo:block>
+ <fo:block font-style="italic" font-size="smaller" break-after="page">Note: The interesting part is on the second page!</fo:block>
+ <fo:block text-align="justify" text-align-last="justify" id="refbl1">Backward reference "first"<fo:leader leader-pattern="dots" leader-pattern-width="8pt"/><fo:page-number-citation id="first-ref" ref-id="first"/></fo:block>
+ <fo:block text-align="justify" text-align-last="justify" id="refbl2">Forward reference "second"<fo:leader leader-pattern="dots" leader-pattern-width="8pt"/><fo:page-number-citation id="second-ref" ref-id="second"/></fo:block>
+ <fo:block break-before="page" id="second">This block has id="second".</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <true xpath="(//block[@prod-id='refbl1']/@ipd - sum(//block[@prod-id='refbl1']/lineArea/child::*/@ipd)) &lt; 3"/>
+ <true xpath="(//block[@prod-id='refbl2']/@ipd - sum(//block[@prod-id='refbl2']/lineArea/child::*/@ipd)) &lt; 3"/>
+ </checks>
+</testcase>