You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/06/29 22:59:28 UTC
svn commit: r202427 - in
/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr:
LeafNodeLayoutManager.java PageNumberCitationLayoutManager.java
PageNumberLayoutManager.java
Author: jeremias
Date: Wed Jun 29 13:59:27 2005
New Revision: 202427
URL: http://svn.apache.org/viewcvs?rev=202427&view=rev
Log:
Fix vertical placement of page-number and page-number-citation.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageNumberCitationLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageNumberLayoutManager.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java?rev=202427&r1=202426&r2=202427&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java Wed Jun 29 13:59:27 2005
@@ -122,12 +122,16 @@
* Set the lead for this inline area.
* The lead is the distance from the top of the object
* to the baseline.
- * Currently not used.
* @param l the lead value
*/
public void setLead(int l) {
lead = l;
}
+
+ /** @return the lead value (distance from the top of the object to the baseline) */
+ public int getLead() {
+ return this.lead;
+ }
/**
* This is a leaf-node, so this method is never called.
@@ -258,8 +262,11 @@
case EN_BOTTOM : total = bpd;
break;
case EN_BASELINE:
- default: lead = bpd;
- break;
+ default:
+ //lead = bpd;
+ lead = getLead();
+ total = bpd;
+ break;
}
// create the AreaInfo object to store the computed values
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageNumberCitationLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageNumberCitationLayoutManager.java?rev=202427&r1=202426&r2=202427&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageNumberCitationLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageNumberCitationLayoutManager.java Wed Jun 29 13:59:27 2005
@@ -33,7 +33,7 @@
public class PageNumberCitationLayoutManager extends LeafNodeLayoutManager {
private PageNumberCitation fobj;
- private Font font = null;
+ private Font font;
// whether the page referred to by the citation has been resolved yet
private boolean resolved = false;
@@ -62,6 +62,11 @@
}
}
+ /** @see org.apache.fop.layoutmgr.LeafNodeLayoutManager#getLead() */
+ public int getLead() {
+ return font.getAscender();
+ }
+
protected void offsetArea(InlineArea area, LayoutContext context) {
area.setOffset(context.getBaseline());
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageNumberLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageNumberLayoutManager.java?rev=202427&r1=202426&r2=202427&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageNumberLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageNumberLayoutManager.java Wed Jun 29 13:59:27 2005
@@ -28,8 +28,9 @@
* LayoutManager for the fo:page-number formatting object
*/
public class PageNumberLayoutManager extends LeafNodeLayoutManager {
+
private PageNumber fobj;
- private Font font = null;
+ private Font font;
/**
* Constructor
@@ -62,6 +63,12 @@
TraitSetter.addTextDecoration(inline, fobj.getTextDecoration());
return inline;
+ }
+
+
+ /** @see org.apache.fop.layoutmgr.LeafNodeLayoutManager#getLead() */
+ public int getLead() {
+ return font.getAscender();
}
protected void offsetArea(InlineArea area, LayoutContext context) {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org