RE: addLayoutManager refactored

2003-08-20 Thread Chris Bowditch
From: Victor Mote [EMAIL PROTECTED]

snip/

So the answer to your second question is that the Visitor doesn't have
anything to do with the layout managers, except as a means to an end.
The only downside that I can see is that the abstract FOTreeVisitor needs 
to
be updated if the super/sub class relationships within the FOTree change.

Hi Victor,

thanks for taking the time to explain, I had a quick look at the code and 
have a basic understanding of what you've done. That change gets you one 
step closer to decoupling layout from the FO Tree. I'm interested in what 
the next step in the effort to decouple layout from the FO Tree will be.

Thanks again,

Chris

_
Find a cheaper internet access deal - choose one to suit you. 
http://www.msn.co.uk/internetaccess

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


DO NOT REPLY [Bug 22579] New: - crash after endless loop over pages

2003-08-20 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22579.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22579

crash after endless loop over pages

   Summary: crash after endless loop over pages
   Product: Fop
   Version: all
  Platform: PC
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: images
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


if an image-size not is specified and the size of the image is greater then then
the size of the space. Then it seems that FOP is trying to place the image on
the next page, but then it also don't fit on this page, end so on, so an
endless loop is started and after that FOP crashes by pagenr. 70.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



RE: control/Document

2003-08-20 Thread Glen Mazza
--- Victor Mote [EMAIL PROTECTED] wrote:

 Actually my
 JBuilder has a nice refactor task that does this for
 almost free, so, unless
 you have something similar at hand, perhaps I should
 do that.
 
 Victor Mote
 

I use JEdit which has a pretty good global SR
feature.
But if you don't mind taking care of this with
JBuilder's refactor task, please do--you're anyway
more familiar with Document in case something comes
up.  

Thanks,
Glen


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



RE: addLayoutManager refactored

2003-08-20 Thread Victor Mote
Chris Bowditch wrote:

 thanks for taking the time to explain, I had a quick look at the code and
 have a basic understanding of what you've done. That change gets you one
 step closer to decoupling layout from the FO Tree. I'm interested in what
 the next step in the effort to decouple layout from the FO Tree will be.

I've been letting the compiler tell me what needs to be done. I have a
script that moves code not related to FO Tree to a different directory, then
I compile. The compile errors tell me what needs to be done. Sometimes it is
moving stuff from fo to some other location, sometimes it is vice versa.
Yesterday I added an FOTreeControl interface that Document implements, which
allows everything in fo to use that interface instead of Document  should
eventually decouple FO Tree even from apps/control. This would allow another
application to create and use the FO Tree stuff. That work isn't complete
yet. Right now I am trying to get area tree stuff in the extensions package
moved to layoutmgr and/or area. To get that step done I think I'll have to
start into actually using LayoutStrategy.

Victor Mote


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



cvs commit: xml-fop/src/java/org/apache/fop/extensions Bookmarks.java

2003-08-20 Thread vmote
vmote   2003/08/20 09:35:27

  Modified:src/java/org/apache/fop/apps Driver.java
   src/java/org/apache/fop/control Document.java
   src/java/org/apache/fop/extensions Bookmarks.java
  Log:
  move some fields and methods from Driver to Document
  
  Revision  ChangesPath
  1.30  +7 -56 xml-fop/src/java/org/apache/fop/apps/Driver.java
  
  Index: Driver.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Driver.java   19 Aug 2003 22:17:57 -  1.29
  +++ Driver.java   20 Aug 2003 16:35:27 -  1.30
  @@ -59,8 +59,6 @@
   import org.apache.fop.fo.FOUserAgent;
   import org.apache.fop.fo.FOInputHandler;
   import org.apache.fop.fo.FOTreeHandler;
  -import org.apache.fop.fo.FOTreeListener;
  -import org.apache.fop.fo.FOTreeEvent;
   import org.apache.fop.area.Title;
   import org.apache.fop.fo.pagination.PageSequence;
   import org.apache.fop.mif.MIFHandler;
  @@ -138,7 +136,7 @@
