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 gm...@apache.org on 2004/10/24 02:03:50 UTC

cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java BasicLinkLayoutManager.java ContentLayoutManager.java LayoutManager.java LineLayoutManager.java PageNumberCitationLayoutManager.java PageSequenceLayoutManager.java

gmazza      2004/10/23 17:03:50

  Modified:    src/java/org/apache/fop/apps FOUserAgent.java
               src/java/org/apache/fop/area AreaTreeHandler.java
                        AreaTreeModel.java LinkResolver.java
                        PageViewport.java RenderPagesModel.java
                        StorePagesModel.java TreeExt.java
               src/java/org/apache/fop/area/extensions BookmarkData.java
               src/java/org/apache/fop/area/inline
                        UnresolvedPageNumber.java
               src/java/org/apache/fop/fo FObj.java
               src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java
                        BasicLinkLayoutManager.java
                        ContentLayoutManager.java LayoutManager.java
                        LineLayoutManager.java
                        PageNumberCitationLayoutManager.java
                        PageSequenceLayoutManager.java
  Added:       src/java/org/apache/fop/area Resolvable.java
  Removed:     src/java/org/apache/fop/area Resolveable.java
  Log:
  1.) Rename of interface Resolveable to Resolvable.      (http://dictionary.reference.com/search?q=resolvable)
  2.) Reordering of methods in AreaTreeHandler, removal of unneeded TreeExt array.
  3.) Switch from AreaTreeModel.addExtension() to .handleExtension().
  4.) Removal of unneeded TreeExt.getName() (unused), getMimeType() (implementation
  of an Area Tree extension up to each renderer), and isResolvable() (code changed to
  use instanceof operator instead).
  5.) Couple of minor layout bugs fixed.
  
  Revision  Changes    Path
  1.19      +3 -3      xml-fop/src/java/org/apache/fop/apps/FOUserAgent.java
  
  Index: FOUserAgent.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/FOUserAgent.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- FOUserAgent.java	10 Oct 2004 12:24:03 -0000	1.18
  +++ FOUserAgent.java	24 Oct 2004 00:03:49 -0000	1.19
  @@ -57,8 +57,8 @@
    * eg. bookmarks will be held in a special hierarchical area representing
    * the title and bookmark structure
    * <br>
  - * These areas may contain resolveable areas that will be processed
  - * with other resolveable areas
  + * These areas may contain resolvable areas that will be processed
  + * with other resolvable areas
    */
   public class FOUserAgent {
   
  
  
  
  1.14      +56 -59    xml-fop/src/java/org/apache/fop/area/AreaTreeHandler.java
  
  Index: AreaTreeHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/AreaTreeHandler.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- AreaTreeHandler.java	4 Oct 2004 00:59:38 -0000	1.13
  +++ AreaTreeHandler.java	24 Oct 2004 00:03:49 -0000	1.14
  @@ -86,8 +86,6 @@
       // list of id's yet to be resolved and arraylists of pages
       private Map resolve = new HashMap();
   
  -    private List treeExtensions = new ArrayList();
  -
       private static Log log = LogFactory.getLog(AreaTreeHandler.class);
   
       /**
  @@ -136,7 +134,7 @@
           Set todo = (Set)resolve.get(id);
           if (todo != null) {
               for (Iterator iter = todo.iterator(); iter.hasNext();) {
  -                Resolveable res = (Resolveable)iter.next();
  +                Resolvable res = (Resolvable)iter.next();
                   res.resolve(id, list);
               }
               resolve.remove(id);
  @@ -155,9 +153,9 @@
       /**
        * Add an unresolved object with a given id.
        * @param id the id reference that needs resolving
  -     * @param res the Resolveable object to resolve
  +     * @param res the Resolvable object to resolve
        */
  -    public void addUnresolvedID(String id, Resolveable res) {
  +    public void addUnresolvedID(String id, Resolvable res) {
           Set todo = (Set)resolve.get(id);
           if (todo == null) {
               todo = new HashSet();
  @@ -167,34 +165,6 @@
       }
   
       /**
  -     * Add a tree extension.
  -     * This checks if the extension is resolveable and attempts
  -     * to resolve or add the resolveable ids for later resolution.
  -     * @param ext the tree extension to add.
  -     */
  -    private void addTreeExtension(TreeExt ext) {
  -        treeExtensions.add(ext);
  -        if (ext.isResolveable()) {
  -            Resolveable res = (Resolveable)ext;
  -            String[] ids = res.getIDs();
  -            for (int count = 0; count < ids.length; count++) {
  -                if (idLocations.containsKey(ids[count])) {
  -                    res.resolve(ids[count], (List)idLocations.get(ids[count]));
  -                } else {
  -                    Set todo = (Set)resolve.get(ids[count]);
  -                    if (todo == null) {
  -                        todo = new HashSet();
  -                        resolve.put(ids[count], todo);
  -                    }
  -                    todo.add(ext);
  -                }
  -            }
  -        } else {
  -            model.addExtension(ext, TreeExt.IMMEDIATELY);
  -        }
  -    }
  -
  -    /**
        * Prepare AreaTreeHandler for document processing
        * This is called from FOTreeBuilder.startDocument()
        *
  @@ -224,7 +194,7 @@
               String id = (String)iter.next();
               Set list = (Set)resolve.get(id);
               for (Iterator resIter = list.iterator(); resIter.hasNext();) {
  -                Resolveable res = (Resolveable)resIter.next();
  +                Resolvable res = (Resolvable)resIter.next();
                   if (!res.isResolved()) {
                       res.resolve(id, null);
                   }
  @@ -258,6 +228,36 @@
       }
   
       /**
  +     * End the PageSequence.
  +     * The PageSequence formats Pages and adds them to the AreaTree.
  +     * The area tree then handles what happens with the pages.
  +     *
  +     * @param pageSequence the page sequence ending
  +     */
  +    public void endPageSequence(PageSequence pageSequence) {
  +
  +        if (collectStatistics) {
  +            if (MEM_PROFILE_WITH_GC) {
  +                // This takes time but gives better results
  +                System.gc();
  +            }
  +            long memoryNow = runtime.totalMemory() - runtime.freeMemory();
  +            if (logger != null) {
  +                logger.debug("Current heap size: " + (memoryNow / 1024L) + "Kb");
  +            }
  +        }
  +
  +        // If no main flow, nothing to layout!
  +        if (pageSequence.getMainFlow() != null) {
  +            addBookmarks(pageSequence.getRoot().getBookmarks());
  +            PageSequenceLayoutManager pageSLM 
  +                = new PageSequenceLayoutManager(this, pageSequence);
  +            pageSLM.run();
  +            pageSequence.setCurrentPageNumber(pageSLM.getPageCount());
  +        }
  +    }
  +
  +    /**
        * Create the bookmark data in the area tree.
        */
       private void addBookmarks(Bookmarks bookmarks) {
  @@ -295,32 +295,29 @@
       }
   
       /**
  -     * End the PageSequence.
  -     * The PageSequence formats Pages and adds them to the AreaTree.
  -     * The area tree then handles what happens with the pages.
  -     *
  -     * @param pageSequence the page sequence ending
  +     * Add a tree extension.
  +     * This checks if the extension is resolvable and attempts
  +     * to resolve or add the resolvable ids for later resolution.
  +     * @param ext the tree extension to add.
        */
  -    public void endPageSequence(PageSequence pageSequence) {
  -
  -        if (collectStatistics) {
  -            if (MEM_PROFILE_WITH_GC) {
  -                // This takes time but gives better results
  -                System.gc();
  -            }
  -            long memoryNow = runtime.totalMemory() - runtime.freeMemory();
  -            if (logger != null) {
  -                logger.debug("Current heap size: " + (memoryNow / 1024L) + "Kb");
  +    private void addTreeExtension(TreeExt ext) {
  +        if (ext instanceof Resolvable) {
  +            Resolvable res = (Resolvable)ext;
  +            String[] ids = res.getIDs();
  +            for (int count = 0; count < ids.length; count++) {
  +                if (idLocations.containsKey(ids[count])) {
  +                    res.resolve(ids[count], (List)idLocations.get(ids[count]));
  +                } else {
  +                    Set todo = (Set)resolve.get(ids[count]);
  +                    if (todo == null) {
  +                        todo = new HashSet();
  +                        resolve.put(ids[count], todo);
  +                    }
  +                    todo.add(ext);
  +                }
               }
  -        }
  -
  -        // If no main flow, nothing to layout!
  -        if (pageSequence.getMainFlow() != null) {
  -            addBookmarks(pageSequence.getRoot().getBookmarks());
  -            PageSequenceLayoutManager pageSLM 
  -                = new PageSequenceLayoutManager(this, pageSequence);
  -            pageSLM.run();
  -            pageSequence.setCurrentPageNumber(pageSLM.getPageCount());
  +        } else {
  +            model.handleExtension(ext, TreeExt.IMMEDIATELY);
           }
       }
   }
  
  
  
  1.8       +3 -3      xml-fop/src/java/org/apache/fop/area/AreaTreeModel.java
  
  Index: AreaTreeModel.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/AreaTreeModel.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AreaTreeModel.java	2 Oct 2004 19:24:31 -0000	1.7
  +++ AreaTreeModel.java	24 Oct 2004 00:03:49 -0000	1.8
  @@ -43,11 +43,11 @@
       public abstract void addPage(PageViewport page);
   
       /**
  -     * Add an extension to this model.
  -     * @param ext the extension to add
  +     * Handle an area tree extension 
  +     * @param ext the extension to handle
        * @param when when the extension should be handled
        */
  -    public abstract void addExtension(TreeExt ext, int when);
  +    public abstract void handleExtension(TreeExt ext, int when);
   
       /**
        * Signal the end of the document for any processing.
  
  
  
  1.3       +3 -3      xml-fop/src/java/org/apache/fop/area/LinkResolver.java
  
  Index: LinkResolver.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/LinkResolver.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LinkResolver.java	27 Feb 2004 17:41:26 -0000	1.2
  +++ LinkResolver.java	24 Oct 2004 00:03:49 -0000	1.3
  @@ -24,14 +24,14 @@
   
   // FOP
   import org.apache.fop.area.Trait;
  -import org.apache.fop.area.Resolveable;
  +import org.apache.fop.area.Resolvable;
   import org.apache.fop.area.PageViewport;
   import org.apache.fop.area.Area;
   
   /**
    * Link resolving for resolving internal links.
    */
  -public class LinkResolver implements Resolveable, Serializable {
  +public class LinkResolver implements Resolvable, Serializable {
       private boolean resolved = false;
       private String idRef;
       private Area area;
  
  
  
  1.4       +3 -3      xml-fop/src/java/org/apache/fop/area/PageViewport.java
  
  Index: PageViewport.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/PageViewport.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PageViewport.java	27 Feb 2004 17:41:26 -0000	1.3
  +++ PageViewport.java	24 Oct 2004 00:03:49 -0000	1.4
  @@ -37,7 +37,7 @@
    * This is the level that creates the page.
    * The page (reference area) is then rendered inside the page object
    */
  -public class PageViewport implements Resolveable, Cloneable {
  +public class PageViewport implements Resolvable, Cloneable {
       
       private Page page;
       private Rectangle2D viewArea;
  @@ -131,7 +131,7 @@
        * @param id the id of the reference
        * @param res the resolver of the reference
        */
  -    public void addUnresolvedID(String id, Resolveable res) {
  +    public void addUnresolvedID(String id, Resolvable res) {
           if (unresolved == null) {
               unresolved = new HashMap();
           }
  @@ -177,7 +177,7 @@
                   List todo = (List)unresolved.get(id);
                   if (todo != null) {
                       for (int count = 0; count < todo.size(); count++) {
  -                        Resolveable res = (Resolveable)todo.get(count);
  +                        Resolvable res = (Resolvable)todo.get(count);
                           res.resolve(id, pages);
                       }
                   }
  
  
  
  1.7       +2 -8      xml-fop/src/java/org/apache/fop/area/RenderPagesModel.java
  
  Index: RenderPagesModel.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/RenderPagesModel.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RenderPagesModel.java	10 Oct 2004 12:24:03 -0000	1.6
  +++ RenderPagesModel.java	24 Oct 2004 00:03:49 -0000	1.7
  @@ -175,15 +175,9 @@
       }
   
       /**
  -     * Add an extension to this model.
  -     * If handle immediately then send directly to the renderer.
  -     * The after page ones are handled after the next page is added.
  -     * End of document extensions are added to a list to be
  -     * handled at the end.
  -     * @param ext the extension
  -     * @param when when to render the extension
  +     * @see org.apache.fop.area.AreaTreeModel#handleExtension(TreeExt, int)
        */
  -    public void addExtension(TreeExt ext, int when) {
  +    public void handleExtension(TreeExt ext, int when) {
           switch(when) {
               case TreeExt.IMMEDIATELY:
                   renderer.renderExtension(ext);
  
  
  
  1.10      +2 -6      xml-fop/src/java/org/apache/fop/area/StorePagesModel.java
  
  Index: StorePagesModel.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/StorePagesModel.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StorePagesModel.java	2 Oct 2004 19:24:31 -0000	1.9
  +++ StorePagesModel.java	24 Oct 2004 00:03:49 -0000	1.10
  @@ -92,13 +92,9 @@
       }
   
       /**
  -     * Add an extension to the store page model.
  -     * The extension is stored so that it can be retrieved in the
  -     * appropriate position.
  -     * @param ext the extension to add
  -     * @param when when the extension should be handled
  +     * @see org.apache.fop.area.AreaTreeModel#handleExtension(TreeExt, int)
        */
  -    public void addExtension(TreeExt ext, int when) {
  +    public void handleExtension(TreeExt ext, int when) {
           int seq, page;
           switch(when) {
               case TreeExt.IMMEDIATELY:
  
  
  
  1.3       +0 -23     xml-fop/src/java/org/apache/fop/area/TreeExt.java
  
  Index: TreeExt.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/TreeExt.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TreeExt.java	27 Feb 2004 17:41:26 -0000	1.2
  +++ TreeExt.java	24 Oct 2004 00:03:49 -0000	1.3
  @@ -45,27 +45,4 @@
        */
       public static final int END_OF_DOC = 2;
   
  -    /**
  -     * Check if this tree extension is also resolveable so that
  -     * the area tree can do id reference resolution when the
  -     * extension is added to the area tree.
  -     *
  -     * @return true if this also implements resolveable
  -     */
  -    boolean isResolveable();
  -
  -    /**
  -     * Get the mime type for the document that this area tree
  -     * extension applies.
  -     *
  -     * @return the mime type of the document where this applies
  -     */
  -    String getMimeType();
  -
  -    /**
  -     * Get the name of this extension.
  -     *
  -     * @return the name of this extension
  -     */
  -    String getName();
   }
  
  
  
  1.1                  xml-fop/src/java/org/apache/fop/area/Resolvable.java
  
  Index: Resolvable.java
  ===================================================================
  /*
   * Copyright 1999-2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  /* $Id: Resolvable.java,v 1.1 2004/10/24 00:03:49 gmazza Exp $ */
   
  package org.apache.fop.area;
  
  import java.util.List;
  
  /**
   * Resolvable Interface.
   * Classes that implement this can be resolved when
   * an id is added to the area tree.
   */
  public interface Resolvable {
  
      /**
       * Check if this area has been resolved.
       *
       * @return true once this area is resolved
       */
      boolean isResolved();
  
      /**
       * Get the array of id references of this resolvable object.
       * If this object contains child resolvables that are
       * resolved through this then it should return the id's of
       * the child also.
       *
       * @return the id references for resolving this object
       */
      String[] getIDs();
  
      /**
       * This resolves reference with a list of pages.
       * The pages (PageViewport) contain the rectangle of the area.
       * @param id the id to resolve
       * @param pages the list of pages with the id area
       *              may be null if not found
       */
      void resolve(String id, List pages);
  }
  
  
  
  1.6       +8 -35     xml-fop/src/java/org/apache/fop/area/extensions/BookmarkData.java
  
  Index: BookmarkData.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/extensions/BookmarkData.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BookmarkData.java	4 Oct 2004 00:59:38 -0000	1.5
  +++ BookmarkData.java	24 Oct 2004 00:03:49 -0000	1.6
  @@ -19,7 +19,7 @@
   package org.apache.fop.area.extensions;
   
   import org.apache.fop.area.PageViewport;
  -import org.apache.fop.area.Resolveable;
  +import org.apache.fop.area.Resolvable;
   import org.apache.fop.area.TreeExt;
   import org.apache.fop.area.AreaTreeModel;
   
  @@ -29,10 +29,10 @@
   
   /**
    * This class holds the PDF bookmark extension data.
  - * This implements Resolveable and TreeExt so that it can be
  - * added to the area tree as a resolveable tree extension.
  + * This implements Resolvable and TreeExt so that it can be
  + * added to the area tree as a resolvable tree extension.
    */
  -public class BookmarkData implements Resolveable, TreeExt {
  +public class BookmarkData implements Resolvable, TreeExt {
       private ArrayList subData = new ArrayList();
       private HashMap idRefs = new HashMap();
   
  @@ -146,34 +146,7 @@
       }
   
       /**
  -     * Check if this tree extension is resolveable.
  -     *
  -     * @return true since this also implements Resolveable
  -     */
  -    public boolean isResolveable() {
  -        return true;
  -    }
  -
  -    /**
  -     * Get the mime type of this area tree extension.
  -     *
  -     * @return this tree extension applies to pdf
  -     */
  -    public String getMimeType() {
  -        return "application/pdf";
  -    }
  -
  -    /**
  -     * Get the name of this area tree extension.
  -     *
  -     * @return the name of the PDF bookmark extension is "Bookmark"
  -     */
  -    public String getName() {
  -        return "Bookmark";
  -    }
  -
  -    /**
  -     * Check if this resolveable object has been resolved.
  +     * Check if this resolvable object has been resolved.
        * Once the id reference is null then it has been resolved.
        *
        * @return true if this has been resolved
  @@ -193,7 +166,7 @@
       }
   
       /**
  -     * Resolve this resolveable object.
  +     * Resolve this resolvable object.
        * This resolves the id reference and if possible also
        * resolves id references of child elements that have the same
        * id reference.
  @@ -230,7 +203,7 @@
           if (idRefs.size() == 0) {
               idRefs = null;
               if (areaTreeModel != null) {
  -                areaTreeModel.addExtension(this, TreeExt.AFTER_PAGE);
  +                areaTreeModel.handleExtension(this, TreeExt.AFTER_PAGE);
               }
           }
       }
  
  
  
  1.4       +4 -4      xml-fop/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java
  
  Index: UnresolvedPageNumber.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UnresolvedPageNumber.java	27 Feb 2004 17:40:58 -0000	1.3
  +++ UnresolvedPageNumber.java	24 Oct 2004 00:03:49 -0000	1.4
  @@ -19,21 +19,21 @@
   package org.apache.fop.area.inline;
   
   import org.apache.fop.area.PageViewport;
  -import org.apache.fop.area.Resolveable;
  +import org.apache.fop.area.Resolvable;
   
   import java.util.List;
   
   /**
  - * Unresolveable page number area.
  + * Unresolvable page number area.
    * This is a word area that resolves itself to a page number
    * from an id reference.
    */
  -public class UnresolvedPageNumber extends TextArea implements Resolveable {
  +public class UnresolvedPageNumber extends TextArea implements Resolvable {
       private boolean resolved = false;
       private String pageRefId;
   
       /**
  -     * Create a new unresolveable page number.
  +     * Create a new unresolvable page number.
        *
        * @param id the id reference for resolving this
        */
  
  
  
  1.85      +1 -1      xml-fop/src/java/org/apache/fop/fo/FObj.java
  
  Index: FObj.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObj.java,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- FObj.java	20 Oct 2004 21:04:43 -0000	1.84
  +++ FObj.java	24 Oct 2004 00:03:49 -0000	1.85
  @@ -111,7 +111,7 @@
        * @throws SAXParseException
        */
       public void bind(PropertyList pList) throws SAXParseException {
  -        throw new SAXParseException("Unconverted element " + this, locator);
  +//        throw new SAXParseException("Unconverted element " + this, locator);
       }
   
       /**
  
  
  
  1.30      +2 -2      xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
  
  Index: AbstractLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- AbstractLayoutManager.java	20 Oct 2004 13:39:33 -0000	1.29
  +++ AbstractLayoutManager.java	24 Oct 2004 00:03:50 -0000	1.30
  @@ -21,7 +21,7 @@
   import org.apache.fop.fo.FObj;
   import org.apache.fop.fo.FONode;
   import org.apache.fop.area.Area;
  -import org.apache.fop.area.Resolveable;
  +import org.apache.fop.area.Resolvable;
   import org.apache.fop.area.PageViewport;
   import org.apache.fop.fo.Constants;
   import org.apache.fop.fo.flow.Marker;
  @@ -364,7 +364,7 @@
        *
        * @see org.apache.fop.layoutmgr.LayoutManager
        */
  -    public void addUnresolvedArea(String id, Resolveable res) {
  +    public void addUnresolvedArea(String id, Resolvable res) {
           parentLM.addUnresolvedArea(id, res);
       }
   
  
  
  
  1.5       +2 -1      xml-fop/src/java/org/apache/fop/layoutmgr/BasicLinkLayoutManager.java
  
  Index: BasicLinkLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BasicLinkLayoutManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BasicLinkLayoutManager.java	20 Oct 2004 21:07:02 -0000	1.4
  +++ BasicLinkLayoutManager.java	24 Oct 2004 00:03:50 -0000	1.5
  @@ -37,6 +37,7 @@
        */
       public BasicLinkLayoutManager(BasicLink node) {
           super(node);
  +        fobj = node;
       }
   
       protected InlineParent createArea() {
  
  
  
  1.15      +2 -2      xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java
  
  Index: ContentLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ContentLayoutManager.java	2 Oct 2004 12:39:10 -0000	1.14
  +++ ContentLayoutManager.java	24 Oct 2004 00:03:50 -0000	1.15
  @@ -22,7 +22,7 @@
   import org.apache.fop.apps.FOUserAgent;
   import org.apache.fop.fo.flow.Marker;
   import org.apache.fop.area.Area;
  -import org.apache.fop.area.Resolveable;
  +import org.apache.fop.area.Resolvable;
   import org.apache.fop.area.PageViewport;
   
   import java.util.LinkedList;
  @@ -234,7 +234,7 @@
       }
   
       /** @see org.apache.fop.layoutmgr.LayoutManager */
  -    public void addUnresolvedArea(String id, Resolveable res) {
  +    public void addUnresolvedArea(String id, Resolvable res) {
           parentLM.addUnresolvedArea(id, res);
       }
   
  
  
  
  1.14      +5 -5      xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManager.java
  
  Index: LayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManager.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- LayoutManager.java	2 Oct 2004 12:39:10 -0000	1.13
  +++ LayoutManager.java	24 Oct 2004 00:03:50 -0000	1.14
  @@ -25,7 +25,7 @@
   import org.apache.fop.fo.flow.Marker;
   
   import org.apache.fop.area.Area;
  -import org.apache.fop.area.Resolveable;
  +import org.apache.fop.area.Resolvable;
   import org.apache.fop.area.PageViewport;
   import org.apache.fop.fo.FObj;
   
  @@ -166,7 +166,7 @@
       /**
        * Resolve the id reference.
        * This is called by an area looking for an id reference.
  -     * If the id reference is not found then it should add a resolveable object.
  +     * If the id reference is not found then it should add a resolvable object.
        *
        * @param ref the id reference
        * @return the page containing the id reference or null if not found
  @@ -183,12 +183,12 @@
   
       /**
        * Add an unresolved area.
  -     * The is used to add a resolveable object to the page for a given id.
  +     * The is used to add a resolvable object to the page for a given id.
        *
        * @param id the id reference this object needs for resolving
  -     * @param res the resolveable object
  +     * @param res the resolvable object
        */
  -    void addUnresolvedArea(String id, Resolveable res);
  +    void addUnresolvedArea(String id, Resolvable res);
   
       /**
        * Add the marker.
  
  
  
  1.31      +5 -5      xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java
  
  Index: LineLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- LineLayoutManager.java	20 Oct 2004 21:07:02 -0000	1.30
  +++ LineLayoutManager.java	24 Oct 2004 00:03:50 -0000	1.31
  @@ -25,7 +25,7 @@
   import org.apache.fop.hyphenation.Hyphenation;
   import org.apache.fop.hyphenation.Hyphenator;
   import org.apache.fop.area.LineArea;
  -import org.apache.fop.area.Resolveable;
  +import org.apache.fop.area.Resolvable;
   
   import java.util.ListIterator;
   import java.util.Iterator;
  @@ -1491,11 +1491,11 @@
        * resolves the inline area and can do the necessary
        * adjustments to the line and inline areas.
        *
  -     * @param id the id reference of the resolveable
  -     * @param res the resolveable object
  +     * @param id the id reference of the resolvable
  +     * @param res the resolvable object
        */
  -    public void addUnresolvedArea(String id, Resolveable res) {
  -        // create a resolveable class that handles ipd
  +    public void addUnresolvedArea(String id, Resolvable res) {
  +        // create a resolvable class that handles ipd
           // adjustment for the current line
   
           parentLM.addUnresolvedArea(id, res);
  
  
  
  1.10      +4 -4      xml-fop/src/java/org/apache/fop/layoutmgr/PageNumberCitationLayoutManager.java
  
  Index: PageNumberCitationLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageNumberCitationLayoutManager.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PageNumberCitationLayoutManager.java	20 Oct 2004 13:42:41 -0000	1.9
  +++ PageNumberCitationLayoutManager.java	24 Oct 2004 00:03:50 -0000	1.10
  @@ -20,7 +20,7 @@
   
   import org.apache.fop.fo.flow.PageNumberCitation;
   import org.apache.fop.area.PageViewport;
  -import org.apache.fop.area.Resolveable;
  +import org.apache.fop.area.Resolvable;
   import org.apache.fop.area.Trait;
   import org.apache.fop.area.inline.InlineArea;
   import org.apache.fop.area.inline.UnresolvedPageNumber;
  @@ -58,7 +58,7 @@
       public void addAreas(PositionIterator posIter, LayoutContext context) {
           super.addAreas(posIter, context);
           if (!resolved) {
  -            parentLM.addUnresolvedArea(fobj.getRefId(), (Resolveable) curArea);
  +            parentLM.addUnresolvedArea(fobj.getRefId(), (Resolvable) curArea);
           }
       }
       
  @@ -68,7 +68,7 @@
   
       /**
        * if id can be resolved then simply return a word, otherwise
  -     * return a resolveable area
  +     * return a resolvable area
        */
       private InlineArea getPageNumberCitationInlineArea(LayoutManager parentLM) {
           PageViewport page = parentLM.resolveRefID(fobj.getRefId());
  
  
  
  1.10      +6 -6      xml-fop/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
  
  Index: PageSequenceLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PageSequenceLayoutManager.java	20 Oct 2004 13:37:48 -0000	1.9
  +++ PageSequenceLayoutManager.java	24 Oct 2004 00:03:50 -0000	1.10
  @@ -35,7 +35,7 @@
   import org.apache.fop.area.Span;
   import org.apache.fop.area.BeforeFloat;
   import org.apache.fop.area.Footnote;
  -import org.apache.fop.area.Resolveable;
  +import org.apache.fop.area.Resolvable;
   import org.apache.fop.area.Trait;
   
   import org.apache.fop.datatypes.PercentBase;
  @@ -330,14 +330,14 @@
        * Add an unresolved area to the layout manager.
        * The Page layout manager handles the unresolved ID
        * reference by adding to the current page and then adding
  -     * the page as a resolveable to the area tree.
  +     * the page as a resolvable to the area tree.
        * This is so that the area tree can resolve the reference
        * and the page can serialize the resolvers if required.
        *
        * @param id the ID reference to add
  -     * @param res the resolveable object that needs resolving
  +     * @param res the resolvable object that needs resolving
        */
  -    public void addUnresolvedArea(String id, Resolveable res) {
  +    public void addUnresolvedArea(String id, Resolvable res) {
           // add unresolved to tree
           // adds to the page viewport so it can serialize
           curPage.addUnresolvedID(id, res);
  @@ -671,7 +671,7 @@
        * See if need to generate a new page for a forced break condition.
        */
       private boolean needNewPage(int breakValue) {
  -        if (curPage.getPage().isEmpty()) {
  +        if (curPage != null && curPage.getPage().isEmpty()) {
               if (breakValue == Constants.PAGE) {
                   return false;
               }
  
  
  

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