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 vh...@apache.org on 2008/07/25 12:56:32 UTC
svn commit: r679758 [6/34] - in
/xmlgraphics/fop/branches/Temp_AFPGOCAResources: ./
examples/embedding/java/embedding/ examples/embedding/java/embedding/events/
examples/embedding/java/embedding/intermediate/
examples/embedding/java/embedding/model/ ex...
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOTreeBuilder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOTreeBuilder.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOTreeBuilder.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOTreeBuilder.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -63,43 +63,43 @@
/** Main DefaultHandler that handles the FO namespace. */
protected MainFOHandler mainFOHandler;
-
+
/** Current delegate ContentHandler to receive the SAX events */
protected ContentHandler delegate;
/** Provides information used during tree building stage. */
private FOTreeBuilderContext builderContext;
-
+
/** The object that handles formatting and rendering to a stream */
private FOEventHandler foEventHandler;
/** The SAX locator object managing the line and column counters */
- private Locator locator;
-
+ private Locator locator;
+
/** The user agent for this processing run. */
private FOUserAgent userAgent;
-
+
private boolean used = false;
private boolean empty = true;
-
+
private int depth;
-
+
/**
* <code>FOTreeBuilder</code> constructor
- *
+ *
* @param outputFormat the MIME type of the output format to use (ex. "application/pdf").
* @param foUserAgent the {@link FOUserAgent} in effect for this process
* @param stream the <code>OutputStream</code> to direct the results to
* @throws FOPException if the <code>FOTreeBuilder</code> cannot be properly created
*/
public FOTreeBuilder(
- String outputFormat,
+ String outputFormat,
FOUserAgent foUserAgent,
- OutputStream stream)
+ OutputStream stream)
throws FOPException {
this.userAgent = foUserAgent;
- this.elementMappingRegistry = userAgent.getFactory().getElementMappingRegistry();
+ this.elementMappingRegistry = userAgent.getFactory().getElementMappingRegistry();
//This creates either an AreaTreeHandler and ultimately a Renderer, or
//one of the RTF-, MIF- etc. Handlers.
foEventHandler = foUserAgent.getRendererFactory().createFOEventHandler(
@@ -116,16 +116,16 @@
public void setDocumentLocator(Locator locator) {
this.locator = locator;
}
-
- /**
+
+ /**
* @return a {@link Locator} instance if it is available and not disabled
*/
protected Locator getEffectiveLocator() {
return (userAgent.isLocatorEnabled() ? this.locator : null);
}
-
+
/** {@inheritDoc} */
- public void characters(char[] data, int start, int length)
+ public void characters(char[] data, int start, int length)
throws SAXException {
delegate.characters(data, start, length);
}
@@ -136,7 +136,7 @@
throw new IllegalStateException("FOTreeBuilder (and the Fop class) cannot be reused."
+ " Please instantiate a new instance.");
}
-
+
used = true;
empty = true;
rootFObj = null; // allows FOTreeBuilder to be reused
@@ -204,7 +204,7 @@
/**
* Provides access to the underlying {@link FOEventHandler} object.
- *
+ *
* @return the FOEventHandler object
*/
public FOEventHandler getEventHandler() {
@@ -215,30 +215,30 @@
* Returns the results of the rendering process. Information includes
* the total number of pages generated and the number of pages per
* page-sequence.
- *
+ *
* @return the results of the rendering process.
*/
public FormattingResults getResults() {
if (getEventHandler() instanceof AreaTreeHandler) {
return ((AreaTreeHandler) getEventHandler()).getResults();
} else {
- //No formatting results available for output formats no
+ //No formatting results available for output formats no
//involving the layout engine.
return null;
}
}
-
+
/**
* Main <code>DefaultHandler</code> implementation which builds the FO tree.
*/
private class MainFOHandler extends DefaultHandler {
-
+
/** Current formatting object being handled */
protected FONode currentFObj = null;
/** Current propertyList for the node being handled */
protected PropertyList currentPropertyList;
-
+
/** Current marker nesting-depth */
private int nestedMarkerDepth = 0;
@@ -253,7 +253,7 @@
// Check to ensure first node encountered is an fo:root
if (rootFObj == null) {
empty = false;
- if (!namespaceURI.equals(FOElementMapping.URI)
+ if (!namespaceURI.equals(FOElementMapping.URI)
|| !localName.equals("root")) {
FOValidationEventProducer eventProducer
= FOValidationEventProducer.Provider.get(
@@ -267,7 +267,7 @@
currentFObj.validateChildNode(locator, namespaceURI, localName);
}
}
-
+
ElementMapping.Maker fobjMaker = findFOMaker(namespaceURI, localName);
try {
@@ -279,7 +279,7 @@
}
propertyList = foNode.createPropertyList(
currentPropertyList, foEventHandler);
- foNode.processNode(localName, getEffectiveLocator(),
+ foNode.processNode(localName, getEffectiveLocator(),
attlist, propertyList);
if (foNode.getNameId() == Constants.FO_MARKER) {
if (builderContext.inMarker()) {
@@ -295,19 +295,19 @@
ContentHandlerFactory chFactory = foNode.getContentHandlerFactory();
if (chFactory != null) {
ContentHandler subHandler = chFactory.createContentHandler();
- if (subHandler instanceof ObjectSource
+ if (subHandler instanceof ObjectSource
&& foNode instanceof ObjectBuiltListener) {
((ObjectSource) subHandler).setObjectBuiltListener(
(ObjectBuiltListener) foNode);
}
-
+
subHandler.startDocument();
- subHandler.startElement(namespaceURI, localName,
+ subHandler.startElement(namespaceURI, localName,
rawName, attlist);
depth = 1;
delegate = subHandler;
}
-
+
if (currentFObj != null) {
currentFObj.addChildNode(foNode);
}
@@ -330,28 +330,28 @@
throws SAXException {
if (currentFObj == null) {
throw new SAXException(
- "endElement() called for " + rawName
+ "endElement() called for " + rawName
+ " where there is no current element.");
- } else if (!currentFObj.getLocalName().equals(localName)
+ } else if (!currentFObj.getLocalName().equals(localName)
|| !currentFObj.getNamespaceURI().equals(uri)) {
- throw new SAXException("Mismatch: " + currentFObj.getLocalName()
- + " (" + currentFObj.getNamespaceURI()
+ throw new SAXException("Mismatch: " + currentFObj.getLocalName()
+ + " (" + currentFObj.getNamespaceURI()
+ ") vs. " + localName + " (" + uri + ")");
}
-
+
// fo:characters can potentially be removed during
// white-space handling.
// Do not notify the FOEventHandler.
if (currentFObj.getNameId() != Constants.FO_CHARACTER) {
currentFObj.endOfNode();
}
-
+
if (currentPropertyList != null
&& currentPropertyList.getFObj() == currentFObj
&& !builderContext.inMarker()) {
currentPropertyList = currentPropertyList.getParentPropertyList();
}
-
+
if (currentFObj.getNameId() == Constants.FO_MARKER) {
if (nestedMarkerDepth == 0) {
builderContext.switchMarkerContext(false);
@@ -359,19 +359,19 @@
nestedMarkerDepth--;
}
}
-
+
if (currentFObj.getParent() == null) {
log.debug("endElement for top-level " + currentFObj.getName());
}
-
+
currentFObj = currentFObj.getParent();
}
/** {@inheritDoc} */
- public void characters(char[] data, int start, int length)
+ public void characters(char[] data, int start, int length)
throws FOPException {
if (currentFObj != null) {
- currentFObj.addCharacters(data, start, length,
+ currentFObj.addCharacters(data, start, length,
currentPropertyList, getEffectiveLocator());
}
}
@@ -380,10 +380,10 @@
public void endDocument() throws SAXException {
currentFObj = null;
}
-
+
/**
* Finds the {@link Maker} used to create {@link FONode} objects of a particular type
- *
+ *
* @param namespaceURI URI for the namespace of the element
* @param localName name of the Element
* @return the ElementMapping.Maker that can create an FO object for this element
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOTreeBuilderContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOTreeBuilderContext.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOTreeBuilderContext.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOTreeBuilderContext.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,7 +32,7 @@
* This is used so we know if the FO tree contains duplicates.
*/
private Set idReferences = new HashSet();
-
+
/**
* The property list maker.
*/
@@ -42,12 +42,12 @@
* The XMLWhitespaceHandler for this tree
*/
protected XMLWhiteSpaceHandler whiteSpaceHandler = new XMLWhiteSpaceHandler();
-
+
/**
* Indicates whether processing descendants of a marker
*/
private boolean inMarker = false;
-
+
/**
* Returns the set of ID references.
* @return the ID references
@@ -58,22 +58,22 @@
/**
* Return the propertyListMaker.
- *
+ *
* @return the currently active {@link PropertyListMaker}
*/
public PropertyListMaker getPropertyListMaker() {
return propertyListMaker;
}
-
+
/**
* Set a new propertyListMaker.
- *
+ *
* @param propertyListMaker the new {@link PropertyListMaker} to use
*/
public void setPropertyListMaker(PropertyListMaker propertyListMaker) {
this.propertyListMaker = propertyListMaker;
}
-
+
/**
* Return the XMLWhiteSpaceHandler
* @return the whiteSpaceHandler
@@ -86,22 +86,22 @@
* Switch to or from marker context
* (used by FOTreeBuilder when processing
* a marker)
- *
- * @param inMarker true if a marker is being processed;
+ *
+ * @param inMarker true if a marker is being processed;
* false otherwise
*
*/
protected void switchMarkerContext(boolean inMarker) {
this.inMarker = inMarker;
}
-
+
/**
* Check whether in marker context
- *
+ *
* @return true if a marker is being processed
*/
protected boolean inMarker() {
return this.inMarker;
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOValidationEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOValidationEventProducer.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOValidationEventProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FOValidationEventProducer.java Fri Jul 25 03:55:49 2008
@@ -37,7 +37,7 @@
* Provider class for the event producer.
*/
class Provider {
-
+
/**
* Returns an event producer.
* @param broadcaster the event broadcaster to use
@@ -55,12 +55,12 @@
* @param elementName the name of the context node
* @param offendingNode the offending node
* @param loc the location of the error or null
- * @throws ValidationException the validation error provoked by the method call
+ * @throws ValidationException the validation error provoked by the method call
* @event.severity FATAL
*/
void tooManyNodes(Object source, String elementName, QName offendingNode,
Locator loc) throws ValidationException;
-
+
/**
* The node order is wrong.
* @param source the event source
@@ -74,7 +74,7 @@
void nodeOutOfOrder(Object source, String elementName,
String tooLateNode, String tooEarlyNode, boolean canRecover,
Locator loc) throws ValidationException;
-
+
/**
* An invalid child was encountered.
* @param source the event source
@@ -112,7 +112,7 @@
*/
void missingProperty(Object source, String elementName, String propertyName,
Locator loc) throws ValidationException;
-
+
/**
* An id was used twice in a document.
* @param source the event source
@@ -334,7 +334,7 @@
*/
void invalidFORoot(Object source, String elementName,
Locator loc) throws ValidationException;
-
+
/**
* No FO document was found.
* @param source the event source
@@ -342,7 +342,7 @@
* @event.severity FATAL
*/
void emptyDocument(Object source) throws ValidationException;
-
+
/**
* An unknown/unsupported formatting object has been encountered.
* @param source the event source
@@ -353,5 +353,5 @@
*/
void unknownFormattingObject(Object source, String elementName,
QName offendingNode, Locator loc);
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObj.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObj.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObj.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,22 +42,22 @@
* All standard formatting object classes extend this class.
*/
public abstract class FObj extends FONode implements Constants {
-
+
/** the list of property makers */
private static final PropertyMaker[] propertyListTable
= FOPropertyMapping.getGenericMappings();
-
- /**
+
+ /**
* pointer to the descendant subtree
*/
protected FONode firstChild;
-
+
/** The list of extension attachments, null if none */
private List extensionAttachments = null;
-
+
/** The map of foreign attributes, null if none */
private Map foreignAttributes = null;
-
+
/** Used to indicate if this FO is either an Out Of Line FO (see rec)
* or a descendant of one. Used during FO validation.
*/
@@ -65,7 +65,7 @@
/** Markers added to this element. */
private Map markers = null;
-
+
// The value of properties relevant for all fo objects
private String id = null;
// End of property values
@@ -77,7 +77,7 @@
*/
public FObj(FONode parent) {
super(parent);
-
+
// determine if isOutOfLineFODescendant should be set
if (parent != null && parent instanceof FObj) {
if (((FObj) parent).getIsOutOfLineFODescendant()) {
@@ -101,7 +101,7 @@
}
return fobj;
}
-
+
/**
* Returns the PropertyMaker for a given property ID.
* @param propId the property ID
@@ -112,8 +112,8 @@
}
/** {@inheritDoc} */
- public void processNode(String elementName, Locator locator,
- Attributes attlist, PropertyList pList)
+ public void processNode(String elementName, Locator locator,
+ Attributes attlist, PropertyList pList)
throws FOPException {
setLocator(locator);
pList.addAttributesToList(attlist);
@@ -125,10 +125,10 @@
}
/**
- * Create a default property list for this element.
+ * Create a default property list for this element.
* {@inheritDoc}
*/
- protected PropertyList createPropertyList(PropertyList parent,
+ protected PropertyList createPropertyList(PropertyList parent,
FOEventHandler foEventHandler) throws FOPException {
return getBuilderContext().getPropertyListMaker().make(this, parent);
}
@@ -158,7 +158,7 @@
* Setup the id for this formatting object.
* Most formatting objects can have an id that can be referenced.
* This methods checks that the id isn't already used by another FO
- *
+ *
* @param id the id to check
* @throws ValidationException if the ID is already defined elsewhere
* (strict validation only)
@@ -186,11 +186,11 @@
protected void addChildNode(FONode child) throws FOPException {
if (child.getNameId() == FO_MARKER) {
addMarker((Marker) child);
- } else {
+ } else {
ExtensionAttachment attachment = child.getExtensionAttachment();
if (attachment != null) {
- /* This removes the element from the normal children,
- * so no layout manager is being created for them
+ /* This removes the element from the normal children,
+ * so no layout manager is being created for them
* as they are only additional information.
*/
addExtensionAttachment(attachment);
@@ -215,11 +215,11 @@
* @param parent the (cloned) parent node
* @throws FOPException when the child could not be added to the parent
*/
- protected static void addChildTo(FONode child, FObj parent)
+ protected static void addChildTo(FONode child, FObj parent)
throws FOPException {
parent.addChildNode(child);
}
-
+
/** {@inheritDoc} */
public void removeChild(FONode child) {
FONode nextChild = null;
@@ -239,7 +239,7 @@
}
}
}
-
+
/**
* Find the nearest parent, grandparent, etc. FONode that is also an FObj
* @return FObj the nearest ancestor FONode that is an FObj
@@ -276,7 +276,7 @@
public boolean hasChildren() {
return this.firstChild != null;
}
-
+
/**
* Return an iterator over the object's childNodes starting
* at the passed-in node (= first call to iterator.next() will
@@ -307,7 +307,7 @@
/**
* Notifies a FObj that one of it's children is removed.
- * This method is subclassed by Block to clear the
+ * This method is subclassed by Block to clear the
* firstInlineChild variable in case it doesn't generate
* any areas (see addMarker()).
* @param node the node that was removed
@@ -315,7 +315,7 @@
void notifyChildRemoval(FONode node) {
//nop
}
-
+
/**
* Add the marker to this formatting object.
* If this object can contain markers it checks that the marker
@@ -392,7 +392,7 @@
return null;
}
}
-
+
/** {@inheritDoc} */
protected String gatherContextInfo() {
if (getLocator() != null) {
@@ -422,11 +422,11 @@
* incoming node is a member of the "%block;" parameter entity
* as defined in Sect. 6.2 of the XSL 1.0 & 1.1 Recommendations
* @param nsURI namespace URI of incoming node
- * @param lName local name (i.e., no prefix) of incoming node
+ * @param lName local name (i.e., no prefix) of incoming node
* @return true if a member, false if not
*/
protected boolean isBlockItem(String nsURI, String lName) {
- return (FO_URI.equals(nsURI)
+ return (FO_URI.equals(nsURI)
&& ("block".equals(lName)
|| "table".equals(lName)
|| "table-and-caption".equals(lName)
@@ -441,11 +441,11 @@
* incoming node is a member of the "%inline;" parameter entity
* as defined in Sect. 6.2 of the XSL 1.0 & 1.1 Recommendations
* @param nsURI namespace URI of incoming node
- * @param lName local name (i.e., no prefix) of incoming node
+ * @param lName local name (i.e., no prefix) of incoming node
* @return true if a member, false if not
*/
protected boolean isInlineItem(String nsURI, String lName) {
- return (FO_URI.equals(nsURI)
+ return (FO_URI.equals(nsURI)
&& ("bidi-override".equals(lName)
|| "character".equals(lName)
|| "external-graphic".equals(lName)
@@ -470,7 +470,7 @@
* incoming node is a member of the "%block;" parameter entity
* or "%inline;" parameter entity
* @param nsURI namespace URI of incoming node
- * @param lName local name (i.e., no prefix) of incoming node
+ * @param lName local name (i.e., no prefix) of incoming node
* @return true if a member, false if not
*/
protected boolean isBlockOrInlineItem(String nsURI, String lName) {
@@ -482,11 +482,11 @@
* incoming node is a member of the neutral item list
* as defined in Sect. 6.2 of the XSL 1.0 & 1.1 Recommendations
* @param nsURI namespace URI of incoming node
- * @param lName local name (i.e., no prefix) of incoming node
+ * @param lName local name (i.e., no prefix) of incoming node
* @return true if a member, false if not
*/
boolean isNeutralItem(String nsURI, String lName) {
- return (FO_URI.equals(nsURI)
+ return (FO_URI.equals(nsURI)
&& ("multi-switch".equals(lName)
|| "multi-properties".equals(lName)
|| "wrapper".equals(lName)
@@ -494,12 +494,12 @@
|| "retrieve-marker".equals(lName)
|| "retrieve-table-marker".equals(lName)));
}
-
+
/**
* Convenience method for validity checking. Checks if the
* current node has an ancestor of a given name.
* @param ancestorID ID of node name to check for (e.g., FO_ROOT)
- * @return number of levels above FO where ancestor exists,
+ * @return number of levels above FO where ancestor exists,
* -1 if not found
*/
protected int findAncestor(int ancestorID) {
@@ -514,19 +514,19 @@
}
return -1;
}
-
+
/**
* Clears the list of child nodes.
*/
public void clearChildNodes() {
this.firstChild = null;
}
-
+
/** @return the "id" property. */
public String getId() {
return id;
}
-
+
/** @return whether this object has an id set */
public boolean hasId() {
return id != null && id.length() > 0;
@@ -543,9 +543,9 @@
}
/**
- * Add a new extension attachment to this FObj.
+ * Add a new extension attachment to this FObj.
* (see org.apache.fop.fo.FONode for details)
- *
+ *
* @param attachment the attachment to add.
*/
void addExtensionAttachment(ExtensionAttachment attachment) {
@@ -557,13 +557,13 @@
extensionAttachments = new java.util.ArrayList();
}
if (log.isDebugEnabled()) {
- log.debug("ExtensionAttachment of category "
- + attachment.getCategory() + " added to "
+ log.debug("ExtensionAttachment of category "
+ + attachment.getCategory() + " added to "
+ getName() + ": " + attachment);
}
extensionAttachments.add(attachment);
}
-
+
/** @return the extension attachments of this FObj. */
public List getExtensionAttachments() {
if (extensionAttachments == null) {
@@ -584,7 +584,7 @@
* @param value the attribute value
*/
public void addForeignAttribute(QName attributeName, String value) {
- /* TODO: Handle this over FOP's property mechanism so we can use
+ /* TODO: Handle this over FOP's property mechanism so we can use
* inheritance.
*/
if (attributeName == null) {
@@ -595,7 +595,7 @@
}
foreignAttributes.put(attributeName, value);
}
-
+
/** @return the map of foreign attributes */
public Map getForeignAttributes() {
if (foreignAttributes == null) {
@@ -604,7 +604,7 @@
return foreignAttributes;
}
}
-
+
/** {@inheritDoc} */
public String toString() {
return (super.toString() + "[@id=" + this.id + "]");
@@ -612,28 +612,28 @@
/** Basic {@link FONodeIterator} implementation */
public class FObjIterator implements FONodeIterator {
-
+
private static final int F_NONE_ALLOWED = 0;
private static final int F_SET_ALLOWED = 1;
private static final int F_REMOVE_ALLOWED = 2;
-
+
private FONode currentNode;
private final FObj parentNode;
private int currentIndex;
private int flags = F_NONE_ALLOWED;
-
+
FObjIterator(FObj parent) {
this.parentNode = parent;
this.currentNode = parent.firstChild;
this.currentIndex = 0;
this.flags = F_NONE_ALLOWED;
}
-
+
/** {@inheritDoc} */
public FObj parentNode() {
return parentNode;
}
-
+
/** {@inheritDoc} */
public Object next() {
if (currentNode != null) {
@@ -665,7 +665,7 @@
throw new NoSuchElementException();
}
}
-
+
/** {@inheritDoc} */
public void set(Object o) {
if ((flags & F_SET_ALLOWED) == F_SET_ALLOWED) {
@@ -683,7 +683,7 @@
throw new IllegalStateException();
}
}
-
+
/** {@inheritDoc} */
public void add(Object o) {
FONode newNode = (FONode) o;
@@ -718,7 +718,7 @@
|| (currentNode.siblings != null
&& currentNode.siblings[0] != null);
}
-
+
/** {@inheritDoc} */
public int nextIndex() {
return currentIndex + 1;
@@ -759,19 +759,19 @@
}
return currentNode;
}
-
+
/** {@inheritDoc} */
public FONode firstNode() {
currentNode = parentNode.firstChild;
currentIndex = 0;
return currentNode;
}
-
+
/** {@inheritDoc} */
public FONode nextNode() {
return (FONode) next();
}
-
+
/** {@inheritDoc} */
public FONode previousNode() {
return (FONode) previous();
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObjMixed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObjMixed.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObjMixed.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/FObjMixed.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -71,7 +71,7 @@
// send character[s]() events to the FOEventHandler
sendCharacters();
}
-
+
}
/**
@@ -180,10 +180,10 @@
/**
* Returns a {@link CharIterator} over this FO's character content
- *
+ *
* @return iterator for this object
*/
public CharIterator charIterator() {
return new RecursiveCharIterator(this);
- }
+ }
}
\ No newline at end of file
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/GraphicsProperties.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/GraphicsProperties.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/GraphicsProperties.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/GraphicsProperties.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,7 +47,7 @@
* @return the "width" property.
*/
Length getWidth();
-
+
/**
* @return the "content-height" property.
*/
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/InlineCharIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/InlineCharIterator.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/InlineCharIterator.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/InlineCharIterator.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/NullCharIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/NullCharIterator.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/NullCharIterator.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/NullCharIterator.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@
public class NullCharIterator extends CharIterator {
private static CharIterator instance;
-
+
public static CharIterator getInstance() {
if (instance == null) {
instance = new NullCharIterator();
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/OneCharIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/OneCharIterator.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/OneCharIterator.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/OneCharIterator.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/PropertyList.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/PropertyList.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/PropertyList.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/PropertyList.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -149,7 +149,7 @@
* the default value.
* @param propId The Constants ID of the property whose value is desired.
* @return the Property corresponding to that name
- * @throws PropertyException if there is a problem evaluating the property
+ * @throws PropertyException if there is a problem evaluating the property
*/
public Property get(int propId) throws PropertyException {
return get(propId, true, true);
@@ -161,11 +161,11 @@
* inheritable, to return the inherited value. If all else fails, it returns
* the default value.
* @param propId the property's id
- * @param bTryInherit true for inherited properties, or when the inherited
+ * @param bTryInherit true for inherited properties, or when the inherited
* value is needed
* @param bTryDefault true when the default value may be used as a last resort
* @return the property
- * @throws PropertyException if there is a problem evaluating the property
+ * @throws PropertyException if there is a problem evaluating the property
*/
public Property get(int propId, boolean bTryInherit,
boolean bTryDefault) throws PropertyException {
@@ -189,7 +189,7 @@
public Property getNearestSpecified(int propId) throws PropertyException {
Property p = null;
PropertyList pList = parentPropertyList;
-
+
while (pList != null) {
p = pList.getExplicit(propId);
if (p != null) {
@@ -198,8 +198,8 @@
pList = pList.parentPropertyList;
}
}
-
- // If no explicit value found on any of the ancestor-nodes,
+
+ // If no explicit value found on any of the ancestor-nodes,
// return initial (default) value.
return makeProperty(propId);
}
@@ -238,7 +238,7 @@
}
/**
- * Return the "writing-mode" property value.
+ * Return the "writing-mode" property value.
* @return the "writing-mode" property value.
*/
public int getWritingMode() {
@@ -266,34 +266,34 @@
/**
* Adds the attributes, passed in by the parser to the PropertyList
- *
+ *
* @param attributes Collection of attributes passed to us from the parser.
* @throws ValidationException if there is an attribute that does not
* map to a property id (strict validation only)
*/
- public void addAttributesToList(Attributes attributes)
+ public void addAttributesToList(Attributes attributes)
throws ValidationException {
/*
- * If column-number/number-columns-spanned are specified, then we
- * need them before all others (possible from-table-column() on any
+ * If column-number/number-columns-spanned are specified, then we
+ * need them before all others (possible from-table-column() on any
* other property further in the list...
*/
String attributeName = "column-number";
String attributeValue = attributes.getValue(attributeName);
- convertAttributeToProperty(attributes, attributeName,
+ convertAttributeToProperty(attributes, attributeName,
attributeValue);
attributeName = "number-columns-spanned";
attributeValue = attributes.getValue(attributeName);
- convertAttributeToProperty(attributes, attributeName,
+ convertAttributeToProperty(attributes, attributeName,
attributeValue);
-
+
/*
* If font-size is set on this FO, must set it first, since
* other attributes specified in terms of "ems" depend on it.
*/
attributeName = "font";
attributeValue = attributes.getValue(attributeName);
- convertAttributeToProperty(attributes, attributeName,
+ convertAttributeToProperty(attributes, attributeName,
attributeValue);
if (attributeValue == null) {
/*
@@ -302,19 +302,19 @@
*/
attributeName = "font-size";
attributeValue = attributes.getValue(attributeName);
- convertAttributeToProperty(attributes, attributeName,
+ convertAttributeToProperty(attributes, attributeName,
attributeValue);
}
-
+
String attributeNS;
- FopFactory factory = getFObj().getUserAgent().getFactory();
+ FopFactory factory = getFObj().getUserAgent().getFactory();
for (int i = 0; i < attributes.getLength(); i++) {
/* convert all attributes with the same namespace as the fo element
* the "xml:lang" property is a special case */
attributeNS = attributes.getURI(i);
attributeName = attributes.getQName(i);
attributeValue = attributes.getValue(i);
- if (attributeNS == null || attributeNS.length() == 0
+ if (attributeNS == null || attributeNS.length() == 0
|| "xml:lang".equals(attributeName)) {
convertAttributeToProperty(attributes, attributeName, attributeValue);
} else if (!factory.isNamespaceIgnored(attributeNS)) {
@@ -322,10 +322,10 @@
attributeNS);
QName attr = new QName(attributeNS, attributeName);
if (mapping != null) {
- if (mapping.isAttributeProperty(attr)
+ if (mapping.isAttributeProperty(attr)
&& mapping.getStandardPrefix() != null) {
- convertAttributeToProperty(attributes,
- mapping.getStandardPrefix() + ":" + attr.getLocalName(),
+ convertAttributeToProperty(attributes,
+ mapping.getStandardPrefix() + ":" + attr.getLocalName(),
attributeValue);
} else {
getFObj().addForeignAttribute(attr, attributeValue);
@@ -336,7 +336,7 @@
}
}
}
-
+
/**
* Validates a property name.
* @param propertyName the property name to check
@@ -360,34 +360,34 @@
* @param attributes Collection of attributes
* @param attributeName Attribute name to convert
* @param attributeValue Attribute value to assign to property
- * @throws ValidationException in case the property name is invalid
+ * @throws ValidationException in case the property name is invalid
* for the FO namespace
*/
private void convertAttributeToProperty(Attributes attributes,
String attributeName,
- String attributeValue)
+ String attributeValue)
throws ValidationException {
-
+
if (attributeValue != null) {
if (attributeName.startsWith("xmlns:")) {
//Ignore namespace declarations
return;
}
-
+
/* Handle "compound" properties, ex. space-before.minimum */
String basePropertyName = findBasePropertyName(attributeName);
String subPropertyName = findSubPropertyName(attributeName);
int propId = FOPropertyMapping.getPropertyId(basePropertyName);
int subpropId = FOPropertyMapping.getSubPropertyId(subPropertyName);
-
- if (propId == -1
+
+ if (propId == -1
|| (subpropId == -1 && subPropertyName != null)) {
handleInvalidProperty(new QName(null, attributeName));
}
FObj parentFO = fobj.findNearestAncestorFObj();
-
+
PropertyMaker propertyMaker = findMaker(propId);
if (propertyMaker == null) {
log.warn("No PropertyMaker registered for " + attributeName
@@ -401,7 +401,7 @@
/* Do nothing if the base property has already been created.
* This is e.g. the case when a compound attribute was
* specified before the base attribute; in these cases
- * the base attribute was already created in
+ * the base attribute was already created in
* findBaseProperty()
*/
if (getExplicit(propId) != null) {
@@ -410,7 +410,7 @@
prop = propertyMaker.make(this, attributeValue, parentFO);
} else { // e.g. "leader-length.maximum"
Property baseProperty
- = findBaseProperty(attributes, parentFO, propId,
+ = findBaseProperty(attributes, parentFO, propId,
basePropertyName, propertyMaker);
prop = propertyMaker.make(baseProperty, subpropId,
this, attributeValue, parentFO);
@@ -446,13 +446,13 @@
* e.g. <fo:leader xxxx.maximum="200pt" xxxx="200pt"... />
*/
String basePropertyValue = attributes.getValue(basePropertyName);
-
+
if (basePropertyValue != null && propertyMaker != null) {
baseProperty = propertyMaker.make(this, basePropertyValue,
parentFO);
return baseProperty;
}
-
+
return null; // could not find base property
}
@@ -462,7 +462,7 @@
* @throws ValidationException if an exception needs to be thrown depending on the
* validation settings
*/
- protected void handleInvalidProperty(QName attr)
+ protected void handleInvalidProperty(QName attr)
throws ValidationException {
if (!attr.getQName().startsWith("xmlns")) {
fobj.getFOValidationEventProducer().invalidProperty(this, fobj.getName(),
@@ -509,7 +509,7 @@
*/
private Property getShorthand(int propId) throws PropertyException {
PropertyMaker propertyMaker = findMaker(propId);
-
+
if (propertyMaker != null) {
return propertyMaker.getShorthand(this);
} else {
@@ -545,11 +545,11 @@
for (int prop = 1; prop <= Constants.PROPERTY_COUNT; prop++) {
maker = findMaker(prop);
inheritableProperty[prop] = (maker != null && maker.isInherited());
- }
+ }
}
return inheritableProperty[propId];
- }
+ }
/**
* @param propId Id of property
@@ -569,11 +569,11 @@
* @return a BorderAndPadding object
* @throws PropertyException if there's a problem while processing the properties
*/
- public CommonBorderPaddingBackground getBorderPaddingBackgroundProps()
+ public CommonBorderPaddingBackground getBorderPaddingBackgroundProps()
throws PropertyException {
return CommonBorderPaddingBackground.getInstance(this);
}
-
+
/**
* Constructs a CommonHyphenation object.
* @return the CommonHyphenation object
@@ -582,7 +582,7 @@
public CommonHyphenation getHyphenationProps() throws PropertyException {
return CommonHyphenation.getInstance(this);
}
-
+
/**
* Constructs a CommonMarginBlock object.
* @return the CommonMarginBlock object
@@ -591,7 +591,7 @@
public CommonMarginBlock getMarginBlockProps() throws PropertyException {
return new CommonMarginBlock(this);
}
-
+
/**
* Constructs a CommonMarginInline object.
* @return the CommonMarginInline object
@@ -600,9 +600,9 @@
public CommonMarginInline getMarginInlineProps() throws PropertyException {
return new CommonMarginInline(this);
}
-
+
/**
- * Constructs a CommonAccessibility object.
+ * Constructs a CommonAccessibility object.
* @return the CommonAccessibility object
* @throws PropertyException if there's a problem while processing the properties
*/
@@ -628,7 +628,7 @@
public CommonRelativePosition getRelativePositionProps() throws PropertyException {
return new CommonRelativePosition(this);
}
-
+
/**
* Constructs a CommonAbsolutePosition object.
* @return the CommonAbsolutePosition object
@@ -636,19 +636,19 @@
*/
public CommonAbsolutePosition getAbsolutePositionProps() throws PropertyException {
return new CommonAbsolutePosition(this);
- }
-
+ }
+
/**
* Constructs a CommonFont object.
- *
+ *
* @return A CommonFont object
* @throws PropertyException if there's a problem while processing the properties
*/
public CommonFont getFontProps() throws PropertyException {
return CommonFont.getInstance(this);
}
-
+
/**
* Constructs a CommonTextDecoration object.
* @return a CommonTextDecoration object
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/PropertyListMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/PropertyListMaker.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/PropertyListMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/PropertyListMaker.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@
package org.apache.fop.fo;
/**
- * A PropertyListMaker is a factory that creates PropertyLists.
+ * A PropertyListMaker is a factory that creates PropertyLists.
*/
public interface PropertyListMaker {
PropertyList make(FObj fobj, PropertyList parentPropertyList);
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/RecursiveCharIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/RecursiveCharIterator.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/RecursiveCharIterator.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/RecursiveCharIterator.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/StaticPropertyList.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/StaticPropertyList.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/StaticPropertyList.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/StaticPropertyList.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,9 +26,9 @@
public class StaticPropertyList extends PropertyList {
private final Property[] explicit;
private final Property[] values;
-
+
/**
- * Construct a StaticPropertyList.
+ * Construct a StaticPropertyList.
* @param fObjToAttach The FObj object.
* @param parentPropertyList The parent property list.
*/
@@ -65,7 +65,7 @@
* @param propId The property ID
*/
public Property get(int propId, boolean bTryInherit, boolean bTryDefault)
- throws PropertyException
+ throws PropertyException
{
Property p = values[propId];
if (p == null) {
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/UnknownXMLObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/UnknownXMLObj.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/UnknownXMLObj.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/UnknownXMLObj.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/ValidationException.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/ValidationException.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/ValidationException.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/ValidationException.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLObj.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLObj.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLObj.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,7 +40,7 @@
public abstract class XMLObj extends FONode implements ObjectBuiltListener {
private static final String XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/";
-
+
// temp reference for attributes
private Attributes attr = null;
@@ -66,7 +66,7 @@
* {@inheritDoc}
* <br>Here, blocks XSL-FO's from having non-FO parents.
*/
- protected void validateChildNode(Locator loc, String nsURI, String localName)
+ protected void validateChildNode(Locator loc, String nsURI, String localName)
throws ValidationException {
if (FO_URI.equals(nsURI)) {
invalidChildError(loc, nsURI, localName);
@@ -74,7 +74,7 @@
}
/** {@inheritDoc} */
- public void processNode(String elementName, Locator locator,
+ public void processNode(String elementName, Locator locator,
Attributes attlist, PropertyList propertyList) throws FOPException {
setLocator(locator);
name = elementName;
@@ -90,17 +90,17 @@
/**
* Returns the dimensions of the generated area in pts.
- *
+ *
* @param view Point2D instance to receive the dimensions
* @return the requested dimensions in pts.
*/
public Point2D getDimension(Point2D view) {
return null;
}
-
+
/**
* Retrieve the intrinsic alignment-adjust of the child element.
- *
+ *
* @return the intrinsic alignment-adjust.
*/
public Length getIntrinsicAlignmentAdjust() {
@@ -149,10 +149,10 @@
}
}
}
-
+
/**
* Add the top-level element to the DOM document
- *
+ *
* @param doc DOM document
* @param svgRoot non-XSL-FO element to be added as the root of this document
*/
@@ -163,7 +163,7 @@
/**
* Create an empty DOM document
- *
+ *
* @return DOM document
*/
public Document createBasicDocument() {
@@ -183,7 +183,7 @@
element.setAttributeNS(XMLNS_NAMESPACE_URI, "xmlns",
getNamespaceURI());
}
-
+
} catch (Exception e) {
//TODO this is ugly because there may be subsequent failures like NPEs
log.error("Error while trying to instantiate a DOM Document", e);
@@ -205,7 +205,7 @@
/**
* Add parsed characters to this object
- *
+ *
* @param data array of characters contaning the text to add
* @param start starting array element to add
* @param length number of characters from the array to add
@@ -223,6 +223,6 @@
public void notifyObjectBuilt(Object obj) {
this.doc = (Document)obj;
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java Fri Jul 25 03:55:49 2008
@@ -27,7 +27,7 @@
/**
* Class encapsulating the functionality for white-space-handling
* during refinement stage.
- * The <code>handleWhiteSpace()</code> methods are called during
+ * The <code>handleWhiteSpace()</code> methods are called during
* FOTree-building and marker-cloning:
* <br>
* <ul>
@@ -47,8 +47,8 @@
* after the previous non-text child</li>
* </ul>
* <br>
- * The iteration always starts at <code>firstTextNode</code>,
- * goes on until the last text-node is reached, and deals only
+ * The iteration always starts at <code>firstTextNode</code>,
+ * goes on until the last text-node is reached, and deals only
* with <code>FOText</code> or <code>Character</code> nodes.
* <br>
* <em>Note</em>: if the method is called from an inline's endOfNode(),
@@ -60,25 +60,25 @@
* of the ancestor block.
*/
public class XMLWhiteSpaceHandler {
-
+
/** True if we are in a run of white space */
private boolean inWhiteSpace = false;
/** True if the last char was a linefeed */
private boolean afterLinefeed = true;
/** Counter, increased every time a non-white-space is encountered */
private int nonWhiteSpaceCount;
-
+
private int linefeedTreatment;
private int whiteSpaceTreatment;
private int whiteSpaceCollapse;
private boolean endOfBlock;
private boolean nextChildIsBlockLevel;
private RecursiveCharIterator charIter;
-
+
private List pendingInlines;
private Stack nestedBlockStack = new java.util.Stack();
private CharIterator firstWhiteSpaceInSeq;
-
+
/**
* Handle white-space for the fo that is passed in, starting at
* firstTextNode
@@ -93,14 +93,14 @@
Block currentBlock = null;
int foId = fo.getNameId();
-
+
/* set the current block */
switch (foId) {
case Constants.FO_BLOCK:
currentBlock = (Block) fo;
if (nestedBlockStack.empty() || fo != nestedBlockStack.peek()) {
if (nextChild != null) {
- /* if already in a block, push the current block
+ /* if already in a block, push the current block
* onto the stack of nested blocks
*/
nestedBlockStack.push(currentBlock);
@@ -111,7 +111,7 @@
}
}
break;
-
+
case Constants.FO_RETRIEVE_MARKER:
/* look for the nearest block ancestor, if any */
FONode ancestor = fo;
@@ -119,19 +119,19 @@
ancestor = ancestor.getParent();
} while (ancestor.getNameId() != Constants.FO_BLOCK
&& ancestor.getNameId() != Constants.FO_STATIC_CONTENT);
-
+
if (ancestor.getNameId() == Constants.FO_BLOCK) {
currentBlock = (Block) ancestor;
nestedBlockStack.push(currentBlock);
}
break;
-
+
default:
if (!nestedBlockStack.empty()) {
currentBlock = (Block) nestedBlockStack.peek();
}
}
-
+
if (currentBlock != null) {
linefeedTreatment = currentBlock.getLinefeedTreatment();
whiteSpaceCollapse = currentBlock.getWhitespaceCollapse();
@@ -141,9 +141,9 @@
whiteSpaceCollapse = Constants.EN_TRUE;
whiteSpaceTreatment = Constants.EN_IGNORE_IF_SURROUNDING_LINEFEED;
}
-
+
endOfBlock = (nextChild == null && fo == currentBlock);
-
+
if (firstTextNode == null) {
//no text means no white-space to handle; return early
afterLinefeed = (fo == currentBlock && fo.firstChild == null);
@@ -153,10 +153,10 @@
}
return;
}
-
+
charIter = new RecursiveCharIterator(fo, firstTextNode);
inWhiteSpace = false;
-
+
if (fo == currentBlock
|| currentBlock == null
|| (foId == Constants.FO_RETRIEVE_MARKER
@@ -172,7 +172,7 @@
|| previousChildId == Constants.FO_BLOCK_CONTAINER);
}
}
-
+
if (foId == Constants.FO_WRAPPER) {
FONode parent = fo.parent;
int parentId = parent.getNameId();
@@ -187,7 +187,7 @@
endOfBlock = (nextChild == null);
}
}
-
+
if (nextChild != null) {
int nextChildId = nextChild.getNameId();
nextChildIsBlockLevel = (
@@ -199,20 +199,20 @@
} else {
nextChildIsBlockLevel = false;
}
-
+
handleWhiteSpace();
-
- if (fo == currentBlock
+
+ if (fo == currentBlock
&& (endOfBlock || nextChildIsBlockLevel)) {
handlePendingInlines();
}
-
+
if (nextChild == null) {
if (fo != currentBlock) {
/* current FO is not a block, and is about to end */
if (nonWhiteSpaceCount > 0 && pendingInlines != null) {
- /* there is non-white-space text between the pending
- * inline(s) and the end of the non-block node;
+ /* there is non-white-space text between the pending
+ * inline(s) and the end of the non-block node;
* clear list of pending inlines */
pendingInlines.clear();
}
@@ -222,7 +222,7 @@
addPendingInline(fo);
}
} else {
- /* end of block: clear the references and pop the
+ /* end of block: clear the references and pop the
* nested block stack */
if (!nestedBlockStack.empty()) {
nestedBlockStack.pop();
@@ -231,7 +231,7 @@
}
}
}
-
+
/**
* Handle white-space for the fo that is passed in, starting at
* firstTextNode (when a nested FO is encountered)
@@ -241,13 +241,13 @@
public void handleWhiteSpace(FObjMixed fo, FONode firstTextNode) {
handleWhiteSpace(fo, firstTextNode, null);
}
-
+
private void handleWhiteSpace() {
-
+
EOLchecker lfCheck = new EOLchecker(charIter);
-
+
nonWhiteSpaceCount = 0;
-
+
while (charIter.hasNext()) {
if (!inWhiteSpace) {
firstWhiteSpaceInSeq = charIter.mark();
@@ -265,7 +265,7 @@
switch (CharUtilities.classOf(currentChar)) {
case CharUtilities.XMLWHITESPACE:
// Some kind of whitespace character, except linefeed.
- if (inWhiteSpace
+ if (inWhiteSpace
&& whiteSpaceCollapse == Constants.EN_TRUE) {
// We are in a run of whitespace and should collapse
// Just delete the char
@@ -343,14 +343,14 @@
}
}
}
-
+
private void addPendingInline(FObjMixed fo) {
if (pendingInlines == null) {
pendingInlines = new java.util.ArrayList(5);
}
pendingInlines.add(new PendingInline(fo, firstWhiteSpaceInSeq));
}
-
+
private void handlePendingInlines() {
if (!(pendingInlines == null || pendingInlines.isEmpty())) {
if (nonWhiteSpaceCount == 0) {
@@ -370,7 +370,7 @@
}
}
}
-
+
/**
* Helper class, used during white-space handling to look ahead, and
* see if the next character is a linefeed (or if there will be
@@ -401,7 +401,7 @@
}
// No more characters == end of text run
// means EOL if there either is a nested block to be added,
- // or if this is the last text node in the current block
+ // or if this is the last text node in the current block
nextIsEOL = nextChildIsBlockLevel || endOfBlock;
}
return nextIsEOL;
@@ -411,16 +411,16 @@
nextIsEOL = false;
}
}
-
+
/**
- * Helper class to store unfinished inline nodes together
+ * Helper class to store unfinished inline nodes together
* with an iterator that starts at the first white-space
* character in the sequence of trailing white-space
*/
private class PendingInline {
protected FObjMixed fo;
protected CharIterator firstTrailingWhiteSpace;
-
+
PendingInline(FObjMixed fo, CharIterator firstTrailingWhiteSpace) {
this.fo = fo;
this.firstTrailingWhiteSpace = firstTrailingWhiteSpace;
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/AbsFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/AbsFunction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/AbsFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/AbsFunction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/BodyStartFunction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/BodyStartFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/BodyStartFunction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fo.expr;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.fo.properties.ColorProperty;
@@ -26,22 +26,22 @@
* Implements the cmyk() function.
*/
class CMYKcolorFunction extends FunctionBase {
-
+
/**
- * cmyk takes four arguments.
- * {@inheritDoc}
+ * cmyk takes four arguments.
+ * {@inheritDoc}
*/
public int nbArgs() {
return 4;
}
-
+
/** {@inheritDoc} */
public Property eval(Property[] args,
PropertyInfo pInfo) throws PropertyException {
StringBuffer sb = new StringBuffer();
sb.append("cmyk(" + args[0] + "," + args[1] + "," + args[2] + "," + args[3] + ")");
- FOUserAgent ua = (pInfo == null)
- ? null
+ FOUserAgent ua = (pInfo == null)
+ ? null
: (pInfo.getFO() == null ? null : pInfo.getFO().getUserAgent());
return ColorProperty.getInstance(ua, sb.toString());
}
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/CeilingFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/CeilingFunction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/CeilingFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/CeilingFunction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fo.expr;
import org.apache.fop.fo.properties.NumberProperty;
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FloorFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FloorFunction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FloorFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FloorFunction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fo.expr;
import org.apache.fop.fo.properties.NumberProperty;
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FromParentFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FromParentFunction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FromParentFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FromParentFunction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/Function.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/Function.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/Function.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/Function.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FunctionBase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FunctionBase.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FunctionBase.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/FunctionBase.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/ICCColorFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/ICCColorFunction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/ICCColorFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/ICCColorFunction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fo.expr;
import org.apache.fop.datatypes.PercentBase;
import org.apache.fop.datatypes.PercentBaseContext;
@@ -29,16 +29,16 @@
* Implements the rgb-icc() function.
*/
class ICCColorFunction extends FunctionBase {
-
+
/**
- * rgb-icc takes a variable number of arguments.
- * At least 4 should be passed - returns -4
- * {@inheritDoc}
+ * rgb-icc takes a variable number of arguments.
+ * At least 4 should be passed - returns -4
+ * {@inheritDoc}
*/
public int nbArgs() {
return -4;
}
-
+
/** {@inheritDoc} */
public PercentBase getPercentBase() {
return new ICCPercentBase();
@@ -52,7 +52,7 @@
Declarations decls = pInfo.getFO().getRoot().getDeclarations();
ColorProfile cp = null;
if (decls == null) {
- //function used in a color-specification
+ //function used in a color-specification
//on a FO occurring:
//a) before the fo:declarations,
//b) or in a document without fo:declarations?
@@ -63,27 +63,27 @@
} else {
cp = decls.getColorProfile(colorProfileName);
if (cp == null) {
- PropertyException pe = new PropertyException("The " + colorProfileName
+ PropertyException pe = new PropertyException("The " + colorProfileName
+ " color profile was not declared");
pe.setPropertyInfo(pInfo);
throw pe;
}
}
String src = cp.getSrc();
-
+
float red = 0, green = 0, blue = 0;
red = args[0].getNumber().floatValue();
green = args[1].getNumber().floatValue();
blue = args[2].getNumber().floatValue();
/* Verify rgb replacement arguments */
- if ((red < 0 || red > 255)
- || (green < 0 || green > 255)
+ if ((red < 0 || red > 255)
+ || (green < 0 || green > 255)
|| (blue < 0 || blue > 255)) {
throw new PropertyException("Color values out of range. "
+ "Arguments to rgb-icc() must be [0..255] or [0%..100%]");
}
-
- // rgb-icc is replaced with fop-rgb-icc which has an extra fifth argument containing the
+
+ // rgb-icc is replaced with fop-rgb-icc which has an extra fifth argument containing the
// color profile src attribute as it is defined in the color-profile declarations element.
StringBuffer sb = new StringBuffer();
sb.append("fop-rgb-icc(");
@@ -92,19 +92,19 @@
sb.append(',').append(blue / 255f);
for (int ix = 3; ix < args.length; ix++) {
if (ix == 3) {
- sb.append(',').append(colorProfileName);
- sb.append(',').append(src);
+ sb.append(',').append(colorProfileName);
+ sb.append(',').append(src);
} else {
sb.append(',').append(args[ix]);
}
}
sb.append(")");
-
+
return ColorProperty.getInstance(pInfo.getUserAgent(), sb.toString());
}
private static final class ICCPercentBase implements PercentBase {
-
+
/** {@inheritDoc} */
public int getBaseLength(PercentBaseContext context) throws PropertyException {
return 0;
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/LabelEndFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/LabelEndFunction.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/LabelEndFunction.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fo/expr/LabelEndFunction.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -70,13 +70,13 @@
LengthBase.CONTAINING_REFAREA_WIDTH);
PercentLength refWidth = new PercentLength(1.0, base);
- Numeric labelEnd = distance;
+ Numeric labelEnd = distance;
labelEnd = NumericOp.addition(labelEnd, startIndent);
//TODO add start-intrusion-adjustment
labelEnd = NumericOp.subtraction(labelEnd, separation);
-
+
labelEnd = NumericOp.subtraction(refWidth, labelEnd);
-
+
return (Property) labelEnd;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org