* driver.render(parser, fileInputSource(args[0]));
* /PRE
*/
  -public class Driver implements LogEnabled, FOTreeListener {
  +public class Driver implements LogEnabled {
   
   /**
* private constant to indicate renderer was not defined.
  @@ -236,12 +234,6 @@
   private Logger log = null;
   private FOUserAgent userAgent = null;
   
  -/**
  - * The current AreaTree for the PageSequence being rendered.
  - */
  -private AreaTree areaTree;
  -private AreaTreeModel atModel;
  -
   private Document currentDocument = null;
   
   /**
  @@ -597,11 +589,11 @@
   try {
   if (foInputHandler instanceof FOTreeHandler) {
   FOTreeHandler foTreeHandler = (FOTreeHandler)foInputHandler;
  -foTreeHandler.addFOTreeListener(this);
  -this.areaTree = new AreaTree();
  -this.atModel = AreaTree.createRenderPagesModel(renderer);
  +foTreeHandler.addFOTreeListener(currentDocument);
  +currentDocument.areaTree = new AreaTree();
  +currentDocument.atModel = AreaTree.createRenderPagesModel(renderer);
   //this.atModel = new CachedRenderPagesModel(renderer);
  -areaTree.setTreeModel(atModel);
  +currentDocument.areaTree.setTreeModel(currentDocument.atModel);
   }
   /**
The following statement triggers virtually all of the processing
  @@ -619,7 +611,7 @@
   parser.parse(source);
   if (foInputHandler instanceof FOTreeHandler) {
   FOTreeHandler foTreeHandler = (FOTreeHandler)foInputHandler;
  -foTreeHandler.removeFOTreeListener(this);
  +foTreeHandler.removeFOTreeListener(currentDocument);
   }
   } catch (SAXException e) {
   if (e.getException() instanceof FOPException) {
  @@ -661,7 +653,7 @@
   initialize();
   }
   
  -if (renderer == null  rendererType != RENDER_RTF 
  +if (renderer == null  rendererType != RENDER_RTF
rendererType != RENDER_MIF) {
   setRenderer(RENDER_PDF);
   }
  @@ -681,47 +673,6 @@
   } else {
   render(reader, source);
   }
  -}
  -
  -/**
  - * Required by the FOTreeListener interface. It handles an
  - * FOTreeEvent that is fired when a PageSequence object has been completed.
  - * @param event the FOTreeEvent that was fired
  - * @throws FOPException for errors in building the PageSequence
  - */
  -public void foPageSequenceComplete (FOTreeEvent event) throws FOPException {
  -PageSequence pageSeq = event.getPageSequence();
  -Title title = null;
  -if (pageSeq.getTitleFO() != null) {
  -title = pageSeq.getTitleFO().getTitleArea();
  -}
  -areaTree.startPageSequence(title);
  -pageSeq.format(areaTree);
  -}
  -
  -/**
  - * Required by the FOTreeListener interface. It handles an FOTreeEvent that
  - * is fired when the Document has been completely parsed.
  - * @param event the FOTreeEvent that was fired
  - * @throws SAXException for parsing errors
  - */
  -public void foDocumentComplete (FOTreeEvent event) throws SAXException {
  -//processAreaTree(atModel);
  -try {
  -areaTree.endDocument();
  -renderer.stopRenderer();
  -} catch (IOException ex) {
  -throw new SAXException(ex);
  -}
  -}
  -
  -/**
  - * Get the area tree for this layout handler.
  - *
  - * @return the area tree for this document
  - */
  -public AreaTree getAreaTree() {
  -return areaTree;
   }
   
   }
 

RE: control/Document

2003-08-20 Thread Victor Mote
Glen Mazza wrote:

 But if you don't mind taking care of this with
 JBuilder's refactor task, please do--you're anyway
 more familiar with Document in case something comes
 up.  

All done.

Victor Mote

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LayoutManagerLS.java

2003-08-20 Thread vmote
vmote   2003/08/20 10:56:25

  Modified:src/java/org/apache/fop/apps Driver.java
   src/java/org/apache/fop/control Document.java
   src/java/org/apache/fop/fo/pagination PageSequence.java
Root.java
   src/java/org/apache/fop/layout LayoutStrategy.java
   src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
  Log:
  style/javadoc changes only
  
  Revision  ChangesPath
  1.31  +0 -4  xml-fop/src/java/org/apache/fop/apps/Driver.java
  
  Index: Driver.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Driver.java   20 Aug 2003 16:35:27 -  1.30
  +++ Driver.java   20 Aug 2003 17:56:24 -  1.31
  @@ -52,22 +52,18 @@
   
   // FOP
   import org.apache.fop.area.AreaTree;
  -import org.apache.fop.area.AreaTreeModel;
   import org.apache.fop.control.Document;
   import org.apache.fop.fo.ElementMapping;
   import org.apache.fop.fo.FOTreeBuilder;
   import org.apache.fop.fo.FOUserAgent;
   import org.apache.fop.fo.FOInputHandler;
   import org.apache.fop.fo.FOTreeHandler;
  -import org.apache.fop.area.Title;
  -import org.apache.fop.fo.pagination.PageSequence;
   import org.apache.fop.mif.MIFHandler;
   import org.apache.fop.render.Renderer;
   import org.apache.fop.render.awt.AWTRenderer;
   import org.apache.fop.rtf.renderer.RTFHandler;
   import org.apache.fop.tools.DocumentInputSource;
   import org.apache.fop.tools.DocumentReader;
  -import org.apache.fop.layout.LayoutStrategy;
   import org.apache.fop.layoutmgr.LayoutManagerLS;
   
   // Avalon
  
  
  
  1.7   +6 -1  xml-fop/src/java/org/apache/fop/control/Document.java
  
  Index: Document.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/control/Document.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Document.java 20 Aug 2003 17:25:43 -  1.6
  +++ Document.java 20 Aug 2003 17:56:24 -  1.7
  @@ -103,6 +103,7 @@
   
   /**
* Main constructor
  + * @param driver the Driver object that is the parent of this Document
*/
   public Document(Driver driver) {
   this.driver = driver;
  @@ -303,6 +304,10 @@
   return layoutStrategy;
   }
   
  +/**
  + * Public accessor for the parent Driver of this Document
  + * @return the parent Driver for this Document
  + */
   public Driver getDriver() {
   return driver;
   }
  
  
  
  1.9   +27 -3 xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java
  
  Index: PageSequence.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PageSequence.java 20 Aug 2003 17:25:43 -  1.8
  +++ PageSequence.java 20 Aug 2003 17:56:24 -  1.9
  @@ -55,12 +55,9 @@
   import org.apache.fop.fo.FObj;
   import org.apache.fop.fo.FOTreeVisitor;
   import org.apache.fop.layout.PageMaster;
  -import org.apache.fop.area.AreaTree;
   import org.apache.fop.area.PageViewport;
   import org.apache.fop.apps.FOPException;
   
  -import org.apache.fop.layoutmgr.PageLayoutManager;
  -
   // Java
   import java.util.HashMap;
   
  @@ -772,26 +769,53 @@
   return titleFO;
   }
   
  +/**
  + * Hook for Visitor objects accessing the FO Tree.
  + * @param fotv the FOTreeVisitor object accessing this node of the FO Tree
  + */
   public void acceptVisitor(FOTreeVisitor fotv) {
   fotv.serveVisitor(this);
   }
   
  +/**
  + * Public accessor for getting the MainFlow to which this PageSequence is
  + * attached.
  + * @return the MainFlow object to which this PageSequence is attached.
  + */
   public Flow getMainFlow() {
   return mainFlow;
   }
   
  +/**
  + * Public accessor for getting the PageSequenceMaster to which this
  + * PageSequence is attached.
  + * @return the PageSequenceMaster to which this PageSequence is attached.
  + */
   public PageSequenceMaster getPageSequenceMaster() {
   return pageSequenceMaster;
   }
   
  +/**
  + * Public accessor for getting the PageNumberGenerator.
  + * @return the PageNumberGenerator
  + */
   public PageNumberGenerator getPageNumberGenerator() {
   return pageNumberGenerator;
   }
   
  +/**
  + * Public accessor for setting the currentPageNumber.
  + * @param currentPageNumber the value to which currentPageNumber should be
  + * set.
  + */
   public void setCurrentPageNumber(int currentPageNumber) {

cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LayoutManagerLS.java

2003-08-20 Thread vmote
vmote   2003/08/20 10:25:44

  Modified:src/java/org/apache/fop/control Document.java
   src/java/org/apache/fop/fo/pagination PageSequence.java
Root.java
   src/java/org/apache/fop/layout LayoutStrategy.java
   src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
  Log:
  move startup of laying out a PageSequence from PageSequence.format() and 
Document.foPageSequenceComplete to the LayoutStrategy implementation 
(layoutmgr/LayoutManagerLS)
  
  Revision  ChangesPath
  1.6   +5 -11 xml-fop/src/java/org/apache/fop/control/Document.java
  
  Index: Document.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/control/Document.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Document.java 20 Aug 2003 16:35:27 -  1.5
  +++ Document.java 20 Aug 2003 17:25:43 -  1.6
  @@ -63,7 +63,6 @@
   import org.apache.fop.fo.FOTreeEvent;
   import org.apache.fop.fo.FOTreeListener;
   import org.apache.fop.fo.pagination.PageSequence;
  -import org.apache.fop.area.Title;
   import org.apache.fop.fonts.Font;
   import org.apache.fop.fonts.FontMetrics;
   import org.apache.fop.layout.LayoutStrategy;
  @@ -94,7 +93,7 @@
* TODO: this actually belongs in the RenderContext class, when it is
* created
*/
  -private LayoutStrategy ls = null;
  +private LayoutStrategy layoutStrategy = null;
   
   /**
* The current AreaTree for the PageSequence being rendered.
  @@ -294,14 +293,14 @@
* @param ls the LayoutStrategy object to be used to process this Document
*/
   public void setLayoutStrategy(LayoutStrategy ls) {
  -this.ls = ls;
  +this.layoutStrategy = ls;
   }
   
   /**
* @return this Document's LayoutStrategy object
*/
   public LayoutStrategy getLayoutStrategy () {
  -return ls;
  +return layoutStrategy;
   }
   
   public Driver getDriver() {
  @@ -316,12 +315,7 @@
*/
   public void foPageSequenceComplete (FOTreeEvent event) throws FOPException {
   PageSequence pageSeq = event.getPageSequence();
  -Title title = null;
  -if (pageSeq.getTitleFO() != null) {
  -title = pageSeq.getTitleFO().getTitleArea();
  -}
  -areaTree.startPageSequence(title);
  -pageSeq.format(areaTree);
  +layoutStrategy.format(pageSeq, areaTree);
   }
   
   /**
  
  
  
  1.8   +20 -52xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java
  
  Index: PageSequence.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PageSequence.java 19 Aug 2003 00:53:54 -  1.7
  +++ PageSequence.java 20 Aug 2003 17:25:43 -  1.8
  @@ -358,59 +358,9 @@
   }
   
   /**
  - * Runs the formatting of this page sequence into the given area tree
  - *
  - * @param areaTree the area tree to format this page sequence into
  - * @throws FOPException if there is an error formatting the contents
  - */
  -public void format(AreaTree areaTree) throws FOPException {
  -// Make a new PageLayoutManager and a FlowLayoutManager
  -// Run the PLM in a thread
  -// Wait for them to finish.
  -
  -// If no main flow, nothing to layout!
  -if (this.mainFlow == null) {
  -return;
  -}
  -
  -// Initialize if already used?
  -//this.layoutMasterSet.resetPageMasters();
  -if (pageSequenceMaster != null) {
  -pageSequenceMaster.reset();
  -}
  -
  -int firstAvailPageNumber = 0;
  -initPageNumber();
  -
  -// This will layout pages and add them to the area tree
  -PageLayoutManager pageLM = new PageLayoutManager(areaTree, this);
  -pageLM.setUserAgent(getUserAgent());
  -pageLM.setFObj(this);
  -pageLM.setPageCounting(currentPageNumber, pageNumberGenerator);
  -
  -// For now, skip the threading and just call run directly.
  -pageLM.run();
  -
  -// Thread layoutThread = new Thread(pageLM);
  -//  layoutThread.start();
  -// log.debug(Layout thread started);
  -
  -// // wait on both managers
  -// try {
  -// layoutThread.join();
  -// log.debug(Layout thread done);
  -// } catch (InterruptedException ie) {
  -// log.error(PageSequence.format() interrupted waiting on layout);
  -// }
  -this.currentPageNumber = pageLM.getPageCount();
  -// Tell the root the last page number we created.
  -this.root.setRunningPageNumberCounter(this.currentPageNumber);
  -}
  -
  -/**
* Initialize 

cvs commit: xml-fop/src/java/org/apache/fop/tools AreaTreeBuilder.java

2003-08-20 Thread vmote
vmote   2003/08/20 11:09:46

  Modified:src/java/org/apache/fop/apps Driver.java
   src/java/org/apache/fop/extensions Bookmarks.java
   src/java/org/apache/fop/mif MIFHandler.java
   src/java/org/apache/fop/render PrintRenderer.java
   src/java/org/apache/fop/render/awt AWTRenderer.java
FontSetup.java
   src/java/org/apache/fop/render/pdf FontSetup.java
PDFRenderer.java PDFXMLHandler.java
   src/java/org/apache/fop/render/ps PSDocumentGraphics2D.java
PSGraphics2D.java PSProcSets.java PSRenderer.java
PSTextElementBridge.java PSTextPainter.java
PSTranscoder.java PSXMLHandler.java
   src/java/org/apache/fop/render/svg SVGRenderer.java
   src/java/org/apache/fop/render/xml XMLRenderer.java
   src/java/org/apache/fop/rtf/renderer RTFHandler.java
   src/java/org/apache/fop/svg PDFDocumentGraphics2D.java
PDFGraphics2D.java PDFTextElementBridge.java
PDFTextPainter.java PDFTranscoder.java
   src/java/org/apache/fop/tools AreaTreeBuilder.java
  Added:   src/java/org/apache/fop/apps Document.java
  Removed: src/java/org/apache/fop/control Document.java
  Log:
  move control/Document to apps/Document
  
  Revision  ChangesPath
  1.32  +1 -1  xml-fop/src/java/org/apache/fop/apps/Driver.java
  
  Index: Driver.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Driver.java   20 Aug 2003 17:56:24 -  1.31
  +++ Driver.java   20 Aug 2003 18:09:45 -  1.32
  @@ -52,7 +52,7 @@
   
   // FOP
   import org.apache.fop.area.AreaTree;
  -import org.apache.fop.control.Document;
  +
   import org.apache.fop.fo.ElementMapping;
   import org.apache.fop.fo.FOTreeBuilder;
   import org.apache.fop.fo.FOUserAgent;
  
  
  
  1.1  xml-fop/src/java/org/apache/fop/apps/Document.java
  
  Index: Document.java
  ===
  /*
   * $Id: Document.java,v 1.1 2003/08/20 18:09:45 vmote Exp $
   * 
   *The Apache Software License, Version 1.1
   * 
   *
   * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modifica-
   * tion, are permitted provided that the following conditions are met:
   *
   * 1. Redistributions of source code must retain the above copyright notice,
   *this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright notice,
   *this list of conditions and the following disclaimer in the documentation
   *and/or other materials provided with the distribution.
   *
   * 3. The end-user documentation included with the redistribution, if any, must
   *include the following acknowledgment: This product includes software
   *developed by the Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowledgment may appear in the software itself, if
   *and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names FOP and Apache Software Foundation must not be used to
   *endorse or promote products derived from this software without prior
   *written permission. For written permission, please contact
   *[EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache, nor may
   *Apache appear in their name, without prior written permission of the
   *Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
   * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
   * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
   * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
   * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary 

RE: control/Document

2003-08-20 Thread Glen Mazza
Great!

--- Victor Mote [EMAIL PROTECTED] wrote:
 Glen Mazza wrote:
 
  But if you don't mind taking care of this with
  JBuilder's refactor task, please do--you're anyway
  more familiar with Document in case something
 comes
  up.  
 
 All done.
 
 Victor Mote
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, email:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LayoutManagerLS.java

2003-08-20 Thread vmote
vmote   2003/08/20 12:46:48

  Modified:src/java/org/apache/fop/apps Document.java Driver.java
   src/java/org/apache/fop/extensions Bookmarks.java
   src/java/org/apache/fop/fo FOTreeControl.java FObj.java
   src/java/org/apache/fop/layout LayoutStrategy.java
   src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
  Log:
  move logic for creating bookmarks/outlines in the area tree from 
extensions/Bookmarks to layoutmgr/LayoutManagerLS
  
  Revision  ChangesPath
  1.2   +12 -2 xml-fop/src/java/org/apache/fop/apps/Document.java
  
  Index: Document.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Document.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Document.java 20 Aug 2003 18:09:45 -  1.1
  +++ Document.java 20 Aug 2003 19:46:47 -  1.2
  @@ -58,7 +58,7 @@
   import org.apache.fop.area.AreaTree;
   import org.apache.fop.area.AreaTreeModel;
   
  -
  +import org.apache.fop.extensions.Bookmarks;
   import org.apache.fop.fo.FOTreeControl;
   import org.apache.fop.fo.FOTreeEvent;
   import org.apache.fop.fo.FOTreeListener;
  @@ -101,6 +101,8 @@
   public AreaTree areaTree;
   public AreaTreeModel atModel;
   
  +private Bookmarks bookmarks;
  +
   /**
* Main constructor
* @param driver the Driver object that is the parent of this Document
  @@ -346,6 +348,14 @@
*/
   public AreaTree getAreaTree() {
   return areaTree;
  +}
  +
  +public void setBookmarks(Bookmarks bookmarks) {
  +this.bookmarks = bookmarks;
  +}
  +
  +public Bookmarks getBookmarks() {
  +return bookmarks;
   }
   
   }
  
  
  
  1.33  +1 -1  xml-fop/src/java/org/apache/fop/apps/Driver.java
  
  Index: Driver.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- Driver.java   20 Aug 2003 18:09:45 -  1.32
  +++ Driver.java   20 Aug 2003 19:46:47 -  1.33
  @@ -579,7 +579,7 @@
   /** LayoutStrategy is hard-wired for now, but needs to be made
   accessible through the API and/or configuration */
   if (foInputHandler instanceof FOTreeHandler) {
  -currentDocument.setLayoutStrategy(new LayoutManagerLS());
  +currentDocument.setLayoutStrategy(new LayoutManagerLS(currentDocument));
   }
   treeBuilder.foTreeControl = currentDocument;
   try {
  
  
  
  1.11  +5 -28 xml-fop/src/java/org/apache/fop/extensions/Bookmarks.java
  
  Index: Bookmarks.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/extensions/Bookmarks.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Bookmarks.java20 Aug 2003 18:09:45 -  1.10
  +++ Bookmarks.java20 Aug 2003 19:46:47 -  1.11
  @@ -50,11 +50,8 @@
*/
   package org.apache.fop.extensions;
   
  -import org.apache.fop.fo.FOTreeHandler;
   import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.FOTreeVisitor;
  -import org.apache.fop.area.AreaTree;
  -import org.apache.fop.apps.Document;
   
   import java.util.ArrayList;
   
  @@ -65,7 +62,6 @@
*/
   public class Bookmarks extends ExtensionObj {
   private ArrayList outlines = new ArrayList();
  -private BookmarkData data;
   
   /**
* Create a new Bookmarks object.
  @@ -89,39 +85,20 @@
   }
   
   /**
  - * Get the data created for this bookmark.
  - *
  - * @return the bookmark data
  - */
  -public BookmarkData getData() {
  -return data;
  -}
  -
  -/**
* When this element is finished then it can create
* the bookmark data from the child elements and add
* the extension to the area tree.
*/
   public void end() {
  -getLogger().debug(adding bookmarks to area tree);
  -data = new BookmarkData();
  -for (int count = 0; count  outlines.size(); count++) {
  -Outline out = (Outline)outlines.get(count);
  -data.addSubData(out.getData());
  -}
  -// add data to area tree for resolving and handling
  -if (foInputHandler instanceof FOTreeHandler) {
  -FOTreeHandler foth = (FOTreeHandler)foInputHandler;
  -Document doc = (Document)foth.foTreeControl;
  -AreaTree at = doc.getAreaTree();
  -at.addTreeExtension(data);
  -data.setAreaTree(at);
  -}
  +getFOTreeControl().setBookmarks(this);
   }
   
   public void acceptVisitor(FOTreeVisitor fotv) {
   fotv.serveVisitor(this);
 

move extensions to fo/extensions?

2003-08-20 Thread Victor Mote
For purposes of my FO Tree isolation work, I am including the extensions
package as part of the FO Tree. The BookmarkData class is going to move to
layoutmgr or area, and I haven't gotten all of the layout stuff out of the
other classes yet, but is there any objection to moving it to fo/extensions
to more clearly show that it is part of the fo stuff?

Victor Mote


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



cvs commit: xml-fop/examples/fo/tables borders.fo

2003-08-20 Thread gmazza
gmazza  2003/08/20 15:04:51

  Modified:examples/fo/tables borders.fo
  Log:
  Examples 8-11 added to check:
  1) implementation of border properties (border-color,
  border-width, border-style, etc.) at the fo:table-row and fo:table-column level.
  2) border property conflict resolutions as defined in CSS2 standard at
  http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution
  
  Revision  ChangesPath
  1.3   +323 -12   xml-fop/examples/fo/tables/borders.fo
  
  Index: borders.fo
  ===
  RCS file: /home/cvs/xml-fop/examples/fo/tables/borders.fo,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- borders.fo29 Jan 2003 16:07:55 -  1.2
  +++ borders.fo20 Aug 2003 22:04:51 -  1.3
  @@ -183,8 +183,8 @@
 /fo:table-body
 /fo:table
   
  -  fo:block space-before.optimum=15pt space-after.optimum=15pt
  -  Table 1: row borders
  +  fo:block space-before.optimum=30pt space-after.optimum=15pt
  +  Table 2: row borders
 /fo:block
   
 fo:table border-collapse=separate
  @@ -307,8 +307,8 @@
 /fo:table-body
 /fo:table
   
  -  fo:block space-before.optimum=15pt space-after.optimum=15pt
  -  Table 1: column borders
  +  fo:block space-before.optimum=30pt space-after.optimum=15pt
  +  Table 3: column borders
 /fo:block
   
 fo:table border-collapse=separate
  @@ -374,8 +374,8 @@
 /fo:table-body
 /fo:table
   
  -  fo:block space-before.optimum=15pt space-after.optimum=15pt
  -  Table 1: column borders over page
  +  fo:block space-before.optimum=30pt space-after.optimum=15pt
  +  Table 4: column borders over page
 /fo:block
   
 fo:table border-collapse=separate
  @@ -441,8 +441,8 @@
 /fo:table-body
 /fo:table
   
  -  fo:block space-before.optimum=15pt space-after.optimum=15pt
  -  Table 1: body borders
  +  fo:block space-before.optimum=30pt space-after.optimum=15pt
  +  Table 5: body borders
 /fo:block
   
 fo:table border-collapse=separate
  @@ -625,8 +625,8 @@
 /fo:table-body
 /fo:table
   
  -  fo:block space-before.optimum=15pt space-after.optimum=15pt
  -  Table 1: table borders
  +  fo:block space-before.optimum=30pt space-after.optimum=15pt
  +  Table 6: table borders
 /fo:block
   
 fo:table border-left-color=green border-left-width=0.5pt 
border-left-style=solid
  @@ -810,8 +810,8 @@
 /fo:table-body
 /fo:table
   
  -  fo:block space-before.optimum=15pt space-after.optimum=15pt
  -  Table 1: combinations
  +  fo:block space-before.optimum=30pt space-after.optimum=15pt
  +  Table 7: combinations
 /fo:block
   
 fo:table border-left-color=green border-left-width=0.5pt 
border-left-style=solid border-collapse=separate
  @@ -1018,6 +1018,317 @@
 /fo:table-body
 /fo:table
   
  +  fo:block space-before.optimum=30pt space-after.optimum=15pt
  +  Table 8:  This is a table with border properties (border-style, 
  +  border-width, border-color) defined at the fo:table-column and 
  +  fo:table-row level.  Not all properties are currently 
  +  implemented--check the compliance page on the FOP website for current 
  +  implementation status.
  +  /fo:block
  +
  +fo:table border-collapse=collapse table-layout=fixed
  +fo:table-column column-width=3cm border-color=blue border-width=0.5pt 
border-style=solid/
  +fo:table-column column-width=3cm border-color=blue border-width=0.5pt 
border-style=solid/
  +fo:table-column column-width=3cm border-color=blue border-width=0.5pt 
border-style=solid/
  +
  +fo:table-body
  +   fo:table-row border-color=blue border-width=0.5pt border-style=solid
  + fo:table-cell
  +   fo:block text-align=center
  +   (1,1)
  +   /fo:block
  + /fo:table-cell
  + fo:table-cell
  +   fo:block text-align=center
  +   (1,2)
  +   /fo:block
  + /fo:table-cell
  + fo:table-cell
  +   fo:block text-align=center
  +   (1,3)
  +   /fo:block
  + /fo:table-cell
  +   /fo:table-row
  +   fo:table-row  border-color=blue border-width=0.5pt border-style=solid
  + fo:table-cell
  +   fo:block text-align=center
  +   (2,1)
  +   /fo:block
  + /fo:table-cell
  + fo:table-cell
  +   fo:block text-align=center
  +   (2,2)
  +   /fo:block
  + /fo:table-cell
  + fo:table-cell
  +   fo:block text-align=center
  +   (2,3)
  +   /fo:block
  + /fo:table-cell
  +   /fo:table-row
  +   fo:table-row  border-color=blue border-width=0.5pt border-style=solid
  + fo:table-cell
  +   fo:block text-align=center
  +   

fop-0.20.4 download links?

2003-08-20 Thread Clay Leeds
I just tried to find the download link for fop-0.20.4. That version has 
been tested and used in production by our staff and clients. 
Unfortunately, there are no download links available. The old download 
location listed on the FOP/download page is empty.

Is there a link where fop-0.20.4 (binary ** source) can be downloaded?

Why were those files removed?

Thanks!

Web Maestro Clay

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


Re: control/Document

2003-08-20 Thread Glen Mazza
--- J.Pietschmann [EMAIL PROTECTED] wrote:
 Dead wrong, properties are inherited properly, if
 you
 ask the property list manager you'll get correct
 values.

Technically speaking, if properties were *inherited*
properly, setting border-width on fo:table-row would
propagate to a child fo:table-cell that didn't have
that property already set, correct?  (Also taking into
account the border conflict resolution rules below.)
The renderer ideally should have no idea nor care
whether border-width came from fo:table-cell directly
or was inherited. (?)

 Suppose your table has a top-border-width of 2pt,
 the
 first cell in the first row has a top-border-width
 of
 1pt, the second 0pt the third 5pt. How should this
 look
 like? Well, actually CSS2 defines this (I think...)

Yes, I found them here:
http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution
and added four examples (Ex. 8-11) to the
examples\tables\borders.fo file for us to check our
compliance in the future.

 but
 implementation is tricky, because you'll have to
 allocate
 space for the borders. Throw in borders for rows and
 columns, and collapsing...
 

It doesn't seem that bad, because we've already
accomplished this at the cell-level.  Is it not just a
case of getting the inheritance and conflict
resolution rules done properly (which, OTOH, *is* very
difficult) so that the rendering behaves as if
everything was explicitly set out at fo:table-cell to
begin with?  I don't know.

Also, when you say collapsing, are you just
referring to the collapsing borders table model? 
(The CSS2 standard defines this and the separated
borders table models here:
http://www.w3.org/TR/REC-CSS2/tables.html#borders.)  

According to compliance.xml, we haven't currently
implemented the border-collapse property--it appears
we just support the collapsing borders model by
default, and that only partially.  Pls. correct me if
you're aware of anything different.

Sorry for the long post.

Thanks,
Glen


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



Re: move extensions to fo/extensions?

2003-08-20 Thread Glen Mazza
We have currently about four sets of
ElementMappings--fo, svg, extension, and MathML in
examples.  

I'm confused about seeing Bookmarks referenced in
FOTreeControl.java--I thought our pluggable
ElementMappings (including the Bookmark formatting
object) were designed to run with zero internal
hardcoding outside that ElementMapping.

This is bringing up an earlier issue--we currently
allow runtime loading of user-defined and -invented
ElementMappings, that supposedly can be processed by
FOP, with zero hardcoding outside of that
ElementMapping.  For example, a user invents his own
ElementMapping, places it in a certain directory, runs
FOP, and FOP will instantly absorb and use the new
ElementMapping--no hardcoding for it required in Area
Tree, Layout, Renderers, etc.

I argued for removing that runtime loading capability
a few months back (when I moved this functionality
from Driver to FOTreeBuilder) because it just doesn't
work by itself, i.e., just adding a ElementMapping
won't work, you still need to hardcode all over the
application to accomodate the new formatting object. 
(Just like you're doing for Bookmarks, for example.) 
But I wasn't sure on that point, and the team
disagreed with me here--saying that no such internal
coding would be needed.

So, are we back to square one with the pluggable
ElementMappers idea?  Should we rip out that
functionality from FOTreeBuilder that allows FOP to
dynamically load brand-new ElementMappings?  I still
don't see its utility.

(+1 on moving the package BTW)

Thanks,
Glen

--- Victor Mote [EMAIL PROTECTED] wrote:
 For purposes of my FO Tree isolation work, I am
 including the extensions
 package as part of the FO Tree. The BookmarkData
 class is going to move to
 layoutmgr or area, and I haven't gotten all of the
 layout stuff out of the
 other classes yet, but is there any objection to
 moving it to fo/extensions
 to more clearly show that it is part of the fo
 stuff?
 
 Victor Mote
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, email:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]