From 569693cad7dc3fc27e3b25ec621e9675490464f7 Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Fri, 6 Oct 2006 17:37:58 +0000 Subject: [PATCH] This fixes a bug that has crept in page number resolution, viz. the text was not updated, so that the wrong ipd was calculated. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@453700 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/area/inline/UnresolvedPageNumber.java | 3 +- .../page-number-citation_basic_2.xml | 52 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 test/layoutengine/standard-testcases/page-number-citation_basic_2.xml diff --git a/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java b/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java index f8585e95a..2f83afdda 100644 --- a/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java +++ b/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java @@ -103,7 +103,8 @@ public class UnresolvedPageNumber extends TextArea implements Resolvable { } // replace the text removeText(); - addWord(page.getPageNumberString(), 0); + text = page.getPageNumberString(); + addWord(text, 0); // update ipd if (font != null) { updateIPD(font.getWordWidth(text)); diff --git a/test/layoutengine/standard-testcases/page-number-citation_basic_2.xml b/test/layoutengine/standard-testcases/page-number-citation_basic_2.xml new file mode 100644 index 000000000..12e610e6a --- /dev/null +++ b/test/layoutengine/standard-testcases/page-number-citation_basic_2.xml @@ -0,0 +1,52 @@ + + + + + +

+ This test checks whether the IPD of a forward + fo:page-number-citation is correctly adjusted after resolution. +

+
+ + + + + + + + + + page -- + page -- + This block has id="second". + + + + + + + + + + + +
-- 2.39.5