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/24 11:37:16 UTC
svn commit: r679326 [6/33] - in /xmlgraphics/fop/trunk:
examples/embedding/java/embedding/ examples/embedding/java/embedding/events/
examples/embedding/java/embedding/intermediate/
examples/embedding/java/embedding/model/ examples/embedding/java/embedd...
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/NullCharIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/NullCharIterator.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/NullCharIterator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/NullCharIterator.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/OneCharIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/OneCharIterator.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/OneCharIterator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/OneCharIterator.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/PropertyList.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/PropertyList.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/PropertyList.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/PropertyList.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/PropertyListMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/PropertyListMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/PropertyListMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/PropertyListMaker.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/RecursiveCharIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/RecursiveCharIterator.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/RecursiveCharIterator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/RecursiveCharIterator.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/StaticPropertyList.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/StaticPropertyList.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/StaticPropertyList.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/StaticPropertyList.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/UnknownXMLObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/UnknownXMLObj.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/UnknownXMLObj.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/UnknownXMLObj.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/ValidationException.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/ValidationException.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/ValidationException.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/ValidationException.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/XMLObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLObj.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLObj.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLObj.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLWhiteSpaceHandler.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/AbsFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/AbsFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/AbsFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/AbsFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/BodyStartFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/BodyStartFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/BodyStartFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/CMYKcolorFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/CeilingFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/CeilingFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/CeilingFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/CeilingFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/FloorFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FloorFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FloorFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FloorFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/FromParentFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FromParentFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FromParentFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FromParentFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/Function.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/Function.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/Function.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/Function.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/FunctionBase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FunctionBase.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FunctionBase.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/FunctionBase.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/ICCColorFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/ICCColorFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/ICCColorFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/ICCColorFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/LabelEndFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/LabelEndFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/LabelEndFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/LabelEndFunction.java Thu Jul 24 02:35:34 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;
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/MaxFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/MaxFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/MaxFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/MaxFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/MinFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/MinFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/MinFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/MinFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/NCnameProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NCnameProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NCnameProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NCnameProperty.java Thu Jul 24 02:35:34 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,13 +42,13 @@
/**
* If a system color, return the corresponding value.
- *
- * @param foUserAgent
+ *
+ * @param foUserAgent
* Reference to FOP user agent - keeps track of cached ColorMaps for ICC colors
* @return Color object corresponding to the NCName
*/
public Color getColor(FOUserAgent foUserAgent) {
- try {
+ try {
return ColorUtil.parseColorString(foUserAgent, ncName);
} catch (PropertyException e) {
//Not logging this error since for properties like "border" you would get an awful
@@ -71,7 +71,7 @@
public Object getObject() {
return this.ncName;
}
-
+
/**
* @return ncName for this
*/
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/NumericOp.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NumericOp.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NumericOp.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NumericOp.java Thu Jul 24 02:35:34 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.
@@ -23,12 +23,12 @@
import org.apache.fop.datatypes.Numeric;
/**
- * This class contains static methods to evaluate operations on Numeric
+ * This class contains static methods to evaluate operations on Numeric
* operands. If the operands are absolute numerics the result is computed
* rigth away and a new absolute numeric is return. If one of the operands are
* relative a n operation node is created with the operation and the operands.
* The evaluation of the operation can then occur when getNumericValue() is
- * called.
+ * called.
*/
public class NumericOp {
/**
@@ -46,16 +46,16 @@
return new RelativeNumericProperty(RelativeNumericProperty.ADDITION, op1, op2);
}
}
-
+
public static Numeric addition2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException {
if (op1.getDimension() != op2.getDimension()) {
throw new PropertyException("Can't subtract Numerics of different dimensions");
}
return numeric(op1.getNumericValue(context) + op2.getNumericValue(context), op1.getDimension());
}
-
+
/**
- * Add the second operand from the first and return a new Numeric
+ * Add the second operand from the first and return a new Numeric
* representing the result.
* @param op1 The first operand.
* @param op2 The second operand.
@@ -77,9 +77,9 @@
}
return numeric(op1.getNumericValue(context) - op2.getNumericValue(context), op1.getDimension());
}
-
+
/**
- * Multiply the two operands and return a new Numeric representing the
+ * Multiply the two operands and return a new Numeric representing the
* result.
* @param op1 The first operand.
* @param op2 The second operand.
@@ -93,16 +93,16 @@
} else {
return new RelativeNumericProperty(RelativeNumericProperty.MULTIPLY, op1, op2);
}
- }
+ }
public static Numeric multiply2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException {
- return numeric(op1.getNumericValue(context) * op2.getNumericValue(context),
+ return numeric(op1.getNumericValue(context) * op2.getNumericValue(context),
op1.getDimension() + op2.getDimension());
}
-
+
/**
- * Divide the second operand into the first and return a new
- * Numeric representing the
+ * Divide the second operand into the first and return a new
+ * Numeric representing the
* result.
* @param op1 The first operand.
* @param op2 The second operand.
@@ -117,12 +117,12 @@
return new RelativeNumericProperty(RelativeNumericProperty.DIVIDE, op1, op2);
}
}
-
+
public static Numeric divide2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException {
- return numeric(op1.getNumericValue(context) / op2.getNumericValue(context),
+ return numeric(op1.getNumericValue(context) / op2.getNumericValue(context),
op1.getDimension() - op2.getDimension());
}
-
+
/**
* Return the remainder of a division of the two operand Numeric.
* @param op1 The first operand.
@@ -136,7 +136,7 @@
return new RelativeNumericProperty(RelativeNumericProperty.MODULO, op1, op2);
}
}
-
+
public static Numeric modulo2(Numeric op1, Numeric op2, PercentBaseContext context) throws PropertyException {
return numeric(op1.getNumericValue(context) % op2.getNumericValue(context), op1.getDimension());
}
@@ -157,7 +157,7 @@
public static Numeric abs2(Numeric op, PercentBaseContext context) throws PropertyException {
return numeric(Math.abs(op.getNumericValue(context)), op.getDimension());
}
-
+
/**
* Return the negation of a Numeric.
* @param op the operand.
@@ -174,7 +174,7 @@
public static Numeric negate2(Numeric op, PercentBaseContext context) throws PropertyException {
return numeric(- op.getNumericValue(context), op.getDimension());
}
-
+
/**
* Return the larger of the two Numerics.
* @param op1 The first operand.
@@ -196,7 +196,7 @@
}
return op1.getNumericValue(context) > op2.getNumericValue(context) ? op1 : op2;
}
-
+
/**
* Return the smaller of two Numerics.
* @param op1 The first operand.
@@ -218,9 +218,9 @@
}
return op1.getNumericValue(context) <= op2.getNumericValue(context) ? op1 : op2;
}
-
+
/**
- * Create a new absolute numeric with the specified value and dimension.
+ * Create a new absolute numeric with the specified value and dimension.
* @param value
* @param dimension
* @return a new absolute numeric.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NumericProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NumericProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NumericProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/NumericProperty.java Thu Jul 24 02:35:34 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 java.awt.Color;
@@ -30,7 +30,7 @@
/**
* A numeric property which hold the final absolute result of an expression
- * calculations.
+ * calculations.
*/
public class NumericProperty extends Property implements Numeric, Length {
private double value;
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java Thu Jul 24 02:35:34 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,8 +40,8 @@
return 1;
}
- /**
- * @return the {@link PercentBase} for the proportional-column-width()
+ /**
+ * @return the {@link PercentBase} for the proportional-column-width()
* function
*/
public PercentBase getPercentBase() {
@@ -68,7 +68,7 @@
throw new PropertyException("proportional-column-width() function "
+ "may only be used on fo:table-column.");
}
-
+
Table t = (Table) pList.getParentFObj();
if (t.isAutoLayout()) {
throw new PropertyException("proportional-column-width() function "
@@ -96,6 +96,6 @@
public int getDimension() {
return 0;
}
-
+
}
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyException.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyException.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyException.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyException.java Thu Jul 24 02:35:34 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.
@@ -45,7 +45,7 @@
this.propertyName = ((PropertyException)cause).propertyName;
}
}
-
+
/**
* Sets the property context information.
* @param propInfo the property info instance
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyInfo.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyInfo.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyInfo.java Thu Jul 24 02:35:34 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.
@@ -94,7 +94,7 @@
public PropertyMaker getPropertyMaker() {
return maker;
}
-
+
/**
* push a function onto the function stack
* @param func function to push onto stack
@@ -117,15 +117,15 @@
/**
* Convenience shortcut to get a reference to the FOUserAgent
- *
+ *
* @return the FOUserAgent
*/
protected FOUserAgent getUserAgent() {
- return (plist.getFObj() != null)
- ? plist.getFObj().getUserAgent()
+ return (plist.getFObj() != null)
+ ? plist.getFObj().getUserAgent()
: null;
}
-
+
private PercentBase getFunctionPercentBase() {
if (stkFunction != null) {
Function f = (Function)stkFunction.peek();
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyParser.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyParser.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyParser.java Thu Jul 24 02:35:34 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.
@@ -45,7 +45,7 @@
private static final String RELUNIT = "em";
private static final HashMap FUNCTION_TABLE = new HashMap();
-
+
static {
// Initialize the HashMap of XSL-defined functions
FUNCTION_TABLE.put("ceiling", new CeilingFunction());
@@ -310,10 +310,10 @@
propInfo.currentFontSize());
} else {
if ("px".equals(unitPart)) {
- //pass the ratio between source-resolution and
+ //pass the ratio between source-resolution and
//the default resolution of 72dpi
prop = FixedLength.getInstance(
- numPart, unitPart,
+ numPart, unitPart,
propInfo.getPropertyList().getFObj()
.getUserAgent().getSourceResolution() / 72.0f);
} else {
@@ -344,7 +344,7 @@
}
propInfo.popFunction();
return prop;
-
+
default:
// TODO: add the token or the expr to the error message.
throw new PropertyException("syntax error");
@@ -357,7 +357,7 @@
* Parse a comma separated list of function arguments. Each argument
* may itself be an expression. This method consumes the closing right
* parenthesis of the argument list.
- * @param function The function object for which the arguments are
+ * @param function The function object for which the arguments are
* collected.
* @return An array of Property objects representing the arguments
* found.
@@ -397,27 +397,27 @@
}
return args;
}
-
+
/**
- *
+ *
* Parse a comma separated list of function arguments. Each argument
* may itself be an expression. This method consumes the closing right
* parenthesis of the argument list.
- *
- * The method differs from parseArgs in that it accepts a variable
+ *
+ * The method differs from parseArgs in that it accepts a variable
* number of arguments.
- *
- * @param function The function object for which the arguments are
+ *
+ * @param function The function object for which the arguments are
* collected.
* @return An array of Property objects representing the arguments
* found.
* @throws PropertyException If the number of arguments found isn't equal
* to the number expected.
- *
- * TODO Merge this with parseArgs?
+ *
+ * TODO Merge this with parseArgs?
*/
Property[] parseVarArgs(Function function) throws PropertyException {
- // For variable argument functions the minimum number of arguments is returned as a
+ // For variable argument functions the minimum number of arguments is returned as a
// negative integer from the nbArgs method
int nbArgs = -function.nbArgs();
List args = new LinkedList();
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java Thu Jul 24 02:35:34 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/trunk/src/java/org/apache/fop/fo/expr/RGBColorFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RGBColorFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RGBColorFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RGBColorFunction.java Thu Jul 24 02:35:34 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.PercentBaseContext;
@@ -28,7 +28,7 @@
* Implements the rgb() function.
*/
class RGBColorFunction extends FunctionBase {
-
+
/** {@inheritDoc} */
public int nbArgs() {
return 3;
@@ -46,8 +46,8 @@
/** {@inheritDoc} */
public Property eval(Property[] args,
PropertyInfo pInfo) throws PropertyException {
- return ColorProperty.getInstance(pInfo.getUserAgent(),
- "rgb(" + args[0] + ","
+ return ColorProperty.getInstance(pInfo.getUserAgent(),
+ "rgb(" + args[0] + ","
+ args[1] + "," + args[2] + ")");
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java Thu Jul 24 02:35:34 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,10 +27,10 @@
/**
- * This class represent a node in a property expression tree.
+ * This class represent a node in a property expression tree.
* It is created when an operation involve relative expression and is used
* to delay evaluation of the operation until the time where getNumericValue()
- * or getValue() is called.
+ * or getValue() is called.
*/
public class RelativeNumericProperty extends Property implements Length {
public static final int ADDITION = 1;
@@ -42,10 +42,10 @@
public static final int ABS = 7;
public static final int MAX = 8;
public static final int MIN = 9;
-
+
// Used in the toString() method, indexed by operation id.
private static String operations = " +-*/%";
-
+
/**
* The operation identifier.
*/
@@ -62,7 +62,7 @@
* The dimension of the result.
*/
private int dimension;
-
+
/**
* Constructor for a two argument operation.
* @param operation the operation opcode: ADDITION, SUBTRACTION, ...
@@ -124,12 +124,12 @@
case MIN:
return NumericOp.min2(op1, op2, context);
default:
- throw new PropertyException("Unknown expr operation " + operation);
+ throw new PropertyException("Unknown expr operation " + operation);
}
}
/**
- * Return the resolved (calculated) value of the expression.
+ * Return the resolved (calculated) value of the expression.
* {@inheritDoc}
*/
public double getNumericValue() throws PropertyException {
@@ -152,14 +152,14 @@
/**
* Return false since an expression is only created when there is relative
- * numerics involved.
+ * numerics involved.
*/
public boolean isAbsolute() {
return false;
}
/**
- * Cast this numeric as a Length.
+ * Cast this numeric as a Length.
*/
public Length getLength() {
if (dimension == 1) {
@@ -205,7 +205,7 @@
* If this value is not 0, the actual value of the Length cannot be known
* without looking at all of the columns in the table to determine the value
* of a "table-unit".
- *
+ *
* @return The number of table units which are included in this length
* specification.
*/
@@ -261,7 +261,7 @@
*/
public String toString() {
switch (operation) {
- case ADDITION: case SUBTRACTION:
+ case ADDITION: case SUBTRACTION:
case DIVIDE: case MULTIPLY: case MODULO:
return "(" + op1 + " " + operations.charAt(operation) + op2 + ")";
case NEGATE:
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RoundFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RoundFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RoundFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/RoundFunction.java Thu Jul 24 02:35:34 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;
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/SystemColorFunction.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/SystemColorFunction.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/SystemColorFunction.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/SystemColorFunction.java Thu Jul 24 02:35:34 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;
@@ -27,7 +27,7 @@
* Implements the system-color() function.
*/
class SystemColorFunction extends FunctionBase {
-
+
/** {@inheritDoc} */
public int nbArgs() {
return 1;
@@ -36,8 +36,8 @@
/** {@inheritDoc} */
public Property eval(Property[] args,
PropertyInfo pInfo) throws PropertyException {
- FOUserAgent ua = (pInfo == null)
- ? null
+ FOUserAgent ua = (pInfo == null)
+ ? null
: (pInfo.getFO() == null ? null : pInfo.getFO().getUserAgent());
return ColorProperty.getInstance(ua, "system-color(" + args[0] + ")");
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionAttachment.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionAttachment.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionAttachment.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionAttachment.java Thu Jul 24 02:35:34 2008
@@ -35,5 +35,5 @@
* @return the category URI
*/
String getCategory();
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java Thu Jul 24 02:35:34 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.
@@ -33,12 +33,12 @@
* Element mapping for FOP's proprietary extension to XSL-FO.
*/
public class ExtensionElementMapping extends ElementMapping {
-
+
/** The FOP extension namespace URI */
public static final String URI = "http://xmlgraphics.apache.org/fop/extensions";
private static final Set propertyAttributes = new java.util.HashSet();
-
+
static {
//These are FOP's standard extension properties (fox:*)
propertyAttributes.add("block-progression-unit");
@@ -46,7 +46,7 @@
propertyAttributes.add("orphan-content-limit");
propertyAttributes.add("internal-destination");
}
-
+
/**
* Constructor.
*/
@@ -66,7 +66,7 @@
foObjs.put("external-document", new ExternalDocumentMaker());
}
}
-
+
static class DestinationMaker extends ElementMapping.Maker {
public FONode make(FONode parent) {
return new Destination(parent);
@@ -83,7 +83,7 @@
public String getStandardPrefix() {
return "fox";
}
-
+
/** {@inheritDoc} */
public boolean isAttributeProperty(QName attributeName) {
if (!URI.equals(attributeName.getNamespaceURI())) {
@@ -91,5 +91,5 @@
}
return propertyAttributes.contains(attributeName.getLocalName());
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionObj.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionObj.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionObj.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExtensionObj.java Thu Jul 24 02:35:34 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.
@@ -45,7 +45,7 @@
/**
* {@inheritDoc}
*/
- public void processNode(String elementName, Locator locator,
+ public void processNode(String elementName, Locator locator,
Attributes attlist, PropertyList pList)
throws FOPException
{
@@ -53,9 +53,9 @@
}
/**
- * Create a default property list for this element.
+ * Create a default property list for this element.
*/
- protected PropertyList createPropertyList(PropertyList parent,
+ protected PropertyList createPropertyList(PropertyList parent,
FOEventHandler foEventHandler) throws FOPException {
return null;
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExternalDocument.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExternalDocument.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExternalDocument.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/extensions/ExternalDocument.java Thu Jul 24 02:35:34 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.
@@ -76,7 +76,7 @@
textAlign = pList.get(PR_TEXT_ALIGN).getEnum();
width = pList.get(PR_WIDTH).getLength();
src = pList.get(PR_SRC).getString();
-
+
if (this.src == null || this.src.length() == 0) {
missingPropertyError("src");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org