From: Simon Pepping Date: Fri, 6 Oct 2006 17:37:58 +0000 (+0000) Subject: This fixes a bug that has crept in page number resolution, viz. the text was not... X-Git-Tag: fop-0_93~72 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=569693cad7dc3fc27e3b25ec621e9675490464f7;p=xmlgraphics-fop.git 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 --- 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". + + + + + + + + + + + +