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 2007/11/18 17:56:10 UTC

svn commit: r596097 - in /xmlgraphics/fop/trunk: ./ src/java/org/apache/fop/fo/ src/java/org/apache/fop/fo/flow/ src/java/org/apache/fop/layoutmgr/inline/

Author: jeremias
Date: Sun Nov 18 08:56:09 2007
New Revision: 596097

URL: http://svn.apache.org/viewvc?rev=596097&view=rev
Log:
Bugzilla #43605:
Added methods for page-number-citation and page-number-citation-last in FOEventHandler.java
Submitted by: V. Schappert <vschappert.at.bloomberg.net>

Patch modified by Jeremias:
Bugfix: FOEventHandler.startPageNumberCitation() was also called in the case of a page-number-citation-last. Introduced abstract base classes to avoid this.

Added:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java
      - copied, changed from r596095, xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java
      - copied, changed from r596095, xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java
Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOEventHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitationLast.java   (contents, props changed)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java   (contents, props changed)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOEventHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOEventHandler.java?rev=596097&r1=596096&r2=596097&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOEventHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOEventHandler.java Sun Nov 18 08:56:09 2007
@@ -19,12 +19,11 @@
 
 package org.apache.fop.fo;
 
-// Java
 import java.util.HashSet;
 import java.util.Set;
+
 import org.xml.sax.SAXException;
 
-// Apache
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.fo.flow.BasicLink;
 import org.apache.fop.fo.flow.Block;
@@ -39,6 +38,8 @@
 import org.apache.fop.fo.flow.ListBlock;
 import org.apache.fop.fo.flow.ListItem;
 import org.apache.fop.fo.flow.PageNumber;
+import org.apache.fop.fo.flow.PageNumberCitation;
+import org.apache.fop.fo.flow.PageNumberCitationLast;
 import org.apache.fop.fo.flow.table.Table;
 import org.apache.fop.fo.flow.table.TableBody;
 import org.apache.fop.fo.flow.table.TableCell;
@@ -48,7 +49,6 @@
 import org.apache.fop.fo.pagination.PageSequence;
 import org.apache.fop.fonts.FontInfo;
 
-
 /**
  * Abstract class defining what should be done with SAX events that map to
  * XSL-FO input. The events are actually captured by fo/FOTreeBuilder, passed
@@ -204,6 +204,34 @@
      * @param pagenum PageNumber that is ending.
      */
     public void endPageNumber(PageNumber pagenum) {
+    }
+
+    /**
+     * 
+     * @param pageCite PageNumberCitation that is starting.
+     */
+    public void startPageNumberCitation(PageNumberCitation pageCite) {
+    }
+
+    /**
+     * 
+     * @param pageCite PageNumberCitation that is ending.
+     */
+    public void endPageNumberCitation(PageNumberCitation pageCite) {
+    }
+
+    /**
+     * 
+     * @param pageLast PageNumberCitationLast that is starting.
+     */
+    public void startPageNumberCitationLast(PageNumberCitationLast pageLast) {
+    }
+
+    /**
+     * 
+     * @param pageLast PageNumberCitationLast that is ending.
+     */
+    public void endPageNumberCitationLast(PageNumberCitationLast pageLast) {
     }
 
     /**

Copied: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java (from r596095, xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java?p2=xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java&p1=xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java&r1=596095&r2=596097&rev=596097&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java Sun Nov 18 08:56:09 2007
@@ -36,13 +36,11 @@
 import org.apache.fop.fo.properties.SpaceProperty;
 
 /**
- * Class modelling the fo:page-number-citation object.
- * This inline fo is replaced with the text for a page number.
- * The page number used is the page that contains the start of the
- * block referenced with the ref-id attribute.
+ * Base class modelling the fo:page-number-citation object.
  */
