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 ke...@apache.org on 2001/11/09 12:32:42 UTC

cvs commit: xml-fop/src/org/apache/fop/system BufferManager.java

keiron      01/11/09 03:32:42

  Modified:    src/org/apache/fop/apps Driver.java Options.java
               src/org/apache/fop/area Area.java PageViewport.java
               src/org/apache/fop/datatypes LengthBase.java
               src/org/apache/fop/extensions ExtensionElementMapping.java
                        ExtensionObj.java Label.java Outline.java
               src/org/apache/fop/fo ColorProfile.java Declarations.java
                        ElementMapping.java FOElementMapping.java
                        FONode.java FOText.java FOTreeBuilder.java
                        FObj.java FObjMixed.java Title.java
                        ToBeImplementedElement.java Unknown.java
                        UnknownXMLObj.java XMLElement.java XMLObj.java
               src/org/apache/fop/fo/expr BodyStartFunction.java
                        LabelEndFunction.java
               src/org/apache/fop/fo/flow BasicLink.java BidiOverride.java
                        Block.java BlockContainer.java Character.java
                        ExternalGraphic.java Float.java Flow.java
                        Footnote.java FootnoteBody.java
                        InitialPropertySet.java Inline.java
                        InlineContainer.java InstreamForeignObject.java
                        Leader.java ListBlock.java ListItem.java
                        ListItemBody.java ListItemLabel.java Marker.java
                        MultiCase.java MultiProperties.java
                        MultiPropertySet.java MultiSwitch.java
                        MultiToggle.java PageNumber.java
                        PageNumberCitation.java RetrieveMarker.java
                        StaticContent.java Table.java TableAndCaption.java
                        TableBody.java TableCaption.java TableCell.java
                        TableColumn.java TableFooter.java TableHeader.java
                        TableRow.java Wrapper.java
               src/org/apache/fop/fo/pagination
                        ConditionalPageMasterReference.java
                        LayoutMasterSet.java PageMasterReference.java
                        PageSequence.java PageSequenceMaster.java
                        Region.java RegionAfter.java RegionBefore.java
                        RegionBody.java RegionEnd.java RegionStart.java
                        RepeatablePageMasterAlternatives.java
                        RepeatablePageMasterReference.java Root.java
                        SimplePageMaster.java
                        SinglePageMasterReference.java
               src/org/apache/fop/fonts TTFSubSetFile.java
               src/org/apache/fop/image FopImageFactory.java ImageArea.java
               src/org/apache/fop/layout FontDescriptor.java FontState.java
               src/org/apache/fop/layout/hyphenation HyphenationTree.java
                        PatternConsumer.java PatternParser.java
               src/org/apache/fop/pdf PDFNumber.java PDFPages.java
                        PDFState.java
               src/org/apache/fop/render/awt AWTFontMetrics.java
               src/org/apache/fop/render/pdf FontSetup.java
               src/org/apache/fop/render/pdf/fonts LazyFont.java
                        MultiByteFont.java SingleByteFont.java
               src/org/apache/fop/render/xml XMLRenderer.java
               src/org/apache/fop/svg PDFDocumentGraphics2D.java
                        PDFGraphics2D.java PDFTextPainter.java
                        PDFTranscoder.java SVGArea.java SVGElement.java
                        SVGElementMapping.java SVGObj.java
                        SVGUserAgent.java
               src/org/apache/fop/system BufferManager.java
  Added:       src/org/apache/fop/svg PDFTextElementBridge.java
  Log:
  changed the parent to FONode
  changed a few more vector and hashtable
  change master-name to master-reference for page-sequence, single-page-master-reference, repeatable-page-masterreference,conditional-page-master-reference
  added pdf text element bridge for simple text
  some other changes that will hopefully make things simpler to handle in the future
  
  Revision  Changes    Path
  1.40      +1 -8      xml-fop/src/org/apache/fop/apps/Driver.java
  
  Index: Driver.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Driver.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- Driver.java	2001/11/06 08:34:50	1.39
  +++ Driver.java	2001/11/09 11:32:36	1.40
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Driver.java,v 1.39 2001/11/06 08:34:50 keiron Exp $
  + * $Id: Driver.java,v 1.40 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -19,8 +19,6 @@
   
   import org.apache.fop.render.pdf.PDFRenderer;
   
  -import org.apache.fop.system.BufferManager;
  -
   import org.apache.log.*;
   import org.apache.log.format.*;
   import org.apache.log.output.io.*;
  @@ -173,8 +171,6 @@
       /**
        * the system resources that FOP will use
        */
  -    private BufferManager _bufferManager;
  -
       private Logger log;
   
       public static final String getParserClassName() {
  @@ -194,9 +190,7 @@
        */
       public Driver() {
           _stream = null;
  -        _bufferManager = new BufferManager();
           _treeBuilder = new FOTreeBuilder();
  -        _treeBuilder.setBufferManager(_bufferManager);
           setupDefaultMappings();
       }
   
  @@ -522,7 +516,6 @@
       /* Set up the system buffers */
   
       public void setBufferFile(File bufferFile) {
  -        this._bufferManager.addBufferFile(bufferFile);
       }
   
       /**
  
  
  
  1.10      +1 -2      xml-fop/src/org/apache/fop/apps/Options.java
  
  Index: Options.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Options.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Options.java	2001/08/10 08:18:43	1.9
  +++ Options.java	2001/11/09 11:32:36	1.10
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Options.java,v 1.9 2001/08/10 08:18:43 keiron Exp $
  + * $Id: Options.java,v 1.10 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -80,7 +80,6 @@
           if (dumpConfiguration) {
               Configuration.put("dumpConfiguration", "true");
               Configuration.dumpConfiguration();
  -            System.exit(0);
           }
   
           // quiet mode
  
  
  
  1.3       +9 -1      xml-fop/src/org/apache/fop/area/Area.java
  
  Index: Area.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/Area.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Area.java	2001/10/26 09:26:59	1.2
  +++ Area.java	2001/11/09 11:32:36	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Area.java,v 1.2 2001/10/26 09:26:59 keiron Exp $
  + * $Id: Area.java,v 1.3 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,6 +8,14 @@
   package org.apache.fop.area;
   
   import java.io.Serializable;
  +
  +// If the area appears more than once in the output
  +// or if the area has external data it is cached
  +// to keep track of it and to minimize rendered output
  +// renderers can render the output once and display it
  +// for every occurence
  +// this should also extend to all outputs (including PDFGraphics2D)
  +// and all types of renderers
   
   /**
    * Base object for all areas.
  
  
  
  1.3       +6 -1      xml-fop/src/org/apache/fop/area/PageViewport.java
  
  Index: PageViewport.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/PageViewport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PageViewport.java	2001/10/26 09:26:59	1.2
  +++ PageViewport.java	2001/11/09 11:32:36	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PageViewport.java,v 1.2 2001/10/26 09:26:59 keiron Exp $
  + * $Id: PageViewport.java,v 1.3 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -27,6 +27,11 @@
       // this list is only used when the page is discarded
       // the information is kept for future reference
       ArrayList idReferences = null;
  +
  +    // this keeps a list of currently unresolved areas or extensions
  +    // once the things is resolved it is removed
  +    // when this is empty the page can be rendered
  +    ArrayList unresolved = null;
   
       public void setClip(boolean c) {
           clip = c;
  
  
  
  1.6       +7 -5      xml-fop/src/org/apache/fop/datatypes/LengthBase.java
  
  Index: LengthBase.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/LengthBase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LengthBase.java	2001/07/30 20:29:19	1.5
  +++ LengthBase.java	2001/11/09 11:32:36	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: LengthBase.java,v 1.5 2001/07/30 20:29:19 tore Exp $
  + * $Id: LengthBase.java,v 1.6 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,6 +8,7 @@
   package org.apache.fop.datatypes;
   
   import org.apache.fop.fo.FObj;
  +import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.PropertyList;
   import org.apache.fop.messaging.MessageHandler;
   
  @@ -75,10 +76,11 @@
               return parentFO.getContentWidth();
           case CONTAINING_REFAREA:    // example: start-indent, end-indent
            {
  -            FObj fo;
  -            for (fo = parentFO; fo != null &&!fo.generatesReferenceAreas();
  -                    fo = fo.getParent());
  -            return (fo != null ? fo.getContentWidth() : 0);
  +            //FONode fo;
  +            //for (fo = parentFO; fo != null && !fo.generatesReferenceAreas();
  +            //        fo = fo.getParent());
  +            //return (((fo != null) && (fo instanceof FObj)) ? ((FObj)fo).getContentWidth() : 0);
  +            return 0;
           }
           case CUSTOM_BASE:
               MessageHandler.errorln("!!! LengthBase.getBaseLength() called on CUSTOM_BASE type !!!");
  
  
  
  1.6       +6 -6      xml-fop/src/org/apache/fop/extensions/ExtensionElementMapping.java
  
  Index: ExtensionElementMapping.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/extensions/ExtensionElementMapping.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ExtensionElementMapping.java	2001/11/06 08:34:50	1.5
  +++ ExtensionElementMapping.java	2001/11/09 11:32:36	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ExtensionElementMapping.java,v 1.5 2001/11/06 08:34:50 keiron Exp $
  + * $Id: ExtensionElementMapping.java,v 1.6 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -7,11 +7,11 @@
   
   package org.apache.fop.extensions;
   
  -import org.apache.fop.fo.*;
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.ElementMapping;
  +import org.apache.fop.fo.FOTreeBuilder;
   
  -import java.util.Enumeration;
   import java.util.HashMap;
  -import java.util.Iterator;
   
   public class ExtensionElementMapping implements ElementMapping {
   
  @@ -29,13 +29,13 @@
       }
   
       class O extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Outline(parent);
           }
       }
   
       class L extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Label(parent);
           }
       }
  
  
  
  1.4       +3 -20     xml-fop/src/org/apache/fop/extensions/ExtensionObj.java
  
  Index: ExtensionObj.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/extensions/ExtensionObj.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExtensionObj.java	2001/11/06 08:34:50	1.3
  +++ ExtensionObj.java	2001/11/09 11:32:36	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ExtensionObj.java,v 1.3 2001/11/06 08:34:50 keiron Exp $
  + * $Id: ExtensionObj.java,v 1.4 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -10,10 +10,7 @@
   import org.apache.fop.fo.*;
   import org.apache.fop.layout.*;
   import org.apache.fop.apps.FOPException;
  -import org.apache.fop.fo.properties.ExtensionPropertyMapping;
   
  -import org.xml.sax.Attributes;
  -
   /**
    * base class for extension objects
    */
  @@ -24,7 +21,7 @@
        * @param parent the parent formatting object
        * @param propertyList the explicit properties of this object
        */
  -    public ExtensionObj(FObj parent) {
  +    public ExtensionObj(FONode parent) {
           super(parent);
       }
   
  @@ -32,7 +29,6 @@
        * Called for extensions within a page sequence or flow. These extensions
        * are allowed to generate visible areas within the layout.
        *
  -     *
        * @param area
        */
       public Status layout(Area area) throws FOPException {
  @@ -52,18 +48,5 @@
           ExtensionArea extArea = new ExtensionArea(this);
           areaTree.addExtension(this);
       }
  -
  -    protected PropertyListBuilder getListBuilder() {
  -            PropertyListBuilder plb = new PropertyListBuilder();
  -            plb.addList(ExtensionPropertyMapping.getGenericMappings());
  -        return plb;
  -    }
  -
  -    public void handleAttrs(Attributes attlist) throws FOPException {
  -        String uri = ExtensionElementMapping.URI;
  -        properties =
  -                    getListBuilder().makeList(uri, name, attlist,
  -                                                (parent == null) ? null
  -                                                : parent.properties, parent);
  -    }
   }
  +
  
  
  
  1.4       +2 -4      xml-fop/src/org/apache/fop/extensions/Label.java
  
  Index: Label.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/extensions/Label.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Label.java	2001/11/06 08:34:50	1.3
  +++ Label.java	2001/11/09 11:32:36	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Label.java,v 1.3 2001/11/06 08:34:50 keiron Exp $
  + * $Id: Label.java,v 1.4 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -9,11 +9,10 @@
   
   import org.apache.fop.fo.*;
   
  -
   public class Label extends ExtensionObj {
       private String _label = "";
   
  -    public Label(FObj parent) {
  +    public Label(FONode parent) {
           super(parent);
       }
   
  @@ -24,6 +23,5 @@
       public String toString() {
           return _label;
       }
  -
   
   }
  
  
  
  1.6       +7 -12     xml-fop/src/org/apache/fop/extensions/Outline.java
  
  Index: Outline.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/extensions/Outline.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Outline.java	2001/11/06 08:34:50	1.5
  +++ Outline.java	2001/11/09 11:32:36	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Outline.java,v 1.5 2001/11/06 08:34:50 keiron Exp $
  + * $Id: Outline.java,v 1.6 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -19,7 +19,7 @@
   
   public class Outline extends ExtensionObj {
       private Label _label;
  -    private Vector _outlines = new Vector();
  +    private ArrayList _outlines = new ArrayList();
   
       private String _internalDestination;
       private String _externalDestination;
  @@ -34,16 +34,15 @@
        */
       private Object _rendererObject;
   
  -    public Outline(FObj parent) {
  +    public Outline(FONode parent) {
           super(parent);
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  -        super.handleAttrs(attlist);
           _internalDestination =
  -            this.properties.get("internal-destination").getString();
  +            attlist.getValue(null, "internal-destination");
           _externalDestination =
  -            this.properties.get("external-destination").getString();
  +            attlist.getValue(null, "external-destination");
           if (_externalDestination != null &&!_externalDestination.equals("")) {
               log.warn("fox:outline external-destination not supported currently.");
           }
  @@ -66,12 +65,10 @@
           if (obj instanceof Label) {
               _label = (Label)obj;
           } else if (obj instanceof Outline) {
  -            _outlines.addElement(obj);
  +            _outlines.add(obj);
           }
  -        super.addChild(obj);
       }
   
  -
       public void setRendererObject(Object o) {
           _rendererObject = o;
       }
  @@ -88,15 +85,13 @@
           return _label == null ? new Label(this) : _label;
       }
   
  -    public Vector getOutlines() {
  +    public ArrayList getOutlines() {
           return _outlines;
       }
   
       public String getInternalDestination() {
           return _internalDestination;
       }
  -
  -
   
   }
   
  
  
  
  1.6       +3 -5      xml-fop/src/org/apache/fop/fo/ColorProfile.java
  
  Index: ColorProfile.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ColorProfile.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ColorProfile.java	2001/11/06 08:34:50	1.5
  +++ ColorProfile.java	2001/11/09 11:32:36	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ColorProfile.java,v 1.5 2001/11/06 08:34:50 keiron Exp $
  + * $Id: ColorProfile.java,v 1.6 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -15,14 +15,12 @@
   import org.apache.fop.apps.FOPException;
   
   /**
  - * The fo:root formatting object. Contains page masters, root extensions,
  - * page-sequences.
  + * The fo:color-profile formatting object.
    */
   public class ColorProfile extends ToBeImplementedElement {
   
  -    protected ColorProfile(FObj parent) {
  +    protected ColorProfile(FONode parent) {
           super(parent);
  -        this.name = "fo:color-profile";
   
           // this.properties.get("src");
           // this.properties.get("color-profile-name");
  
  
  
  1.5       +2 -3      xml-fop/src/org/apache/fop/fo/Declarations.java
  
  Index: Declarations.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Declarations.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Declarations.java	2001/11/06 08:34:50	1.4
  +++ Declarations.java	2001/11/09 11:32:36	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Declarations.java,v 1.4 2001/11/06 08:34:50 keiron Exp $
  + * $Id: Declarations.java,v 1.5 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,9 +18,8 @@
    */
   public class Declarations extends ToBeImplementedElement {
   
  -    protected Declarations(FObj parent) {
  +    protected Declarations(FONode parent) {
           super(parent);
  -        this.name = "fo:declarations";
       }
   
   }
  
  
  
  1.10      +4 -2      xml-fop/src/org/apache/fop/fo/ElementMapping.java
  
  Index: ElementMapping.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ElementMapping.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ElementMapping.java	2001/11/06 08:34:50	1.9
  +++ ElementMapping.java	2001/11/09 11:32:36	1.10
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ElementMapping.java,v 1.9 2001/11/06 08:34:50 keiron Exp $
  + * $Id: ElementMapping.java,v 1.10 2001/11/09 11:32:36 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -12,10 +12,12 @@
    * the given builder.
    */
   public interface ElementMapping {
  +    public static final String DEFAULT = "<default>";
  +
       public void addToBuilder(FOTreeBuilder builder);
   
       public static class Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return null;
           }
       }
  
  
  
  1.2       +57 -58    xml-fop/src/org/apache/fop/fo/FOElementMapping.java
  
  Index: FOElementMapping.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOElementMapping.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FOElementMapping.java	2001/11/06 08:34:50	1.1
  +++ FOElementMapping.java	2001/11/09 11:32:37	1.2
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FOElementMapping.java,v 1.1 2001/11/06 08:34:50 keiron Exp $
  + * $Id: FOElementMapping.java,v 1.2 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -7,7 +7,6 @@
   
   package org.apache.fop.fo;
   
  -import java.util.Enumeration;
   import java.util.HashMap;
   import java.util.Iterator;
   
  @@ -112,337 +111,337 @@
       }
   
       class R extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Root(parent);
           }
       }
   
       class Dec extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Declarations(parent);
           }
       }
   
       class CP extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new ColorProfile(parent);
           }
       }
   
       class PS extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new PageSequence(parent);
           }
       }
   
       class LMS extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new LayoutMasterSet(parent);
           }
       }
   
       class PSM extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new PageSequenceMaster(parent);
           }
       }
   
       class SPMR extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new SinglePageMasterReference(parent);
           }
       }
   
       class RPMR extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new RepeatablePageMasterReference(parent);
           }
       }
   
       class RPMA extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new RepeatablePageMasterAlternatives(parent);
           }
       }
   
       class CPMR extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new ConditionalPageMasterReference(parent);
           }
       }
   
       class SPM extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new SimplePageMaster(parent);
           }
       }
   
       class RB extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new RegionBody(parent);
           }
       }
   
       class RBefore extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new RegionBefore(parent);
           }
       }
   
       class RA extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new RegionAfter(parent);
           }
       }
   
       class RS extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new RegionStart(parent);
           }
       }
   
       class RE extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new RegionEnd(parent);
           }
       }
   
       class Fl extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Flow(parent);
           }
       }
   
       class SC extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new StaticContent(parent);
           }
       }
   
       class T extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Title(parent);
           }
       }
   
       class B extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Block(parent);
           }
       }
   
       class BC extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new BlockContainer(parent);
           }
       }
   
       class BO extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new BidiOverride(parent);
           }
       }
   
       class Ch extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new org.apache.fop.fo.flow.Character(parent);
           }
       }
   
       class IPS extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new InitialPropertySet(parent);
           }
       }
   
       class EG extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new ExternalGraphic(parent);
           }
       }
   
       class IFO extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new InstreamForeignObject(parent);
           }
       }
   
       class In extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Inline(parent);
           }
       }
   
       class IC extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new InlineContainer(parent);
           }
       }
   
       class L extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Leader(parent);
           }
       }
   
       class PN extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new PageNumber(parent);
           }
       }
   
       class PNC extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new PageNumberCitation(parent);
           }
       }
   
       class TAC extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new TableAndCaption(parent);
           }
       }
   
       class Ta extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Table(parent);
           }
       }
   
       class TC extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new TableColumn(parent);
           }
       }
   
       class TCaption extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new TableCaption(parent);
           }
       }
   
       class TH extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new TableHeader(parent);
           }
       }
   
       class TF extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new TableFooter(parent);
           }
       }
   
       class TB extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new TableBody(parent);
           }
       }
   
       class TR extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new TableRow(parent);
           }
       }
   
       class TCell extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new TableCell(parent);
           }
       }
   
       class LB extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new ListBlock(parent);
           }
       }
   
       class LI extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new ListItem(parent);
           }
       }
   
       class LIB extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new ListItemBody(parent);
           }
       }
   
       class LIL extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new ListItemLabel(parent);
           }
       }
   
       class BL extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new BasicLink(parent);
           }
       }
   
       class MS extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new MultiSwitch(parent);
           }
       }
   
       class MC extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new MultiCase(parent);
           }
       }
   
       class MT extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new MultiToggle(parent);
           }
       }
   
       class MP extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new MultiProperties(parent);
           }
       }
   
       class MPS extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new MultiPropertySet(parent);
           }
       }
   
       class F extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new org.apache.fop.fo.flow.Float(parent);
           }
       }
   
       class Foot extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Footnote(parent);
           }
       }
   
       class FB extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new FootnoteBody(parent);
           }
       }
   
       class W extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Wrapper(parent);
           }
       }
   
       class M extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Marker(parent);
           }
       }
   
       class RM extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new RetrieveMarker(parent);
           }
       }
  
  
  
  1.23      +43 -202   xml-fop/src/org/apache/fop/fo/FONode.java
  
  Index: FONode.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FONode.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- FONode.java	2001/11/06 08:34:50	1.22
  +++ FONode.java	2001/11/09 11:32:37	1.23
  @@ -1,260 +1,101 @@
   /*
  - * $Id: FONode.java,v 1.22 2001/11/06 08:34:50 keiron Exp $
  + * $Id: FONode.java,v 1.23 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
    */
   
  -
   package org.apache.fop.fo;
   
   // FOP
   import org.apache.fop.apps.FOPException;
  +import org.apache.fop.apps.StreamRenderer;
   import org.apache.fop.layout.Area;
  -import org.apache.fop.layout.AreaClass;
  -import org.apache.fop.layout.LinkSet;
  -import org.apache.fop.system.BufferManager;
  -import org.apache.fop.fo.flow.Marker;
   
   import org.apache.log.Logger;
   
  -// Java
  -import java.util.Vector;
  -import java.util.Hashtable;
  -
   import org.xml.sax.Attributes;
   
   /**
  - * base class for nodes in the formatting object tree
  + * base class for nodes in the XML tree
    *
  - * Modified by Mark Lillywhite mark-fop@inomial.com. Made
  - * Vector a protected member. (/me things this should be
  - * a private member with an API for adding children;
  - * this woudl save a lot of memory because the Vector
  - * would not have to be instantiated unless the node had
  - * children).
    */
   abstract public class FONode {
  +    protected FONode parent;
  +    protected String name;
   
  -    protected FObj parent;
  -
  -    protected String areaClass = AreaClass.UNASSIGNED;
  -
  -    public BufferManager bufferManager;
  -
  -    protected Vector children = new Vector();    // made public for searching for id's
  -
  -    /**
  -     * value of marker before layout begins
  -     */
  -    public final static int START = -1000;
  -
  -    /**
  -     * value of marker after break-after
  -     */
  -    public final static int BREAK_AFTER = -1001;
  -
  -    /**
  -     * where the layout was up to.
  -     * for FObjs it is the child number
  -     * for FOText it is the character number
  -     */
  -    protected int marker = START;
  -
  -    protected boolean isInTableCell = false;
  -
  -    protected int forcedStartOffset = 0;
  -    protected int forcedWidth = 0;
  -
  -    protected int widows = 0;
  -    protected int orphans = 0;
  -
  -    protected LinkSet linkSet;
  -
  -    // count of areas generated-by/returned-by
  -    public int areasGenerated = 0;
  -
  -    // markers
  -    protected Hashtable markers;
  -
       protected Logger log;
   
  -    protected FONode(FObj parent) {
  +    protected FONode(FONode parent) {
           this.parent = parent;
  -        if (parent != null) {
  -            this.bufferManager = parent.bufferManager;
  -        }
  -
  -        markers = new Hashtable();
  +    }
   
  -        if (null != parent)
  -            this.areaClass = parent.areaClass;
  +    public void setName(String str) {
  +        name = str;
       }
   
       public void setLogger(Logger logger) {
           log = logger;
       }
   
  -    public void handleAttrs(Attributes attlist) throws FOPException {
  +    public void setUserAgent(FOUserAgent ua) {
       }
   
  -    public void setIsInTableCell() {
  -        this.isInTableCell = true;
  -        // made recursive by Eric Schaeffer
  -        for (int i = 0; i < this.children.size(); i++) {
  -            FONode child = (FONode)this.children.elementAt(i);
  -            child.setIsInTableCell();
  -        }
  +    public void setStreamRenderer(StreamRenderer st) {
       }
   
  -    public void forceStartOffset(int offset) {
  -        this.forcedStartOffset = offset;
  -        // made recursive by Eric Schaeffer
  -        for (int i = 0; i < this.children.size(); i++) {
  -            FONode child = (FONode)this.children.elementAt(i);
  -            child.forceStartOffset(offset);
  -        }
  -    }
  -
  -    public void forceWidth(int width) {
  -        this.forcedWidth = width;
  -        // made recursive by Eric Schaeffer
  -        for (int i = 0; i < this.children.size(); i++) {
  -            FONode child = (FONode)this.children.elementAt(i);
  -            child.forceWidth(width);
  -        }
  -    }
  -
  -    public void resetMarker() {
  -        this.marker = START;
  -        int numChildren = this.children.size();
  -        for (int i = 0; i < numChildren; i++) {
  -            ((FONode)children.elementAt(i)).resetMarker();
  -        }
  -    }
  -
  -    public void setWidows(int wid) {
  -        widows = wid;
  -    }
  -
  -    public void setOrphans(int orph) {
  -        orphans = orph;
  -    }
  -
  -    public void removeAreas() {
  -        // still to do
  -    }
  -
  -
  -    protected void addChild(FONode child) {
  -        children.addElement(child);
  -    }
  -
  -    public FObj getParent() {
  -        return this.parent;
  -    }
  -
  -    public void setBufferManager(BufferManager bufferManager) {
  -        this.bufferManager = bufferManager;
  -    }
  -
  -    public BufferManager getBufferManager() {
  -        return this.bufferManager;
  -    }
  -
  -    public void setLinkSet(LinkSet linkSet) {
  -        this.linkSet = linkSet;
  -        for (int i = 0; i < this.children.size(); i++) {
  -            FONode child = (FONode)this.children.elementAt(i);
  -            child.setLinkSet(linkSet);
  -        }
  +    public void handleAttrs(Attributes attlist) throws FOPException {
       }
   
  -    public LinkSet getLinkSet() {
  -        return this.linkSet;
  +    /**
  +     * returns the name of the object
  +     * @return the name of this object
  +     */
  +    public String getName() {
  +        return this.name;
       }
   
  -    abstract public Status layout(Area area) throws FOPException;
  -
       /**
  -     * lets outside sources access the property list
  -     * first used by PageNumberCitation to find the "id" property
  -     * returns null by default, overide this function when there is a property list
  -     * @param name - the name of the desired property to obtain
  -     * @returns the property
  +     * adds characters (does nothing here)
  +     * @param data text
  +     * @param start start position
  +     * @param length length of the text
        */
  -    public Property getProperty(String name) {
  -        return (null);
  +    protected void addCharacters(char data[], int start, int length) {
  +        // ignore
       }
   
       /**
  -     * At the start of a new span area layout may be partway through a
  -     * nested FO, and balancing requires rollback to this known point.
  -     * The snapshot records exactly where layout is at.
  -     * @param snapshot a Vector of markers (Integer)
  -     * @returns the updated Vector of markers (Integers)
  +     * generates the area or areas for this formatting object
  +     * and adds these to the area. This method should always be
  +     * overridden by all sub classes
  +     *
  +     * @param area
        */
  -    public Vector getMarkerSnapshot(Vector snapshot) {
  -        snapshot.addElement(new Integer(this.marker));
  -
  -        // terminate if no kids or child not yet accessed
  -        if (this.marker < 0)
  -            return snapshot;
  -        else if (children.isEmpty())
  -            return snapshot;
  -        else
  -            return ((FONode)children.elementAt(this.marker)).getMarkerSnapshot(snapshot);
  +    public Status layout(Area area) throws FOPException {
  +        // should always be overridden
  +        return new Status(Status.OK);
       }
   
       /**
  -     * When balancing occurs, the flow layout() method restarts at the
  -     * point specified by the current marker snapshot, which is retrieved
  -     * and restored using this method.
  -     * @param snapshot the Vector of saved markers (Integers)
  +     *
        */
  -    public void rollback(Vector snapshot) {
  -        this.marker = ((Integer)snapshot.elementAt(0)).intValue();
  -        snapshot.removeElementAt(0);
  -
  -        if (this.marker == START) {
  -            // make sure all the children of this FO are also reset
  -            resetMarker();
  -            return;
  -        } else if ((this.marker == -1) || children.isEmpty())
  -            return;
  -
  -        int numChildren = this.children.size();
  -
  -        if (this.marker <= START) {
  -            return;
  -        }
  -
  -        for (int i = this.marker + 1; i < numChildren; i++) {
  -            FONode fo = (FONode)children.elementAt(i);
  -            fo.resetMarker();
  -        }
  -        ((FONode)children.elementAt(this.marker)).rollback(snapshot);
  +    protected void start() {
  +        // do nothing by default
       }
   
  -
  -    public void addMarker(Marker marker) throws FOPException {
  -        String mcname = marker.getMarkerClassName();
  -        if (!markers.containsKey(mcname) && children.isEmpty()) {
  -            markers.put(mcname, marker);
  -        } else {
  -            log.error("fo:marker must be an initial child,"
  -                                   + "and 'marker-class-name' must be unique for same parent");
  -            throw new FOPException("fo:marker must be an initial child,"
  -                                   + "and 'marker-class-name' must be unique for same parent");
  -        }
  +    /**
  +     *
  +     */
  +    protected void end() {
  +        // do nothing by default
       }
   
  -    public boolean hasMarkers() {
  -        return !markers.isEmpty();
  +    protected void addChild(FONode child) {
       }
   
  -    public Vector getMarkers() {
  -        return new Vector(markers.values());
  +    public FONode getParent() {
  +        return this.parent;
       }
   
   }
  
  
  
  1.25      +29 -85    xml-fop/src/org/apache/fop/fo/FOText.java
  
  Index: FOText.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOText.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- FOText.java	2001/09/11 10:04:24	1.24
  +++ FOText.java	2001/11/09 11:32:37	1.25
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FOText.java,v 1.24 2001/09/11 10:04:24 keiron Exp $
  + * $Id: FOText.java,v 1.25 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources."
  @@ -26,67 +26,42 @@
    * longer than the lifetime of the object itself, causing
    * excessive memory consumption and OOM errors.
    */
  -public class FOText extends FONode {
  +public class FOText extends FObj {
   
       protected char[] ca;
       protected int start;
       protected int length;
  +    TextInfo textInfo;
   
  -    FontState fs;
  -    float red;
  -    float green;
  -    float blue;
  -    int wrapOption;
  -    int whiteSpaceCollapse;
  -    int verticalAlign;
  -
  -    // Textdecoration
  -    protected boolean underlined = false;
  -    protected boolean overlined = false;
  -    protected boolean lineThrough = false;
  +    public static class TextInfo {
  +        FontState fs;
  +        float red;
  +        float green;
  +        float blue;
  +        int wrapOption;
  +        int whiteSpaceCollapse;
  +        int verticalAlign;
  +
  +        // Textdecoration
  +        protected boolean underlined = false;
  +        protected boolean overlined = false;
  +        protected boolean lineThrough = false;
  +    }
   
       TextState ts;
  -
   
  -    public FOText(char[] chars, int s, int e, FObj parent) {
  -        super(parent);
  +    public FOText(char[] chars, int s, int e, TextInfo ti) {
  +        super(null);
           this.start = 0;
           this.ca = new char[e - s];
           for (int i = s; i < e; i++)
               ca[i - s] = chars[i];
           this.length = e - s;
  -
  -        /* ML - remove refs to BufferManager
  -        this.bufferManager = parent.bufferManager;
  -        if (this.bufferManager != null) {
  -            bufferManager.writeBuffer((Object)this, ca);
  -    } else {
  -            System.out.println("abnormal exit");
  -            System.exit(0);
  -    }
  -        */
  -    }
  -
  -    public void setUnderlined(boolean ul) {
  -        this.underlined = ul;
  -    }
  -
  -    public void setOverlined(boolean ol) {
  -        this.overlined = ol;
  -    }
  -
  -    public void setLineThrough(boolean lt) {
  -        this.lineThrough = lt;
  +        textInfo = ti;
       }
   
  -
       public boolean willCreateArea() {
  -        // ML - remove refs to BufferManager
  -        //char ca[] = this.bufferManager.readBuffer((Object)this);
  -
  -        this.whiteSpaceCollapse =
  -            this.parent.properties.get("white-space-collapse").getEnum();
  -        if (this.whiteSpaceCollapse == WhiteSpaceCollapse.FALSE
  +        if (textInfo.whiteSpaceCollapse == WhiteSpaceCollapse.FALSE
                   && length > 0) {
               return true;
           }
  @@ -102,55 +77,24 @@
       }
   
       public Status layout(Area area) throws FOPException {
  -        // ML - remove refs to BufferManager
  -        // char ca[] = this.bufferManager.readBuffer((Object)this);
           if (!(area instanceof BlockArea)) {
               log.error("text outside block area"
                                      + new String(ca, start, length));
               return new Status(Status.OK);
           }
           if (this.marker == START) {
  -            String fontFamily =
  -                this.parent.properties.get("font-family").getString();
  -            String fontStyle =
  -                this.parent.properties.get("font-style").getString();
  -            String fontWeight =
  -                this.parent.properties.get("font-weight").getString();
  -            int fontSize =
  -                this.parent.properties.get("font-size").getLength().mvalue();
  -            // font-variant support
  -            // added by Eric SCHAEFFER
  -            int fontVariant =
  -                this.parent.properties.get("font-variant").getEnum();
  -
  -            this.fs = new FontState(area.getFontInfo(), fontFamily,
  -                                    fontStyle, fontWeight, fontSize,
  -                                    fontVariant);
  -
  -            ColorType c = this.parent.properties.get("color").getColorType();
  -            this.red = c.red();
  -            this.green = c.green();
  -            this.blue = c.blue();
  -
  -            this.verticalAlign =
  -                this.parent.properties.get("vertical-align").getEnum();
  -
  -            this.wrapOption =
  -                this.parent.properties.get("wrap-option").getEnum();
  -            this.whiteSpaceCollapse =
  -                this.parent.properties.get("white-space-collapse").getEnum();
               this.ts = new TextState();
  -            ts.setUnderlined(underlined);
  -            ts.setOverlined(overlined);
  -            ts.setLineThrough(lineThrough);
  +            ts.setUnderlined(textInfo.underlined);
  +            ts.setOverlined(textInfo.overlined);
  +            ts.setLineThrough(textInfo.lineThrough);
   
               this.marker = this.start;
           }
           int orig_start = this.marker;
  -        this.marker = addText((BlockArea)area, fs, red, green, blue,
  -                              wrapOption, this.getLinkSet(),
  -                              whiteSpaceCollapse, ca, this.marker, length,
  -                              ts, verticalAlign);
  +        this.marker = addText((BlockArea)area, textInfo.fs, textInfo.red, textInfo.green, textInfo.blue,
  +                              textInfo.wrapOption, this.getLinkSet(),
  +                              textInfo.whiteSpaceCollapse, ca, this.marker, length,
  +                              ts, textInfo.verticalAlign);
           if (this.marker == -1) {
   
   
  @@ -290,5 +234,5 @@
           return -1;
       }
   
  -
   }
  +
  
  
  
  1.33      +16 -18    xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java
  
  Index: FOTreeBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- FOTreeBuilder.java	2001/11/06 08:34:50	1.32
  +++ FOTreeBuilder.java	2001/11/09 11:32:37	1.33
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FOTreeBuilder.java,v 1.32 2001/11/06 08:34:50 keiron Exp $
  + * $Id: FOTreeBuilder.java,v 1.33 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -12,7 +12,6 @@
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.apps.StreamRenderer;
   import org.apache.fop.fo.pagination.Root;
  -import org.apache.fop.system.BufferManager;
   import org.apache.fop.fo.pagination.PageSequence;
   import org.apache.fop.extensions.ExtensionObj;
   
  @@ -53,15 +52,13 @@
       /**
        * current formatting object being handled
        */
  -    protected FObj currentFObj = null;
  +    protected FONode currentFObj = null;
   
       /**
        * the root of the formatting object tree
        */
       protected FObj rootFObj = null;
   
  -    public BufferManager bufferManager;
  -
       /**
        * set of names of formatting objects encountered but unknown
        */
  @@ -73,8 +70,8 @@
        * (mark-fop@inomial.com)
        */
       private StreamRenderer streamRenderer;
  -
       private Logger log;
  +    private FOUserAgent userAgent;
   
       public FOTreeBuilder() {}
   
  @@ -114,7 +111,7 @@
       throws SAXException {
           currentFObj.end();
   
  -        currentFObj = (FObj)currentFObj.getParent();
  +        currentFObj = currentFObj.getParent();
       }
   
       /**
  @@ -139,7 +136,7 @@
       public void startElement(String uri, String localName, String rawName,
                                Attributes attlist) throws SAXException {
           /* the formatting object started */
  -        FObj fobj;
  +        FONode fobj;
   
           /* the maker for the formatting object started */
           ElementMapping.Maker fobjMaker = null;
  @@ -149,7 +146,7 @@
               fobjMaker = (ElementMapping.Maker)table.get(localName);
               // try default
               if(fobjMaker == null) {
  -                fobjMaker = (ElementMapping.Maker)table.get("<default>");
  +                fobjMaker = (ElementMapping.Maker)table.get(ElementMapping.DEFAULT);
               }
           }
   
  @@ -158,7 +155,7 @@
               String fullName = uri + "^" + localName;
               if (!this.unknownFOs.containsKey(fullName)) {
                   this.unknownFOs.put(fullName, "");
  -                log.error("Unknown formatting object "
  +                log.warn("Unknown formatting object "
                                          + fullName);
               }
               if(namespaces.contains(uri.intern())) {
  @@ -174,20 +171,25 @@
               fobj = fobjMaker.make(currentFObj);
               fobj.setName(localName);
               fobj.setLogger(log);
  +            // set the user agent for resolving user agent values
  +            fobj.setUserAgent(userAgent);
  +            // set the stream renderer so that appropriate
  +            // elements can add pages and handle resolving references
  +            fobj.setStreamRenderer(streamRenderer);
  +
               fobj.handleAttrs(attlist);
           } catch (FOPException e) {
               throw new SAXException(e);
           }
   
           if (rootFObj == null) {
  -            rootFObj = fobj;
  -            rootFObj.setBufferManager(this.bufferManager);
               if (!fobj.getName().equals("fo:root")) {
                   throw new SAXException(new FOPException("Root element must"
  -                                                        + " be root, not "
  +                                                        + " be fo:root, not "
                                                           + fobj.getName()));
               }
  -        } else if(!(fobj instanceof org.apache.fop.fo.pagination.PageSequence)) {
  +            rootFObj = (FObj)fobj;
  +        } else {
               currentFObj.addChild(fobj);
           }
   
  @@ -202,10 +204,6 @@
   
       public boolean hasData() {
           return (rootFObj != null);
  -    }
  -
  -    public void setBufferManager(BufferManager bufferManager) {
  -        this.bufferManager = bufferManager;
       }
   
   }
  
  
  
  1.22      +222 -53   xml-fop/src/org/apache/fop/fo/FObj.java
  
  Index: FObj.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FObj.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- FObj.java	2001/11/06 08:34:50	1.21
  +++ FObj.java	2001/11/09 11:32:37	1.22
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FObj.java,v 1.21 2001/11/06 08:34:50 keiron Exp $
  + * $Id: FObj.java,v 1.22 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -9,33 +9,89 @@
   
   // FOP
   import org.apache.fop.layout.Area;
  +import org.apache.fop.layout.AreaClass;
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.datatypes.IDReferences;
   import org.apache.fop.fo.properties.FOPropertyMapping;
  +import org.apache.fop.layout.Area;
  +import org.apache.fop.layout.AreaClass;
  +import org.apache.fop.layout.LinkSet;
  +import org.apache.fop.system.BufferManager;
  +import org.apache.fop.fo.flow.Marker;
   
   import org.xml.sax.Attributes;
   
  +import java.util.Iterator;
  +import java.util.Vector;
  +import java.util.Hashtable;
  +
   /**
    * base class for representation of formatting objects and their processing
    */
   public class FObj extends FONode {
  -
       public PropertyList properties;
       protected PropertyManager propMgr;
  +    protected String areaClass = AreaClass.UNASSIGNED;
  +
  +    /**
  +     * value of marker before layout begins
  +     */
  +    public final static int START = -1000;
  +
  +    /**
  +     * value of marker after break-after
  +     */
  +    public final static int BREAK_AFTER = -1001;
  +
  +    /**
  +     * where the layout was up to.
  +     * for FObjs it is the child number
  +     * for FOText it is the character number
  +     */
  +    protected int marker = START;
  +
  +    protected Vector children = new Vector();    // made public for searching for id's
   
  -    protected String name;
  +    protected boolean isInTableCell = false;
   
  -    public FObj(FObj parent) {
  +    protected int forcedStartOffset = 0;
  +    protected int forcedWidth = 0;
  +
  +    protected int widows = 0;
  +    protected int orphans = 0;
  +
  +    protected LinkSet linkSet;
  +
  +    // count of areas generated-by/returned-by
  +    public int areasGenerated = 0;
  +
  +    // markers
  +    protected Hashtable markers;
  +
  +    public FObj(FONode parent) {
           super(parent);
  +        markers = new Hashtable();
  +        if (parent instanceof FObj)
  +            this.areaClass = ((FObj)parent).areaClass;
       }
   
       public void setName(String str) {
           name = "fo:" + str;
       }
   
  +    protected static PropertyListBuilder plb = null;
  +
       protected PropertyListBuilder getListBuilder() {
  -            PropertyListBuilder plb = new PropertyListBuilder();
  +        if(plb == null) {
  +            plb = new PropertyListBuilder();
               plb.addList(FOPropertyMapping.getGenericMappings());
  +
  +            for (Iterator iter = FOPropertyMapping.getElementMappings().iterator();
  +                    iter.hasNext(); ) {
  +                String elem = (String)iter.next();
  +                plb.addElementList(elem, FOPropertyMapping.getElementMapping(elem));
  +            }
  +        }
           return plb;
       }
   
  @@ -46,10 +102,17 @@
        */
       public void handleAttrs(Attributes attlist) throws FOPException {
           String uri = "http://www.w3.org/1999/XSL/Format";
  +        FONode par = parent;
  +        while(par != null && !(par instanceof FObj)) {
  +            par = par.parent;
  +        }
  +        PropertyList props = null;
  +        if(par != null) {
  +            props = ((FObj)par).properties;
  +        }
           properties =
                       getListBuilder().makeList(uri, name, attlist,
  -                                                (parent == null) ? null
  -                                                : parent.properties, parent);
  +                                                props, (FObj)par);
           properties.setFObj(this);
           this.propMgr = makePropertyManager(properties);
           setWritingMode();
  @@ -59,48 +122,8 @@
           return new PropertyManager(propertyList);
       }
   
  -    /**
  -     * adds characters (does nothing here)
  -     * @param data text
  -     * @param start start position
  -     * @param length length of the text
  -     */
  -    protected void addCharacters(char data[], int start, int length) {
  -        // ignore
  -    }
  -
  -    /**
  -     * generates the area or areas for this formatting object
  -     * and adds these to the area. This method should always be
  -     * overridden by all sub classes
  -     *
  -     * @param area
  -     */
  -    public Status layout(Area area) throws FOPException {
  -        // should always be overridden
  -        return new Status(Status.OK);
  -    }
  -
  -    /**
  -     * returns the name of the formatting object
  -     * @return the name of this formatting objects
  -     */
  -    public String getName() {
  -        return this.name;
  -    }
  -
  -    /**
  -     *
  -     */
  -    protected void start() {
  -        // do nothing by default
  -    }
  -
  -    /**
  -     *
  -     */
  -    protected void end() {
  -        // do nothing by default
  +    protected void addChild(FONode child) {
  +        children.addElement(child);
       }
   
       /**
  @@ -113,7 +136,6 @@
           return (properties.get(name));
       }
   
  -
       /**
        * Return the "content width" of the areas generated by this FO.
        * This is used by percent-based properties to get the dimension of
  @@ -158,12 +180,159 @@
        */
       protected void setWritingMode() {
           FObj p;
  -        FObj parent;
  +        FONode parent;
           for (p = this;
  -                !p.generatesReferenceAreas() && (parent = p.getParent()) != null;
  -                p = parent);
  +                !p.generatesReferenceAreas() && (parent = p.getParent()) != null && (parent instanceof FObj);
  +                p = (FObj)parent);
           this.properties.setWritingMode(p.getProperty("writing-mode").getEnum());
       }
   
  +    public void setIsInTableCell() {
  +        this.isInTableCell = true;
  +        // made recursive by Eric Schaeffer
  +        for (int i = 0; i < this.children.size(); i++) {
  +            Object obj = this.children.elementAt(i);
  +            if(obj instanceof FObj) {
  +                FObj child = (FObj)obj;
  +                child.setIsInTableCell();
  +            }
  +        }
  +    }
  +    
  +    public void forceStartOffset(int offset) {
  +        this.forcedStartOffset = offset; 
  +        // made recursive by Eric Schaeffer
  +        for (int i = 0; i < this.children.size(); i++) {
  +            Object obj = this.children.elementAt(i);
  +            if(obj instanceof FObj) {
  +                FObj child = (FObj)obj;
  +                child.forceStartOffset(offset);
  +            }
  +        }
  +    }
  +
  +    public void forceWidth(int width) {
  +        this.forcedWidth = width;
  +        // made recursive by Eric Schaeffer
  +        for (int i = 0; i < this.children.size(); i++) {
  +            Object obj = this.children.elementAt(i);
  +            if(obj instanceof FObj) {
  +                FObj child = (FObj)obj;
  +                child.forceWidth(width);
  +            }
  +        }
  +    }
  +
  +    public void resetMarker() {
  +        this.marker = START;
  +        int numChildren = this.children.size();
  +        for (int i = 0; i < numChildren; i++) {
  +            Object obj = this.children.elementAt(i);
  +            if(obj instanceof FObj) {
  +                FObj child = (FObj)obj;
  +                child.resetMarker();
  +            }
  +        }
  +    }
  +
  +    public void setWidows(int wid) {
  +        widows = wid;
  +    }
  +    
  +    public void setOrphans(int orph) {
  +        orphans = orph;
  +    }
  +
  +    public void removeAreas() {
  +        // still to do
  +    }
  +
  +    public void setLinkSet(LinkSet linkSet) {
  +        this.linkSet = linkSet;
  +        for (int i = 0; i < this.children.size(); i++) {
  +            Object obj = this.children.elementAt(i);
  +            if(obj instanceof FObj) {
  +                FObj child = (FObj)obj;
  +                child.setLinkSet(linkSet);
  +            }
  +        }
  +    }
  +
  +    public LinkSet getLinkSet() {
  +        return this.linkSet;
  +    }
  +
  +    /**
  +     * At the start of a new span area layout may be partway through a
  +     * nested FO, and balancing requires rollback to this known point.
  +     * The snapshot records exactly where layout is at.
  +     * @param snapshot a Vector of markers (Integer)
  +     * @returns the updated Vector of markers (Integers)
  +     */
  +    public Vector getMarkerSnapshot(Vector snapshot) {
  +        snapshot.addElement(new Integer(this.marker));
  +
  +        // terminate if no kids or child not yet accessed
  +        if (this.marker < 0)
  +            return snapshot;
  +        else if (children.isEmpty())
  +            return snapshot;
  +        else
  +            return ((FObj)children.elementAt(this.marker)).getMarkerSnapshot(snapshot);
  +    }
  +
  +    /**
  +     * When balancing occurs, the flow layout() method restarts at the
  +     * point specified by the current marker snapshot, which is retrieved
  +     * and restored using this method.
  +     * @param snapshot the Vector of saved markers (Integers)
  +     */
  +    public void rollback(Vector snapshot) {
  +        this.marker = ((Integer)snapshot.elementAt(0)).intValue();
  +        snapshot.removeElementAt(0);
  +
  +        if (this.marker == START) {
  +            // make sure all the children of this FO are also reset
  +            resetMarker();
  +            return;
  +        } else if ((this.marker == -1) || children.isEmpty())
  +            return;
  +
  +        int numChildren = this.children.size();
  +
  +        if (this.marker <= START) {
  +            return;
  +        }
  +
  +        for (int i = this.marker + 1; i < numChildren; i++) {
  +            Object obj = this.children.elementAt(i);
  +            if(obj instanceof FObj) {
  +                FObj child = (FObj)obj;
  +                child.resetMarker();
  +            }
  +        }
  +        ((FObj)children.elementAt(this.marker)).rollback(snapshot);
  +    }
  +
  +
  +    public void addMarker(Marker marker) throws FOPException {
  +        String mcname = marker.getMarkerClassName();
  +        if (!markers.containsKey(mcname) && children.isEmpty()) {
  +            markers.put(mcname, marker);
  +        } else {
  +            log.error("fo:marker must be an initial child,"
  +                                   + "and 'marker-class-name' must be unique for same parent");
  +            throw new FOPException("fo:marker must be an initial child,"
  +                                   + "and 'marker-class-name' must be unique for same parent");
  +        }
  +    }
  +
  +    public boolean hasMarkers() {
  +        return !markers.isEmpty();
  +    }
  +
  +    public Vector getMarkers() {
  +        return new Vector(markers.values());
  +    }
   }
   
  
  
  
  1.14      +41 -3     xml-fop/src/org/apache/fop/fo/FObjMixed.java
  
  Index: FObjMixed.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FObjMixed.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FObjMixed.java	2001/11/06 08:34:50	1.13
  +++ FObjMixed.java	2001/11/09 11:32:37	1.14
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FObjMixed.java,v 1.13 2001/11/06 08:34:50 keiron Exp $
  + * $Id: FObjMixed.java,v 1.14 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,20 +8,58 @@
   package org.apache.fop.fo;
   
   import org.apache.fop.layout.Area;
  +import org.apache.fop.layout.FontState;
   import org.apache.fop.apps.FOPException;
  +import org.apache.fop.datatypes.ColorType;
   
   /**
    * base class for representation of mixed content formatting objects
    * and their processing
    */
   public class FObjMixed extends FObj {
  +    FOText.TextInfo textInfo = null;
   
  -    public FObjMixed(FObj parent) {
  +    public FObjMixed(FONode parent) {
           super(parent);
       }
   
       protected void addCharacters(char data[], int start, int length) {
  -        addChild(new FOText(data, start, length, this));
  +        if(textInfo == null) {
  +            String fontFamily =
  +                getProperty("font-family").getString();
  +            String fontStyle =
  +                getProperty("font-style").getString();
  +            String fontWeight =
  +                getProperty("font-weight").getString();
  +            int fontSize =
  +                getProperty("font-size").getLength().mvalue();
  +            // font-variant support
  +            // added by Eric SCHAEFFER
  +            int fontVariant =
  +                getProperty("font-variant").getEnum();
  +
  +            //textInfo.fs = new FontState(area.getFontInfo(), fontFamily,
  +            //                        fontStyle, fontWeight, fontSize,
  +            //                        fontVariant);
  +
  +            ColorType c = getProperty("color").getColorType();
  +            textInfo.red = c.red();
  +            textInfo.green = c.green();
  +            textInfo.blue = c.blue();
  +
  +            textInfo.verticalAlign =
  +                getProperty("vertical-align").getEnum();
  +
  +            textInfo.wrapOption =
  +                getProperty("wrap-option").getEnum();
  +            textInfo.whiteSpaceCollapse =
  +                getProperty("white-space-collapse").getEnum();
  +
  +        }
  +
  +        FOText ft = new FOText(data, start, length, textInfo);
  +        ft.setLogger(log);
  +        addChild(ft);
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.6       +2 -3      xml-fop/src/org/apache/fop/fo/Title.java
  
  Index: Title.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Title.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Title.java	2001/11/06 08:34:50	1.5
  +++ Title.java	2001/11/09 11:32:37	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Title.java,v 1.5 2001/11/06 08:34:50 keiron Exp $
  + * $Id: Title.java,v 1.6 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -20,9 +20,8 @@
    */
   public class Title extends ToBeImplementedElement {
   
  -    public Title(FObj parent) {
  +    public Title(FONode parent) {
           super(parent);
  -        this.name = "fo:title";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.5       +2 -2      xml-fop/src/org/apache/fop/fo/ToBeImplementedElement.java
  
  Index: ToBeImplementedElement.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ToBeImplementedElement.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ToBeImplementedElement.java	2001/11/06 08:34:50	1.4
  +++ ToBeImplementedElement.java	2001/11/09 11:32:37	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ToBeImplementedElement.java,v 1.4 2001/11/06 08:34:50 keiron Exp $
  + * $Id: ToBeImplementedElement.java,v 1.5 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,7 +18,7 @@
    */
   public class ToBeImplementedElement extends FObj {
   
  -    protected ToBeImplementedElement(FObj parent) {
  +    protected ToBeImplementedElement(FONode parent) {
           super(parent);
       }
   
  
  
  
  1.4       +4 -4      xml-fop/src/org/apache/fop/fo/Unknown.java
  
  Index: Unknown.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Unknown.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Unknown.java	2001/11/06 08:34:51	1.3
  +++ Unknown.java	2001/11/09 11:32:37	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Unknown.java,v 1.3 2001/11/06 08:34:51 keiron Exp $
  + * $Id: Unknown.java,v 1.4 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -21,15 +21,15 @@
    * This prevents any further problems arising from the unknown
    * data.
    */
  -public class Unknown extends FObj {
  +public class Unknown extends FONode {
   
       public static class Maker extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new Unknown(parent);
           }
       }
   
  -    public Unknown(FObj parent) {
  +    public Unknown(FONode parent) {
           super(parent);
       }
   
  
  
  
  1.4       +3 -3      xml-fop/src/org/apache/fop/fo/UnknownXMLObj.java
  
  Index: UnknownXMLObj.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/UnknownXMLObj.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UnknownXMLObj.java	2001/11/06 08:34:51	1.3
  +++ UnknownXMLObj.java	2001/11/09 11:32:37	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: UnknownXMLObj.java,v 1.3 2001/11/06 08:34:51 keiron Exp $
  + * $Id: UnknownXMLObj.java,v 1.4 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -25,7 +25,7 @@
               space = sp;
           }
   
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new UnknownXMLObj(parent, space);
           }
       }
  @@ -36,7 +36,7 @@
        * @param parent the parent formatting object
        * @param propertyList the explicit properties of this object
        */
  -    protected UnknownXMLObj(FObj parent, String space) {
  +    protected UnknownXMLObj(FONode parent, String space) {
           super(parent);
           this.namespace = space;
       }
  
  
  
  1.3       +2 -2      xml-fop/src/org/apache/fop/fo/XMLElement.java
  
  Index: XMLElement.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/XMLElement.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLElement.java	2001/11/06 08:34:51	1.2
  +++ XMLElement.java	2001/11/09 11:32:37	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: XMLElement.java,v 1.2 2001/11/06 08:34:51 keiron Exp $
  + * $Id: XMLElement.java,v 1.3 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -27,7 +27,7 @@
        * @param parent the parent formatting object
        * @param propertyList the explicit properties of this object
        */
  -    public XMLElement(FObj parent) {
  +    public XMLElement(FONode parent) {
           super(parent);
       }
   
  
  
  
  1.5       +15 -33    xml-fop/src/org/apache/fop/fo/XMLObj.java
  
  Index: XMLObj.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/XMLObj.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLObj.java	2001/11/06 08:34:51	1.4
  +++ XMLObj.java	2001/11/09 11:32:37	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: XMLObj.java,v 1.4 2001/11/06 08:34:51 keiron Exp $
  + * $Id: XMLObj.java,v 1.5 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -22,11 +22,11 @@
   import java.util.*;
   
   /**
  - * Since SVG objects are not layed out then this class checks
  - * that this element is not being layed out inside some incorrect
  - * element.
  + * Generic XML object.
  + * This is used by xml objects (other than fo) than will build a DOM
  + * with each element.
    */
  -public abstract class XMLObj extends FObj {
  +public abstract class XMLObj extends FONode {
   
       // temp reference for attributes
       Attributes attr = null;
  @@ -39,7 +39,7 @@
        * @param parent the parent formatting object
        * @param propertyList the explicit properties of this object
        */
  -    public XMLObj(FObj parent) {
  +    public XMLObj(FONode parent) {
           super(parent);
       }
   
  @@ -52,9 +52,9 @@
       }
       public abstract String getNameSpace();
   
  -    protected static Hashtable ns = new Hashtable();
  +    protected static HashMap ns = new HashMap();
   
  -    public void addGraphic(Document doc, Element parent) {
  +    public void addElement(Document doc, Element parent) {
           this.doc = doc;
           element = doc.createElementNS(getNameSpace(), name);
   
  @@ -121,7 +121,12 @@
   
       protected void addChild(FONode child) {
           if (child instanceof XMLObj) {
  -            ((XMLObj)child).addGraphic(doc, element);
  +            ((XMLObj)child).addElement(doc, element);
  +        } else {
  +            // in theory someone might want to embed some defined
  +            // xml (eg. fo) inside the foreign xml
  +            // they could use a different namespace
  +            log.debug("Invalid element: " + child.getName() + " inside foreign xml markup");
           }
       }
   
  @@ -139,33 +144,10 @@
        */
       public Status layout(Area area) throws FOPException {
           /* generate a warning */
  -        log.error("" + this.name + " outside foreign xml");
  +        log.warn("" + this.name + " outside foreign xml");
   
           /* return status */
           return new Status(Status.OK);
       }
  -
  -    public void removeID(IDReferences idReferences) {}
  -
  -    /**
  -     * These method overrides prevent problems with the different types.
  -     */
  -    public void setIsInTableCell() {}
  -
  -    public void forceStartOffset(int offset) {}
  -
  -    public void forceWidth(int width) {}
  -
  -    public void resetMarker() {}
  -
  -    public void setLinkSet(LinkSet linkSet) {}
  -
  -    public Vector getMarkerSnapshot(Vector snapshot) {
  -        return snapshot;
  -    }
  -
  -    public void rollback(Vector snapshot) {}
  -
  -    protected void setWritingMode() {}
   }
   
  
  
  
  1.3       +4 -3      xml-fop/src/org/apache/fop/fo/expr/BodyStartFunction.java
  
  Index: BodyStartFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/expr/BodyStartFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BodyStartFunction.java	2001/07/30 20:29:21	1.2
  +++ BodyStartFunction.java	2001/11/09 11:32:37	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: BodyStartFunction.java,v 1.2 2001/07/30 20:29:21 tore Exp $
  + * $Id: BodyStartFunction.java,v 1.3 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -9,6 +9,7 @@
   
   import org.apache.fop.fo.Property;
   import org.apache.fop.fo.FObj;
  +import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.ListItem;
   
   public class BodyStartFunction extends FunctionBase {
  @@ -22,7 +23,7 @@
           Numeric distance =
               pInfo.getPropertyList().get("provisional-distance-between-starts").getNumeric();
   
  -        FObj item = pInfo.getFO();
  +        FONode item = pInfo.getFO();
           while (item != null &&!(item instanceof ListItem)) {
               item = item.getParent();
           }
  @@ -31,7 +32,7 @@
           }
   
           Numeric startIndent =
  -            item.properties.get("start-indent").getNumeric();
  +            ((ListItem)item).properties.get("start-indent").getNumeric();
   
           return new NumericProperty(distance.add(startIndent));
       }
  
  
  
  1.3       +5 -4      xml-fop/src/org/apache/fop/fo/expr/LabelEndFunction.java
  
  Index: LabelEndFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/expr/LabelEndFunction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LabelEndFunction.java	2001/07/30 20:29:21	1.2
  +++ LabelEndFunction.java	2001/11/09 11:32:37	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: LabelEndFunction.java,v 1.2 2001/07/30 20:29:21 tore Exp $
  + * $Id: LabelEndFunction.java,v 1.3 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -11,6 +11,7 @@
   import org.apache.fop.fo.Property;
   import org.apache.fop.fo.LengthProperty;
   import org.apache.fop.fo.FObj;
  +import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.ListItem;
   
   public class LabelEndFunction extends FunctionBase {
  @@ -27,19 +28,19 @@
           Length separation =
               pInfo.getPropertyList().getNearestSpecified("provisional-label-separation").getLength();
   
  -        FObj item = pInfo.getFO();
  +        FONode item = pInfo.getFO();
           while (item != null &&!(item instanceof ListItem)) {
               item = item.getParent();
           }
           if (item == null) {
               throw new PropertyException("label-end() called from outside an fo:list-item");
           }
  -        Length startIndent = item.properties.get("start-indent").getLength();
  +        Length startIndent = ((ListItem)item).properties.get("start-indent").getLength();
   
           LinearCombinationLength labelEnd = new LinearCombinationLength();
   
           // Should be CONTAINING_REFAREA but that doesn't work
  -        LengthBase base = new LengthBase(item, pInfo.getPropertyList(),
  +        LengthBase base = new LengthBase((ListItem)item, pInfo.getPropertyList(),
                                            LengthBase.CONTAINING_BOX);
           PercentLength refWidth = new PercentLength(1.0, base);
   
  
  
  
  1.10      +4 -4      xml-fop/src/org/apache/fop/fo/flow/BasicLink.java
  
  Index: BasicLink.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/BasicLink.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BasicLink.java	2001/11/06 08:34:51	1.9
  +++ BasicLink.java	2001/11/09 11:32:37	1.10
  @@ -1,5 +1,5 @@
   /*
  - * $Id: BasicLink.java,v 1.9 2001/11/06 08:34:51 keiron Exp $
  + * $Id: BasicLink.java,v 1.10 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -20,9 +20,8 @@
   
   public class BasicLink extends Inline {
   
  -    public BasicLink(FObj parent) {
  +    public BasicLink(FONode parent) {
           super(parent);
  -        this.name = "fo:basic-link";
       }
   
       public Status layout(Area area) throws FOPException {
  @@ -94,7 +93,8 @@
           int numChildren = this.children.size();
           for (int i = this.marker; i < numChildren; i++) {
               FONode fo = (FONode)children.elementAt(i);
  -            fo.setLinkSet(ls);
  +            if(fo instanceof FObj)
  +                ((FObj)fo).setLinkSet(ls);
   
               Status status;
               if ((status = fo.layout(area)).isIncomplete()) {
  
  
  
  1.6       +2 -3      xml-fop/src/org/apache/fop/fo/flow/BidiOverride.java
  
  Index: BidiOverride.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/BidiOverride.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BidiOverride.java	2001/11/06 08:34:51	1.5
  +++ BidiOverride.java	2001/11/09 11:32:37	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: BidiOverride.java,v 1.5 2001/11/06 08:34:51 keiron Exp $
  + * $Id: BidiOverride.java,v 1.6 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -19,9 +19,8 @@
    */
   public class BidiOverride extends ToBeImplementedElement {
   
  -    public BidiOverride(FObj parent) {
  +    public BidiOverride(FONode parent) {
           super(parent);
  -        this.name = "fo:bidi-override";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.43      +6 -9      xml-fop/src/org/apache/fop/fo/flow/Block.java
  
  Index: Block.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Block.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- Block.java	2001/11/06 08:34:51	1.42
  +++ Block.java	2001/11/09 11:32:37	1.43
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Block.java,v 1.42 2001/11/06 08:34:51 keiron Exp $
  + * $Id: Block.java,v 1.43 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -56,9 +56,8 @@
       // this may be helpful on other FOs too
       boolean anythingLaidOut = false;
   
  -    public Block(FObj parent) {
  +    public Block(FONode parent) {
           super(parent);
  -        this.name = "fo:block";
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  @@ -153,8 +152,6 @@
               this.blockOrphans =
                   this.properties.get("orphans").getNumber().intValue();
   
  -
  -
               this.id = this.properties.get("id").getString();
   
               if (area instanceof BlockArea) {
  @@ -178,7 +175,7 @@
                   FONode fo = (FONode)children.elementAt(i);
                   if (fo instanceof FOText) {
                       if (((FOText)fo).willCreateArea()) {
  -                        fo.setWidows(blockWidows);
  +                        //fo.setWidows(blockWidows);
                           break;
                       } else {
                           children.removeElementAt(i);
  @@ -186,7 +183,7 @@
                           i--;
                       }
                   } else {
  -                    fo.setWidows(blockWidows);
  +                    //fo.setWidows(blockWidows);
                       break;
                   }
               }
  @@ -195,11 +192,11 @@
                   FONode fo = (FONode)children.elementAt(i);
                   if (fo instanceof FOText) {
                       if (((FOText)fo).willCreateArea()) {
  -                        fo.setOrphans(blockOrphans);
  +                        //fo.setOrphans(blockOrphans);
                           break;
                       }
                   } else {
  -                    fo.setOrphans(blockOrphans);
  +                    //fo.setOrphans(blockOrphans);
                       break;
                   }
               }
  
  
  
  1.13      +2 -3      xml-fop/src/org/apache/fop/fo/flow/BlockContainer.java
  
  Index: BlockContainer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/BlockContainer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- BlockContainer.java	2001/11/06 08:34:51	1.12
  +++ BlockContainer.java	2001/11/09 11:32:37	1.13
  @@ -1,5 +1,5 @@
   /*
  - * $Id: BlockContainer.java,v 1.12 2001/11/06 08:34:51 keiron Exp $
  + * $Id: BlockContainer.java,v 1.13 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -39,9 +39,8 @@
   
       PageSequence pageSequence;
   
  -    public BlockContainer(FObj parent) {
  +    public BlockContainer(FONode parent) {
           super(parent);
  -        this.name = "fo:block-container";
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  
  
  
  1.14      +3 -3      xml-fop/src/org/apache/fop/fo/flow/Character.java
  
  Index: Character.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Character.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Character.java	2001/11/06 08:34:51	1.13
  +++ Character.java	2001/11/09 11:32:37	1.14
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Character.java,v 1.13 2001/11/06 08:34:51 keiron Exp $
  + * $Id: Character.java,v 1.14 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -37,7 +37,7 @@
       public final static int OK = 0;
       public final static int DOESNOT_FIT = 1;
   
  -    public Character(FObj parent) {
  +    public Character(FONode parent) {
           super(parent);
           this.name = "fo:character";
       }
  @@ -102,7 +102,7 @@
   
           int whiteSpaceCollapse =
               this.properties.get("white-space-collapse").getEnum();
  -        int wrapOption = this.parent.properties.get("wrap-option").getEnum();
  +        int wrapOption = ((FObj)this.parent).properties.get("wrap-option").getEnum();
   
           int tmp = this.properties.get("text-decoration").getEnum();
           if (tmp == org.apache.fop.fo.properties.TextDecoration.UNDERLINE) {
  
  
  
  1.15      +2 -3      xml-fop/src/org/apache/fop/fo/flow/ExternalGraphic.java
  
  Index: ExternalGraphic.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ExternalGraphic.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ExternalGraphic.java	2001/11/06 08:34:51	1.14
  +++ ExternalGraphic.java	2001/11/09 11:32:37	1.15
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ExternalGraphic.java,v 1.14 2001/11/06 08:34:51 keiron Exp $
  + * $Id: ExternalGraphic.java,v 1.15 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -36,9 +36,8 @@
   
       ImageArea imageArea;
   
  -    public ExternalGraphic(FObj parent) {
  +    public ExternalGraphic(FONode parent) {
           super(parent);
  -        this.name = "fo:external-graphic";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.6       +2 -2      xml-fop/src/org/apache/fop/fo/flow/Float.java
  
  Index: Float.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Float.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Float.java	2001/11/06 08:34:51	1.5
  +++ Float.java	2001/11/09 11:32:37	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Float.java,v 1.5 2001/11/06 08:34:51 keiron Exp $
  + * $Id: Float.java,v 1.6 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,7 +18,7 @@
    */
   public class Float extends ToBeImplementedElement {
   
  -    public Float(FObj parent) {
  +    public Float(FONode parent) {
           super(parent);
           this.name = "fo:float";
       }
  
  
  
  1.26      +2 -2      xml-fop/src/org/apache/fop/fo/flow/Flow.java
  
  Index: Flow.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Flow.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- Flow.java	2001/11/06 08:34:51	1.25
  +++ Flow.java	2001/11/09 11:32:37	1.26
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Flow.java,v 1.25 2001/11/06 08:34:51 keiron Exp $
  + * $Id: Flow.java,v 1.26 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -52,7 +52,7 @@
       private Status _status = new Status(Status.AREA_FULL_NONE);
   
   
  -    public Flow(FObj parent) {
  +    public Flow(FONode parent) {
           super(parent);
           this.name = getElementName();
       }
  
  
  
  1.8       +2 -2      xml-fop/src/org/apache/fop/fo/flow/Footnote.java
  
  Index: Footnote.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Footnote.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Footnote.java	2001/11/06 08:34:51	1.7
  +++ Footnote.java	2001/11/09 11:32:37	1.8
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Footnote.java,v 1.7 2001/11/06 08:34:51 keiron Exp $
  + * $Id: Footnote.java,v 1.8 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -20,7 +20,7 @@
   
   public class Footnote extends FObj {
   
  -    public Footnote(FObj parent) {
  +    public Footnote(FONode parent) {
           super(parent);
           this.name = "fo:footnote";
       }
  
  
  
  1.8       +2 -2      xml-fop/src/org/apache/fop/fo/flow/FootnoteBody.java
  
  Index: FootnoteBody.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/FootnoteBody.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FootnoteBody.java	2001/11/06 08:34:51	1.7
  +++ FootnoteBody.java	2001/11/09 11:32:37	1.8
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FootnoteBody.java,v 1.7 2001/11/06 08:34:51 keiron Exp $
  + * $Id: FootnoteBody.java,v 1.8 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -27,7 +27,7 @@
       int endIndent;
       int textIndent;
   
  -    public FootnoteBody(FObj parent) {
  +    public FootnoteBody(FONode parent) {
           super(parent);
           this.name = "fo:footnote-body";
       }
  
  
  
  1.6       +2 -3      xml-fop/src/org/apache/fop/fo/flow/InitialPropertySet.java
  
  Index: InitialPropertySet.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/InitialPropertySet.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InitialPropertySet.java	2001/11/06 08:34:51	1.5
  +++ InitialPropertySet.java	2001/11/09 11:32:37	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: InitialPropertySet.java,v 1.5 2001/11/06 08:34:51 keiron Exp $
  + * $Id: InitialPropertySet.java,v 1.6 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -19,9 +19,8 @@
    */
   public class InitialPropertySet extends ToBeImplementedElement {
   
  -    public InitialPropertySet(FObj parent) {
  +    public InitialPropertySet(FONode parent) {
           super(parent);
  -        this.name = "fo:initial-property-set";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.10      +2 -12     xml-fop/src/org/apache/fop/fo/flow/Inline.java
  
  Index: Inline.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Inline.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Inline.java	2001/11/06 08:34:51	1.9
  +++ Inline.java	2001/11/09 11:32:37	1.10
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Inline.java,v 1.9 2001/11/06 08:34:51 keiron Exp $
  + * $Id: Inline.java,v 1.10 2001/11/09 11:32:37 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -26,9 +26,8 @@
       protected boolean lineThrough = false;
   
   
  -    public Inline(FObj parent) {
  +    public Inline(FONode parent) {
           super(parent);
  -        this.name = "fo:inline";
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  @@ -86,15 +85,6 @@
           if (textDecoration == TextDecoration.LINE_THROUGH) {
               this.lineThrough = true;
           }
  -    }
  -
  -    protected void addCharacters(char data[], int start, int length) {
  -        FOText ft = new FOText(data, start, length, this);
  -        ft.setLogger(log);
  -        ft.setUnderlined(underlined);
  -        ft.setOverlined(overlined);
  -        ft.setLineThrough(lineThrough);
  -        children.addElement(ft);
       }
   
   }
  
  
  
  1.6       +2 -3      xml-fop/src/org/apache/fop/fo/flow/InlineContainer.java
  
  Index: InlineContainer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/InlineContainer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InlineContainer.java	2001/11/06 08:34:51	1.5
  +++ InlineContainer.java	2001/11/09 11:32:38	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: InlineContainer.java,v 1.5 2001/11/06 08:34:51 keiron Exp $
  + * $Id: InlineContainer.java,v 1.6 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -20,9 +20,8 @@
    */
   public class InlineContainer extends ToBeImplementedElement {
   
  -    public InlineContainer(FObj parent) {
  +    public InlineContainer(FONode parent) {
           super(parent);
  -        this.name = "fo:inline-container";
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  
  
  
  1.16      +2 -4      xml-fop/src/org/apache/fop/fo/flow/InstreamForeignObject.java
  
  Index: InstreamForeignObject.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/InstreamForeignObject.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- InstreamForeignObject.java	2001/11/06 08:34:51	1.15
  +++ InstreamForeignObject.java	2001/11/09 11:32:38	1.16
  @@ -1,5 +1,5 @@
   /*
  - * $Id: InstreamForeignObject.java,v 1.15 2001/11/06 08:34:51 keiron Exp $
  + * $Id: InstreamForeignObject.java,v 1.16 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -45,9 +45,8 @@
        * @param parent the parent formatting object
        * @param propertyList the explicit properties of this object
        */
  -    public InstreamForeignObject(FObj parent) {
  +    public InstreamForeignObject(FONode parent) {
           super(parent);
  -        this.name = "fo:instream-foreign-object";
       }
   
       /**
  @@ -164,7 +163,6 @@
                   if (this.children.size() > 0) {
                       FONode fo = (FONode)children.elementAt(0);
                       Status status;
  -                    // currently FONode must be an SVG
                       if ((status =
                               fo.layout(this.areaCurrent)).isIncomplete()) {
                           return status;
  
  
  
  1.15      +2 -3      xml-fop/src/org/apache/fop/fo/flow/Leader.java
  
  Index: Leader.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Leader.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Leader.java	2001/11/06 08:34:51	1.14
  +++ Leader.java	2001/11/09 11:32:38	1.15
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Leader.java,v 1.14 2001/11/06 08:34:51 keiron Exp $
  + * $Id: Leader.java,v 1.15 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -25,9 +25,8 @@
    */
   public class Leader extends FObjMixed {
   
  -    public Leader(FObj parent) {
  +    public Leader(FONode parent) {
           super(parent);
  -        this.name = "fo:leader";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.23      +2 -3      xml-fop/src/org/apache/fop/fo/flow/ListBlock.java
  
  Index: ListBlock.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListBlock.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ListBlock.java	2001/11/06 08:34:51	1.22
  +++ ListBlock.java	2001/11/09 11:32:38	1.23
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ListBlock.java,v 1.22 2001/11/06 08:34:51 keiron Exp $
  + * $Id: ListBlock.java,v 1.23 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -33,9 +33,8 @@
       int spaceBetweenListRows = 0;
       ColorType backgroundColor;
   
  -    public ListBlock(FObj parent) {
  +    public ListBlock(FONode parent) {
           super(parent);
  -        this.name = "fo:list-block";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.18      +2 -2      xml-fop/src/org/apache/fop/fo/flow/ListItem.java
  
  Index: ListItem.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListItem.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ListItem.java	2001/11/06 08:34:51	1.17
  +++ ListItem.java	2001/11/09 11:32:38	1.18
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ListItem.java,v 1.17 2001/11/06 08:34:51 keiron Exp $
  + * $Id: ListItem.java,v 1.18 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -32,7 +32,7 @@
       String id;
       BlockArea blockArea;
   
  -    public ListItem(FObj parent) {
  +    public ListItem(FONode parent) {
           super(parent);
           this.name = "fo:list-item";
       }
  
  
  
  1.13      +2 -2      xml-fop/src/org/apache/fop/fo/flow/ListItemBody.java
  
  Index: ListItemBody.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListItemBody.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ListItemBody.java	2001/11/06 08:34:51	1.12
  +++ ListItemBody.java	2001/11/09 11:32:38	1.13
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ListItemBody.java,v 1.12 2001/11/06 08:34:51 keiron Exp $
  + * $Id: ListItemBody.java,v 1.13 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -19,7 +19,7 @@
   
   public class ListItemBody extends FObj {
   
  -    public ListItemBody(FObj parent) {
  +    public ListItemBody(FONode parent) {
           super(parent);
           this.name = "fo:list-item-body";
       }
  
  
  
  1.13      +2 -2      xml-fop/src/org/apache/fop/fo/flow/ListItemLabel.java
  
  Index: ListItemLabel.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListItemLabel.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ListItemLabel.java	2001/11/06 08:34:51	1.12
  +++ ListItemLabel.java	2001/11/09 11:32:38	1.13
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ListItemLabel.java,v 1.12 2001/11/06 08:34:51 keiron Exp $
  + * $Id: ListItemLabel.java,v 1.13 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -19,7 +19,7 @@
   
   public class ListItemLabel extends FObj {
   
  -    public ListItemLabel(FObj parent) {
  +    public ListItemLabel(FONode parent) {
           super(parent);
           this.name = "fo:list-item-label";
       }
  
  
  
  1.8       +5 -7      xml-fop/src/org/apache/fop/fo/flow/Marker.java
  
  Index: Marker.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Marker.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Marker.java	2001/11/06 08:34:51	1.7
  +++ Marker.java	2001/11/09 11:32:38	1.8
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Marker.java,v 1.7 2001/11/06 08:34:51 keiron Exp $
  + * $Id: Marker.java,v 1.8 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -21,9 +21,8 @@
       private String markerClassName;
       private Area registryArea;
   
  -    public Marker(FObj parent) {
  +    public Marker(FONode parent) {
           super(parent);
  -        this.name = "fo:marker";
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  @@ -36,11 +35,10 @@
           // check to ensure that no other marker with same parent
           // has this 'marker-class-name' is in addMarker() method
           try {
  -            parent.addMarker(this);
  +            ((FObj)parent).addMarker(this);
           } catch (FOPException fopex) {
  -            // log is null in constructor
  -            //log.error("marker cannot be added to '" + parent
  -            //                     + "'");
  +            log.error("marker cannot be added to '" + parent
  +                                 + "'");
           }
       }
   
  
  
  
  1.6       +2 -3      xml-fop/src/org/apache/fop/fo/flow/MultiCase.java
  
  Index: MultiCase.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/MultiCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MultiCase.java	2001/11/06 08:34:51	1.5
  +++ MultiCase.java	2001/11/09 11:32:38	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: MultiCase.java,v 1.5 2001/11/06 08:34:51 keiron Exp $
  + * $Id: MultiCase.java,v 1.6 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,9 +18,8 @@
    */
   public class MultiCase extends ToBeImplementedElement {
   
  -    public MultiCase(FObj parent) {
  +    public MultiCase(FONode parent) {
           super(parent);
  -        this.name = "fo:multi-case";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.6       +2 -2      xml-fop/src/org/apache/fop/fo/flow/MultiProperties.java
  
  Index: MultiProperties.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/MultiProperties.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MultiProperties.java	2001/11/06 08:34:51	1.5
  +++ MultiProperties.java	2001/11/09 11:32:38	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: MultiProperties.java,v 1.5 2001/11/06 08:34:51 keiron Exp $
  + * $Id: MultiProperties.java,v 1.6 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,7 +18,7 @@
    */
   public class MultiProperties extends ToBeImplementedElement {
   
  -    public MultiProperties(FObj parent) {
  +    public MultiProperties(FONode parent) {
           super(parent);
           this.name = "fo:multi-properties";
       }
  
  
  
  1.6       +2 -2      xml-fop/src/org/apache/fop/fo/flow/MultiPropertySet.java
  
  Index: MultiPropertySet.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/MultiPropertySet.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MultiPropertySet.java	2001/11/06 08:34:51	1.5
  +++ MultiPropertySet.java	2001/11/09 11:32:38	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: MultiPropertySet.java,v 1.5 2001/11/06 08:34:51 keiron Exp $
  + * $Id: MultiPropertySet.java,v 1.6 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,7 +18,7 @@
    */
   public class MultiPropertySet extends ToBeImplementedElement {
   
  -    public MultiPropertySet(FObj parent) {
  +    public MultiPropertySet(FONode parent) {
           super(parent);
           this.name = "fo:multi-property-set";
       }
  
  
  
  1.6       +2 -2      xml-fop/src/org/apache/fop/fo/flow/MultiSwitch.java
  
  Index: MultiSwitch.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/MultiSwitch.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MultiSwitch.java	2001/11/06 08:34:51	1.5
  +++ MultiSwitch.java	2001/11/09 11:32:38	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: MultiSwitch.java,v 1.5 2001/11/06 08:34:51 keiron Exp $
  + * $Id: MultiSwitch.java,v 1.6 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,7 +18,7 @@
    */
   public class MultiSwitch extends ToBeImplementedElement {
   
  -    public MultiSwitch(FObj parent) {
  +    public MultiSwitch(FONode parent) {
           super(parent);
           this.name = "fo:multi-switch";
       }
  
  
  
  1.6       +2 -2      xml-fop/src/org/apache/fop/fo/flow/MultiToggle.java
  
  Index: MultiToggle.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/MultiToggle.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MultiToggle.java	2001/11/06 08:34:51	1.5
  +++ MultiToggle.java	2001/11/09 11:32:38	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: MultiToggle.java,v 1.5 2001/11/06 08:34:51 keiron Exp $
  + * $Id: MultiToggle.java,v 1.6 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,7 +18,7 @@
    */
   public class MultiToggle extends ToBeImplementedElement {
   
  -    public MultiToggle(FObj parent) {
  +    public MultiToggle(FONode parent) {
           super(parent);
           this.name = "fo:multi-toggle";
       }
  
  
  
  1.23      +2 -3      xml-fop/src/org/apache/fop/fo/flow/PageNumber.java
  
  Index: PageNumber.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/PageNumber.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- PageNumber.java	2001/11/06 08:34:51	1.22
  +++ PageNumber.java	2001/11/09 11:32:38	1.23
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PageNumber.java,v 1.22 2001/11/06 08:34:51 keiron Exp $
  + * $Id: PageNumber.java,v 1.23 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -27,9 +27,8 @@
       int whiteSpaceCollapse;
       TextState ts;
   
  -    public PageNumber(FObj parent) {
  +    public PageNumber(FONode parent) {
           super(parent);
  -        this.name = "fo:page-number";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.21      +2 -3      xml-fop/src/org/apache/fop/fo/flow/PageNumberCitation.java
  
  Index: PageNumberCitation.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/PageNumberCitation.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- PageNumberCitation.java	2001/11/06 08:34:51	1.20
  +++ PageNumberCitation.java	2001/11/09 11:32:38	1.21
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PageNumberCitation.java,v 1.20 2001/11/06 08:34:51 keiron Exp $
  + * $Id: PageNumberCitation.java,v 1.21 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -84,9 +84,8 @@
       TextState ts;
   
   
  -    public PageNumberCitation(FObj parent) {
  +    public PageNumberCitation(FONode parent) {
           super(parent);
  -        this.name = "fo:page-number-citation";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.8       +2 -2      xml-fop/src/org/apache/fop/fo/flow/RetrieveMarker.java
  
  Index: RetrieveMarker.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/RetrieveMarker.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RetrieveMarker.java	2001/11/06 08:34:51	1.7
  +++ RetrieveMarker.java	2001/11/09 11:32:38	1.8
  @@ -1,5 +1,5 @@
   /*
  - * $Id: RetrieveMarker.java,v 1.7 2001/11/06 08:34:51 keiron Exp $
  + * $Id: RetrieveMarker.java,v 1.8 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -25,7 +25,7 @@
       private int retrievePosition;
       private int retrieveBoundary;
   
  -    public RetrieveMarker(FObj parent) {
  +    public RetrieveMarker(FONode parent) {
           super(parent);
           this.name = "fo:retrieve-marker";
       }
  
  
  
  1.20      +2 -2      xml-fop/src/org/apache/fop/fo/flow/StaticContent.java
  
  Index: StaticContent.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/StaticContent.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- StaticContent.java	2001/11/06 08:34:51	1.19
  +++ StaticContent.java	2001/11/09 11:32:38	1.20
  @@ -1,5 +1,5 @@
   /*
  - * $Id: StaticContent.java,v 1.19 2001/11/06 08:34:51 keiron Exp $
  + * $Id: StaticContent.java,v 1.20 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -19,7 +19,7 @@
   
   public class StaticContent extends Flow {
   
  -    public StaticContent(FObj parent) {
  +    public StaticContent(FONode parent) {
           super(parent);
           ((PageSequence)parent).setIsFlowSet(false);    // hacquery of sorts
       }
  
  
  
  1.41      +4 -4      xml-fop/src/org/apache/fop/fo/flow/Table.java
  
  Index: Table.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Table.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- Table.java	2001/11/06 08:34:51	1.40
  +++ Table.java	2001/11/09 11:32:38	1.41
  @@ -1,5 +1,5 @@
   /*
  - * -- $Id: Table.java,v 1.40 2001/11/06 08:34:51 keiron Exp $ --
  + * -- $Id: Table.java,v 1.41 2001/11/09 11:32:38 keiron Exp $ --
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -47,7 +47,7 @@
   
       AreaContainer areaContainer;
   
  -    public Table(FObj parent) {
  +    public Table(FONode parent) {
           super(parent);
           this.name = "fo:table";
       }
  @@ -228,8 +228,8 @@
                       addedFooter = true;
                       tableFooter.resetMarker();
                   }
  -                fo.setWidows(widows);
  -                fo.setOrphans(orphans);
  +                //fo.setWidows(widows);
  +                //fo.setOrphans(orphans);
                   ((TableBody)fo).setColumns(columns);
   
                   if ((status = fo.layout(areaContainer)).isIncomplete()) {
  
  
  
  1.6       +2 -3      xml-fop/src/org/apache/fop/fo/flow/TableAndCaption.java
  
  Index: TableAndCaption.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableAndCaption.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TableAndCaption.java	2001/11/06 08:34:51	1.5
  +++ TableAndCaption.java	2001/11/09 11:32:38	1.6
  @@ -1,5 +1,5 @@
   /*
  - * -- $Id: TableAndCaption.java,v 1.5 2001/11/06 08:34:51 keiron Exp $ --
  + * -- $Id: TableAndCaption.java,v 1.6 2001/11/09 11:32:38 keiron Exp $ --
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,9 +18,8 @@
    */
   public class TableAndCaption extends ToBeImplementedElement {
   
  -    public TableAndCaption(FObj parent) {
  +    public TableAndCaption(FONode parent) {
           super(parent);
  -        this.name = "fo:table-and-caption";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.40      +2 -2      xml-fop/src/org/apache/fop/fo/flow/TableBody.java
  
  Index: TableBody.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableBody.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- TableBody.java	2001/11/06 08:34:51	1.39
  +++ TableBody.java	2001/11/09 11:32:38	1.40
  @@ -1,5 +1,5 @@
   /*
  - * $Id: TableBody.java,v 1.39 2001/11/06 08:34:51 keiron Exp $
  + * $Id: TableBody.java,v 1.40 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -30,7 +30,7 @@
   
       AreaContainer areaContainer;
   
  -    public TableBody(FObj parent) {
  +    public TableBody(FONode parent) {
           super(parent);
           this.name = "fo:table-body";
       }
  
  
  
  1.6       +2 -3      xml-fop/src/org/apache/fop/fo/flow/TableCaption.java
  
  Index: TableCaption.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableCaption.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TableCaption.java	2001/11/06 08:34:51	1.5
  +++ TableCaption.java	2001/11/09 11:32:38	1.6
  @@ -1,5 +1,5 @@
   /*
  - * -- $Id: TableCaption.java,v 1.5 2001/11/06 08:34:51 keiron Exp $ --
  + * -- $Id: TableCaption.java,v 1.6 2001/11/09 11:32:38 keiron Exp $ --
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,9 +18,8 @@
    */
   public class TableCaption extends ToBeImplementedElement {
   
  -    public TableCaption(FObj parent) {
  +    public TableCaption(FONode parent) {
           super(parent);
  -        this.name = "fo:table-caption";
       }
   
       public Status layout(Area area) throws FOPException {
  
  
  
  1.41      +2 -2      xml-fop/src/org/apache/fop/fo/flow/TableCell.java
  
  Index: TableCell.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableCell.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- TableCell.java	2001/11/06 08:34:51	1.40
  +++ TableCell.java	2001/11/09 11:32:38	1.41
  @@ -1,5 +1,5 @@
   /*
  - * -- $Id: TableCell.java,v 1.40 2001/11/06 08:34:51 keiron Exp $ --
  + * -- $Id: TableCell.java,v 1.41 2001/11/09 11:32:38 keiron Exp $ --
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -86,7 +86,7 @@
   
       AreaContainer cellArea;
   
  -    public TableCell(FObj parent) {
  +    public TableCell(FONode parent) {
           super(parent);
           this.name = "fo:table-cell";
       }
  
  
  
  1.22      +2 -2      xml-fop/src/org/apache/fop/fo/flow/TableColumn.java
  
  Index: TableColumn.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableColumn.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- TableColumn.java	2001/11/06 08:34:51	1.21
  +++ TableColumn.java	2001/11/09 11:32:38	1.22
  @@ -1,5 +1,5 @@
   /*
  - * $Id: TableColumn.java,v 1.21 2001/11/06 08:34:51 keiron Exp $
  + * $Id: TableColumn.java,v 1.22 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -28,7 +28,7 @@
   
       AreaContainer areaContainer;
   
  -    public TableColumn(FObj parent) {
  +    public TableColumn(FONode parent) {
           super(parent);
           this.name = "fo:table-column";
       }
  
  
  
  1.5       +2 -2      xml-fop/src/org/apache/fop/fo/flow/TableFooter.java
  
  Index: TableFooter.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableFooter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TableFooter.java	2001/11/06 08:34:51	1.4
  +++ TableFooter.java	2001/11/09 11:32:38	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: TableFooter.java,v 1.4 2001/11/06 08:34:51 keiron Exp $
  + * $Id: TableFooter.java,v 1.5 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -24,7 +24,7 @@
           areaContainer.setYPosition(value + 2 * spaceBefore);
       }
   
  -    public TableFooter(FObj parent) {
  +    public TableFooter(FONode parent) {
           super(parent);
           this.name = "fo:table-footer";
       }
  
  
  
  1.4       +2 -2      xml-fop/src/org/apache/fop/fo/flow/TableHeader.java
  
  Index: TableHeader.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableHeader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TableHeader.java	2001/11/06 08:34:51	1.3
  +++ TableHeader.java	2001/11/09 11:32:38	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: TableHeader.java,v 1.3 2001/11/06 08:34:51 keiron Exp $
  + * $Id: TableHeader.java,v 1.4 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -16,7 +16,7 @@
   
   public class TableHeader extends TableBody {
   
  -    public TableHeader(FObj parent) {
  +    public TableHeader(FONode parent) {
           super(parent);
           this.name = "fo:table-header";
       }
  
  
  
  1.53      +2 -3      xml-fop/src/org/apache/fop/fo/flow/TableRow.java
  
  Index: TableRow.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/TableRow.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- TableRow.java	2001/11/06 08:34:51	1.52
  +++ TableRow.java	2001/11/09 11:32:38	1.53
  @@ -1,5 +1,5 @@
   /*
  - * -- $Id: TableRow.java,v 1.52 2001/11/06 08:34:51 keiron Exp $ --
  + * -- $Id: TableRow.java,v 1.53 2001/11/09 11:32:38 keiron Exp $ --
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -160,9 +160,8 @@
       }
   
   
  -    public TableRow(FObj parent) {
  +    public TableRow(FONode parent) {
           super(parent);
  -        this.name = "fo:table-row";
       }
   
       public void setColumns(Vector columns) {
  
  
  
  1.6       +2 -8      xml-fop/src/org/apache/fop/fo/flow/Wrapper.java
  
  Index: Wrapper.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Wrapper.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Wrapper.java	2001/11/06 08:34:51	1.5
  +++ Wrapper.java	2001/11/09 11:32:38	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Wrapper.java,v 1.5 2001/11/06 08:34:51 keiron Exp $
  + * $Id: Wrapper.java,v 1.6 2001/11/09 11:32:38 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -23,15 +23,9 @@
    */
   public class Wrapper extends FObjMixed {
   
  -    public Wrapper(FObj parent) {
  +    public Wrapper(FONode parent) {
           super(parent);
           // check that this occurs inside an fo:flow
  -    }
  -
  -    protected void addCharacters(char data[], int start, int length) {
  -        FOText ft = new FOText(data, start, length, this);
  -        ft.setLogger(log);
  -        children.addElement(ft);
       }
   
   }
  
  
  
  1.7       +3 -3      xml-fop/src/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java
  
  Index: ConditionalPageMasterReference.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ConditionalPageMasterReference.java	2001/11/06 08:34:53	1.6
  +++ ConditionalPageMasterReference.java	2001/11/09 11:32:40	1.7
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ConditionalPageMasterReference.java,v 1.6 2001/11/06 08:34:53 keiron Exp $
  + * $Id: ConditionalPageMasterReference.java,v 1.7 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -23,7 +23,7 @@
       private int oddOrEven;
       private int blankOrNotBlank;
   
  -    public ConditionalPageMasterReference(FObj parent) {
  +    public ConditionalPageMasterReference(FONode parent) {
           super(parent);
   
           this.name = getElementName();
  @@ -132,7 +132,7 @@
       }
   
   
  -    protected void validateParent(FObj parent) throws FOPException {
  +    protected void validateParent(FONode parent) throws FOPException {
           if (parent.getName().equals("fo:repeatable-page-master-alternatives")) {
               this.repeatablePageMasterAlternatives =
                   (RepeatablePageMasterAlternatives)parent;
  
  
  
  1.12      +2 -3      xml-fop/src/org/apache/fop/fo/pagination/LayoutMasterSet.java
  
  Index: LayoutMasterSet.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/LayoutMasterSet.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- LayoutMasterSet.java	2001/11/06 08:34:53	1.11
  +++ LayoutMasterSet.java	2001/11/09 11:32:40	1.12
  @@ -1,5 +1,5 @@
   /*
  - * $Id: LayoutMasterSet.java,v 1.11 2001/11/06 08:34:53 keiron Exp $
  + * $Id: LayoutMasterSet.java,v 1.12 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -26,9 +26,8 @@
   
       private Root root;
   
  -    public LayoutMasterSet(FObj parent) {
  +    public LayoutMasterSet(FONode parent) {
           super(parent);
  -        this.name = "fo:layout-master-set";
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  
  
  
  1.7       +12 -13    xml-fop/src/org/apache/fop/fo/pagination/PageMasterReference.java
  
  Index: PageMasterReference.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/PageMasterReference.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PageMasterReference.java	2001/11/06 08:34:53	1.6
  +++ PageMasterReference.java	2001/11/09 11:32:40	1.7
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PageMasterReference.java,v 1.6 2001/11/06 08:34:53 keiron Exp $
  + * $Id: PageMasterReference.java,v 1.7 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -15,7 +15,7 @@
   
   /**
    * Base PageMasterReference class. Provides implementation for handling the
  - * master-name attribute and containment within a PageSequenceMaster
  + * master-reference attribute and containment within a PageSequenceMaster
    */
   public abstract class PageMasterReference extends FObj
       implements SubSequenceSpecifier {
  @@ -23,15 +23,15 @@
       private String _masterName;
       private PageSequenceMaster _pageSequenceMaster;
   
  -    public PageMasterReference(FObj parent) {
  +    public PageMasterReference(FONode parent) {
           super(parent);
           this.name = getElementName();
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
           super.handleAttrs(attlist);
  -        if (getProperty("master-name") != null) {
  -            setMasterName(getProperty("master-name").getString());
  +        if (getProperty("master-reference") != null) {
  +            setMasterName(getProperty("master-reference").getString());
           }
           validateParent(parent);
   
  @@ -42,7 +42,7 @@
       }
   
       /**
  -     * Returns the "master-name" attribute of this page master reference
  +     * Returns the "master-reference" attribute of this page master reference
        */
       public String getMasterName() {
           return _masterName;
  @@ -61,9 +61,11 @@
                                                boolean isEmptyPage);
   
       /**
  -     * Gets the formating object name for this object. Subclasses must provide this.
  +     * Gets the formating object name for this object.
  +     * Subclasses must provide this.
        *
  -     * @return the element name of this reference. e.g. fo:repeatable-page-master-reference
  +     * @return the element name of this reference.
  +     * e.g. fo:repeatable-page-master-reference
        */
       protected abstract String getElementName();
   
  @@ -71,13 +73,13 @@
        * Checks that the parent is the right element. The default implementation
        * checks for fo:page-sequence-master
        */
  -    protected void validateParent(FObj parent) throws FOPException {
  +    protected void validateParent(FONode parent) throws FOPException {
           if (parent.getName().equals("fo:page-sequence-master")) {
               _pageSequenceMaster = (PageSequenceMaster)parent;
   
               if (getMasterName() == null) {
                   log.warn("" + getElementName()
  -                                       + " does not have a master-name and so is being ignored");
  +                                       + " does not have a master-reference and so is being ignored");
               } else {
                   _pageSequenceMaster.addSubsequenceSpecifier(this);
               }
  @@ -89,8 +91,5 @@
       }
   
       public abstract void reset();
  -
  -
  -
   
   }
  
  
  
  1.42      +5 -6      xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java
  
  Index: PageSequence.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- PageSequence.java	2001/11/06 08:34:53	1.41
  +++ PageSequence.java	2001/11/09 11:32:40	1.42
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PageSequence.java,v 1.41 2001/11/06 08:34:53 keiron Exp $
  + * $Id: PageSequence.java,v 1.42 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -69,7 +69,7 @@
       private Hashtable _flowMap;
   
       /**
  -     * the "master-name" attribute
  +     * the "master-reference" attribute
        */
       private String masterName;
   
  @@ -121,9 +121,8 @@
       private String currentPageMasterName;
   
   
  -    public PageSequence(FObj parent) {
  +    public PageSequence(FONode parent) {
           super(parent);
  -        this.name = "fo:page-sequence";
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  @@ -166,7 +165,7 @@
               }
           }
   
  -        masterName = this.properties.get("master-name").getString();
  +        masterName = this.properties.get("master-reference").getString();
   
           // get the 'format' properties
           this.pageNumberGenerator =
  @@ -517,7 +516,7 @@
               SimplePageMaster simpleMaster =
                   this.layoutMasterSet.getSimplePageMaster(pageSequenceName);
               if (simpleMaster == null) {
  -                throw new FOPException("'master-name' for 'fo:page-sequence'"
  +                throw new FOPException("'master-reference' for 'fo:page-sequence'"
                                          + "matches no 'simple-page-master' or 'page-sequence-master'");
               }
               currentPageMasterName = pageSequenceName;
  
  
  
  1.8       +2 -3      xml-fop/src/org/apache/fop/fo/pagination/PageSequenceMaster.java
  
  Index: PageSequenceMaster.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/PageSequenceMaster.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PageSequenceMaster.java	2001/11/06 08:34:53	1.7
  +++ PageSequenceMaster.java	2001/11/09 11:32:40	1.8
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PageSequenceMaster.java,v 1.7 2001/11/06 08:34:53 keiron Exp $
  + * $Id: PageSequenceMaster.java,v 1.8 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -30,9 +30,8 @@
       // references to page-masters. So the methods use the former
       // terminology ('sub-sequence-specifiers', or SSS),
       // but the actual FO's are MasterReferences.
  -    public PageSequenceMaster(FObj parent) {
  +    public PageSequenceMaster(FONode parent) {
           super(parent);
  -        this.name = "fo:page-sequence-master";
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  
  
  
  1.7       +3 -2      xml-fop/src/org/apache/fop/fo/pagination/Region.java
  
  Index: Region.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Region.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Region.java	2001/11/06 08:34:53	1.6
  +++ Region.java	2001/11/09 11:32:40	1.7
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Region.java,v 1.6 2001/11/06 08:34:53 keiron Exp $
  + * $Id: Region.java,v 1.7 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -9,6 +9,7 @@
   
   // FOP
   import org.apache.fop.fo.FObj;
  +import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.PropertyList;
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.layout.RegionArea;
  @@ -24,7 +25,7 @@
       private SimplePageMaster _layoutMaster;
       private String _regionName;
   
  -    protected Region(FObj parent) {
  +    protected Region(FONode parent) {
           super(parent);
           this.name = getElementName();
       }
  
  
  
  1.11      +2 -2      xml-fop/src/org/apache/fop/fo/pagination/RegionAfter.java
  
  Index: RegionAfter.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionAfter.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- RegionAfter.java	2001/11/06 08:34:53	1.10
  +++ RegionAfter.java	2001/11/09 11:32:40	1.11
  @@ -1,5 +1,5 @@
   /*
  - * $Id: RegionAfter.java,v 1.10 2001/11/06 08:34:53 keiron Exp $
  + * $Id: RegionAfter.java,v 1.11 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -23,7 +23,7 @@
   
       private int precedence;
   
  -    public RegionAfter(FObj parent) {
  +    public RegionAfter(FONode parent) {
           super(parent);
       }
   
  
  
  
  1.11      +2 -2      xml-fop/src/org/apache/fop/fo/pagination/RegionBefore.java
  
  Index: RegionBefore.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionBefore.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- RegionBefore.java	2001/11/06 08:34:53	1.10
  +++ RegionBefore.java	2001/11/09 11:32:40	1.11
  @@ -1,5 +1,5 @@
   /*
  - * $Id: RegionBefore.java,v 1.10 2001/11/06 08:34:53 keiron Exp $
  + * $Id: RegionBefore.java,v 1.11 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -23,7 +23,7 @@
   
       private int precedence;
   
  -    public RegionBefore(FObj parent) {
  +    public RegionBefore(FONode parent) {
           super(parent);
       }
   
  
  
  
  1.13      +3 -2      xml-fop/src/org/apache/fop/fo/pagination/RegionBody.java
  
  Index: RegionBody.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionBody.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- RegionBody.java	2001/11/06 08:34:53	1.12
  +++ RegionBody.java	2001/11/09 11:32:40	1.13
  @@ -1,5 +1,5 @@
   /*
  - * $Id: RegionBody.java,v 1.12 2001/11/06 08:34:53 keiron Exp $
  + * $Id: RegionBody.java,v 1.13 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -9,6 +9,7 @@
   
   // FOP
   import org.apache.fop.fo.FObj;
  +import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.PropertyList;
   import org.apache.fop.fo.properties.Overflow;
   import org.apache.fop.datatypes.ColorType;
  @@ -25,7 +26,7 @@
   
       ColorType backgroundColor;
   
  -    public RegionBody(FObj parent) {
  +    public RegionBody(FONode parent) {
           super(parent);
       }
   
  
  
  
  1.5       +2 -2      xml-fop/src/org/apache/fop/fo/pagination/RegionEnd.java
  
  Index: RegionEnd.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionEnd.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RegionEnd.java	2001/11/06 08:34:53	1.4
  +++ RegionEnd.java	2001/11/09 11:32:40	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: RegionEnd.java,v 1.4 2001/11/06 08:34:53 keiron Exp $
  + * $Id: RegionEnd.java,v 1.5 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -20,7 +20,7 @@
       public static final String REGION_CLASS = "end";
   
   
  -    public RegionEnd(FObj parent) {
  +    public RegionEnd(FONode parent) {
           super(parent);
       }
   
  
  
  
  1.5       +2 -2      xml-fop/src/org/apache/fop/fo/pagination/RegionStart.java
  
  Index: RegionStart.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RegionStart.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RegionStart.java	2001/11/06 08:34:53	1.4
  +++ RegionStart.java	2001/11/09 11:32:40	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: RegionStart.java,v 1.4 2001/11/06 08:34:53 keiron Exp $
  + * $Id: RegionStart.java,v 1.5 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources."
  @@ -20,7 +20,7 @@
       public static final String REGION_CLASS = "start";
   
   
  -    public RegionStart(FObj parent) {
  +    public RegionStart(FONode parent) {
           super(parent);
       }
   
  
  
  
  1.9       +2 -3      xml-fop/src/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
  
  Index: RepeatablePageMasterAlternatives.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RepeatablePageMasterAlternatives.java	2001/11/06 08:34:53	1.8
  +++ RepeatablePageMasterAlternatives.java	2001/11/09 11:32:40	1.9
  @@ -1,5 +1,5 @@
   /*
  - * $Id: RepeatablePageMasterAlternatives.java,v 1.8 2001/11/06 08:34:53 keiron Exp $
  + * $Id: RepeatablePageMasterAlternatives.java,v 1.9 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -31,9 +31,8 @@
   
       private Vector conditionalPageMasterRefs;
   
  -    public RepeatablePageMasterAlternatives(FObj parent) {
  +    public RepeatablePageMasterAlternatives(FONode parent) {
           super(parent);
  -        this.name = "fo:repeatable-page-master-alternatives";
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  
  
  
  1.5       +2 -2      xml-fop/src/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
  
  Index: RepeatablePageMasterReference.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RepeatablePageMasterReference.java	2001/11/06 08:34:53	1.4
  +++ RepeatablePageMasterReference.java	2001/11/09 11:32:40	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: RepeatablePageMasterReference.java,v 1.4 2001/11/06 08:34:53 keiron Exp $
  + * $Id: RepeatablePageMasterReference.java,v 1.5 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -22,7 +22,7 @@
       private int maximumRepeats;
       private int numberConsumed = 0;
   
  -    public RepeatablePageMasterReference(FObj parent) {
  +    public RepeatablePageMasterReference(FONode parent) {
           super(parent);
       }
   
  
  
  
  1.18      +2 -9      xml-fop/src/org/apache/fop/fo/pagination/Root.java
  
  Index: Root.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Root.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Root.java	2001/11/06 08:34:53	1.17
  +++ Root.java	2001/11/09 11:32:40	1.18
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Root.java,v 1.17 2001/11/06 08:34:53 keiron Exp $
  + * $Id: Root.java,v 1.18 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -33,7 +33,7 @@
        */
       private int runningPageNumberCounter = 0;
   
  -    public Root(FObj parent) {
  +    public Root(FONode parent) {
           super(parent);
   
           // this.properties.get("media-usage");
  @@ -51,13 +51,6 @@
   
       protected void setRunningPageNumberCounter(int count) {
           this.runningPageNumberCounter = count;
  -    }
  -
  -    /**
  -     * @deprecated handled by addChild now
  -     */
  -    public void addPageSequence(PageSequence pageSequence) {
  -        this.pageSequences.addElement(pageSequence);
       }
   
       public int getPageSequenceCount() {
  
  
  
  1.17      +2 -3      xml-fop/src/org/apache/fop/fo/pagination/SimplePageMaster.java
  
  Index: SimplePageMaster.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/SimplePageMaster.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SimplePageMaster.java	2001/11/06 08:34:53	1.16
  +++ SimplePageMaster.java	2001/11/09 11:32:40	1.17
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SimplePageMaster.java,v 1.16 2001/11/06 08:34:53 keiron Exp $
  + * $Id: SimplePageMaster.java,v 1.17 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -37,9 +37,8 @@
       boolean afterPrecedence;
       int afterHeight;
   
  -    public SimplePageMaster(FObj parent) {
  +    public SimplePageMaster(FONode parent) {
           super(parent);
  -        this.name = "fo:simple-page-master";
       }
   
       public void handleAttrs(Attributes attlist) throws FOPException {
  
  
  
  1.6       +2 -2      xml-fop/src/org/apache/fop/fo/pagination/SinglePageMasterReference.java
  
  Index: SinglePageMasterReference.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/SinglePageMasterReference.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SinglePageMasterReference.java	2001/11/06 08:34:53	1.5
  +++ SinglePageMasterReference.java	2001/11/09 11:32:40	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SinglePageMasterReference.java,v 1.5 2001/11/06 08:34:53 keiron Exp $
  + * $Id: SinglePageMasterReference.java,v 1.6 2001/11/09 11:32:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -17,7 +17,7 @@
   
       private int state;
   
  -    public SinglePageMasterReference(FObj parent) {
  +    public SinglePageMasterReference(FONode parent) {
           super(parent);
           this.state = FIRST;
       }
  
  
  
  1.6       +33 -33    xml-fop/src/org/apache/fop/fonts/TTFSubSetFile.java
  
  Index: TTFSubSetFile.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fonts/TTFSubSetFile.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TTFSubSetFile.java	2001/07/30 20:29:26	1.5
  +++ TTFSubSetFile.java	2001/11/09 11:32:41	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: TTFSubSetFile.java,v 1.5 2001/07/30 20:29:26 tore Exp $
  + * $Id: TTFSubSetFile.java,v 1.6 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -7,9 +7,9 @@
   
   package org.apache.fop.fonts;
   import java.io.*;
  -import java.util.Enumeration;
  -import java.util.Hashtable;
  -import java.util.Vector;
  +import java.util.Iterator;
  +import java.util.HashMap;
  +import java.util.ArrayList;
   import org.apache.fop.messaging.MessageHandler;
   
   /**
  @@ -300,7 +300,7 @@
        * Create the glyf table and fill in loca table
        */
       private void createGlyf(FontFileReader in,
  -                            Hashtable glyphs) throws IOException {
  +                            HashMap glyphs) throws IOException {
           TTFDirTabEntry entry = (TTFDirTabEntry)dirTabs.get("glyf");
           int size = 0;
           int start = 0;
  @@ -309,9 +309,9 @@
               pad4();
               start = currentPos;
   
  -            for (Enumeration e = glyphs.keys(); e.hasMoreElements(); ) {
  +            for (Iterator e = glyphs.keySet().iterator(); e.hasNext(); ) {
                   int glyphLength = 0;
  -                Integer origIndex = (Integer)e.nextElement();
  +                Integer origIndex = (Integer)e.next();
                   Integer subsetIndex = (Integer)glyphs.get(origIndex);
   
                   int nextOffset = 0;
  @@ -367,7 +367,7 @@
        * metric (key) to the subset metric (value)
        */
       private void createHmtx(FontFileReader in,
  -                            Hashtable glyphs) throws IOException {
  +                            HashMap glyphs) throws IOException {
           TTFDirTabEntry entry = (TTFDirTabEntry)dirTabs.get("hmtx");
   
           int longHorMetricSize = glyphs.size() * 2;
  @@ -377,8 +377,8 @@
           if (entry != null) {
               pad4();
               int offset = (int)entry.offset;
  -            for (Enumeration e = glyphs.keys(); e.hasMoreElements(); ) {
  -                Integer origIndex = (Integer)e.nextElement();
  +            for (Iterator e = glyphs.keySet().iterator(); e.hasNext(); ) {
  +                Integer origIndex = (Integer)e.next();
                   Integer subsetIndex = (Integer)glyphs.get(origIndex);
   
                   writeUShort(currentPos + subsetIndex.intValue() * 4,
  @@ -399,13 +399,13 @@
       }
   
       /**
  -     * Returns a Vector containing the glyph itself plus all glyphs
  +     * Returns a List containing the glyph itself plus all glyphs
        * that this composite glyph uses
        */
  -    private Vector getIncludedGlyphs(FontFileReader in, int glyphOffset,
  +    private ArrayList getIncludedGlyphs(FontFileReader in, int glyphOffset,
                                        Integer glyphIdx) throws IOException {
  -        Vector ret = new Vector();
  -        ret.addElement(glyphIdx);
  +        ArrayList ret = new ArrayList();
  +        ret.add(glyphIdx);
           int offset = glyphOffset + (int)mtx_tab[glyphIdx.intValue()].offset
                        + 10;
           Integer compositeIdx = null;
  @@ -414,7 +414,7 @@
           while (moreComposites) {
               flags = in.readTTFUShort(offset);
               compositeIdx = new Integer(in.readTTFUShort(offset + 2));
  -            ret.addElement(compositeIdx);
  +            ret.add(compositeIdx);
   
               offset += 4;
               if ((flags & 1) > 0) {
  @@ -445,7 +445,7 @@
        * Rewrite all compositepointers in glyphindex glyphIdx
        *
        */
  -    private void remapComposite(FontFileReader in, Hashtable glyphs,
  +    private void remapComposite(FontFileReader in, HashMap glyphs,
                                   int glyphOffset,
                                   Integer glyphIdx) throws IOException {
           int offset = glyphOffset + (int)mtx_tab[glyphIdx.intValue()].offset
  @@ -503,36 +503,36 @@
        * mapping
        */
       private void scanGlyphs(FontFileReader in,
  -                            Hashtable glyphs) throws IOException {
  +                            HashMap glyphs) throws IOException {
           TTFDirTabEntry entry = (TTFDirTabEntry)dirTabs.get("glyf");
  -        Hashtable newComposites = null;
  -        Hashtable allComposites = new Hashtable();
  +        HashMap newComposites = null;
  +        HashMap allComposites = new HashMap();
   
           int newIndex = glyphs.size();
   
           if (entry != null) {
               while (newComposites == null || newComposites.size() > 0) {
                   // Inefficient to iterate through all glyphs
  -                newComposites = new Hashtable();
  +                newComposites = new HashMap();
   
  -                for (Enumeration e = glyphs.keys(); e.hasMoreElements(); ) {
  -                    Integer origIndex = (Integer)e.nextElement();
  +                for (Iterator e = glyphs.keySet().iterator(); e.hasNext(); ) {
  +                    Integer origIndex = (Integer)e.next();
   
                       if (in.readTTFShort(entry.offset
                                           + mtx_tab[origIndex.intValue()].offset) < 0) {
                           // origIndex is a composite glyph
                           allComposites.put(origIndex, glyphs.get(origIndex));
  -                        Vector composites =
  +                        ArrayList composites =
                               getIncludedGlyphs(in, (int)entry.offset,
                                                 origIndex);
   
                           // Iterate through all composites pointed to
                           // by this composite and check if they exists
                           // in the glyphs map, add them if not.
  -                        for (Enumeration cps = composites.elements();
  -                                cps.hasMoreElements(); ) {
  +                        for (Iterator cps = composites.iterator();
  +                                cps.hasNext(); ) {
   
  -                            Integer cIdx = (Integer)cps.nextElement();
  +                            Integer cIdx = (Integer)cps.next();
                               if (glyphs.get(cIdx) == null
                                       && newComposites.get(cIdx) == null) {
                                   newComposites.put(cIdx,
  @@ -544,19 +544,19 @@
                   }
   
                   // Add composites to glyphs
  -                for (Enumeration m = newComposites.keys();
  -                        m.hasMoreElements(); ) {
  -                    Integer im = (Integer)m.nextElement();
  +                for (Iterator m = newComposites.keySet().iterator();
  +                        m.hasNext(); ) {
  +                    Integer im = (Integer)m.next();
                       glyphs.put(im, newComposites.get(im));
                   }
               }
   
               // Iterate through all composites to remap their composite index
   
  -            for (Enumeration ce = allComposites.keys();
  -                    ce.hasMoreElements(); ) {
  +            for (Iterator ce = allComposites.keySet().iterator();
  +                    ce.hasNext(); ) {
                   remapComposite(in, glyphs, (int)entry.offset,
  -                               (Integer)ce.nextElement());
  +                               (Integer)ce.next());
               }
   
           } else {
  @@ -572,7 +572,7 @@
        */
   
       public byte[] readFont(FontFileReader in, String name,
  -                           Hashtable glyphs) throws IOException {
  +                           HashMap glyphs) throws IOException {
   
           /*
            * Check if TrueType collection, and that the name
  
  
  
  1.26      +2 -2      xml-fop/src/org/apache/fop/image/FopImageFactory.java
  
  Index: FopImageFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/FopImageFactory.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- FopImageFactory.java	2001/10/11 09:13:33	1.25
  +++ FopImageFactory.java	2001/11/09 11:32:41	1.26
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FopImageFactory.java,v 1.25 2001/10/11 09:13:33 keiron Exp $
  + * $Id: FopImageFactory.java,v 1.26 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -66,7 +66,7 @@
               try {
                   absoluteURL = new URL(href);
               } catch (MalformedURLException mue) {
  -                // if the href contains onl a path then file is assumed
  +                // if the href contains only a path then file is assumed
                   absoluteURL = new URL("file:" + href);
               }
               imgIS = absoluteURL.openStream();
  
  
  
  1.11      +1 -4      xml-fop/src/org/apache/fop/image/ImageArea.java
  
  Index: ImageArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/ImageArea.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ImageArea.java	2001/10/22 09:30:31	1.10
  +++ ImageArea.java	2001/11/09 11:32:41	1.11
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ImageArea.java,v 1.10 2001/10/22 09:30:31 keiron Exp $
  + * $Id: ImageArea.java,v 1.11 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -88,8 +88,5 @@
           xOffset = startIndent;
       }
   
  -
  -
   }
  -
   
  
  
  
  1.5       +2 -2      xml-fop/src/org/apache/fop/layout/FontDescriptor.java
  
  Index: FontDescriptor.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/FontDescriptor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FontDescriptor.java	2001/07/30 20:29:27	1.4
  +++ FontDescriptor.java	2001/11/09 11:32:41	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FontDescriptor.java,v 1.4 2001/07/30 20:29:27 tore Exp $
  + * $Id: FontDescriptor.java,v 1.5 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -20,7 +20,7 @@
       public int getStemV();
   
       public boolean hasKerningInfo();
  -    public java.util.Hashtable getKerningInfo();
  +    public java.util.HashMap getKerningInfo();
       public boolean isEmbeddable();
       public byte getSubType();
       public org.apache.fop.pdf.PDFStream getFontFile(int objNum);
  
  
  
  1.15      +5 -5      xml-fop/src/org/apache/fop/layout/FontState.java
  
  Index: FontState.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/FontState.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FontState.java	2001/07/30 20:29:27	1.14
  +++ FontState.java	2001/11/09 11:32:41	1.15
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FontState.java,v 1.14 2001/07/30 20:29:27 tore Exp $
  + * $Id: FontState.java,v 1.15 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -7,7 +7,7 @@
   
   package org.apache.fop.layout;
   
  -import java.util.Hashtable;
  +import java.util.HashMap;
   
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.fo.properties.FontVariant;
  @@ -24,7 +24,7 @@
   
       private FontMetric _metric;
   
  -    private static Hashtable EMPTY_HASHTABLE = new Hashtable();
  +    private static HashMap EMPTY_HASHTABLE = new HashMap();
   
   
       public FontState(FontInfo fontInfo, String fontFamily, String fontStyle,
  @@ -84,9 +84,9 @@
           return _metric.getXHeight(_fontSize) / 1000;
       }
   
  -    public Hashtable getKerning() {
  +    public HashMap getKerning() {
           if (_metric instanceof FontDescriptor) {
  -            Hashtable ret = ((FontDescriptor)_metric).getKerningInfo();
  +            HashMap ret = ((FontDescriptor)_metric).getKerningInfo();
               if (ret != null)
                   return ret;
           }
  
  
  
  1.6       +8 -8      xml-fop/src/org/apache/fop/layout/hyphenation/HyphenationTree.java
  
  Index: HyphenationTree.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/HyphenationTree.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- HyphenationTree.java	2001/07/30 20:29:28	1.5
  +++ HyphenationTree.java	2001/11/09 11:32:41	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: HyphenationTree.java,v 1.5 2001/07/30 20:29:28 tore Exp $
  + * $Id: HyphenationTree.java,v 1.6 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,8 +8,8 @@
   package org.apache.fop.layout.hyphenation;
   
   import java.io.*;
  -import java.util.Vector;
  -import java.util.Hashtable;
  +import java.util.ArrayList;
  +import java.util.HashMap;
   
   /**
    * This tree structure stores the hyphenation patterns in an efficient
  @@ -29,7 +29,7 @@
       /**
        * This map stores hyphenation exceptions
        */
  -    protected Hashtable stoplist;
  +    protected HashMap stoplist;
   
       /**
        * This map stores the character classes
  @@ -42,7 +42,7 @@
       private transient TernaryTree ivalues;
   
       public HyphenationTree() {
  -        stoplist = new Hashtable(23);    // usually a small table
  +        stoplist = new HashMap(23);    // usually a small table
           classmap = new TernaryTree();
           vspace = new ByteVector();
           vspace.alloc(1);    // this reserves index 0, which we don't use
  @@ -282,10 +282,10 @@
           String sw = new String(word, 1, len);
           if (stoplist.containsKey(sw)) {
               // assume only simple hyphens (Hyphen.pre="-", Hyphen.post = Hyphen.no = null)
  -            Vector hw = (Vector)stoplist.get(sw);
  +            ArrayList hw = (ArrayList)stoplist.get(sw);
               int j = 0;
               for (i = 0; i < hw.size(); i++) {
  -                Object o = hw.elementAt(i);
  +                Object o = hw.get(i);
                   if (o instanceof String) {
                       j += ((String)o).length();
                       if (j >= remainCharCount && j < (len - pushCharCount))
  @@ -354,7 +354,7 @@
        * @param hyphenatedword a vector of alternating strings and
        * {@link Hyphen hyphen} objects.
        */
  -    public void addException(String word, Vector hyphenatedword) {
  +    public void addException(String word, ArrayList hyphenatedword) {
           stoplist.put(word, hyphenatedword);
       }
   
  
  
  
  1.4       +3 -3      xml-fop/src/org/apache/fop/layout/hyphenation/PatternConsumer.java
  
  Index: PatternConsumer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/PatternConsumer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PatternConsumer.java	2001/07/30 20:29:28	1.3
  +++ PatternConsumer.java	2001/11/09 11:32:41	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PatternConsumer.java,v 1.3 2001/07/30 20:29:28 tore Exp $
  + * $Id: PatternConsumer.java,v 1.4 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -7,7 +7,7 @@
   
   package org.apache.fop.layout.hyphenation;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   /**
    * This interface is used to connect the XML pattern file parser to
  @@ -32,7 +32,7 @@
        * A hyphenatedword is a vector of alternating String's and
        * {@link Hyphen Hyphen} instances
        */
  -    public void addException(String word, Vector hyphenatedword);
  +    public void addException(String word, ArrayList hyphenatedword);
   
       /**
        * Add hyphenation patterns.
  
  
  
  1.5       +21 -21    xml-fop/src/org/apache/fop/layout/hyphenation/PatternParser.java
  
  Index: PatternParser.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/PatternParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PatternParser.java	2001/07/30 20:29:28	1.4
  +++ PatternParser.java	2001/11/09 11:32:41	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PatternParser.java,v 1.4 2001/07/30 20:29:28 tore Exp $
  + * $Id: PatternParser.java,v 1.5 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -22,7 +22,7 @@
   import java.io.PrintWriter;
   import java.io.IOException;
   import java.io.FileNotFoundException;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.net.URL;
   
   /**
  @@ -37,7 +37,7 @@
       int currElement;
       PatternConsumer consumer;
       StringBuffer token;
  -    Vector exception;
  +    ArrayList exception;
       char hyphenChar;
       String errMsg;
   
  @@ -183,10 +183,10 @@
           return pat.toString();
       }
   
  -    protected Vector normalizeException(Vector ex) {
  -        Vector res = new Vector();
  +    protected ArrayList normalizeException(ArrayList ex) {
  +        ArrayList res = new ArrayList();
           for (int i = 0; i < ex.size(); i++) {
  -            Object item = ex.elementAt(i);
  +            Object item = ex.get(i);
               if (item instanceof String) {
                   String str = (String)item;
                   StringBuffer buf = new StringBuffer();
  @@ -195,27 +195,27 @@
                       if (c != hyphenChar)
                           buf.append(c);
                       else {
  -                        res.addElement(buf.toString());
  +                        res.add(buf.toString());
                           buf.setLength(0);
                           char[] h = new char[1];
                           h[0] = hyphenChar;
                           // we use here hyphenChar which is not necessarily
                           // the one to be printed
  -                        res.addElement(new Hyphen(new String(h), null, null));
  +                        res.add(new Hyphen(new String(h), null, null));
                       }
                   }
                   if (buf.length() > 0)
  -                    res.addElement(buf.toString());
  +                    res.add(buf.toString());
               } else
  -                res.addElement(item);
  +                res.add(item);
           }
           return res;
       }
   
  -    protected String getExceptionWord(Vector ex) {
  +    protected String getExceptionWord(ArrayList ex) {
           StringBuffer res = new StringBuffer();
           for (int i = 0; i < ex.size(); i++) {
  -            Object item = ex.elementAt(i);
  +            Object item = ex.get(i);
               if (item instanceof String)
                   res.append((String)item);
               else {
  @@ -260,12 +260,12 @@
               currElement = ELEM_PATTERNS;
           else if (local.equals("exceptions")) {
               currElement = ELEM_EXCEPTIONS;
  -            exception = new Vector();
  +            exception = new ArrayList();
           } else if (local.equals("hyphen")) {
               if (token.length() > 0) {
  -                exception.addElement(token.toString());
  +                exception.add(token.toString());
               }
  -            exception.addElement(new Hyphen(attrs.getValue("pre"),
  +            exception.add(new Hyphen(attrs.getValue("pre"),
                                               attrs.getValue("no"),
                                               attrs.getValue("post")));
               currElement = ELEM_HYPHEN;
  @@ -282,10 +282,10 @@
                   consumer.addClass(word);
                   break;
               case ELEM_EXCEPTIONS:
  -                exception.addElement(word);
  +                exception.add(word);
                   exception = normalizeException(exception);
                   consumer.addException(getExceptionWord(exception),
  -                                      (Vector)exception.clone());
  +                                      (ArrayList)exception.clone());
                   break;
               case ELEM_PATTERNS:
                   consumer.addPattern(getPattern(word),
  @@ -319,11 +319,11 @@
                   consumer.addClass(word);
                   break;
               case ELEM_EXCEPTIONS:
  -                exception.addElement(word);
  +                exception.add(word);
                   exception = normalizeException(exception);
                   consumer.addException(getExceptionWord(exception),
  -                                      (Vector)exception.clone());
  -                exception.removeAllElements();
  +                                      (ArrayList)exception.clone());
  +                exception.clear();
                   break;
               case ELEM_PATTERNS:
                   consumer.addPattern(getPattern(word),
  @@ -391,7 +391,7 @@
           System.out.println("class: " + c);
       }
   
  -    public void addException(String w, Vector e) {
  +    public void addException(String w, ArrayList e) {
           System.out.println("exception: " + w + " : " + e.toString());
       }
   
  
  
  
  1.6       +1 -2      xml-fop/src/org/apache/fop/pdf/PDFNumber.java
  
  Index: PDFNumber.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFNumber.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PDFNumber.java	2001/07/30 20:29:30	1.5
  +++ PDFNumber.java	2001/11/09 11:32:41	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFNumber.java,v 1.5 2001/07/30 20:29:30 tore Exp $
  + * $Id: PDFNumber.java,v 1.6 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -72,7 +72,6 @@
       }
   
       public static String doubleOut(double doubleDown, int dec) {
  -
           StringBuffer p = new StringBuffer();
           if (doubleDown < 0) {
               doubleDown = -doubleDown;
  
  
  
  1.13      +5 -5      xml-fop/src/org/apache/fop/pdf/PDFPages.java
  
  Index: PDFPages.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFPages.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- PDFPages.java	2001/08/01 23:08:55	1.12
  +++ PDFPages.java	2001/11/09 11:32:41	1.13
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFPages.java,v 1.12 2001/08/01 23:08:55 gears Exp $
  + * $Id: PDFPages.java,v 1.13 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -10,7 +10,7 @@
   // Java
   import java.io.PrintWriter;
   import org.apache.fop.messaging.MessageHandler;
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   /**
    * class representing a /Pages object.
  @@ -24,7 +24,7 @@
       /**
        * the /Page objects
        */
  -    protected Vector kids = new Vector();
  +    protected ArrayList kids = new ArrayList();
   
       /**
        * the number of /Page objects
  @@ -53,7 +53,7 @@
        * @param page the PDFPage to add.
        */
       public void addPage(PDFPage page) {
  -        this.kids.addElement(page.referencePDF());
  +        this.kids.add(page.referencePDF());
           page.setParent(this);
           this.incrementCount();
       }
  @@ -85,7 +85,7 @@
                                             + " obj\n<< /Type /Pages\n/Count "
                                             + this.getCount() + "\n/Kids [");
           for (int i = 0; i < kids.size(); i++) {
  -            p = p.append(kids.elementAt(i) + " ");
  +            p = p.append(kids.get(i) + " ");
           }
           p = p.append("] >>\nendobj\n");
           return p.toString().getBytes();
  
  
  
  1.2       +99 -8     xml-fop/src/org/apache/fop/pdf/PDFState.java
  
  Index: PDFState.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFState.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PDFState.java	2001/10/22 09:30:32	1.1
  +++ PDFState.java	2001/11/09 11:32:41	1.2
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFState.java,v 1.1 2001/10/22 09:30:32 keiron Exp $
  + * $Id: PDFState.java,v 1.2 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -11,6 +11,9 @@
   import java.util.ArrayList;
   import java.util.HashMap;
   
  +import java.awt.Color;
  +import java.awt.Paint;
  +
   /**
    * This keeps information about the current state when writing to pdf.
    * It allows for creating new graphics states with the q operator.
  @@ -29,8 +32,8 @@
   public class PDFState {
       private final static String COLOR = "color";
       private final static String BACKCOLOR = "backcolor";
  -    private final static String PATTERN = "pattern";
  -    private final static String BACKPATTERN = "backpattern";
  +    private final static String PAINT = "paint";
  +    private final static String BACKPAINT = "backpaint";
       private final static String LINECAP = "lineCap";
       private final static String LINEJOIN = "lineJoin";
       private final static String LINEWIDTH = "lineWidth";
  @@ -43,10 +46,10 @@
       private final static String FONTNAME = "fontName";
       private final static String CLIP = "clip";
   
  -    PDFColor color = new PDFColor(0, 0, 0);
  -    PDFColor backcolor = new PDFColor(255, 255, 255);
  -    PDFPattern pattern = null;
  -    PDFPattern backPattern = null;
  +    Color color = Color.black;
  +    Color backcolor = Color.white;
  +    Paint paint = null;
  +    Paint backPaint = null;
       int lineCap = 0;
       int lineJoin = 0;
       float lineWidth = 1;
  @@ -68,13 +71,45 @@
       // this call should be used when the q operator is used
       // so that the state is known when popped
       public void push() {
  -        HashMap changedMap = new HashMap();
  +        HashMap saveMap = new HashMap();
  +        saveMap.put(COLOR, color);
  +        saveMap.put(BACKCOLOR, backcolor);
  +        saveMap.put(PAINT, paint);
  +        saveMap.put(BACKPAINT, backPaint);
  +        saveMap.put(LINECAP, new Integer(lineCap));
  +        saveMap.put(LINEJOIN, new Integer(lineJoin));
  +        saveMap.put(LINEWIDTH, new Float(lineWidth));
  +        saveMap.put(MITERLIMIT, new Float(miterLimit));
  +        saveMap.put(TEXT, new Boolean(text));
  +        saveMap.put(DASHOFFSET, new Integer(dashOffset));
  +        saveMap.put(DASHARRAY, dashArray);
  +        saveMap.put(TRANSFORM, transform);
  +        saveMap.put(FONTSIZE, new Float(fontSize));
  +        saveMap.put(FONTNAME, fontName);
  +        saveMap.put(CLIP, clip);
   
  +        stateStack.add(saveMap);
       }
   
       public void pop() {
           if (getStackLevel() > 0) {
  +            HashMap saveMap = (HashMap)stateStack.get(stateStack.size() - 1);
               stateStack.remove(stateStack.size() - 1);
  +            color = (Color)saveMap.get(COLOR);
  +            backcolor = (Color)saveMap.get(BACKCOLOR);
  +            paint = (Paint)saveMap.get(PAINT);
  +            backPaint = (Paint)saveMap.get(BACKPAINT);
  +            lineCap = ((Integer)saveMap.get(LINECAP)).intValue();
  +            lineJoin = ((Integer)saveMap.get(LINEJOIN)).intValue();
  +            lineWidth = ((Float)saveMap.get(LINEWIDTH)).floatValue();
  +            miterLimit = ((Float)saveMap.get(MITERLIMIT)).floatValue();
  +            text = ((Boolean)saveMap.get(TEXT)).booleanValue();
  +            dashOffset = ((Integer)saveMap.get(DASHOFFSET)).intValue();
  +            dashArray = (int[])saveMap.get(DASHARRAY);
  +            transform = (double[])saveMap.get(TRANSFORM);
  +            fontSize = ((Float)saveMap.get(FONTSIZE)).floatValue();
  +            fontName = (String)saveMap.get(FONTNAME);
  +            clip = (Shape)saveMap.get(CLIP);
           }
       }
   
  @@ -86,5 +121,61 @@
           return false;
       }
   
  +    public boolean setColor(Color col) {
  +        if(!col.equals(color)) {
  +            color = col;
  +            return true;
  +        }
  +        return false;
  +    }
  +
  +    public boolean setBackColor(Color col) {
  +        if(!col.equals(backcolor)) {
  +            backcolor = col;
  +            return true;
  +        }
  +        return false;
  +    }
  +
  +    public boolean setPaint(Paint p) {
  +        if(paint == null) {
  +            if(p != null) {
  +                paint = p;
  +                return true;
  +            }
  +        } else if(!paint.equals(p)) {
  +            paint = p;
  +            return true;
  +        }
  +        return false;
  +    }
  +
  +    public boolean checkClip(Shape cl) {
  +        if(clip == null) {
  +            if(cl != null) {
  +                return true;
  +            }
  +        } else if(!clip.equals(cl)) {
  +            return true;
  +        }
  +        return false;
  +    }
  +
  +    public void setClip(Shape cl) {
  +        clip = cl;
  +    }
  +
  +    public boolean checkTransform(double[] vals) {
  +        for(int count = 0; count < transform.length; count++) {
  +            if(transform[count] != vals[count]) {
  +                return true;
  +            }
  +        }
  +        return false;
  +    }
  +
  +    public void setTransform(double[] vals) {
  +        transform = vals;
  +    }
   }
   
  
  
  
  1.4       +1 -3      xml-fop/src/org/apache/fop/render/awt/AWTFontMetrics.java
  
  Index: AWTFontMetrics.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/awt/AWTFontMetrics.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AWTFontMetrics.java	2001/07/30 20:29:32	1.3
  +++ AWTFontMetrics.java	2001/11/09 11:32:41	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: AWTFontMetrics.java,v 1.3 2001/07/30 20:29:32 tore Exp $
  + * $Id: AWTFontMetrics.java,v 1.4 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,7 +8,6 @@
   package org.apache.fop.render.awt;
   
   // FOP
  -import org.apache.fop.messaging.MessageHandler;
   import org.apache.fop.layout.FontInfo;
   import org.apache.fop.layout.FontDescriptor;
   import org.apache.fop.layout.FontState;
  @@ -37,7 +36,6 @@
    * Since FontState and FontInfo multiply all factors by
    * size, we assume a "standard" font of FONT_SIZE.
    */
  -
   public class AWTFontMetrics {
   
       /**
  
  
  
  1.15      +4 -6      xml-fop/src/org/apache/fop/render/pdf/FontSetup.java
  
  Index: FontSetup.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/FontSetup.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FontSetup.java	2001/11/02 11:06:08	1.14
  +++ FontSetup.java	2001/11/09 11:32:41	1.15
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FontSetup.java,v 1.14 2001/11/02 11:06:08 keiron Exp $
  + * $Id: FontSetup.java,v 1.15 2001/11/09 11:32:41 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -9,7 +9,6 @@
   
   // FOP
   import org.apache.fop.render.pdf.fonts.*;
  -import org.apache.fop.messaging.MessageHandler;
   import org.apache.fop.layout.FontInfo;
   import org.apache.fop.layout.FontDescriptor;
   import org.apache.fop.pdf.PDFDocument;
  @@ -39,7 +38,6 @@
        * @param fontInfo the font info object to set up
        */
       public static void setup(FontInfo fontInfo) {
  -        MessageHandler.logln("setting up fonts");
   
           fontInfo.addMetrics("F1", new Helvetica());
           fontInfo.addMetrics("F2", new HelveticaOblique());
  @@ -178,9 +176,9 @@
                       }
                   }
               } catch (Exception ex) {
  -                MessageHandler.error("Failed to read font metrics file "
  -                                     + configFontInfo.getMetricsFile()
  -                                     + " : " + ex.getMessage());
  +                //MessageHandler.error("Failed to read font metrics file "
  +                //                     + configFontInfo.getMetricsFile()
  +                //                     + " : " + ex.getMessage());
               }
           }
       }
  
  
  
  1.3       +3 -3      xml-fop/src/org/apache/fop/render/pdf/fonts/LazyFont.java
  
  Index: LazyFont.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/fonts/LazyFont.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LazyFont.java	2001/08/13 07:52:21	1.2
  +++ LazyFont.java	2001/11/09 11:32:42	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: LazyFont.java,v 1.2 2001/08/13 07:52:21 keiron Exp $
  + * $Id: LazyFont.java,v 1.3 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -11,7 +11,7 @@
   import org.apache.fop.layout.FontDescriptor;
   import org.apache.fop.pdf.PDFStream;
   import org.apache.fop.messaging.MessageHandler;
  -import java.util.Hashtable;
  +import java.util.HashMap;
   
   import org.apache.fop.render.pdf.FontReader;
   
  @@ -158,7 +158,7 @@
           return realFontDescriptor.hasKerningInfo();
       }
       
  -    public Hashtable getKerningInfo(){
  +    public HashMap getKerningInfo(){
           load();
           return realFontDescriptor.getKerningInfo();
       }
  
  
  
  1.5       +7 -7      xml-fop/src/org/apache/fop/render/pdf/fonts/MultiByteFont.java
  
  Index: MultiByteFont.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/fonts/MultiByteFont.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MultiByteFont.java	2001/07/30 20:29:33	1.4
  +++ MultiByteFont.java	2001/11/09 11:32:42	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: MultiByteFont.java,v 1.4 2001/07/30 20:29:33 tore Exp $
  + * $Id: MultiByteFont.java,v 1.5 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -24,7 +24,7 @@
   import java.io.FileInputStream;
   import java.io.File;
   import java.io.BufferedInputStream;
  -import java.util.Hashtable;
  +import java.util.HashMap;
   
   /**
    * Generic MultiByte (CID) font
  @@ -53,7 +53,7 @@
       public int defaultWidth = 0;
       public byte cidType = PDFCIDFont.CID_TYPE2;
   
  -    public Hashtable kerning = new Hashtable();
  +    public HashMap kerning = new HashMap();
       public boolean useKerning = true;
       private String namePrefix = null;    // Quasi unique prefix
       private static int uniqueCounter = 1;
  @@ -66,12 +66,12 @@
       /**
        * usedGlyphs contains orginal, new glyph index
        */
  -    private Hashtable usedGlyphs = new Hashtable();
  +    private HashMap usedGlyphs = new HashMap();
   
       /**
        * usedGlyphsIndex contains new glyph, original index
        */
  -    private Hashtable usedGlyphsIndex = new Hashtable();
  +    private HashMap usedGlyphsIndex = new HashMap();
       int usedGlyphsCount = 0;
   
       public MultiByteFont() {
  @@ -99,11 +99,11 @@
           return (useKerning & kerning.isEmpty());
       }
   
  -    public final java.util.Hashtable getKerningInfo() {
  +    public final java.util.HashMap getKerningInfo() {
           if (useKerning)
               return kerning;
           else
  -            return new Hashtable();
  +            return new HashMap();
       }
   
       public byte getSubType() {
  
  
  
  1.4       +5 -5      xml-fop/src/org/apache/fop/render/pdf/fonts/SingleByteFont.java
  
  Index: SingleByteFont.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/fonts/SingleByteFont.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SingleByteFont.java	2001/07/30 20:29:33	1.3
  +++ SingleByteFont.java	2001/11/09 11:32:42	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SingleByteFont.java,v 1.3 2001/07/30 20:29:33 tore Exp $
  + * $Id: SingleByteFont.java,v 1.4 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -16,7 +16,7 @@
   import java.io.InputStream;
   import java.io.FileInputStream;
   import java.io.BufferedInputStream;
  -import java.util.Hashtable;
  +import java.util.HashMap;
   
   /**
    * Generic SingleByte font
  @@ -44,7 +44,7 @@
       public int italicAngle = 0;
       public int missingWidth = 0;
   
  -    public Hashtable kerning = new Hashtable();
  +    public HashMap kerning = new HashMap();
       public boolean useKerning = true;
   
       public int width[] = null;
  @@ -54,11 +54,11 @@
           return (useKerning & kerning.isEmpty());
       }
   
  -    public final java.util.Hashtable getKerningInfo() {
  +    public final java.util.HashMap getKerningInfo() {
           if (useKerning)
               return kerning;
           else
  -            return new Hashtable();
  +            return new HashMap();
       }
   
       public byte getSubType() {
  
  
  
  1.31      +3 -1      xml-fop/src/org/apache/fop/render/xml/XMLRenderer.java
  
  Index: XMLRenderer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/xml/XMLRenderer.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- XMLRenderer.java	2001/11/02 07:45:18	1.30
  +++ XMLRenderer.java	2001/11/09 11:32:42	1.31
  @@ -1,5 +1,5 @@
   /*
  - * $Id: XMLRenderer.java,v 1.30 2001/11/02 07:45:18 keiron Exp $
  + * $Id: XMLRenderer.java,v 1.31 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -77,6 +77,8 @@
   
       public void setUserAgent(FOUserAgent agent) {
           super.setUserAgent(agent);
  +
  +        //
           //userAgent.addExtensionHandler();
           XMLHandler handler = new XMLXMLHandler();
           userAgent.setDefaultXMLHandler(mimeType, handler);
  
  
  
  1.13      +35 -15    xml-fop/src/org/apache/fop/svg/PDFDocumentGraphics2D.java
  
  Index: PDFDocumentGraphics2D.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFDocumentGraphics2D.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- PDFDocumentGraphics2D.java	2001/10/26 09:30:40	1.12
  +++ PDFDocumentGraphics2D.java	2001/11/09 11:32:42	1.13
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFDocumentGraphics2D.java,v 1.12 2001/10/26 09:30:40 keiron Exp $
  + * $Id: PDFDocumentGraphics2D.java,v 1.13 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -31,7 +31,7 @@
    * <tt>PDFGraphics2D</tt>.
    *
    * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
  - * @version $Id: PDFDocumentGraphics2D.java,v 1.12 2001/10/26 09:30:40 keiron Exp $
  + * @version $Id: PDFDocumentGraphics2D.java,v 1.13 2001/11/09 11:32:42 keiron Exp $
    * @see org.apache.fop.svg.PDFGraphics2D
    */
   public class PDFDocumentGraphics2D extends PDFGraphics2D {
  @@ -45,21 +45,19 @@
   
       /**
        * Create a new PDFDocumentGraphics2D.
  -     * This is used to create a new pdf document of the given height
  -     * and width.
  +     * This is used to create a new pdf document, the height,
  +     * width and output stream can be setup later.
  +     * For use by the transcoder which needs font information
  +     * for the bridge before the document size is known.
        * The resulting document is written to the stream after rendering.
        *
        * @param textAsShapes set this to true so that text will be rendered
        * using curves and not the font.
  -     * @param stream the stream that the final document should be written to.
  -     * @param width the width of the document
  -     * @param height the height of the document
        */
  -    public PDFDocumentGraphics2D(boolean textAsShapes, OutputStream stream,
  -                                 int width, int height) {
  +    PDFDocumentGraphics2D(boolean textAsShapes) {
           super(textAsShapes);
  -
  -        if (!textAsShapes) {
  +    
  +        if(!textAsShapes) {
               fontInfo = new FontInfo();
               FontSetup.setup(fontInfo);
               try {
  @@ -67,21 +65,43 @@
                                             "normal", 12, 0);
               } catch (FOPException e) {}
           }
  +
           standalone = true;
  -        this.stream = stream;
           this.pdfDoc = new PDFDocument();
           this.pdfDoc.setProducer("FOP SVG Renderer");
           pdfStream = this.pdfDoc.makeStream();
  -        this.width = width;
  -        this.height = height;
   
  +        graphicsState = new PDFState();
  +
           currentFontName = "";
           currentFontSize = 0;
           currentYPosition = 0;
           currentXPosition = 0;
  +    }
   
  +    void setupDocument(OutputStream stream, int width, int height) {
  +        this.width = width;
  +        this.height = height;
  +        this.stream = stream;
           currentStream.write("1 0 0 -1 0 " + height + " cm\n");
  +    }
   
  +    /**
  +     * Create a new PDFDocumentGraphics2D.
  +     * This is used to create a new pdf document of the given height
  +     * and width.
  +     * The resulting document is written to the stream after rendering.
  +     *
  +     * @param textAsShapes set this to true so that text will be rendered
  +     * using curves and not the font.
  +     * @param stream the stream that the final document should be written to.
  +     * @param width the width of the document
  +     * @param height the height of the document
  +     */
  +    public PDFDocumentGraphics2D(boolean textAsShapes, OutputStream stream,
  +                                 int width, int height) {
  +        this(textAsShapes);
  +        setupDocument(stream, width, height);
       }
   
       public FontState getFontState() {
  @@ -110,7 +130,7 @@
        */
       public void setBackgroundColor(Color col) {
           Color c = col;
  -        currentColour = new PDFColor(c.getRed(), c.getGreen(), c.getBlue());
  +        PDFColor currentColour = new PDFColor(c.getRed(), c.getGreen(), c.getBlue());
           currentStream.write("q\n");
           currentStream.write(currentColour.getColorSpaceOut(true));
   
  
  
  
  1.23      +95 -70    xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java
  
  Index: PDFGraphics2D.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- PDFGraphics2D.java	2001/11/06 08:34:53	1.22
  +++ PDFGraphics2D.java	2001/11/09 11:32:42	1.23
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFGraphics2D.java,v 1.22 2001/11/06 08:34:53 keiron Exp $
  + * $Id: PDFGraphics2D.java,v 1.23 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -32,18 +32,15 @@
   
   import java.util.Map;
   import java.util.ArrayList;
  -import java.util.Hashtable;
  +import java.util.HashMap;
   
   /**
  - * This concrete implementation of <tt>AbstractGraphics2D</tt> is a
  - * simple help to programmers to get started with their own
  - * implementation of <tt>Graphics2D</tt>.
  - * <tt>DefaultGraphics2D</tt> implements all the abstract methods
  - * is <tt>AbstractGraphics2D</tt> and makes it easy to start
  - * implementing a <tt>Graphic2D</tt> piece-meal.
  + * PDF Graphics 2D.
  + * Used for drawing into a pdf document as if it is a graphics object.
  + * This takes a pdf document and draws into it.
    *
    * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
  - * @version $Id: PDFGraphics2D.java,v 1.22 2001/11/06 08:34:53 keiron Exp $
  + * @version $Id: PDFGraphics2D.java,v 1.23 2001/11/09 11:32:42 keiron Exp $
    * @see org.apache.batik.ext.awt.g2d.AbstractGraphics2D
    */
   public class PDFGraphics2D extends AbstractGraphics2D {
  @@ -55,6 +52,11 @@
       protected PDFDocument pdfDoc;
   
       /**
  +     * the current state of the pdf graphics
  +     */
  +    PDFState graphicsState;
  +
  +    /**
        * the current annotation list to add annotations to
        */
       PDFAnnotList currentAnnotList = null;
  @@ -88,11 +90,6 @@
       protected int currentXPosition = 0;
   
       /**
  -     * the current colour for use in svg
  -     */
  -    PDFColor currentColour = new PDFColor(0, 0, 0);
  -
  -    /**
        * Create a new PDFGraphics2D with the given pdf document info.
        * This is used to create a Graphics object for use inside an already
        * existing document.
  @@ -108,7 +105,7 @@
           fontState = fs;
       }
   
  -    public PDFGraphics2D(boolean textAsShapes) {
  +    protected PDFGraphics2D(boolean textAsShapes) {
           super(textAsShapes);
       }
   
  @@ -476,7 +473,6 @@
           fontState = null;
           currentStream = null;
           currentFontName = null;
  -        currentColour = null;
       }
   
       /**
  @@ -503,50 +499,60 @@
               return;
           }
   
  -        currentStream.write("q\n");
  +        AffineTransform trans = getTransform();
  +        double[] tranvals = new double[6];
  +        trans.getMatrix(tranvals);
  +
           Shape imclip = getClip();
  -        writeClip(imclip);
  +        boolean newClip = graphicsState.checkClip(imclip);
  +        boolean newTransform = graphicsState.checkTransform(tranvals);
  +
  +        if(newClip || newTransform) { 
  +            currentStream.write("q\n");
  +            graphicsState.push();
  +            if(newClip) {
  +                writeClip(imclip);
  +            }
  +            if(newTransform) {
  +                currentStream.write(PDFNumber.doubleOut(tranvals[0], 5) + " "
  +                            + PDFNumber.doubleOut(tranvals[1], 5) + " "
  +                            + PDFNumber.doubleOut(tranvals[2], 5) + " "
  +                            + PDFNumber.doubleOut(tranvals[3], 5) + " "
  +                            + PDFNumber.doubleOut(tranvals[4], 5) + " "
  +                            + PDFNumber.doubleOut(tranvals[5], 5) + " cm\n");
  +            }
  +        }
           applyColor(c, false);
   
           applyPaint(getPaint(), false);
           applyStroke(getStroke());
   
  -        AffineTransform trans = getTransform();
  -        double[] tranvals = new double[6];
  -        trans.getMatrix(tranvals);
  -        currentStream.write(PDFNumber.doubleOut(tranvals[0]) + " "
  -                            + PDFNumber.doubleOut(tranvals[1]) + " "
  -                            + PDFNumber.doubleOut(tranvals[2]) + " "
  -                            + PDFNumber.doubleOut(tranvals[3]) + " "
  -                            + PDFNumber.doubleOut(tranvals[4]) + " "
  -                            + PDFNumber.doubleOut(tranvals[5]) + " cm\n");
  -
           PathIterator iter = s.getPathIterator(new AffineTransform());
           while (!iter.isDone()) {
               double vals[] = new double[6];
               int type = iter.currentSegment(vals);
               switch (type) {
               case PathIterator.SEG_CUBICTO:
  -                currentStream.write(PDFNumber.doubleOut(vals[0]) + " "
  -                                    + PDFNumber.doubleOut(vals[1]) + " "
  -                                    + PDFNumber.doubleOut(vals[2]) + " "
  -                                    + PDFNumber.doubleOut(vals[3]) + " "
  -                                    + PDFNumber.doubleOut(vals[4]) + " "
  -                                    + PDFNumber.doubleOut(vals[5]) + " c\n");
  +                currentStream.write(PDFNumber.doubleOut(vals[0], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[1], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[2], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[3], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[4], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[5], 5) + " c\n");
                   break;
               case PathIterator.SEG_LINETO:
  -                currentStream.write(PDFNumber.doubleOut(vals[0]) + " "
  -                                    + PDFNumber.doubleOut(vals[1]) + " l\n");
  +                currentStream.write(PDFNumber.doubleOut(vals[0], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[1], 5) + " l\n");
                   break;
               case PathIterator.SEG_MOVETO:
  -                currentStream.write(PDFNumber.doubleOut(vals[0]) + " "
  -                                    + PDFNumber.doubleOut(vals[1]) + " m\n");
  +                currentStream.write(PDFNumber.doubleOut(vals[0], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[1], 5) + " m\n");
                   break;
               case PathIterator.SEG_QUADTO:
  -                currentStream.write(PDFNumber.doubleOut(vals[0]) + " "
  -                                    + PDFNumber.doubleOut(vals[1]) + " "
  -                                    + PDFNumber.doubleOut(vals[2]) + " "
  -                                    + PDFNumber.doubleOut(vals[3]) + " y\n");
  +                currentStream.write(PDFNumber.doubleOut(vals[0], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[1], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[2], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[3], 5) + " y\n");
                   break;
               case PathIterator.SEG_CLOSE:
                   currentStream.write("h\n");
  @@ -557,7 +563,10 @@
               iter.next();
           }
           doDrawing(false, true, false);
  -        currentStream.write("Q\n");
  +        if(newClip || newTransform) {
  +            currentStream.write("Q\n");
  +            graphicsState.pop();
  +        }
       }
   
       protected void writeClip(Shape s) {
  @@ -608,7 +617,7 @@
           Color c = col;
           if (c.getColorSpace().getType()
                   == java.awt.color.ColorSpace.TYPE_RGB) {
  -            currentColour = new PDFColor(c.getRed(), c.getGreen(),
  +            PDFColor currentColour = new PDFColor(c.getRed(), c.getGreen(),
                                            c.getBlue());
               currentStream.write(currentColour.getColorSpaceOut(fill));
           } else if (c.getColorSpace().getType()
  @@ -619,7 +628,7 @@
                   // convert the float elements to doubles for pdf
                   cmyk[i] = cComps[i];
               }
  -            currentColour = new PDFColor(cmyk[0], cmyk[1], cmyk[2], cmyk[3]);
  +            PDFColor currentColour = new PDFColor(cmyk[0], cmyk[1], cmyk[2], cmyk[3]);
               currentStream.write(currentColour.getColorSpaceOut(fill));
           } else if (c.getColorSpace().getType()
                      == java.awt.color.ColorSpace.TYPE_2CLR) {
  @@ -629,8 +638,8 @@
               for (int i = 0; i < 1; i++) {
                   blackMagenta[i] = cComps[i];
               }
  -            // currentColour = new PDFColor(blackMagenta[0], blackMagenta[1]);
  -            currentStream.write(currentColour.getColorSpaceOut(fill));
  +            //PDFColor  currentColour = new PDFColor(blackMagenta[0], blackMagenta[1]);
  +            //currentStream.write(currentColour.getColorSpaceOut(fill));
           } else {
               System.err.println("Color Space not supported by PDFGraphics2D");
           }
  @@ -875,7 +884,7 @@
   
           currentStream.write("BT\n");
   
  -        Hashtable kerning = null;
  +        HashMap kerning = null;
           boolean kerningAvailable = false;
   
           kerning = fontState.getKerning();
  @@ -952,9 +961,9 @@
       }
   
       private void addKerning(StringWriter buf, Integer ch1, Integer ch2,
  -                            Hashtable kerning, String startText,
  +                            HashMap kerning, String startText,
                               String endText) {
  -        Hashtable kernPair = (Hashtable)kerning.get(ch1);
  +        HashMap kernPair = (HashMap)kerning.get(ch1);
   
           if (kernPair != null) {
               Integer width = (Integer)kernPair.get(ch2);
  @@ -1086,15 +1095,28 @@
                   return;
               }
           }
  -        currentStream.write("q\n");
           Shape imclip = getClip();
  -        writeClip(imclip);
  +        boolean newState = graphicsState.checkClip(imclip);
  +
  +        if(newState) {
  +            currentStream.write("q\n");
  +            graphicsState.push();
  +            writeClip(imclip);
  +            graphicsState.setClip(imclip);
  +        }
           c = getColor();
  -        applyColor(c, true);
  +        if(graphicsState.setColor(c)) {
  +            applyColor(c, true);
  +        }
           c = getBackground();
  -        applyColor(c, false);
  +        if(graphicsState.setBackColor(c)) {
  +            applyColor(c, false);
  +        }
   
  -        applyPaint(getPaint(), true);
  +        Paint paint = getPaint();
  +        if(graphicsState.setPaint(paint)) {
  +            applyPaint(paint, true);
  +        }
   
           PathIterator iter = s.getPathIterator(getTransform());
           while (!iter.isDone()) {
  @@ -1102,26 +1124,26 @@
               int type = iter.currentSegment(vals);
               switch (type) {
               case PathIterator.SEG_CUBICTO:
  -                currentStream.write(PDFNumber.doubleOut(vals[0]) + " "
  -                                    + PDFNumber.doubleOut(vals[1]) + " "
  -                                    + PDFNumber.doubleOut(vals[2]) + " "
  -                                    + PDFNumber.doubleOut(vals[3]) + " "
  -                                    + PDFNumber.doubleOut(vals[4]) + " "
  -                                    + PDFNumber.doubleOut(vals[5]) + " c\n");
  +                currentStream.write(PDFNumber.doubleOut(vals[0], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[1], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[2], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[3], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[4], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[5], 5) + " c\n");
                   break;
               case PathIterator.SEG_LINETO:
  -                currentStream.write(PDFNumber.doubleOut(vals[0]) + " "
  -                                    + PDFNumber.doubleOut(vals[1]) + " l\n");
  +                currentStream.write(PDFNumber.doubleOut(vals[0], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[1], 5) + " l\n");
                   break;
               case PathIterator.SEG_MOVETO:
  -                currentStream.write(PDFNumber.doubleOut(vals[0]) + " "
  -                                    + PDFNumber.doubleOut(vals[1]) + " m\n");
  +                currentStream.write(PDFNumber.doubleOut(vals[0], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[1], 5) + " m\n");
                   break;
               case PathIterator.SEG_QUADTO:
  -                currentStream.write(PDFNumber.doubleOut(vals[0]) + " "
  -                                    + PDFNumber.doubleOut(vals[1]) + " "
  -                                    + PDFNumber.doubleOut(vals[2]) + " "
  -                                    + PDFNumber.doubleOut(vals[3]) + " y\n");
  +                currentStream.write(PDFNumber.doubleOut(vals[0], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[1], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[2], 5) + " "
  +                                    + PDFNumber.doubleOut(vals[3], 5) + " y\n");
                   break;
               case PathIterator.SEG_CLOSE:
                   currentStream.write("h\n");
  @@ -1133,7 +1155,10 @@
           }
           doDrawing(true, false,
                     iter.getWindingRule() == PathIterator.WIND_EVEN_ODD);
  -        currentStream.write("Q\n");
  +        if(newState) {
  +            currentStream.write("Q\n");
  +            graphicsState.pop();
  +        }
       }
   
       protected void doDrawing(boolean fill, boolean stroke, boolean nonzero) {
  
  
  
  1.8       +10 -9     xml-fop/src/org/apache/fop/svg/PDFTextPainter.java
  
  Index: PDFTextPainter.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFTextPainter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PDFTextPainter.java	2001/10/12 06:40:13	1.7
  +++ PDFTextPainter.java	2001/11/09 11:32:42	1.8
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFTextPainter.java,v 1.7 2001/10/12 06:40:13 keiron Exp $
  + * $Id: PDFTextPainter.java,v 1.8 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -36,7 +36,7 @@
    * Renders the attributed character iterator of a <tt>TextNode</tt>.
    *
    * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
  - * @version $Id: PDFTextPainter.java,v 1.7 2001/10/12 06:40:13 keiron Exp $
  + * @version $Id: PDFTextPainter.java,v 1.8 2001/11/09 11:32:42 keiron Exp $
    */
   public class PDFTextPainter implements TextPainter {
       FontState fontState;
  @@ -103,10 +103,10 @@
                   String name = fam.getFamilyName();
                   if (fi.hasFont(name, weight, style)) {
                       try {
  -                        int fsize = (int)size.floatValue();
  +                        int fsize = (int)(size.floatValue() * 1000);
                           fontState = new FontState(fontState.getFontInfo(),
                                                     name, style, weight,
  -                                                  fsize * 1000, 0);
  +                                                  fsize, 0);
                       } catch (org.apache.fop.apps.FOPException fope) {
                           fope.printStackTrace();
                       }
  @@ -117,9 +117,9 @@
           }
           if (!found) {
               try {
  -                int fsize = (int)size.floatValue();
  +                int fsize = (int)(size.floatValue() * 1000);
                   fontState = new FontState(fontState.getFontInfo(), "any",
  -                                          style, weight, fsize * 1000, 0);
  +                                          style, weight, fsize, 0);
               } catch (org.apache.fop.apps.FOPException fope) {
                   fope.printStackTrace();
               }
  @@ -230,13 +230,14 @@
       }
   
       public Shape getDecoratedShape(TextNode node) {
  -        System.out.println("PDFText getDecoratedShape");
  +        //System.out.println("PDFText getDecoratedShape");
           return new Rectangle(1, 1);
       }
   
       public Rectangle2D getBounds(TextNode node) {
  -        System.out.println("PDFText getBounds");
  -        return null;
  +        //System.out.println("PDFText getBounds");
  +        Rectangle2D bounds = new Rectangle2D.Float(0, 0, 100, 12);
  +        return bounds;
       }
   
       public Rectangle2D getDecoratedBounds(TextNode node) {
  
  
  
  1.13      +12 -9     xml-fop/src/org/apache/fop/svg/PDFTranscoder.java
  
  Index: PDFTranscoder.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFTranscoder.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- PDFTranscoder.java	2001/10/30 07:04:10	1.12
  +++ PDFTranscoder.java	2001/11/09 11:32:42	1.13
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFTranscoder.java,v 1.12 2001/10/30 07:04:10 keiron Exp $
  + * $Id: PDFTranscoder.java,v 1.13 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -123,7 +123,7 @@
    * millimeter conversion factor.
    *
    * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
  - * @version $Id: PDFTranscoder.java,v 1.12 2001/10/30 07:04:10 keiron Exp $
  + * @version $Id: PDFTranscoder.java,v 1.13 2001/11/09 11:32:42 keiron Exp $
    */
   public class PDFTranscoder extends XMLAbstractTranscoder {
   
  @@ -169,10 +169,11 @@
           svgCtx.setPixelToMM(userAgent.getPixelToMM());
           ((SVGOMDocument)document).setSVGContext(svgCtx);
   
  -        boolean stroke = true;
  +        /*boolean stroke = true;
           if (hints.containsKey(KEY_STROKE_TEXT)) {
               stroke = ((Boolean)hints.get(KEY_STROKE_TEXT)).booleanValue();
  -        }
  +        }*/
  +        PDFDocumentGraphics2D graphics = new PDFDocumentGraphics2D(false);
   
           // build the GVT tree
           GVTBuilder builder = new GVTBuilder();
  @@ -181,7 +182,10 @@
           TextPainter textPainter = null;
           textPainter = new StrokingTextPainter();
           ctx.setTextPainter(textPainter);
  -        
  +
  +        PDFTextElementBridge pdfTextElementBridge = new PDFTextElementBridge(graphics.getFontState());
  +        ctx.putBridge(pdfTextElementBridge);
  +
           PDFAElementBridge pdfAElementBridge = new PDFAElementBridge();
           AffineTransform currentTransform = new AffineTransform(1, 0, 0, 1, 0, 0);
           pdfAElementBridge.setCurrentTransform(currentTransform);
  @@ -267,14 +271,13 @@
           int w = (int)width;
           int h = (int)height;
   
  -        PDFDocumentGraphics2D graphics = new PDFDocumentGraphics2D(stroke,
  -                output.getOutputStream(), w, h);
  +        graphics.setupDocument(output.getOutputStream(), w, h);
           graphics.setSVGDimension(docWidth, docHeight);
           currentTransform.setTransform(1, 0, 0, -1, 0, height);
  -        if (!stroke) {
  +        /*if (!stroke) {
               textPainter = new PDFTextPainter(graphics.getFontState());
               ctx.setTextPainter(textPainter);
  -        }
  +        }*/
   
           if (hints.containsKey(ImageTranscoder.KEY_BACKGROUND_COLOR)) {
               graphics.setBackgroundColor((Color)hints.get(ImageTranscoder.KEY_BACKGROUND_COLOR));
  
  
  
  1.12      +2 -2      xml-fop/src/org/apache/fop/svg/SVGArea.java
  
  Index: SVGArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGArea.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SVGArea.java	2001/10/22 09:30:33	1.11
  +++ SVGArea.java	2001/11/09 11:32:42	1.12
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SVGArea.java,v 1.11 2001/10/22 09:30:33 keiron Exp $
  + * $Id: SVGArea.java,v 1.12 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -12,7 +12,7 @@
   import org.apache.fop.layout.FontState;
   import org.apache.fop.layout.Area;
   
  -import java.util.*;
  +//import java.util.*;
   
   import org.w3c.dom.svg.*;
   import org.w3c.dom.*;
  
  
  
  1.18      +2 -6      xml-fop/src/org/apache/fop/svg/SVGElement.java
  
  Index: SVGElement.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGElement.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SVGElement.java	2001/11/06 08:34:53	1.17
  +++ SVGElement.java	2001/11/09 11:32:42	1.18
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SVGElement.java,v 1.17 2001/11/06 08:34:53 keiron Exp $
  + * $Id: SVGElement.java,v 1.18 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -52,7 +52,7 @@
        * @param parent the parent formatting object
        * @param propertyList the explicit properties of this object
        */
  -    public SVGElement(FObj parent) {
  +    public SVGElement(FONode parent) {
           super(parent);
       }
   
  @@ -75,11 +75,7 @@
               throw new FOPException("SVG not in fo:instream-foreign-object");
           }
   
  -        if (this.marker == START) {
               this.fs = area.getFontState();
  -
  -            this.marker = 0;
  -        }
   
           final Element svgRoot = element;
           /* create an SVG area */
  
  
  
  1.20      +5 -6      xml-fop/src/org/apache/fop/svg/SVGElementMapping.java
  
  Index: SVGElementMapping.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGElementMapping.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- SVGElementMapping.java	2001/11/06 08:34:53	1.19
  +++ SVGElementMapping.java	2001/11/09 11:32:42	1.20
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SVGElementMapping.java,v 1.19 2001/11/06 08:34:53 keiron Exp $
  + * $Id: SVGElementMapping.java,v 1.20 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -7,10 +7,9 @@
   
   package org.apache.fop.svg;
   
  -import java.util.Enumeration;
   import java.util.HashMap;
   
  -import org.apache.fop.fo.FObj;
  +import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.FOTreeBuilder;
   import org.apache.fop.fo.ElementMapping;
   import org.apache.fop.apps.Driver;
  @@ -33,7 +32,7 @@
   
                   foObjs = new HashMap();
                   foObjs.put("svg", new SE());
  -                foObjs.put("<default>", new SVGMaker());
  +                foObjs.put(DEFAULT, new SVGMaker());
               }
   
               String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
  @@ -44,13 +43,13 @@
       }
   
       class SVGMaker extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new SVGObj(parent);
           }
       }
   
       class SE extends ElementMapping.Maker {
  -        public FObj make(FObj parent) {
  +        public FONode make(FONode parent) {
               return new SVGElement(parent);
           }
       }
  
  
  
  1.9       +2 -7      xml-fop/src/org/apache/fop/svg/SVGObj.java
  
  Index: SVGObj.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGObj.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SVGObj.java	2001/11/06 08:34:53	1.8
  +++ SVGObj.java	2001/11/09 11:32:42	1.9
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SVGObj.java,v 1.8 2001/11/06 08:34:53 keiron Exp $
  + * $Id: SVGObj.java,v 1.9 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,12 +8,7 @@
   package org.apache.fop.svg;
   
   import org.apache.fop.fo.*;
  -import org.apache.fop.layout.Area;
  -import org.apache.fop.layout.FontState;
  -import org.apache.fop.apps.FOPException;
   
  -import org.w3c.dom.Element;
  -
   public class SVGObj extends XMLObj {
       /**
        * constructs an svg object (called by Maker).
  @@ -21,7 +16,7 @@
        * @param parent the parent formatting object
        * @param propertyList the explicit properties of this object
        */
  -    public SVGObj(FObj parent) {
  +    public SVGObj(FONode parent) {
           super(parent);
       }
   
  
  
  
  1.5       +1 -3      xml-fop/src/org/apache/fop/svg/SVGUserAgent.java
  
  Index: SVGUserAgent.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGUserAgent.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SVGUserAgent.java	2001/11/02 11:06:08	1.4
  +++ SVGUserAgent.java	2001/11/09 11:32:42	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SVGUserAgent.java,v 1.4 2001/11/02 11:06:08 keiron Exp $
  + * $Id: SVGUserAgent.java,v 1.5 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -115,7 +115,6 @@
       public void openLink(SVGAElement elt) {
       }
   
  -
       public Point getClientAreaLocationOnScreen() {
           return new Point(0, 0);
       }
  @@ -145,7 +144,6 @@
       public void registerExtension(BridgeExtension be) {}
   
       public void handleElement(Element elt, Object data) {}
  -
   
   }
   
  
  
  
  1.1                  xml-fop/src/org/apache/fop/svg/PDFTextElementBridge.java
  
  Index: PDFTextElementBridge.java
  ===================================================================
  /*
   * $Id: PDFTextElementBridge.java,v 1.1 2001/11/09 11:32:42 keiron Exp $
   * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
   * For details on use and redistribution please refer to the
   * LICENSE file included with these sources.
   */
  
  package org.apache.fop.svg;
  
  import org.apache.batik.gvt.TextNode;
  import org.apache.batik.bridge.*;
  
  import org.apache.batik.css.CSSOMReadOnlyStyleDeclaration;
  import org.apache.batik.gvt.CompositeGraphicsNode;
  import org.apache.batik.gvt.GraphicsNode;
  
  import org.apache.fop.layout.FontState;
  
  import org.w3c.dom.Element;
  import org.w3c.dom.Node;
  
  import org.apache.batik.gvt.GraphicsNode;
  
  /**
   * Bridge class for the &lt;text> element.
   * This bridge will use the direct text painter if the text
   * for the element is simple.
   *
   * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
   */
  public class PDFTextElementBridge extends SVGTextElementBridge {
      private PDFTextPainter pdfTextPainter;
  
      /**
       * Constructs a new bridge for the &lt;text> element.
       */
      public PDFTextElementBridge(FontState fs) {
          pdfTextPainter = new PDFTextPainter(fs);
      }
  
      public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) {
          GraphicsNode node = super.createGraphicsNode(ctx, e);
          if(isSimple(ctx, e, node)) {
              ((TextNode)node).setTextPainter(getTextPainter());
          }
          return node;
      }
  
      private PDFTextPainter getTextPainter() {
          return pdfTextPainter;
      }
  
      /**
       * Check if text element contains simple text.
       * This checks the children of the text element to determine
       * if the text is simple. The text is simple if it can be rendered
       * with basic text drawing algorithms. This means there are no
       * alternate characters, the font is known and there are no effects
       * applied to the text.
       */
      private boolean isSimple(BridgeContext ctx, Element element, GraphicsNode node) {
          CSSOMReadOnlyStyleDeclaration cssDecl
              = CSSUtilities.getComputedStyle(element);
          UnitProcessor.Context uctx = UnitProcessor.createContext(ctx, element);
  
          // Font size, in user space units.
          float fs = TextUtilities.convertFontSize(element, ctx, cssDecl, uctx);
          if(((int)fs) != fs) {
              return false;
          }
  
          Element nodeElement;
          for (Node n = element.getFirstChild();
               n != null;
               n = n.getNextSibling()) {
  
              switch (n.getNodeType()) {
              case Node.ELEMENT_NODE:
  
                  nodeElement = (Element)n;
  
                  if (n.getLocalName().equals(SVG_TSPAN_TAG)
                      || n.getLocalName().equals(SVG_ALT_GLYPH_TAG)) {
                      return false;
                  } else if (n.getLocalName().equals(SVG_TEXT_PATH_TAG)) {
                      return false;
                  } else if (n.getLocalName().equals(SVG_TREF_TAG)) {
                      return false;
                  }
                  break;
              case Node.TEXT_NODE:
              case Node.CDATA_SECTION_NODE:
              }
          }
  
          if(CSSUtilities.convertFilter(element, node, ctx) != null) {
              return false;
          }
  
          return true;
      }
  }
  
  
  
  1.3       +1 -2      xml-fop/src/org/apache/fop/system/BufferManager.java
  
  Index: BufferManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/system/BufferManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BufferManager.java	2001/07/30 20:29:35	1.2
  +++ BufferManager.java	2001/11/09 11:32:42	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: BufferManager.java,v 1.2 2001/07/30 20:29:35 tore Exp $
  + * $Id: BufferManager.java,v 1.3 2001/11/09 11:32:42 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -134,7 +134,6 @@
   
               if (csize < values.length) {
                   System.out.println("Cache size too small");
  -                System.exit(0);
               }
   
   
  
  
  

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