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 je...@apache.org on 2003/03/05 22:48:04 UTC
cvs commit: xml-fop/src/org/apache/fop/fo NumberProperty.java FOText.java SpaceProperty.java Declarations.java PropertyList.java EnumProperty.java ColorProfile.java GenericShorthandParser.java Unknown.java FOTreeBuilder.java LengthProperty.java KeepProperty.java FObjMixed.java Title.java AbstractCharIterator.java StringProperty.java BoxPropShorthandParser.java CharIterator.java ListProperty.java ShorthandParser.java CondLengthProperty.java CharacterProperty.java InlineCharIterator.java OneCharIterator.java ColorTypeProperty.java Property.java RecursiveCharIterator.java FOElementMapping.java ElementMapping.java FONode.java UnknownXMLObj.java ToBeImplementedElement.java TextInfo.java LengthRangeProperty.java PropertyListBuilder.java FObj.java LengthPairProperty.java XMLObj.java XMLElement.java FOUserAgent.java
jeremias 2003/03/05 13:48:03
Modified: src/org/apache/fop/fo NumberProperty.java FOText.java
SpaceProperty.java Declarations.java
PropertyList.java EnumProperty.java
ColorProfile.java GenericShorthandParser.java
Unknown.java FOTreeBuilder.java LengthProperty.java
KeepProperty.java FObjMixed.java Title.java
AbstractCharIterator.java StringProperty.java
BoxPropShorthandParser.java CharIterator.java
ListProperty.java ShorthandParser.java
CondLengthProperty.java CharacterProperty.java
InlineCharIterator.java OneCharIterator.java
ColorTypeProperty.java Property.java
RecursiveCharIterator.java FOElementMapping.java
ElementMapping.java FONode.java UnknownXMLObj.java
ToBeImplementedElement.java TextInfo.java
LengthRangeProperty.java PropertyListBuilder.java
FObj.java LengthPairProperty.java XMLObj.java
XMLElement.java FOUserAgent.java
Log:
Switched to long licence
Some general checkstyle fixing
Revision Changes Path
1.6 +53 -7 xml-fop/src/org/apache/fop/fo/NumberProperty.java
Index: NumberProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/NumberProperty.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- NumberProperty.java 30 Jul 2001 20:29:20 -0000 1.5
+++ NumberProperty.java 5 Mar 2003 21:48:01 -0000 1.6
@@ -1,9 +1,53 @@
/*
* $Id$
- * 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.
- */
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import org.apache.fop.datatypes.ColorType;
@@ -19,11 +63,13 @@
public Property convertProperty(Property p,
PropertyList propertyList, FObj fo) {
- if (p instanceof NumberProperty)
+ if (p instanceof NumberProperty) {
return p;
+ }
Number val = p.getNumber();
- if (val != null)
+ if (val != null) {
return new NumberProperty(val);
+ }
return convertPropertyDatatype(p, propertyList, fo);
}
1.43 +67 -21 xml-fop/src/org/apache/fop/fo/FOText.java
Index: FOText.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOText.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- FOText.java 14 Feb 2003 04:15:03 -0000 1.42
+++ FOText.java 5 Mar 2003 21:48:01 -0000 1.43
@@ -1,27 +1,68 @@
/*
* $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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
+// Java
+import java.util.NoSuchElementException;
+import java.util.List;
+
// FOP
-import org.apache.fop.layout.FontState;
-import org.apache.fop.layout.*;
-import org.apache.fop.datatypes.*;
-import org.apache.fop.fo.properties.*;
-import org.apache.fop.apps.FOPException;
+import org.apache.fop.layout.TextState;
import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.TextLayoutManager;
import org.apache.fop.apps.StructureHandler;
-
-import java.util.NoSuchElementException;
-import java.util.List;
+import org.apache.fop.fo.properties.WhiteSpaceCollapse;
/**
- * a text node in the formatting object tree
+ * A text node in the formatting object tree.
*
* Modified by Mark Lillywhite, mark-fop@inomial.com.
* Unfortunately the BufferManager implementatation holds
@@ -61,15 +102,17 @@
* @return true if this will create an area in the output
*/
public boolean willCreateArea() {
- if (textInfo.whiteSpaceCollapse == WhiteSpaceCollapse.FALSE &&
- length > 0) {
+ if (textInfo.whiteSpaceCollapse == WhiteSpaceCollapse.FALSE
+ && length > 0) {
return true;
}
for (int i = start; i < start + length; i++) {
char ch = ca[i];
- if (!((ch == ' ') || (ch == '\n') || (ch == '\r') ||
- (ch == '\t'))) { // whitespace
+ if (!((ch == ' ')
+ || (ch == '\n')
+ || (ch == '\r')
+ || (ch == '\t'))) { // whitespace
return true;
}
}
@@ -78,7 +121,9 @@
public void addLayoutManager(List list) {
// if nothing left (length=0)?
- if(length == 0) { return; }
+ if (length == 0) {
+ return;
+ }
if (length < ca.length) {
char[] tmp = ca;
@@ -95,7 +140,8 @@
}
private class TextCharIterator extends AbstractCharIterator {
- int curIndex = 0;
+ private int curIndex = 0;
+
public boolean hasNext() {
return (curIndex < length);
}
1.5 +49 -6 xml-fop/src/org/apache/fop/fo/SpaceProperty.java
Index: SpaceProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/SpaceProperty.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SpaceProperty.java 30 Jul 2001 20:29:20 -0000 1.4
+++ SpaceProperty.java 5 Mar 2003 21:48:01 -0000 1.5
@@ -1,12 +1,55 @@
/*
* $Id$
- * 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.
- */
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-import org.apache.fop.datatypes.Length;
import org.apache.fop.datatypes.Space;
import org.apache.fop.datatypes.LengthRange;
1.8 +66 -24 xml-fop/src/org/apache/fop/fo/Declarations.java
Index: Declarations.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Declarations.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Declarations.java 7 Aug 2002 16:54:56 -0000 1.7
+++ Declarations.java 5 Mar 2003 21:48:01 -0000 1.8
@@ -1,18 +1,58 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-// FOP
-import org.apache.fop.fo.flow.*;
-import org.apache.fop.apps.FOPException;
-
-import java.util.ArrayList;
-import java.util.HashMap;
+// Java
+import java.util.List;
+import java.util.Map;
import java.util.Iterator;
/**
@@ -23,8 +63,9 @@
* references.
*/
public class Declarations extends FObj {
- HashMap colorProfiles = null;
- ArrayList external = null;
+
+ private Map colorProfiles = null;
+ private List external = null;
protected Declarations(FONode parent) {
super(parent);
@@ -35,25 +76,26 @@
* a hashmap of color profiles and a list of external xml.
*/
public void end() {
- for(Iterator iter = children.iterator(); iter.hasNext(); ) {
+ for (Iterator iter = children.iterator(); iter.hasNext();) {
FONode node = (FONode)iter.next();
- if(node.getName().equals("fo:color-profile")) {
+ if (node.getName().equals("fo:color-profile")) {
ColorProfile cp = (ColorProfile)node;
- if(!"".equals(cp.getProfileName())) {
- if(colorProfiles == null) {
- colorProfiles = new HashMap();
+ if (!"".equals(cp.getProfileName())) {
+ if (colorProfiles == null) {
+ colorProfiles = new java.util.HashMap();
}
- if(colorProfiles.get(cp.getProfileName()) != null) {
+ if (colorProfiles.get(cp.getProfileName()) != null) {
// duplicate names
- getLogger().warn("Duplicate fo:color-profile profile name : " + cp.getProfileName());
+ getLogger().warn("Duplicate fo:color-profile profile name : "
+ + cp.getProfileName());
}
colorProfiles.put(cp.getProfileName(), cp);
} else {
getLogger().warn("color-profile-name required for color profile");
}
- } else if(node instanceof XMLObj) {
- if(external == null) {
- external = new ArrayList();
+ } else if (node instanceof XMLObj) {
+ if (external == null) {
+ external = new java.util.ArrayList();
}
external.add(node);
} else {
1.20 +74 -25 xml-fop/src/org/apache/fop/fo/PropertyList.java
Index: PropertyList.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/PropertyList.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- PropertyList.java 19 Dec 2002 08:12:04 -0000 1.19
+++ PropertyList.java 5 Mar 2003 21:48:01 -0000 1.20
@@ -1,10 +1,53 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import java.util.HashMap;
@@ -28,26 +71,26 @@
public static final int BLOCKPROGDIM = 4;
public static final int INLINEPROGDIM = 5;
- private static final String[] sAbsNames = new String[] {
+ private static final String[] ABS_NAMES = new String[] {
"left", "right", "top", "bottom", "height", "width"
};
- private static final String[] sRelNames = new String[] {
+ private static final String[] REL_NAMES = new String[] {
"start", "end", "before", "after", "block-progression-dimension",
"inline-progression-dimension"
};
- private static final HashMap wmtables = new HashMap(4);
+ private static final HashMap WRITING_MODE_TABLES = new HashMap(4);
{
- wmtables.put(new Integer(WritingMode.LR_TB), /* lr-tb */
+ WRITING_MODE_TABLES.put(new Integer(WritingMode.LR_TB), /* lr-tb */
new byte[] {
START, END, BEFORE, AFTER, BLOCKPROGDIM, INLINEPROGDIM
});
- wmtables.put(new Integer(WritingMode.RL_TB), /* rl-tb */
+ WRITING_MODE_TABLES.put(new Integer(WritingMode.RL_TB), /* rl-tb */
new byte[] {
END, START, BEFORE, AFTER, BLOCKPROGDIM, INLINEPROGDIM
});
- wmtables.put(new Integer(WritingMode.TB_RL), /* tb-rl */
+ WRITING_MODE_TABLES.put(new Integer(WritingMode.TB_RL), /* tb-rl */
new byte[] {
AFTER, BEFORE, START, END, INLINEPROGDIM, BLOCKPROGDIM
});
@@ -55,9 +98,9 @@
private PropertyListBuilder builder;
private PropertyList parentPropertyList = null;
- String namespace = "";
- String element = "";
- FObj fobj = null;
+ private String namespace = "";
+ private String element = "";
+ private FObj fobj = null;
public PropertyList(PropertyList parentPropertyList, String space,
String el) {
@@ -77,8 +120,9 @@
public FObj getParentFObj() {
if (parentPropertyList != null) {
return parentPropertyList.getFObj();
- } else
+ } else {
return null;
+ }
}
/**
@@ -94,8 +138,9 @@
String baseName;
if (sepchar > -1) {
baseName = propertyName.substring(0, sepchar);
- } else
+ } else {
baseName = propertyName;
+ }
Property p = getExplicitBaseProp(baseName);
if (p == null) {
p = builder.getShorthand(this, namespace, element, baseName);
@@ -125,8 +170,9 @@
baseName, p,
propertyName.substring(sepchar
+ 1));
- } else
+ } else {
return null;
+ }
}
return (Property)super.get(propertyName);
}
@@ -255,7 +301,7 @@
// if value is inherit then get computed value from
// parent
- if(p != null && "inherit".equals(p.getSpecifiedValue())) {
+ if (p != null && "inherit".equals(p.getSpecifiedValue())) {
if (this.parentPropertyList != null) {
p = parentPropertyList.get(propertyName, true, false);
}
@@ -264,8 +310,9 @@
if (subpropName != null && p != null) {
return this.builder.getSubpropValue(namespace, element,
propertyName, p, subpropName);
- } else
+ } else {
return p;
+ }
}
public void setBuilder(PropertyListBuilder builder) {
@@ -336,9 +383,10 @@
*/
public String wmAbsToRel(int absdir) {
if (wmtable != null) {
- return sRelNames[wmtable[absdir]];
- } else
+ return REL_NAMES[wmtable[absdir]];
+ } else {
return "";
+ }
}
/**
@@ -349,8 +397,9 @@
public String wmRelToAbs(int reldir) {
if (wmtable != null) {
for (int i = 0; i < wmtable.length; i++) {
- if (wmtable[i] == reldir)
- return sAbsNames[i];
+ if (wmtable[i] == reldir) {
+ return ABS_NAMES[i];
+ }
}
}
return "";
@@ -360,7 +409,7 @@
* Set the writing mode traits for the FO with this property list.
*/
public void setWritingMode(int writingMode) {
- this.wmtable = (byte[])wmtables.get(new Integer(writingMode));
+ this.wmtable = (byte[])WRITING_MODE_TABLES.get(new Integer(writingMode));
}
}
1.8 +49 -6 xml-fop/src/org/apache/fop/fo/EnumProperty.java
Index: EnumProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/EnumProperty.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- EnumProperty.java 25 Oct 2002 09:29:40 -0000 1.7
+++ EnumProperty.java 5 Mar 2003 21:48:01 -0000 1.8
@@ -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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import org.apache.fop.apps.FOPException;
1.10 +62 -15 xml-fop/src/org/apache/fop/fo/ColorProfile.java
Index: ColorProfile.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ColorProfile.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ColorProfile.java 7 Aug 2002 16:54:56 -0000 1.9
+++ ColorProfile.java 5 Mar 2003 21:48:01 -0000 1.10
@@ -1,31 +1,78 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-// FOP
-import org.apache.fop.datatypes.ColorType;
-
+// Java
import java.awt.color.ICC_Profile;
import java.awt.color.ICC_ColorSpace;
import java.net.URL;
import java.io.IOException;
import java.io.InputStream;
+// FOP
+import org.apache.fop.datatypes.ColorType;
+
/**
* The fo:color-profile formatting object.
* This loads the color profile when needed and resolves a requested color.
*/
public class ColorProfile extends FObj {
- int intent;
- String src;
- String profileName;
- ICC_ColorSpace colorSpace = null;
+ private int intent;
+ private String src;
+ private String profileName;
+ private ICC_ColorSpace colorSpace = null;
+ /**
+ * @see org.apache.fop.fo.FONode#FONode(FONode)
+ */
protected ColorProfile(FONode parent) {
super(parent);
}
@@ -64,9 +111,9 @@
InputStream is = url.openStream();
ICC_Profile iccProfile = ICC_Profile.getInstance(is);
colorSpace = new ICC_ColorSpace(iccProfile);
- } catch(IOException ioe) {
+ } catch (IOException ioe) {
getLogger().error("Could not read Color Profile src", ioe);
- } catch(IllegalArgumentException iae) {
+ } catch (IllegalArgumentException iae) {
getLogger().error("Color Profile src not an ICC Profile", iae);
}
}
1.4 +49 -6 xml-fop/src/org/apache/fop/fo/GenericShorthandParser.java
Index: GenericShorthandParser.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/GenericShorthandParser.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- GenericShorthandParser.java 25 Oct 2002 09:29:41 -0000 1.3
+++ GenericShorthandParser.java 5 Mar 2003 21:48:01 -0000 1.4
@@ -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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import java.util.Vector;
1.7 +49 -13 xml-fop/src/org/apache/fop/fo/Unknown.java
Index: Unknown.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Unknown.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Unknown.java 7 Aug 2002 16:54:56 -0000 1.6
+++ Unknown.java 5 Mar 2003 21:48:01 -0000 1.7
@@ -1,18 +1,54 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-
-// FOP
-import org.apache.fop.fo.*;
-import org.apache.fop.layout.*;
-import org.apache.fop.fo.flow.*;
-import org.apache.fop.fo.properties.*;
-import org.apache.fop.apps.FOPException;
/**
* This represents an unknown element.
1.43 +97 -27 xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java
Index: FOTreeBuilder.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- FOTreeBuilder.java 17 Dec 2002 08:32:12 -0000 1.42
+++ FOTreeBuilder.java 5 Mar 2003 21:48:01 -0000 1.43
@@ -1,26 +1,71 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
// FOP
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.StructureHandler;
-// Avalon
-import org.apache.avalon.framework.logger.Logger;
+// Java
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
// SAX
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.SAXException;
import org.xml.sax.Attributes;
-// Java
-import java.util.*;
+// Avalon
+import org.apache.avalon.framework.logger.Logger;
/**
* SAX Handler that builds the formatting object tree.
@@ -39,12 +84,12 @@
* Table mapping element names to the makers of objects
* representing formatting objects.
*/
- protected Map fobjTable = new HashMap();
+ protected Map fobjTable = new java.util.HashMap();
/**
* Set of mapped namespaces.
*/
- protected Set namespaces = new HashSet();
+ protected Set namespaces = new java.util.HashSet();
/**
* Current formatting object being handled
@@ -64,20 +109,32 @@
private FOUserAgent userAgent;
- public FOTreeBuilder() {}
+ /**
+ * Default constructor
+ */
+ public FOTreeBuilder() {
+ }
- public Logger getLogger() {
+ private Logger getLogger() {
return userAgent.getLogger();
}
+ /**
+ * Sets the user agent
+ * @param ua the user agent
+ */
public void setUserAgent(FOUserAgent ua) {
userAgent = ua;
}
- public FOUserAgent getUserAgent() {
+ private FOUserAgent getUserAgent() {
return userAgent;
}
+ /**
+ * Sets the structure handler to receive events.
+ * @param sh StructureHandler instance
+ */
public void setStructHandler(StructureHandler sh) {
this.structHandler = sh;
}
@@ -95,47 +152,52 @@
/**
* SAX Handler for characters
+ * @see org.xml.sax.ContentHandler#characters(char[], int, int)
*/
public void characters(char data[], int start, int length) {
- if(currentFObj != null) {
+ if (currentFObj != null) {
currentFObj.addCharacters(data, start, start + length);
}
}
/**
* SAX Handler for the end of an element
+ * @see org.xml.sax.ContentHandler#endElement(String, String, String)
*/
public void endElement(String uri, String localName, String rawName)
- throws SAXException {
+ throws SAXException {
currentFObj.end();
currentFObj = currentFObj.getParent();
}
/**
* SAX Handler for the start of the document
+ * @see org.xml.sax.ContentHandler#startDocument()
*/
- public void startDocument()
- throws SAXException {
+ public void startDocument() throws SAXException {
rootFObj = null; // allows FOTreeBuilder to be reused
- if (getLogger().isDebugEnabled())
+ if (getLogger().isDebugEnabled()) {
getLogger().debug("Building formatting object tree");
+ }
structHandler.startDocument();
}
/**
* SAX Handler for the end of the document
+ * @see org.xml.sax.ContentHandler#endDocument()
*/
- public void endDocument()
- throws SAXException {
+ public void endDocument() throws SAXException {
rootFObj = null;
currentFObj = null;
- if (getLogger().isDebugEnabled())
+ if (getLogger().isDebugEnabled()) {
getLogger().debug("Parsing of document complete");
+ }
structHandler.endDocument();
}
/**
* SAX Handler for the start of an element
+ * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)
*/
public void startElement(String uri, String localName, String rawName,
Attributes attlist) throws SAXException {
@@ -146,18 +208,19 @@
ElementMapping.Maker fobjMaker = null;
Map table = (Map)fobjTable.get(uri);
- if(table != null) {
+ if (table != null) {
fobjMaker = (ElementMapping.Maker)table.get(localName);
// try default
- if(fobjMaker == null) {
+ if (fobjMaker == null) {
fobjMaker = (ElementMapping.Maker)table.get(ElementMapping.DEFAULT);
}
}
if (fobjMaker == null) {
- if (getLogger().isWarnEnabled())
+ if (getLogger().isWarnEnabled()) {
getLogger().warn("Unknown formatting object " + uri + "^" + localName);
- if(namespaces.contains(uri.intern())) {
+ }
+ if (namespaces.contains(uri.intern())) {
// fall back
fobjMaker = new Unknown.Maker();
} else {
@@ -193,12 +256,19 @@
currentFObj = fobj;
}
+ /**
+ * Resets this object for another run.
+ */
public void reset() {
currentFObj = null;
rootFObj = null;
structHandler = null;
}
+ /**
+ * Indicates if data has been processed.
+ * @return True if data has been processed
+ */
public boolean hasData() {
return (rootFObj != null);
}
1.7 +49 -6 xml-fop/src/org/apache/fop/fo/LengthProperty.java
Index: LengthProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/LengthProperty.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- LengthProperty.java 25 Oct 2002 09:29:41 -0000 1.6
+++ LengthProperty.java 5 Mar 2003 21:48:01 -0000 1.7
@@ -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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import org.apache.fop.datatypes.Length;
1.3 +49 -6 xml-fop/src/org/apache/fop/fo/KeepProperty.java
Index: KeepProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/KeepProperty.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- KeepProperty.java 30 Jul 2001 20:29:20 -0000 1.2
+++ KeepProperty.java 5 Mar 2003 21:48:01 -0000 1.3
@@ -1,10 +1,53 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import org.apache.fop.datatypes.Keep;
1.33 +50 -10 xml-fop/src/org/apache/fop/fo/FObjMixed.java
Index: FObjMixed.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FObjMixed.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- FObjMixed.java 14 Feb 2003 04:15:03 -0000 1.32
+++ FObjMixed.java 5 Mar 2003 21:48:01 -0000 1.33
@@ -1,17 +1,57 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-import org.apache.fop.layout.FontState;
import org.apache.fop.layout.FontInfo;
-import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.StructureHandler;
-import org.apache.fop.datatypes.ColorType;
import org.apache.fop.layoutmgr.InlineStackingLayoutManager;
import org.apache.fop.layoutmgr.LMiter;
@@ -46,7 +86,7 @@
}
protected void addCharacters(char data[], int start, int length) {
- if(textInfo == null) {
+ if (textInfo == null) {
// Really only need one of these, but need to get fontInfo
// stored in propMgr for later use.
propMgr.setFontInfo(fontInfo);
1.15 +49 -6 xml-fop/src/org/apache/fop/fo/Title.java
Index: Title.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Title.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Title.java 4 Mar 2003 03:55:54 -0000 1.14
+++ Title.java 5 Mar 2003 21:48:01 -0000 1.15
@@ -1,10 +1,53 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
// FOP
1.4 +70 -8 xml-fop/src/org/apache/fop/fo/AbstractCharIterator.java
Index: AbstractCharIterator.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/AbstractCharIterator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractCharIterator.java 29 Nov 2002 23:18:53 -0000 1.3
+++ AbstractCharIterator.java 5 Mar 2003 21:48:01 -0000 1.4
@@ -1,34 +1,96 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-// FOP
-import org.apache.fop.apps.FOPException;
import java.util.NoSuchElementException;
+/**
+ * Abstract base class for character iterators.
+ */
public abstract class AbstractCharIterator implements CharIterator, Cloneable {
+ /**
+ * @see java.util.Iterator#hasNext()
+ */
public abstract boolean hasNext();
+ /**
+ * @see org.apache.fop.fo.CharIterator#nextChar()
+ */
public abstract char nextChar() throws NoSuchElementException ;
+ /**
+ * @see java.util.Iterator#next()
+ */
public Object next() throws NoSuchElementException {
return new Character(nextChar());
}
+ /**
+ * @see java.util.Iterator#remove()
+ */
public void remove() {
throw new UnsupportedOperationException();
}
+ /**
+ * @see org.apache.fop.fo.CharIterator#replaceChar(char)
+ */
public void replaceChar(char c) {
}
+ /**
+ * @see java.lang.Object#clone()
+ */
public Object clone() {
try {
return super.clone();
1.4 +50 -7 xml-fop/src/org/apache/fop/fo/StringProperty.java
Index: StringProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/StringProperty.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- StringProperty.java 17 Sep 2002 06:35:59 -0000 1.3
+++ StringProperty.java 5 Mar 2003 21:48:01 -0000 1.4
@@ -1,10 +1,53 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
@@ -37,7 +80,7 @@
// fall through and use the entire value, including first quote
}
String str = checkValueKeywords(value);
- if(str != null) {
+ if (str != null) {
value = str;
}
}
1.3 +58 -11 xml-fop/src/org/apache/fop/fo/BoxPropShorthandParser.java
Index: BoxPropShorthandParser.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/BoxPropShorthandParser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BoxPropShorthandParser.java 30 Jul 2001 20:29:20 -0000 1.2
+++ BoxPropShorthandParser.java 5 Mar 2003 21:48:01 -0000 1.3
@@ -1,23 +1,70 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-import org.apache.fop.apps.FOPException;
-
public class BoxPropShorthandParser extends GenericShorthandParser {
+ /**
+ * @see org.apache.fop.fo.GenericShorthandParser#GenericShorthandParser(ListProperty)
+ */
public BoxPropShorthandParser(ListProperty listprop) {
super(listprop);
}
- // 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
+ /**
+ * 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(String, Maker, PropertyList)
+ */
protected Property convertValueForProperty(String propName,
Property.Maker maker,
PropertyList propertyList) {
1.2 +48 -5 xml-fop/src/org/apache/fop/fo/CharIterator.java
Index: CharIterator.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/CharIterator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CharIterator.java 21 Nov 2001 22:13:36 -0000 1.1
+++ CharIterator.java 5 Mar 2003 21:48:01 -0000 1.2
@@ -1,10 +1,53 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import java.util.Iterator;
1.3 +52 -8 xml-fop/src/org/apache/fop/fo/ListProperty.java
Index: ListProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ListProperty.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ListProperty.java 30 Jul 2001 20:29:20 -0000 1.2
+++ ListProperty.java 5 Mar 2003 21:48:01 -0000 1.3
@@ -1,10 +1,53 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import java.util.Vector;
@@ -19,10 +62,11 @@
public Property convertProperty(Property p,
PropertyList propertyList, FObj fo) {
- if (p instanceof ListProperty)
+ if (p instanceof ListProperty) {
return p;
- else
+ } else {
return new ListProperty(p);
+ }
}
}
1.3 +52 -9 xml-fop/src/org/apache/fop/fo/ShorthandParser.java
Index: ShorthandParser.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ShorthandParser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ShorthandParser.java 30 Jul 2001 20:29:20 -0000 1.2
+++ ShorthandParser.java 5 Mar 2003 21:48:01 -0000 1.3
@@ -1,14 +1,57 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
public interface ShorthandParser {
- public Property getValueForProperty(String propName,
- Property.Maker maker,
- PropertyList propertyList);
+ Property getValueForProperty(String propName,
+ Property.Maker maker,
+ PropertyList propertyList);
}
1.5 +49 -6 xml-fop/src/org/apache/fop/fo/CondLengthProperty.java
Index: CondLengthProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/CondLengthProperty.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- CondLengthProperty.java 30 Jul 2001 20:29:20 -0000 1.4
+++ CondLengthProperty.java 5 Mar 2003 21:48:01 -0000 1.5
@@ -1,10 +1,53 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import org.apache.fop.datatypes.Length;
1.3 +49 -6 xml-fop/src/org/apache/fop/fo/CharacterProperty.java
Index: CharacterProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/CharacterProperty.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CharacterProperty.java 30 Jul 2001 20:29:20 -0000 1.2
+++ CharacterProperty.java 5 Mar 2003 21:48:02 -0000 1.3
@@ -1,10 +1,53 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
public class CharacterProperty extends Property {
1.4 +57 -14 xml-fop/src/org/apache/fop/fo/InlineCharIterator.java
Index: InlineCharIterator.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/InlineCharIterator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InlineCharIterator.java 25 Oct 2002 09:29:41 -0000 1.3
+++ InlineCharIterator.java 5 Mar 2003 21:48:02 -0000 1.4
@@ -1,16 +1,57 @@
/*
* $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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import org.apache.fop.layout.BorderAndPadding;
import org.apache.fop.util.CharUtilities;
-import java.util.Iterator;
-import java.util.ListIterator;
import java.util.NoSuchElementException;
@@ -26,15 +67,16 @@
private void checkBoundaries(BorderAndPadding bap) {
// TODO! use start and end in BAP!!
- bStartBoundary = (bap.getBorderLeftWidth(false) > 0 ||
- bap.getPaddingLeft(false) > 0);
- bEndBoundary = (bap.getBorderRightWidth(false) > 0 ||
- bap.getPaddingRight(false) > 0);
+ bStartBoundary = (bap.getBorderLeftWidth(false) > 0
+ || bap.getPaddingLeft(false) > 0);
+ bEndBoundary = (bap.getBorderRightWidth(false) > 0
+ || bap.getPaddingRight(false) > 0);
}
public boolean hasNext() {
- if (bStartBoundary)
+ if (bStartBoundary) {
return true;
+ }
return (super.hasNext() || bEndBoundary);
/* If super.hasNext() returns false,
* we return true if we are going to return a "boundary" signal
@@ -55,8 +97,9 @@
if (bEndBoundary) {
bEndBoundary = false;
return CharUtilities.CODE_EOT;
- } else
+ } else {
throw e;
+ }
}
}
}
1.4 +50 -8 xml-fop/src/org/apache/fop/fo/OneCharIterator.java
Index: OneCharIterator.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/OneCharIterator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- OneCharIterator.java 29 Nov 2002 23:18:53 -0000 1.3
+++ OneCharIterator.java 5 Mar 2003 21:48:02 -0000 1.4
@@ -1,19 +1,61 @@
/*
* $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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-import java.util.Iterator;
import java.util.NoSuchElementException;
public class OneCharIterator extends AbstractCharIterator {
- private boolean bFirst=true;
+ private boolean bFirst = true;
private char charCode;
public OneCharIterator(char c) {
1.5 +49 -6 xml-fop/src/org/apache/fop/fo/ColorTypeProperty.java
Index: ColorTypeProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ColorTypeProperty.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ColorTypeProperty.java 25 Oct 2002 09:29:40 -0000 1.4
+++ ColorTypeProperty.java 5 Mar 2003 21:48:02 -0000 1.5
@@ -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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import org.apache.fop.datatypes.ColorType;
1.22 +60 -11 xml-fop/src/org/apache/fop/fo/Property.java
Index: Property.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Property.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Property.java 7 Aug 2002 16:54:56 -0000 1.21
+++ Property.java 5 Mar 2003 21:48:02 -0000 1.22
@@ -1,17 +1,66 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-import org.apache.fop.datatypes.*;
+import org.apache.fop.datatypes.ColorType;
+import org.apache.fop.datatypes.CondLength;
+import org.apache.fop.datatypes.Keep;
+import org.apache.fop.datatypes.Length;
+import org.apache.fop.datatypes.LengthPair;
+import org.apache.fop.datatypes.LengthRange;
+import org.apache.fop.datatypes.PercentBase;
+import org.apache.fop.datatypes.Space;
import org.apache.fop.fo.expr.Numeric;
import org.apache.fop.fo.expr.PropertyParser;
import org.apache.fop.fo.expr.PropertyInfo;
-import org.apache.fop.fo.expr.PropertyException;
import org.apache.fop.apps.FOPException;
import java.util.Vector;
@@ -186,9 +235,9 @@
}
return pret;
} catch (org.apache.fop.fo.expr.PropertyException propEx) {
- throw new FOPException("Error in " + propName +
- " property value '" + value + "': " +
- propEx);
+ throw new FOPException("Error in " + propName
+ + " property value '" + value + "': "
+ + propEx);
}
}
1.5 +55 -11 xml-fop/src/org/apache/fop/fo/RecursiveCharIterator.java
Index: RecursiveCharIterator.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/RecursiveCharIterator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RecursiveCharIterator.java 15 Nov 2002 11:56:27 -0000 1.4
+++ RecursiveCharIterator.java 5 Mar 2003 21:48:02 -0000 1.5
@@ -1,20 +1,62 @@
/*
* $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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
import java.util.Iterator;
-import java.util.ListIterator;
import java.util.NoSuchElementException;
public class RecursiveCharIterator extends AbstractCharIterator {
- Iterator childIter = null; // Child flow objects
- CharIterator curCharIter = null; // Children's characters
+ private Iterator childIter = null; // Child flow objects
+ private CharIterator curCharIter = null; // Children's characters
private FONode fobj;
private FONode curChild;
@@ -67,8 +109,9 @@
while (curCharIter != null) {
if (curCharIter.hasNext() == false) {
getNextCharIter();
- } else
+ } else {
return true;
+ }
}
return false;
}
@@ -76,8 +119,9 @@
public char nextChar() throws NoSuchElementException {
if (curCharIter != null) {
return curCharIter.nextChar();
- } else
+ } else {
throw new NoSuchElementException();
+ }
}
1.5 +107 -60 xml-fop/src/org/apache/fop/fo/FOElementMapping.java
Index: FOElementMapping.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOElementMapping.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- FOElementMapping.java 13 Sep 2002 08:21:53 -0000 1.4
+++ FOElementMapping.java 5 Mar 2003 21:48:02 -0000 1.5
@@ -1,23 +1,67 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
+// Java
import java.util.HashMap;
-import java.util.Iterator;
-
-import org.apache.fop.fo.flow.*;
-import org.apache.fop.fo.pagination.*;
+/**
+ * Element mapping class for all XSL-FO elements.
+ */
public class FOElementMapping implements ElementMapping {
+
private static HashMap foObjs = null;
private static synchronized void setupFO() {
- if(foObjs == null) {
+ if (foObjs == null) {
foObjs = new HashMap();
// Declarations and Pagination and Layout Formatting Objects
@@ -107,6 +151,9 @@
}
+ /**
+ * @see org.apache.fop.fo.ElementMapping#addToBuilder(FOTreeBuilder)
+ */
public void addToBuilder(FOTreeBuilder builder) {
setupFO();
String uri = "http://www.w3.org/1999/XSL/Format";
@@ -115,7 +162,7 @@
static class R extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Root(parent);
+ return new org.apache.fop.fo.pagination.Root(parent);
}
}
@@ -133,91 +180,91 @@
static class PS extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new PageSequence(parent);
+ return new org.apache.fop.fo.pagination.PageSequence(parent);
}
}
static class LMS extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new LayoutMasterSet(parent);
+ return new org.apache.fop.fo.pagination.LayoutMasterSet(parent);
}
}
static class PSM extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new PageSequenceMaster(parent);
+ return new org.apache.fop.fo.pagination.PageSequenceMaster(parent);
}
}
static class SPMR extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new SinglePageMasterReference(parent);
+ return new org.apache.fop.fo.pagination.SinglePageMasterReference(parent);
}
}
static class RPMR extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new RepeatablePageMasterReference(parent);
+ return new org.apache.fop.fo.pagination.RepeatablePageMasterReference(parent);
}
}
static class RPMA extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new RepeatablePageMasterAlternatives(parent);
+ return new org.apache.fop.fo.pagination.RepeatablePageMasterAlternatives(parent);
}
}
static class CPMR extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new ConditionalPageMasterReference(parent);
+ return new org.apache.fop.fo.pagination.ConditionalPageMasterReference(parent);
}
}
static class SPM extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new SimplePageMaster(parent);
+ return new org.apache.fop.fo.pagination.SimplePageMaster(parent);
}
}
static class RB extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new RegionBody(parent);
+ return new org.apache.fop.fo.pagination.RegionBody(parent);
}
}
static class RBefore extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new RegionBefore(parent);
+ return new org.apache.fop.fo.pagination.RegionBefore(parent);
}
}
static class RA extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new RegionAfter(parent);
+ return new org.apache.fop.fo.pagination.RegionAfter(parent);
}
}
static class RS extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new RegionStart(parent);
+ return new org.apache.fop.fo.pagination.RegionStart(parent);
}
}
static class RE extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new RegionEnd(parent);
+ return new org.apache.fop.fo.pagination.RegionEnd(parent);
}
}
static class Fl extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Flow(parent);
+ return new org.apache.fop.fo.flow.Flow(parent);
}
}
static class SC extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new StaticContent(parent);
+ return new org.apache.fop.fo.flow.StaticContent(parent);
}
}
@@ -229,19 +276,19 @@
static class B extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Block(parent);
+ return new org.apache.fop.fo.flow.Block(parent);
}
}
static class BC extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new BlockContainer(parent);
+ return new org.apache.fop.fo.flow.BlockContainer(parent);
}
}
static class BO extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new BidiOverride(parent);
+ return new org.apache.fop.fo.flow.BidiOverride(parent);
}
}
@@ -253,151 +300,151 @@
static class IPS extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new InitialPropertySet(parent);
+ return new org.apache.fop.fo.flow.InitialPropertySet(parent);
}
}
static class EG extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new ExternalGraphic(parent);
+ return new org.apache.fop.fo.flow.ExternalGraphic(parent);
}
}
static class IFO extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new InstreamForeignObject(parent);
+ return new org.apache.fop.fo.flow.InstreamForeignObject(parent);
}
}
static class In extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Inline(parent);
+ return new org.apache.fop.fo.flow.Inline(parent);
}
}
static class IC extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new InlineContainer(parent);
+ return new org.apache.fop.fo.flow.InlineContainer(parent);
}
}
static class L extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Leader(parent);
+ return new org.apache.fop.fo.flow.Leader(parent);
}
}
static class PN extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new PageNumber(parent);
+ return new org.apache.fop.fo.flow.PageNumber(parent);
}
}
static class PNC extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new PageNumberCitation(parent);
+ return new org.apache.fop.fo.flow.PageNumberCitation(parent);
}
}
static class TAC extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new TableAndCaption(parent);
+ return new org.apache.fop.fo.flow.TableAndCaption(parent);
}
}
static class Ta extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Table(parent);
+ return new org.apache.fop.fo.flow.Table(parent);
}
}
static class TC extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new TableColumn(parent);
+ return new org.apache.fop.fo.flow.TableColumn(parent);
}
}
static class TCaption extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new TableCaption(parent);
+ return new org.apache.fop.fo.flow.TableCaption(parent);
}
}
static class TB extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new TableBody(parent);
+ return new org.apache.fop.fo.flow.TableBody(parent);
}
}
static class TR extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new TableRow(parent);
+ return new org.apache.fop.fo.flow.TableRow(parent);
}
}
static class TCell extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new TableCell(parent);
+ return new org.apache.fop.fo.flow.TableCell(parent);
}
}
static class LB extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new ListBlock(parent);
+ return new org.apache.fop.fo.flow.ListBlock(parent);
}
}
static class LI extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new ListItem(parent);
+ return new org.apache.fop.fo.flow.ListItem(parent);
}
}
static class LIB extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new ListItemBody(parent);
+ return new org.apache.fop.fo.flow.ListItemBody(parent);
}
}
static class LIL extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new ListItemLabel(parent);
+ return new org.apache.fop.fo.flow.ListItemLabel(parent);
}
}
static class BL extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new BasicLink(parent);
+ return new org.apache.fop.fo.flow.BasicLink(parent);
}
}
static class MS extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new MultiSwitch(parent);
+ return new org.apache.fop.fo.flow.MultiSwitch(parent);
}
}
static class MC extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new MultiCase(parent);
+ return new org.apache.fop.fo.flow.MultiCase(parent);
}
}
static class MT extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new MultiToggle(parent);
+ return new org.apache.fop.fo.flow.MultiToggle(parent);
}
}
static class MP extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new MultiProperties(parent);
+ return new org.apache.fop.fo.flow.MultiProperties(parent);
}
}
static class MPS extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new MultiPropertySet(parent);
+ return new org.apache.fop.fo.flow.MultiPropertySet(parent);
}
}
@@ -409,31 +456,31 @@
static class Foot extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Footnote(parent);
+ return new org.apache.fop.fo.flow.Footnote(parent);
}
}
static class FB extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new FootnoteBody(parent);
+ return new org.apache.fop.fo.flow.FootnoteBody(parent);
}
}
static class W extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Wrapper(parent);
+ return new org.apache.fop.fo.flow.Wrapper(parent);
}
}
static class M extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new Marker(parent);
+ return new org.apache.fop.fo.flow.Marker(parent);
}
}
static class RM extends ElementMapping.Maker {
public FONode make(FONode parent) {
- return new RetrieveMarker(parent);
+ return new org.apache.fop.fo.flow.RetrieveMarker(parent);
}
}
}
1.11 +51 -8 xml-fop/src/org/apache/fop/fo/ElementMapping.java
Index: ElementMapping.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ElementMapping.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ElementMapping.java 9 Nov 2001 11:32:36 -0000 1.10
+++ ElementMapping.java 5 Mar 2003 21:48:02 -0000 1.11
@@ -1,10 +1,53 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
/**
@@ -12,9 +55,9 @@
* the given builder.
*/
public interface ElementMapping {
- public static final String DEFAULT = "<default>";
+ final String DEFAULT = "<default>";
- public void addToBuilder(FOTreeBuilder builder);
+ void addToBuilder(FOTreeBuilder builder);
public static class Maker {
public FONode make(FONode parent) {
1.34 +91 -19 xml-fop/src/org/apache/fop/fo/FONode.java
Index: FONode.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FONode.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- FONode.java 18 Nov 2002 15:54:13 -0000 1.33
+++ FONode.java 5 Mar 2003 21:48:02 -0000 1.34
@@ -1,54 +1,126 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-// FOP
-import org.apache.fop.apps.FOPException;
-import org.apache.fop.apps.StructureHandler;
-import org.apache.fop.util.CharUtilities;
+// Java
+import java.util.ListIterator;
+
+// XML
+import org.xml.sax.Attributes;
// Avalon
import org.apache.avalon.framework.logger.Logger;
-import org.xml.sax.Attributes;
-
-import java.util.ListIterator;
-import java.util.NoSuchElementException;
+// FOP
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.apps.StructureHandler;
+import org.apache.fop.util.CharUtilities;
/**
* base class for nodes in the XML tree
*
*/
public abstract class FONode {
+
+ /** FO User Agent for this node (for logger etc.)*/
protected FOUserAgent userAgent;
+ /** Parent FO node */
protected FONode parent;
+ /** Name of the node */
protected String name;
+ /**
+ * Main constructor.
+ * @param parent parent of this node
+ */
protected FONode(FONode parent) {
this.parent = parent;
}
+ /**
+ * Sets the name of the node.
+ * @param str the name
+ */
public void setName(String str) {
name = str;
}
- public Logger getLogger() {
+ /**
+ * Returns the logger for the node.
+ * @return the logger
+ */
+ protected Logger getLogger() {
return userAgent.getLogger();
}
+ /**
+ * Sets the user agent for the node.
+ * @param ua the user agent
+ */
public void setUserAgent(FOUserAgent ua) {
userAgent = ua;
}
- public FOUserAgent getUserAgent() {
+ /**
+ * Returns the user agent for the node.
+ * @return FOUserAgent
+ */
+ protected FOUserAgent getUserAgent() {
return userAgent;
}
+ /**
+ * Sets the structure handler to send events to.
+ * @param st StructureHandler instance
+ */
public void setStructHandler(StructureHandler st) {
}
@@ -56,7 +128,7 @@
}
/**
- * returns the name of the object
+ * Returns the name of the object
* @return the name of this object
*/
public String getName() {
@@ -64,7 +136,7 @@
}
/**
- * adds characters (does nothing here)
+ * Adds characters (does nothing here)
* @param data text
* @param start start position
* @param length length of the text
@@ -99,7 +171,7 @@
* @return A ListIterator.
*/
public ListIterator getChildren() {
- return null;
+ return null;
}
/**
1.7 +54 -17 xml-fop/src/org/apache/fop/fo/UnknownXMLObj.java
Index: UnknownXMLObj.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/UnknownXMLObj.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- UnknownXMLObj.java 21 Jun 2002 14:03:42 -0000 1.6
+++ UnknownXMLObj.java 5 Mar 2003 21:48:02 -0000 1.7
@@ -1,25 +1,62 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-import org.apache.fop.fo.*;
-import org.apache.fop.layout.FontState;
-import org.apache.fop.apps.FOPException;
-
-import org.w3c.dom.Element;
-
public class UnknownXMLObj extends XMLObj {
- String namespace;
+ private String namespace;
public static class Maker extends ElementMapping.Maker {
- String space;
+ private String space;
- Maker(String sp) {
+ public Maker(String sp) {
space = sp;
}
@@ -44,14 +81,14 @@
}
protected void addChild(FONode child) {
- if(doc == null) {
+ if (doc == null) {
createBasicDocument();
}
super.addChild(child);
}
protected void addCharacters(char data[], int start, int length) {
- if(doc == null) {
+ if (doc == null) {
createBasicDocument();
}
super.addCharacters(data, start, length);
1.8 +50 -12 xml-fop/src/org/apache/fop/fo/ToBeImplementedElement.java
Index: ToBeImplementedElement.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ToBeImplementedElement.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ToBeImplementedElement.java 7 Aug 2002 16:54:56 -0000 1.7
+++ ToBeImplementedElement.java 5 Mar 2003 21:48:02 -0000 1.8
@@ -1,19 +1,57 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-// FOP
-import org.apache.fop.fo.*;
-import org.apache.fop.fo.flow.*;
-import org.apache.fop.fo.properties.*;
-import org.apache.fop.apps.FOPException;
-
/**
+ * This class is a placeholder for elements that have not been implemented.
*/
public class ToBeImplementedElement extends FObj {
1.6 +50 -7 xml-fop/src/org/apache/fop/fo/TextInfo.java
Index: TextInfo.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/TextInfo.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TextInfo.java 25 Oct 2002 09:29:41 -0000 1.5
+++ TextInfo.java 5 Mar 2003 21:48:02 -0000 1.6
@@ -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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
// FOP
@@ -29,7 +72,7 @@
public SpaceVal letterSpacing;
// Add hyphenation props too
- public boolean bCanHyphenate=true;
+ public boolean bCanHyphenate = true;
// Textdecoration
public boolean underlined = false;
1.5 +49 -7 xml-fop/src/org/apache/fop/fo/LengthRangeProperty.java
Index: LengthRangeProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/LengthRangeProperty.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LengthRangeProperty.java 30 Jul 2001 20:29:20 -0000 1.4
+++ LengthRangeProperty.java 5 Mar 2003 21:48:02 -0000 1.5
@@ -1,13 +1,55 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-import org.apache.fop.datatypes.Length;
import org.apache.fop.datatypes.LengthRange;
public class LengthRangeProperty extends Property {
1.35 +58 -15 xml-fop/src/org/apache/fop/fo/PropertyListBuilder.java
Index: PropertyListBuilder.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/PropertyListBuilder.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- PropertyListBuilder.java 22 Nov 2001 07:11:39 -0000 1.34
+++ PropertyListBuilder.java 5 Mar 2003 21:48:02 -0000 1.35
@@ -1,21 +1,61 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-import org.apache.fop.fo.properties.*;
-import org.apache.fop.svg.*;
-import org.apache.fop.datatypes.*;
-
-import org.apache.fop.apps.FOPException;
-
+// Java
+import java.util.HashMap;
import org.xml.sax.Attributes;
-import java.util.HashMap;
+// FOP
+import org.apache.fop.apps.FOPException;
public class PropertyListBuilder {
@@ -113,7 +153,9 @@
try {
p.put(FONTSIZEATTR,
propertyMaker.make(p, fontsizeval, parentFO));
- } catch (FOPException e) {}
+ } catch (FOPException e) {
+ /**@todo log this exception */
+ }
}
// Put in the "done" list even if error or no Maker.
propsDone.append(FONTSIZEATTR + ' ');
@@ -184,8 +226,9 @@
Property.Maker maker = findMaker(space, element, propertyName);
if (maker != null) {
return maker.getSubpropValue(p, subpropName);
- } else
+ } else {
return null;
+ }
}
1.40 +62 -22 xml-fop/src/org/apache/fop/fo/FObj.java
Index: FObj.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FObj.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- FObj.java 15 Nov 2002 11:56:27 -0000 1.39
+++ FObj.java 5 Mar 2003 21:48:02 -0000 1.40
@@ -1,37 +1,76 @@
/*
* $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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-// FOP
-import org.apache.fop.layout.AreaClass;
-import org.apache.fop.apps.FOPException;
-import org.apache.fop.apps.StructureHandler;
-import org.apache.fop.layoutmgr.LayoutManager;
-import org.apache.fop.fo.properties.FOPropertyMapping;
-import org.apache.fop.fo.flow.Marker;
-
// Java
import java.util.Iterator;
-import org.xml.sax.Attributes;
-
-import java.util.Iterator;
import java.util.ListIterator;
import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
import java.util.Set;
import java.util.Map;
+import org.xml.sax.Attributes;
+
+// FOP
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.apps.StructureHandler;
+import org.apache.fop.fo.properties.FOPropertyMapping;
+import org.apache.fop.fo.flow.Marker;
/**
* base class for representation of formatting objects and their processing
*/
public class FObj extends FONode {
- private final static String FO_URI = "http://www.w3.org/1999/XSL/Format";
+ private static final String FO_URI = "http://www.w3.org/1999/XSL/Format";
/**
* Static property list builder that converts xml attributes
@@ -236,9 +275,9 @@
protected void setWritingMode() {
FObj p;
FONode parent;
- for (p = this; !p.generatesReferenceAreas() &&
- (parent = p.getParent()) != null &&
- (parent instanceof FObj); p = (FObj) parent) {
+ for (p = this; !p.generatesReferenceAreas()
+ && (parent = p.getParent()) != null
+ && (parent instanceof FObj); p = (FObj) parent) {
}
this.properties.setWritingMode(
p.getProperty("writing-mode").getEnum());
@@ -312,7 +351,8 @@
if (!markers.containsKey(mcname)) {
markers.put(mcname, marker);
} else {
- getLogger().error("fo:marker 'marker-class-name' must be unique for same parent: " + mcname);
+ getLogger().error("fo:marker 'marker-class-name' "
+ + "must be unique for same parent: " + mcname);
}
}
1.3 +49 -7 xml-fop/src/org/apache/fop/fo/LengthPairProperty.java
Index: LengthPairProperty.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/LengthPairProperty.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LengthPairProperty.java 30 Jul 2001 20:29:20 -0000 1.2
+++ LengthPairProperty.java 5 Mar 2003 21:48:02 -0000 1.3
@@ -1,13 +1,55 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-import org.apache.fop.datatypes.Length;
import org.apache.fop.datatypes.LengthPair;
public class LengthPairProperty extends Property {
1.13 +57 -14 xml-fop/src/org/apache/fop/fo/XMLObj.java
Index: XMLObj.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/XMLObj.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- XMLObj.java 7 Aug 2002 16:54:56 -0000 1.12
+++ XMLObj.java 5 Mar 2003 21:48:02 -0000 1.13
@@ -1,23 +1,66 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
-// FOP
-import org.apache.fop.fo.*;
-import org.apache.fop.layout.FontState;
-import org.apache.fop.apps.FOPException;
+// Java
+import java.awt.geom.Point2D;
+import java.util.HashMap;
-import org.w3c.dom.*;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.xml.sax.Attributes;
import javax.xml.parsers.DocumentBuilderFactory;
-import java.util.*;
-import java.awt.geom.Point2D;
+// FOP
+import org.apache.fop.apps.FOPException;
/**
* Generic XML object.
@@ -27,7 +70,7 @@
public abstract class XMLObj extends FONode {
// temp reference for attributes
- Attributes attr = null;
+ private Attributes attr = null;
protected Element element;
protected Document doc;
1.5 +54 -10 xml-fop/src/org/apache/fop/fo/XMLElement.java
Index: XMLElement.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/XMLElement.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XMLElement.java 20 Jun 2002 09:14:12 -0000 1.4
+++ XMLElement.java 5 Mar 2003 21:48:02 -0000 1.5
@@ -1,23 +1,67 @@
/*
* $Id$
- * 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.
- */
-
+ * ============================================================================
+ * 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
+// XML
+import org.xml.sax.Attributes;
+
// FOP
-import org.apache.fop.fo.properties.*;
import org.apache.fop.apps.FOPException;
-import org.xml.sax.Attributes;
-
/**
* class representing svg:svg pseudo flow object.
*/
public class XMLElement extends XMLObj {
- String namespace = "";
+
+ private String namespace = "";
/**
* constructs an XML object (called by Maker).
1.15 +49 -6 xml-fop/src/org/apache/fop/fo/FOUserAgent.java
Index: FOUserAgent.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOUserAgent.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- FOUserAgent.java 27 Jan 2003 09:22:17 -0000 1.14
+++ FOUserAgent.java 5 Mar 2003 21:48:02 -0000 1.15
@@ -1,10 +1,53 @@
/*
* $Id$
- * Copyright (C) 2001-2003 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
+ * apache@apache.org.
+ *
+ * 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 <jt...@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
package org.apache.fop.fo;
// Java
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org