-public class PageNumberCitation extends FObj {
-    // The value of properties relevant for fo:page-number-citation.
+public abstract class AbstractPageNumberCitation extends FObj {
+    
+    // The value of properties relevant for fo:page-number-citation(-last).
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonFont commonFont;
     private Length alignmentAdjust;
@@ -77,7 +75,7 @@
     /**
      * @param parent FONode that is the parent of this object
      */
-    public PageNumberCitation(FONode parent) {
+    public AbstractPageNumberCitation(FONode parent) {
         super(parent);
     }
 
@@ -102,9 +100,7 @@
         color = pList.get(Constants.PR_COLOR).getColor(getUserAgent());
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
     protected void startOfNode() throws FOPException {
         super.startOfNode();
         if (refId.equals("")) {
@@ -181,13 +177,4 @@
         return refId;
     }
      
-    /** {@inheritDoc} */
-    public String getLocalName() {
-        return "page-number-citation";
-    }
-
-    /** {@inheritDoc} */
-    public int getNameId() {
-        return FO_PAGE_NUMBER_CITATION;
-    }
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java?rev=596097&r1=596096&r2=596097&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitation.java Sun Nov 18 08:56:09 2007
@@ -19,21 +19,8 @@
 
 package org.apache.fop.fo.flow;
 
-import java.awt.Color;
-
-import org.xml.sax.Locator;
-
 import org.apache.fop.apps.FOPException;
-import org.apache.fop.datatypes.Length;
-import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.FONode;
-import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.PropertyList;
-import org.apache.fop.fo.ValidationException;
-import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
-import org.apache.fop.fo.properties.CommonFont;
-import org.apache.fop.fo.properties.CommonTextDecoration;
-import org.apache.fop.fo.properties.SpaceProperty;
 
 /**
  * Class modelling the fo:page-number-citation object.
@@ -41,146 +28,28 @@
  * The page number used is the page that contains the start of the
  * block referenced with the ref-id attribute.
  */
-public class PageNumberCitation extends FObj {
-    // The value of properties relevant for fo:page-number-citation.
-    private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    private CommonFont commonFont;
-    private Length alignmentAdjust;
-    private int alignmentBaseline;
-    private Length baselineShift;
-    private int dominantBaseline;
-    // private ToBeImplementedProperty letterSpacing;
-    private SpaceProperty lineHeight;
-    private String refId;
-    /** Holds the text decoration values. May be null */
-    private CommonTextDecoration textDecoration;
-    // private ToBeImplementedProperty textShadow;
-    // Unused but valid items, commented out for performance:
-    //     private CommonAccessibility commonAccessibility;
-    //     private CommonAural commonAural;
-    //     private CommonMarginInline commonMarginInline;
-    //     private CommonRelativePosition commonRelativePosition;
-    //     private KeepProperty keepWithNext;
-    //     private KeepProperty keepWithPrevious;
-    //     private int scoreSpaces;
-    //     private Length textAltitude;
-    //     private Length textDepth;
-    //     private int textTransform;
-    //     private int visibility;
-    //     private SpaceProperty wordSpacing;
-    //     private int wrapOption;
-    // End of property values
-
-    // Properties which are not explicitely listed but are still applicable 
-    private Color color;
+public class PageNumberCitation extends AbstractPageNumberCitation {
 
     /**
+     * Main constructor
      * @param parent FONode that is the parent of this object
      */
     public PageNumberCitation(FONode parent) {
         super(parent);
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    public void bind(PropertyList pList) throws FOPException {
-        super.bind(pList);
-        commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        commonFont = pList.getFontProps();
-        alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
-        alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
-        baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
-        dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
-        // letterSpacing = pList.get(PR_LETTER_SPACING);
-        lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
-        refId = pList.get(PR_REF_ID).getString();
-        textDecoration = pList.getTextDecorationProps();
-        // textShadow = pList.get(PR_TEXT_SHADOW);
-        
-        // implicit properties
-        color = pList.get(Constants.PR_COLOR).getColor(getUserAgent());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
     protected void startOfNode() throws FOPException {
         super.startOfNode();
-        if (refId.equals("")) {
-            missingPropertyError("ref-id");
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     * XSL Content Model: empty
-     */
-    protected void validateChildNode(Locator loc, String nsURI, String localName) 
-        throws ValidationException {
-            invalidChildError(loc, nsURI, localName);
-    }
-
-    /** @return the Common Font Properties. */
-    public CommonFont getCommonFont() {
-        return commonFont;
-    }
-
-    /** @return the "color" property. */
-    public Color getColor() {
-        return color;
+        getFOEventHandler().startPageNumberCitation(this);
     }
 
-    /** @return the "text-decoration" property. */
-    public CommonTextDecoration getTextDecoration() {
-        return textDecoration; 
-    }
-    
-    /**
-     * @return the "alignment-adjust" property
-     */
-    public Length getAlignmentAdjust() {
-        return alignmentAdjust;
-    }
-    
-    /**
-     * @return the "alignment-baseline" property
-     */
-    public int getAlignmentBaseline() {
-        return alignmentBaseline;
-    }
-    
-    /**
-     * @return the "baseline-shift" property
-     */
-    public Length getBaselineShift() {
-        return baselineShift;
-    }
-    
-    /**
-     * @return the "dominant-baseline" property
-     */
-    public int getDominantBaseline() {
-        return dominantBaseline;
-    }
-    
-    /** @return the Common Border, Padding, and Background Properties. */
-    public CommonBorderPaddingBackground getCommonBorderPaddingBackground() {
-        return commonBorderPaddingBackground;
+    /** {@inheritDoc} */
+    protected void endOfNode() throws FOPException {
+        super.endOfNode();
+        getFOEventHandler().endPageNumberCitation(this);
     }
 
-    /**
-     * @return the "line-height" property
-     */
-    public SpaceProperty getLineHeight() {
-        return lineHeight;
-    }
-    
-    /** @return the "ref-id" property. */
-    public String getRefId() {
-        return refId;
-    }
-     
     /** {@inheritDoc} */
     public String getLocalName() {
         return "page-number-citation";

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitationLast.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitationLast.java?rev=596097&r1=596096&r2=596097&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitationLast.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitationLast.java Sun Nov 18 08:56:09 2007
@@ -19,6 +19,7 @@
 
 package org.apache.fop.fo.flow;
 
+import org.apache.fop.apps.FOPException;
 import org.apache.fop.fo.FONode;
 
 /**
@@ -28,7 +29,7 @@
  * block referenced with the ref-id attribute.
  * @since XSL 1.1
  */
-public class PageNumberCitationLast extends PageNumberCitation {
+public class PageNumberCitationLast extends AbstractPageNumberCitation {
 
     /**
      * Main constructor
@@ -39,6 +40,18 @@
     }
     
     /** {@inheritDoc} */
+    protected void startOfNode() throws FOPException {
+        super.startOfNode();
+        getFOEventHandler().startPageNumberCitationLast(this);
+    }
+
+    /** {@inheritDoc} */
+    protected void endOfNode() throws FOPException {
+        super.endOfNode();
+        getFOEventHandler().endPageNumberCitationLast(this);
+    }
+
+    /** {@inheritDoc} */
     public String getLocalName() {
         return "page-number-citation-last";
     }
@@ -47,4 +60,5 @@
     public int getNameId() {
         return FO_PAGE_NUMBER_CITATION_LAST;
     }
+
 }

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/PageNumberCitationLast.java
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java (from r596095, xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java?p2=xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java&p1=xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java&r1=596095&r2=596097&rev=596097&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java Sun Nov 18 08:56:09 2007
@@ -19,13 +19,13 @@
 
 package org.apache.fop.layoutmgr.inline;
 
-import org.apache.fop.fo.flow.PageNumberCitation;
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.area.Resolvable;
 import org.apache.fop.area.Trait;
 import org.apache.fop.area.inline.InlineArea;
-import org.apache.fop.area.inline.UnresolvedPageNumber;
 import org.apache.fop.area.inline.TextArea;
+import org.apache.fop.area.inline.UnresolvedPageNumber;
+import org.apache.fop.fo.flow.AbstractPageNumberCitation;
 import org.apache.fop.fonts.Font;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.fonts.FontTriplet;
@@ -35,11 +35,12 @@
 import org.apache.fop.layoutmgr.TraitSetter;
 
 /**
- * LayoutManager for the fo:page-number-citation formatting object
+ * LayoutManager for the fo:page-number-citation(-last) formatting object
  */
-public class PageNumberCitationLayoutManager extends LeafNodeLayoutManager {
+public abstract class AbstractPageNumberCitationLayoutManager extends LeafNodeLayoutManager {
 
-    private PageNumberCitation fobj;
+    /** The page number citation object */
+    protected AbstractPageNumberCitation fobj;
     /** Font for the page-number-citation */
     protected Font font;
     
@@ -52,7 +53,7 @@
      * @param node the formatting object that creates this area
      * @todo better retrieval of font info
      */
-    public PageNumberCitationLayoutManager(PageNumberCitation node) {
+    public AbstractPageNumberCitationLayoutManager(AbstractPageNumberCitation node) {
         super(node);
         fobj = node;
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java?rev=596097&r1=596096&r2=596097&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java Sun Nov 18 08:56:09 2007
@@ -19,22 +19,20 @@
 
 package org.apache.fop.layoutmgr.inline;
 
-import org.apache.fop.fo.flow.PageNumberCitationLast;
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.area.Resolvable;
 import org.apache.fop.area.inline.InlineArea;
-import org.apache.fop.area.inline.UnresolvedPageNumber;
 import org.apache.fop.area.inline.TextArea;
+import org.apache.fop.area.inline.UnresolvedPageNumber;
+import org.apache.fop.fo.flow.PageNumberCitationLast;
 import org.apache.fop.layoutmgr.LayoutContext;
 import org.apache.fop.layoutmgr.LayoutManager;
 
 /**
  * LayoutManager for the fo:page-number-citation-last formatting object
  */
-public class PageNumberCitationLastLayoutManager extends PageNumberCitationLayoutManager {
+public class PageNumberCitationLastLayoutManager extends AbstractPageNumberCitationLayoutManager {
 
-    private PageNumberCitationLast fobj;
-    
     /**
      * Constructor
      *

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java?rev=596097&r1=596096&r2=596097&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java Sun Nov 18 08:56:09 2007
@@ -19,33 +19,19 @@
 
 package org.apache.fop.layoutmgr.inline;
 
-import org.apache.fop.fo.flow.PageNumberCitation;
 import org.apache.fop.area.PageViewport;
-import org.apache.fop.area.Resolvable;
-import org.apache.fop.area.Trait;
 import org.apache.fop.area.inline.InlineArea;
-import org.apache.fop.area.inline.UnresolvedPageNumber;
 import org.apache.fop.area.inline.TextArea;
-import org.apache.fop.fonts.Font;
-import org.apache.fop.fonts.FontInfo;
-import org.apache.fop.fonts.FontTriplet;
+import org.apache.fop.area.inline.UnresolvedPageNumber;
+import org.apache.fop.fo.flow.PageNumberCitation;
 import org.apache.fop.layoutmgr.LayoutContext;
 import org.apache.fop.layoutmgr.LayoutManager;
-import org.apache.fop.layoutmgr.PositionIterator;
-import org.apache.fop.layoutmgr.TraitSetter;
 
 /**
  * LayoutManager for the fo:page-number-citation formatting object
  */
-public class PageNumberCitationLayoutManager extends LeafNodeLayoutManager {
+public class PageNumberCitationLayoutManager extends AbstractPageNumberCitationLayoutManager {
 
-    private PageNumberCitation fobj;
-    /** Font for the page-number-citation */
-    protected Font font;
-    
-    /** Indicates whether the page referred to by the citation has been resolved yet */
-    protected boolean resolved = false;
-    
     /**
      * Constructor
      *
@@ -54,50 +40,15 @@
      */
     public PageNumberCitationLayoutManager(PageNumberCitation node) {
         super(node);
-        fobj = node;
     }
     
     /** {@inheritDoc} */
-    public void initialize() {
-        FontInfo fi = fobj.getFOEventHandler().getFontInfo();
-        FontTriplet[] fontkeys = fobj.getCommonFont().getFontState(fi);
-        font = fi.getFontInstance(fontkeys[0], fobj.getCommonFont().fontSize.getValue(this));
-        setCommonBorderPaddingBackground(fobj.getCommonBorderPaddingBackground());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected AlignmentContext makeAlignmentContext(LayoutContext context) {
-        return new AlignmentContext(
-                font
-                , fobj.getLineHeight().getOptimum(this).getLength().getValue(this)
-                , fobj.getAlignmentAdjust()
-                , fobj.getAlignmentBaseline()
-                , fobj.getBaselineShift()
-                , fobj.getDominantBaseline()
-                , context.getAlignmentContext()
-            );
-    }
-
-    /** {@inheritDoc} */
     public InlineArea get(LayoutContext context) {
         curArea = getPageNumberCitationInlineArea(parentLM);
         return curArea;
     }
     
     /**
-     * {@inheritDoc}
-     *                                                                      , LayoutContext) 
-     */
-    public void addAreas(PositionIterator posIter, LayoutContext context) {
-        super.addAreas(posIter, context);
-        if (!resolved) {
-            getPSLM().addUnresolvedArea(fobj.getRefId(), (Resolvable) curArea);
-        }
-    }
-    
-    /**
      * if id can be resolved then simply return a word, otherwise
      * return a resolvable area
      */
@@ -124,34 +75,5 @@
         return text;
     }
     
-    /**
-     * Updates the traits for the generated text area. 
-     * @param text the text area
-     */
-    protected void updateTextAreaTraits(TextArea text) {
-        TraitSetter.setProducerID(text, fobj.getId());
-        text.setBPD(font.getAscender() - font.getDescender());
-        text.setBaselineOffset(font.getAscender());
-        TraitSetter.addFontTraits(text, font);
-        text.addTrait(Trait.COLOR, fobj.getColor());
-        TraitSetter.addTextDecoration(text, fobj.getTextDecoration());
-    }
-    
-    /**
-     * @param str string to be measured
-     * @return width (in millipoints ??) of the string
-     */
-    protected int getStringWidth(String str) {
-        int width = 0;
-        for (int count = 0; count < str.length(); count++) {
-            width += font.getCharWidth(str.charAt(count));
-        }
-        return width;
-    }
-
-    /** {@inheritDoc} */
-    protected void addId() {
-        getPSLM().addIDToPage(fobj.getId());
-    }
 }
 

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=596097&r1=596096&r2=596097&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Sun Nov 18 08:56:09 2007
@@ -28,6 +28,9 @@
 
   <changes>
     <release version="FOP Trunk">
+      <action context="Code" dev="JM" type="add" fixes-bug="43605" due-to="V. Schappert">
+        Added methods for fo:page-number-citation(-last) in FOEventHandler.
+      </action>
       <action context="Code" dev="VH" type="add">
         Step towards performance: the collapsing-border resolution algorithm no longer triggers the
         retrieving of the whole table, when possible.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org