cvs commit: xml-fop/src/java/org/apache/fop/hyphenation - New directory

2004-09-06 Thread gmazza
gmazza  2004/09/06 10:59:13

  xml-fop/src/java/org/apache/fop/hyphenation - New directory

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



cvs commit: xml-fop/src/java/org/apache/fop/fo/pagination Root.java

2004-09-06 Thread gmazza
gmazza  2004/09/06 11:28:17

  Modified:src/java/org/apache/fop/fo FONode.java FOTreeBuilder.java
   src/java/org/apache/fop/fo/pagination Root.java
  Log:
  Switched to a static FOInputHandler object for the FOTree instead of relying on 
recursion to get to the FOInputHandler object stored at pagination.Root.
  
  Revision  ChangesPath
  1.43  +15 -1 xml-fop/src/java/org/apache/fop/fo/FONode.java
  
  Index: FONode.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FONode.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- FONode.java   5 Sep 2004 04:00:51 -   1.42
  +++ FONode.java   6 Sep 2004 18:28:17 -   1.43
  @@ -41,6 +41,12 @@
   
   protected static String FO_URI = FOElementMapping.URI;
   
  +/** 
  + * FOInputHandler that handles FO events occurring 
  + * during FO Tree processing.
  + */
  +protected static FOInputHandler foInputHandler = null;
  +
   /** Parent FO node */
   protected FONode parent;
   
  @@ -73,12 +79,20 @@
   }
   
   /**
  + * Sets the FOInputHandler that the FOTree processing fires events to
  + * @param inputHandler the FOInputHandler subclass to send FO events to
  + */
  +public static void setFOInputHandler(FOInputHandler inputHandler) {
  +FONode.foInputHandler = inputHandler;
  +} 
  +
  +/**
* Recursively goes up the FOTree hierarchy until the fo:root is found,
* which returns the parent FOInputHandler.
* @return the FOInputHandler object that is the parent of the FO Tree
*/
   public FOInputHandler getFOInputHandler() {
  -return parent.getFOInputHandler();
  +return FONode.foInputHandler;
   }
   
   /**
  
  
  
  1.47  +1 -1  xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java
  
  Index: FOTreeBuilder.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- FOTreeBuilder.java5 Sep 2004 04:00:51 -   1.46
  +++ FOTreeBuilder.java6 Sep 2004 18:28:17 -   1.47
  @@ -217,6 +217,7 @@
*/
   public void startDocument() throws SAXException {
   rootFObj = null;// allows FOTreeBuilder to be reused
  +FONode.setFOInputHandler(foInputHandler);
   if (log.isDebugEnabled()) {
   log.debug(Building formatting object tree);
   }
  @@ -273,7 +274,6 @@
   
   if (rootFObj == null) {
   rootFObj = (Root) foNode;
  -rootFObj.setFOInputHandler(foInputHandler);
   } else {
   currentFObj.addChildNode(foNode);
   }
  
  
  
  1.25  +0 -25 xml-fop/src/java/org/apache/fop/fo/pagination/Root.java
  
  Index: Root.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Root.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Root.java 4 Sep 2004 19:53:07 -   1.24
  +++ Root.java 6 Sep 2004 18:28:17 -   1.25
  @@ -49,11 +49,6 @@
*/
   private int runningPageNumberCounter = 0;
   
  -/** 
  - * Controlling FOTreeHandler object for this FO Tree
  - */
  -private FOInputHandler foInputHandler = null;
  -
   /**
* @see org.apache.fop.fo.FONode#FONode(FONode)
*/
  @@ -200,26 +195,6 @@
*/
   public Bookmarks getBookmarks() {
   return bookmarks;
  -}
  -
  -/**
  - * Sets the Document that this Root is attached to
  - * @param document the apps.Document implementation to which this Root
  - * is attached
  - */
  -public void setFOInputHandler(FOInputHandler foInputHandler) {
  -this.foInputHandler = foInputHandler;
  -}
  -
  -/**
  - * This method overrides the FONode version. The FONode version calls the
  - * method by the same name for the parent object. Since Root is at the top
  - * of the tree, it returns the actual FOInputHandler object. Thus, any FONode
  - * can use this chain to find which FOInputHandler it is being built for.
  - * @return the FOInputHandler implementation that this Root is attached to
  - */
  -public FOInputHandler getFOInputHandler() {
  -return foInputHandler;
   }
   
   /**
  
  
  

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



cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr KnuthPenalty.java KnuthElement.java KnuthBox.java KnuthGlue.java KnuthPossPosIter.java

2004-09-06 Thread jeremias
jeremias2004/09/06 12:07:12

  Modified:src/java/org/apache/fop/layoutmgr KnuthPenalty.java
KnuthElement.java KnuthBox.java KnuthGlue.java
KnuthPossPosIter.java
  Log:
  Added missing license headers.
  
  Revision  ChangesPath
  1.2   +18 -0 xml-fop/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java
  
  Index: KnuthPenalty.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- KnuthPenalty.java 5 Sep 2004 19:16:39 -   1.1
  +++ KnuthPenalty.java 6 Sep 2004 19:07:12 -   1.2
  @@ -1,3 +1,21 @@
  +/*
  + * Copyright 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$ */
  +
   package org.apache.fop.layoutmgr;
   
   public class KnuthPenalty extends KnuthElement {
  
  
  
  1.2   +18 -0 xml-fop/src/java/org/apache/fop/layoutmgr/KnuthElement.java
  
  Index: KnuthElement.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/KnuthElement.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- KnuthElement.java 5 Sep 2004 19:16:39 -   1.1
  +++ KnuthElement.java 6 Sep 2004 19:07:12 -   1.2
  @@ -1,3 +1,21 @@
  +/*
  + * Copyright 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$ */
  +
   package org.apache.fop.layoutmgr;
   
   public abstract class KnuthElement {
  
  
  
  1.2   +18 -0 xml-fop/src/java/org/apache/fop/layoutmgr/KnuthBox.java
  
  Index: KnuthBox.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/KnuthBox.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- KnuthBox.java 5 Sep 2004 19:16:39 -   1.1
  +++ KnuthBox.java 6 Sep 2004 19:07:12 -   1.2
  @@ -1,3 +1,21 @@
  +/*
  + * Copyright 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$ */
  +
   package org.apache.fop.layoutmgr;
   
   public class KnuthBox extends KnuthElement {
  
  
  
  1.2   +18 -0 xml-fop/src/java/org/apache/fop/layoutmgr/KnuthGlue.java
  
  Index: KnuthGlue.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/KnuthGlue.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- KnuthGlue.java5 Sep 2004 19:16:39 -   1.1
  +++ KnuthGlue.java6 Sep 2004 19:07:12 -   1.2
  @@ -1,3 +1,21 @@
  +/*
  + * Copyright 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,
  + * 

cvs commit: xml-fop/src/java/org/apache/fop/fo Unknown.java UnknownXMLObj.java XMLElement.java

2004-09-06 Thread gmazza
gmazza  2004/09/06 13:54:59

  Modified:src/java/org/apache/fop/fo Unknown.java UnknownXMLObj.java
  Removed: src/java/org/apache/fop/fo XMLElement.java
  Log:
  Removal of unused/obsolete XMLElement.java.
  
  Revision  ChangesPath
  1.9   +2 -6  xml-fop/src/java/org/apache/fop/fo/Unknown.java
  
  Index: Unknown.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Unknown.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Unknown.java  4 Aug 2004 22:21:02 -   1.8
  +++ Unknown.java  6 Sep 2004 20:54:59 -   1.9
  @@ -19,8 +19,8 @@
   package org.apache.fop.fo;
   
   /**
  - * Class for handling an unknown element, for example one from an unsupported
  - * namespace.
  + * Class for handling an unknown element from a namespace recognized
  + * by FOP.
* This prevents any further problems arising from the unknown
* data.
*/
  @@ -46,9 +46,5 @@
*/
   public Unknown(FONode parent) {
   super(parent);
  -}
  -
  -private void setup() {
  -getLogger().debug(Layout Unknown element);
   }
   }
  
  
  
  1.11  +3 -3  xml-fop/src/java/org/apache/fop/fo/UnknownXMLObj.java
  
  Index: UnknownXMLObj.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/UnknownXMLObj.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- UnknownXMLObj.java4 Aug 2004 22:21:02 -   1.10
  +++ UnknownXMLObj.java6 Sep 2004 20:54:59 -   1.11
  @@ -34,10 +34,10 @@
   
   /**
* Construct the Maker
  - * @param sp the namespace for this Maker
  + * @param ns the namespace for this Maker
*/
  -public Maker(String sp) {
  -space = sp;
  +public Maker(String ns) {
  +space = ns;
   }
   
   /**
  
  
  

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



cvs commit: xml-fop/src/java/org/apache/fop/fo/properties BoxPropShorthandParser.java GenericShorthandParser.java ShorthandParser.java PropertyMaker.java

2004-09-06 Thread gmazza
gmazza  2004/09/06 14:13:51

  Modified:src/java/org/apache/fop/fo FOPropertyMapping.java
   src/java/org/apache/fop/fo/properties PropertyMaker.java
  Added:   src/java/org/apache/fop/fo/properties
BoxPropShorthandParser.java
GenericShorthandParser.java ShorthandParser.java
  Removed: src/java/org/apache/fop/fo BoxPropShorthandParser.java
GenericShorthandParser.java ShorthandParser.java
  Log:
  Moved the property shorthand parser code into the properties package.
  
  Revision  ChangesPath
  1.15  +4 -1  xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java
  
  Index: FOPropertyMapping.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOPropertyMapping.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FOPropertyMapping.java15 Aug 2004 09:57:07 -  1.14
  +++ FOPropertyMapping.java6 Sep 2004 21:13:50 -   1.15
  @@ -23,12 +23,14 @@
   
   import org.apache.fop.datatypes.LengthBase;
   import org.apache.fop.fo.properties.BorderWidthPropertyMaker;
  +import org.apache.fop.fo.properties.BoxPropShorthandParser;
   import org.apache.fop.fo.properties.CharacterProperty;
   import org.apache.fop.fo.properties.ColorTypeProperty;
   import org.apache.fop.fo.properties.CondLengthProperty;
   import org.apache.fop.fo.properties.CorrespondingPropertyMaker;
   import org.apache.fop.fo.properties.DimensionPropertyMaker;
   import org.apache.fop.fo.properties.EnumProperty;
  +import org.apache.fop.fo.properties.GenericShorthandParser;
   import org.apache.fop.fo.properties.IndentPropertyMaker;
   import org.apache.fop.fo.properties.KeepProperty;
   import org.apache.fop.fo.properties.LengthPairProperty;
  @@ -39,6 +41,7 @@
   import org.apache.fop.fo.properties.NumberProperty;
   import org.apache.fop.fo.properties.Property;
   import org.apache.fop.fo.properties.PropertyMaker;
  +import org.apache.fop.fo.properties.ShorthandParser;
   import org.apache.fop.fo.properties.SpaceProperty;
   import org.apache.fop.fo.properties.SpacingPropertyMaker;
   import org.apache.fop.fo.properties.StringProperty;
  
  
  
  1.6   +1 -2  xml-fop/src/java/org/apache/fop/fo/properties/PropertyMaker.java
  
  Index: PropertyMaker.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/PropertyMaker.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PropertyMaker.java18 Jun 2004 17:58:35 -  1.5
  +++ PropertyMaker.java6 Sep 2004 21:13:51 -   1.6
  @@ -28,7 +28,6 @@
   import org.apache.fop.fo.FOPropertyMapping;
   import org.apache.fop.fo.FObj;
   import org.apache.fop.fo.PropertyList;
  -import org.apache.fop.fo.ShorthandParser;
   import org.apache.fop.fo.expr.PropertyInfo;
   import org.apache.fop.fo.expr.PropertyParser;
   
  
  
  
  1.1  
xml-fop/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java
  
  Index: BoxPropShorthandParser.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: BoxPropShorthandParser.java,v 1.1 2004/09/06 21:13:51 gmazza Exp $ */
  
  package org.apache.fop.fo.properties;
  
  import org.apache.fop.fo.FOPropertyMapping;
  import org.apache.fop.fo.PropertyList;
  
  /**
   * Shorthand property parser for Box properties
   */
  public class BoxPropShorthandParser extends GenericShorthandParser {
  
  /**
   * @see org.apache.fop.fo.GenericShorthandParser#GenericShorthandParser()
   */
  public BoxPropShorthandParser() {
  }
  
  /**
   * Stores 1 to 4 values of same type.
   * Set the given property based on the number of values set.
   * Example: padding, border-width, border-color, border-style, margin
   * @see org.apache.fop.fo.GenericShorthandParser#convertValueForProperty(
   * int, ListProperty, PropertyMaker, PropertyList)
   */
  protected Property convertValueForProperty(int propId,
 ListProperty listProperty,
 PropertyMaker maker,
  

cvs commit: xml-fop/src/java/org/apache/fop/fo/flow MultiSwitch.java TableRow.java

2004-09-06 Thread gmazza
gmazza  2004/09/06 14:23:23

  Modified:src/java/org/apache/fop/fo/flow MultiSwitch.java
TableRow.java
  Log:
  validateChildNode() for fo:table-row added.
  
  Revision  ChangesPath
  1.17  +1 -2  xml-fop/src/java/org/apache/fop/fo/flow/MultiSwitch.java
  
  Index: MultiSwitch.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/MultiSwitch.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- MultiSwitch.java  6 Sep 2004 18:44:31 -   1.16
  +++ MultiSwitch.java  6 Sep 2004 21:23:23 -   1.17
  @@ -59,8 +59,7 @@
   }
   
   /**
  - * Make sure content model satisfied, if so then tell the
  - * FOEventHandler that we are at the end of the flow.
  + * Make sure content model satisfied.
* @see org.apache.fop.fo.FONode#end
*/
   protected void endOfNode() throws SAXParseException {
  
  
  
  1.33  +20 -1 xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java
  
  Index: TableRow.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- TableRow.java 6 Sep 2004 18:44:31 -   1.32
  +++ TableRow.java 6 Sep 2004 21:23:23 -   1.33
  @@ -23,6 +23,7 @@
   
   // XML
   import org.xml.sax.Attributes;
  +import org.xml.sax.Locator;
   import org.xml.sax.SAXParseException;
   
   // FOP
  @@ -37,7 +38,6 @@
   
   /**
* Class modelling the fo:table-row object.
  - * @todo implement validateChildNode()
*/
   public class TableRow extends FObj {
   
  @@ -67,8 +67,24 @@
   getFOEventHandler().startRow(this);
   }
   
  +/**
  + * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
  + * XSL Content Model: (table-cell+)
  + */
  +protected void validateChildNode(Locator loc, String nsURI, String localName) 
  +throws SAXParseException {
  +if (!(nsURI == FO_URI  localName.equals(table-cell))) {
  +invalidChildError(loc, nsURI, localName);
  +}
  +}
   
  +/**
  + * @see org.apache.fop.fo.FONode#end
  + */
   protected void endOfNode() throws SAXParseException {
  +if (childNodes == null) {
  +missingChildElementError((table-cell+));
  +}
   getFOEventHandler().endRow(this);
   }
   
  @@ -79,6 +95,9 @@
   return keepWithPrevious;
   }
   
  +/**
  + * @todo see if should remove, or move code to addProperties()
  + */
   private void doSetup() {
   this.breakAfter = getPropEnum(PR_BREAK_AFTER);
   this.backgroundColor =
  
  
  

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