cvs commit: xml-fop/src/org/apache/fop/svg SVGElementMapping.java PDFGraphicsConfiguration.javat PDFGraphicsDevice.java PDFAElementBridge.java PDFANode.java PDFImageElementBridge.java SVGObj.java SVGUserAgent.java PDFTextPainter.java PDFGraphics2D.java PDFTranscoder.java PDFDocumentGraphics2D.java PDFTextElementBridge.java SVGUtilities.java

2003-03-07 Thread jeremias
jeremias2003/03/07 01:51:26

  Modified:src/org/apache/fop/svg SVGElementMapping.java
PDFGraphicsConfiguration.javat
PDFGraphicsDevice.java PDFAElementBridge.java
PDFANode.java PDFImageElementBridge.java
SVGObj.java SVGUserAgent.java PDFTextPainter.java
PDFGraphics2D.java PDFTranscoder.java
PDFDocumentGraphics2D.java
PDFTextElementBridge.java SVGUtilities.java
  Log:
  Switched to long licence
  
  Revision  ChangesPath
  1.24  +49 -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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- SVGElementMapping.java10 Sep 2002 15:07:13 -  1.23
  +++ SVGElementMapping.java7 Mar 2003 09:51:25 -   1.24
  @@ -1,10 +1,53 @@
   /*
* $Id$
  - * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * 
  + *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 contributions made by many individuals
  + * on behalf of the Apache Software Foundation and was originally created by
  + * James Tauber <[EMAIL PROTECTED]>. For more information on the Apache
  + * Software Foundation, please see .
  + */ 
   package org.apache.fop.svg;
   
   import java.util.HashMap;
  
  
  
  1.2   +49 -6 xml-fop/src/org/apache/fop/svg/PDFGraphicsConfiguration.javat
  
  Index: PDFGraphicsConfiguration.javat
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFGraphicsConfiguration.javat,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PDFGraphicsConfiguration.javat17 Sep 2002 20:22:11 -  1.1
  +++ PDFGraphicsConfiguration.javat7 Mar 2003 09:51:25 -   1.2
  @@ -1,10 +1,53 @@
   /*
* $Id$
  - * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistri

cvs commit: xml-fop/src/org/apache/fop/svg SVGElementMapping.java

2002-01-03 Thread keiron

keiron  02/01/03 00:29:01

  Modified:src/org/apache/fop/extensions Tag: fop-0_20_2-maintain
ExtensionElementMapping.java
   src/org/apache/fop/fo Tag: fop-0_20_2-maintain
StandardElementMapping.java
   src/org/apache/fop/svg Tag: fop-0_20_2-maintain
SVGElementMapping.java
  Log:
  fixed thread prob as with trunk
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.4.2.1   +6 -2  
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.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- ExtensionElementMapping.java  24 Sep 2001 09:17:12 -  1.4
  +++ ExtensionElementMapping.java  3 Jan 2002 08:29:00 -   1.4.2.1
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ExtensionElementMapping.java,v 1.4 2001/09/24 09:17:12 keiron Exp $
  + * $Id: ExtensionElementMapping.java,v 1.4.2.1 2002/01/03 08:29:00 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,12 +21,16 @@
   
   private static HashMap foObjs = null;
   
  -public synchronized void addToBuilder(TreeBuilder builder) {
  +private static synchronized void setupExt() {
   if(foObjs == null) {
   foObjs = new HashMap();
   foObjs.put("outline", Outline.maker());
   foObjs.put("label", Label.maker());
   }
  +}
  +
  +public void addToBuilder(TreeBuilder builder) {
  +setupExt();
   builder.addMapping(URI, foObjs);
   
   
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.26.2.1  +6 -4  xml-fop/src/org/apache/fop/fo/Attic/StandardElementMapping.java
  
  Index: StandardElementMapping.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/StandardElementMapping.java,v
  retrieving revision 1.26
  retrieving revision 1.26.2.1
  diff -u -r1.26 -r1.26.2.1
  --- StandardElementMapping.java   24 Sep 2001 09:17:12 -  1.26
  +++ StandardElementMapping.java   3 Jan 2002 08:29:01 -   1.26.2.1
  @@ -1,5 +1,5 @@
   /*
  - * $Id: StandardElementMapping.java,v 1.26 2001/09/24 09:17:12 keiron Exp $
  + * $Id: StandardElementMapping.java,v 1.26.2.1 2002/01/03 08:29:01 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 StandardElementMapping implements ElementMapping {
   private static HashMap foObjs = null;
   
  -public synchronized void addToBuilder(TreeBuilder builder) {
  +private static synchronized void setupFO() {
   
   if(foObjs == null) {
   foObjs = new HashMap();
  @@ -107,7 +107,10 @@
   foObjs.put("marker", Marker.maker());
   foObjs.put("retrieve-marker", RetrieveMarker.maker());
   }
  +}
   
  +public void addToBuilder(TreeBuilder builder) {
  +setupFO();
   String uri = "http://www.w3.org/1999/XSL/Format";;
   builder.addMapping(uri, foObjs);
   
  @@ -119,7 +122,6 @@
   builder.addElementPropertyList(uri, elem,
  
FOPropertyMapping.getElementMapping(elem));
   }
  -
   }
  -
   }
  +
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.17.2.1  +6 -3  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.17
  retrieving revision 1.17.2.1
  diff -u -r1.17 -r1.17.2.1
  --- SVGElementMapping.java5 Oct 2001 10:29:48 -   1.17
  +++ SVGElementMapping.java3 Jan 2002 08:29:01 -   1.17.2.1
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SVGElementMapping.java,v 1.17 2001/10/05 10:29:48 keiron Exp $
  + * $Id: SVGElementMapping.java,v 1.17.2.1 2002/01/03 08:29:01 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 static HashMap foObjs = null;
   
  -public synchronized void addToBuilder(TreeBuilder builder) {
  +private static synchronized void setupSVG() {
 

cvs commit: xml-fop/src/org/apache/fop/svg SVGElementMapping.java

2001-12-13 Thread keiron

keiron  01/12/13 01:40:04

  Modified:src/org/apache/fop/extensions ExtensionElementMapping.java
   src/org/apache/fop/fo FOElementMapping.java
   src/org/apache/fop/svg SVGElementMapping.java
  Log:
  properly setup the element mappings
  
  Revision  ChangesPath
  1.7   +9 -5  
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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ExtensionElementMapping.java  2001/11/09 11:32:36 1.6
  +++ ExtensionElementMapping.java  2001/12/13 09:40:04 1.7
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ExtensionElementMapping.java,v 1.6 2001/11/09 11:32:36 keiron Exp $
  + * $Id: ExtensionElementMapping.java,v 1.7 2001/12/13 09:40:04 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,22 +19,26 @@
   
   private static HashMap foObjs = null;
   
  -public synchronized void addToBuilder(FOTreeBuilder builder) {
  +private static synchronized void setupExt() {
   if(foObjs == null) {
  -foObjs = new HashMap();
  +foObjs = new HashMap();
   foObjs.put("outline", new O());
   foObjs.put("label", new L());
   }
  +}
  +
  +public void addToBuilder(FOTreeBuilder builder) {
  +setupExt();
   builder.addMapping(URI, foObjs);
   }
   
  -class O extends ElementMapping.Maker {
  +static class O extends ElementMapping.Maker {
   public FONode make(FONode parent) {
   return new Outline(parent);
   }
   }
   
  -class L extends ElementMapping.Maker {
  +static class L extends ElementMapping.Maker {
   public FONode make(FONode parent) {
   return new Label(parent);
   }
  
  
  
  1.3   +62 -59xml-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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FOElementMapping.java 2001/11/09 11:32:37 1.2
  +++ FOElementMapping.java 2001/12/13 09:40:04 1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FOElementMapping.java,v 1.2 2001/11/09 11:32:37 keiron Exp $
  + * $Id: FOElementMapping.java,v 1.3 2001/12/13 09:40:04 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,8 +16,7 @@
   public class FOElementMapping implements ElementMapping {
   private static HashMap foObjs = null;
   
  -public synchronized void addToBuilder(FOTreeBuilder builder) {
  -
  +private static synchronized void setupFO() {
   if(foObjs == null) {
   foObjs = new HashMap();
   
  @@ -106,341 +105,345 @@
   foObjs.put("retrieve-marker", new RM());
   }
   
  +}
  +
  +public void addToBuilder(FOTreeBuilder builder) {
  +setupFO();
   String uri = "http://www.w3.org/1999/XSL/Format";;
   builder.addMapping(uri, foObjs);
   }
   
  -class R extends ElementMapping.Maker {
  +static class R extends ElementMapping.Maker {
   public FONode make(FONode parent) {
   return new Root(parent);
   }
   }
   
  -class Dec extends ElementMapping.Maker {
  +static class Dec extends ElementMapping.Maker {
   public FONode make(FONode parent) {
   return new Declarations(parent);
   }
   }
   
  -class CP extends ElementMapping.Maker {
  +static class CP extends ElementMapping.Maker {
   public FONode make(FONode parent) {
   return new ColorProfile(parent);
   }
   }
   
  -class PS extends ElementMapping.Maker {
  +static class PS extends ElementMapping.Maker {
   public FONode make(FONode parent) {
   return new PageSequence(parent);
   }
   }
   
  -class LMS extends ElementMapping.Maker {
  +static class LMS extends ElementMapping.Maker {
   public FONode make(FONode parent) {
   return new LayoutMasterSet(parent);
   }
   }
   
  -class PSM extends ElementMapping.Maker {
  +static class PSM extends ElementMapping.Maker {
   public FONode make(FONode parent) {
   return new PageSequenceMaster(parent);
   }
   }
   
  -class SPMR extends ElementMapping.Make

cvs commit: xml-fop/src/org/apache/fop/svg SVGElementMapping.java

2001-07-12 Thread keiron

keiron  01/07/12 06:03:42

  Modified:src/org/apache/fop/apps Driver.java
   src/org/apache/fop/configuration Configuration.java
ConfigurationReader.java
   src/org/apache/fop/extensions ExtensionElementMapping.java
   src/org/apache/fop/fo ElementMapping.java
StandardElementMapping.java
   src/org/apache/fop/image SVGImage.java
   src/org/apache/fop/render/awt AWTRenderer.java
   src/org/apache/fop/render/pdf PDFRenderer.java
   src/org/apache/fop/render/ps PSRenderer.java
   src/org/apache/fop/svg SVGElementMapping.java
  Log:
  combined property list setting into element setting
  also always get parser class name from one place
  
  Revision  ChangesPath
  1.28  +96 -53xml-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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- Driver.java   2001/07/02 10:48:01 1.27
  +++ Driver.java   2001/07/12 13:02:56 1.28
  @@ -1,4 +1,4 @@
  -/* $Id: Driver.java,v 1.27 2001/07/02 10:48:01 keiron Exp $
  +/* $Id: Driver.java,v 1.28 2001/07/12 13:02:56 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.fo.FOTreeBuilder;
   import org.apache.fop.fo.ElementMapping;
  -import org.apache.fop.fo.PropertyListMapping;
   import org.apache.fop.layout.AreaTree;
   import org.apache.fop.layout.FontInfo;
   import org.apache.fop.render.Renderer;
  @@ -136,6 +135,18 @@
   /** the system resources that FOP will use*/
   private BufferManager _bufferManager;
   
  +public static final String getParserClassName() {
  +String parserClassName = null;
  +try {
  +parserClassName = System.getProperty("org.xml.sax.parser");
  +} catch(SecurityException se) {
  +}
  +if (parserClassName == null) {
  +parserClassName = "org.apache.xerces.parsers.SAXParser";
  +}
  +return parserClassName;
  +}
  +
   /** create a new Driver */
   public Driver() {
   _stream = null;
  @@ -200,30 +211,24 @@
   _reader = reader;
   }
   
  -
   /**
* Sets all the element and property list mappings to their default values.
*
*/
   public void setupDefaultMappings() {
   addElementMapping("org.apache.fop.fo.StandardElementMapping");
  -addPropertyList ("org.apache.fop.fo.StandardPropertyListMapping");
  -
   addElementMapping("org.apache.fop.svg.SVGElementMapping");
  -addPropertyList ("org.apache.fop.svg.SVGPropertyListMapping");
  -
   addElementMapping("org.apache.fop.extensions.ExtensionElementMapping");
  -addPropertyList ("org.apache.fop.extensions.ExtensionPropertyListMapping");
   
  -// add mappings from user configuration
  -Hashtable mappings = Configuration.getHashtableValue("mappings");
  -if (mappings != null) {
  -String prop = (String) mappings.get("property");
  -String ele = (String) mappings.get("element");
  -try {
  -addElementMapping(ele);
  -addPropertyList(prop);
  -} catch (IllegalArgumentException e) {
  +// add mappings from available services
  +Enumeration providers = 
Service.providers(org.apache.fop.fo.ElementMapping.class);
  +if (providers != null) {
  +while(providers.hasMoreElements()) {
  +String str = (String)providers.nextElement();
  +try {
  +addElementMapping(str);
  +} catch (IllegalArgumentException e) {
  +}
   }
   }
   }
  @@ -271,7 +276,6 @@
   
   }
   
  -
   /**
* Set the Renderer to use
* @param renderer the renderer instance to use
  @@ -361,41 +365,6 @@
   }
   
   /**
  - * Add the PropertyListMapping.
  - */
  -public void addPropertyList(PropertyListMapping mapping) {
  -mapping.addToBuilder(_treeBuilder);
  -}
  -
  -/**
  - * Add the PropertyListMapping with the given class name.
  - */
  -public void addPropertyList(String listClassName)
  -throws IllegalArgumentException {
  -try {
  -PropertyListMapping mapping =
  -  (PropertyListMapping) Class.forName(
  -listClassName).newInstance();
  -addPropertyList(mapping);
  -
  -} catch (ClassNotFoundException e) {
  -throw new IllegalArgumentExceptio