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 sp...@apache.org on 2010/11/19 19:52:12 UTC
svn commit: r1036979 [3/4] - in
/xmlgraphics/fop/branches/Temp_ComplexScripts: ./ lib/ lib/build/
src/documentation/content/xdocs/trunk/ src/java/org/apache/fop/afp/
src/java/org/apache/fop/afp/apps/ src/java/org/apache/fop/afp/modca/
src/java/org/apac...
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/output.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/output.xml?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/output.xml (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/output.xml Fri Nov 19 18:52:09 2010
@@ -885,6 +885,13 @@ Note that the value of the encoding attr
segment in the generated file. Please also note that page segments cannot be scaled.
They are always rendered in their intrinsic size.
</p>
+ <p>
+ The include-page-segment extension element has the optional attribute
+ <i>resource-file</i>. The value of this is a URI to a resource containing a page
+ segment with the declared name. In this case FOP embeds the page segment into the
+ generated document so that the external resource does not have to be supplied in the
+ print job.
+ </p>
</section>
<section id="afp-tag-logical-element">
<title>Tag Logical Element (TLE) Extension</title>
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPResourceManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPResourceManager.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPResourceManager.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPResourceManager.java Fri Nov 19 18:52:09 2010
@@ -19,12 +19,15 @@
package org.apache.fop.afp;
+import java.io.BufferedInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Map;
+import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -38,6 +41,7 @@ import org.apache.fop.afp.modca.PageSegm
import org.apache.fop.afp.modca.Registry;
import org.apache.fop.afp.modca.ResourceGroup;
import org.apache.fop.afp.modca.ResourceObject;
+import org.apache.fop.afp.util.AFPResourceUtil;
import org.apache.fop.afp.util.ResourceAccessor;
/**
@@ -314,6 +318,57 @@ public class AFPResourceManager {
}
/**
+ * Creates an included resource extracting the named resource from an external source.
+ * @param resourceName the name of the resource
+ * @param uri the URI for the resource
+ * @param accessor resource accessor to access the resource with
+ * @throws IOException if an I/O error occurs while loading the resource
+ */
+ public void createIncludedResourceFromExternal(final String resourceName,
+ final URI uri, final ResourceAccessor accessor) throws IOException {
+
+ AFPResourceLevel resourceLevel = new AFPResourceLevel(AFPResourceLevel.PRINT_FILE);
+
+ AFPResourceInfo resourceInfo = new AFPResourceInfo();
+ resourceInfo.setLevel(resourceLevel);
+ resourceInfo.setName(resourceName);
+ resourceInfo.setUri(uri.toASCIIString());
+
+ String resource = (String)includeNameMap.get(resourceInfo);
+ if (resource == null) {
+
+ ResourceGroup resourceGroup = streamer.getResourceGroup(resourceLevel);
+
+ //resourceObject delegates write commands to copyNamedResource()
+ //The included resource may already be wrapped in a resource object
+ AbstractNamedAFPObject resourceObject = new AbstractNamedAFPObject(null) {
+
+ protected void writeContent(OutputStream os) throws IOException {
+ InputStream inputStream = null;
+ try {
+ inputStream = accessor.createInputStream(uri);
+ BufferedInputStream bin = new BufferedInputStream(inputStream);
+ AFPResourceUtil.copyNamedResource(resourceName, bin, os);
+ } finally {
+ IOUtils.closeQuietly(inputStream);
+ }
+ }
+
+ //bypass super.writeStart
+ protected void writeStart(OutputStream os) throws IOException { }
+ //bypass super.writeEnd
+ protected void writeEnd(OutputStream os) throws IOException { }
+ };
+
+ resourceGroup.addObject(resourceObject);
+
+ includeNameMap.put(resourceInfo, resourceName);
+
+ }
+ }
+
+
+ /**
* Sets resource level defaults. The existing defaults over merged with the ones passed in
* as parameter.
* @param defaults the new defaults
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPStreamer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPStreamer.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPStreamer.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPStreamer.java Fri Nov 19 18:52:09 2010
@@ -158,7 +158,7 @@ public class AFPStreamer implements Stre
*/
// write out any external resource groups
public void close() throws IOException {
- Iterator it = pathResourceGroupMap.entrySet().iterator();
+ Iterator it = pathResourceGroupMap.values().iterator();
while (it.hasNext()) {
StreamedResourceGroup resourceGroup = (StreamedResourceGroup)it.next();
resourceGroup.close();
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AbstractAFPPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AbstractAFPPainter.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AbstractAFPPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AbstractAFPPainter.java Fri Nov 19 18:52:09 2010
@@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFac
public abstract class AbstractAFPPainter {
/** Static logging instance */
- protected static Log log = LogFactory.getLog("org.apache.xmlgraphics.afp");
+ protected static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp");
/** data stream */
protected final DataStream dataStream;
Propchange: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/apps/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov 19 18:52:09 2010
@@ -2,4 +2,4 @@
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/apps:603620-746655
/xmlgraphics/fop/branches/fop-0_95/src/java/org/apache/fop/afp/apps:684572,688085,688696
/xmlgraphics/fop/branches/fop-1_0/src/java/org/apache/fop/afp/apps:959975-964707
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps:981451-1004917
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps:981451-1036883
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java Fri Nov 19 18:52:09 2010
@@ -45,7 +45,7 @@ public abstract class AbstractAFPObject
protected static final byte SF_CLASS = (byte)0xD3;
/** the structure field header */
- protected static final byte[] SF_HEADER = new byte[] {
+ static final byte[] SF_HEADER = new byte[] {
0x5A, // Structured field identifier
0x00, // Length byte 1
0x10, // Length byte 2
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/modca/IncludedResourceObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/modca/IncludedResourceObject.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/modca/IncludedResourceObject.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/modca/IncludedResourceObject.java Fri Nov 19 18:52:09 2010
@@ -26,6 +26,7 @@ import java.net.URI;
import org.apache.commons.io.IOUtils;
+import org.apache.fop.afp.util.AFPResourceUtil;
import org.apache.fop.afp.util.ResourceAccessor;
@@ -54,7 +55,7 @@ public class IncludedResourceObject exte
public void writeToStream(OutputStream os) throws IOException {
InputStream in = resourceAccessor.createInputStream(this.uri);
try {
- IOUtils.copy(in, os);
+ AFPResourceUtil.copyResourceFile(in, os);
} finally {
IOUtils.closeQuietly(in);
}
Propchange: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov 19 18:52:09 2010
@@ -2,4 +2,4 @@
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/parser:603620-746655
/xmlgraphics/fop/branches/fop-0_95/src/java/org/apache/fop/afp/parser:684572,688085,688696
/xmlgraphics/fop/branches/fop-1_0/src/java/org/apache/fop/afp/parser:959975-964707
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/parser:981451-1004917
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/parser:981451-1036883
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/MODCAParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/MODCAParser.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/MODCAParser.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/MODCAParser.java Fri Nov 19 18:52:09 2010
@@ -29,6 +29,9 @@ import java.io.InputStream;
*/
public class MODCAParser {
+ /** The carriage control character (0x5A) used to indicate the start of a structured field. */
+ public static final byte CARRIAGE_CONTROL_CHAR = (byte)(0x5A & 0xFF);
+
private DataInputStream din;
/**
@@ -58,11 +61,15 @@ public class MODCAParser {
* @throws IOException if an I/O error occurs
*/
public UnparsedStructuredField readNextStructuredField() throws IOException {
- din.mark(1);
try {
- byte b = din.readByte(); //Skip 0x5A character if necessary (ex. AFP)
- if (b != 0x5A) {
- din.reset(); //Not necessary for MO:DCA files
+ while (true) {
+ byte b = din.readByte(); //Skip 0x5A character if necessary (ex. AFP)
+ if (b == 0x0D || b == 0x0A) {
+ //CR and LF may be used as field delimiters
+ continue;
+ } else if (b == CARRIAGE_CONTROL_CHAR) {
+ break; //Signals the start of a new structured field
+ }
}
} catch (EOFException eof) {
return null;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/UnparsedStructuredField.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/UnparsedStructuredField.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/UnparsedStructuredField.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/UnparsedStructuredField.java Fri Nov 19 18:52:09 2010
@@ -22,16 +22,23 @@ package org.apache.fop.afp.parser;
import java.io.DataInputStream;
import java.io.EOFException;
import java.io.IOException;
+import java.io.OutputStream;
import java.io.PrintStream;
import java.text.DecimalFormat;
import org.apache.commons.io.HexDump;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* Represents an unparsed (generic) AFP structured field.
*/
public class UnparsedStructuredField {
+ private static final Log LOG = LogFactory.getLog(UnparsedStructuredField.class);
+
+ private static final int INTRODUCER_LENGTH = 8;
+
private short sfLength;
private byte sfClassCode;
private byte sfTypeCode;
@@ -40,6 +47,7 @@ public class UnparsedStructuredField {
private boolean sfiSegmentedData;
private boolean sfiPaddingPresent;
private short extLength;
+ private byte[] introducerData;
private byte[] extData;
private byte[] data;
@@ -59,33 +67,53 @@ public class UnparsedStructuredField {
*/
public static UnparsedStructuredField readStructuredField(DataInputStream din)
throws IOException {
+ UnparsedStructuredField sf = new UnparsedStructuredField();
+
+ //Read introducer as byte array to preserve any data not parsed below
+ din.mark(INTRODUCER_LENGTH);
+ sf.introducerData = new byte[INTRODUCER_LENGTH]; //Length of introducer
+ din.readFully(sf.introducerData);
+ din.reset();
+
+ //Parse the introducer
short len;
try {
len = din.readShort();
} catch (EOFException eof) {
return null;
}
- UnparsedStructuredField sf = new UnparsedStructuredField();
sf.sfLength = len;
sf.sfClassCode = din.readByte();
sf.sfTypeCode = din.readByte();
sf.sfCategoryCode = din.readByte();
+ //Flags
byte f = din.readByte();
sf.sfiExtensionPresent = (f & 0x01) != 0;
sf.sfiSegmentedData = (f & 0x04) != 0;
sf.sfiPaddingPresent = (f & 0x10) != 0;
din.skip(2); //Reserved
- int dataLength = sf.sfLength - 8;
+ int dataLength = sf.sfLength - INTRODUCER_LENGTH;
+
+ //Handle optional extension
if (sf.sfiExtensionPresent) {
sf.extLength = (short)(((short)din.readByte()) & 0xFF);
- sf.extData = new byte[sf.extLength - 1];
- din.readFully(sf.extData);
- dataLength -= sf.extLength;
+ if (sf.extLength > 0) {
+ sf.extData = new byte[sf.extLength - 1];
+ din.readFully(sf.extData);
+ dataLength -= sf.extLength;
+ }
}
+
+ //Read payload
sf.data = new byte[dataLength];
din.readFully(sf.data);
+
+ if (LOG.isTraceEnabled()) {
+ LOG.trace(sf);
+ }
+
return sf;
}
@@ -163,6 +191,7 @@ public class UnparsedStructuredField {
case 0x77: return "Color Attribute Table";
case 0x7B: return "IM Image";
case 0x88: return "Medium";
+ case 0x89: return "Font";
case 0x8A: return "Coded Font";
case 0x90: return "Process Element";
case 0x92: return "Object Container";
@@ -196,7 +225,7 @@ public class UnparsedStructuredField {
* @return the field length
*/
public short getSfLength() {
- return sfLength;
+ return this.sfLength;
}
/**
@@ -214,7 +243,7 @@ public class UnparsedStructuredField {
* @return the field class code
*/
public byte getSfClassCode() {
- return sfClassCode;
+ return this.sfClassCode;
}
/**
@@ -222,7 +251,7 @@ public class UnparsedStructuredField {
* @return the type code
*/
public byte getSfTypeCode() {
- return sfTypeCode;
+ return this.sfTypeCode;
}
/**
@@ -230,7 +259,7 @@ public class UnparsedStructuredField {
* @return the sfCategoryCode
*/
public byte getSfCategoryCode() {
- return sfCategoryCode;
+ return this.sfCategoryCode;
}
/**
@@ -238,7 +267,7 @@ public class UnparsedStructuredField {
* @return true if an field introducer extension is present
*/
public boolean isSfiExtensionPresent() {
- return sfiExtensionPresent;
+ return this.sfiExtensionPresent && (this.extData != null);
}
/**
@@ -246,7 +275,7 @@ public class UnparsedStructuredField {
* @return true if the data is segmented
*/
public boolean isSfiSegmentedData() {
- return sfiSegmentedData;
+ return this.sfiSegmentedData;
}
/**
@@ -254,7 +283,7 @@ public class UnparsedStructuredField {
* @return true if the data is padded
*/
public boolean isSfiPaddingPresent() {
- return sfiPaddingPresent;
+ return this.sfiPaddingPresent;
}
/**
@@ -262,7 +291,7 @@ public class UnparsedStructuredField {
* @return the length of the extension (or 0 if no extension is present)
*/
public short getExtLength() {
- return extLength;
+ return this.extLength;
}
/**
@@ -270,7 +299,7 @@ public class UnparsedStructuredField {
* @return the extension data (or null if no extension is present)
*/
public byte[] getExtData() {
- return extData;
+ return this.extData;
}
/**
@@ -278,7 +307,49 @@ public class UnparsedStructuredField {
* @return the field's data
*/
public byte[] getData() {
- return data;
+ return this.data;
+ }
+
+ /**
+ * Returns the structured field's introducer data.
+ * @return the introducer data
+ */
+ public byte[] getIntroducerData() {
+ return this.introducerData;
}
+ /**
+ * Returns the complete structured field as a byte array.
+ * @return the complete field data
+ */
+ public byte[] getCompleteFieldAsBytes() {
+ int len = INTRODUCER_LENGTH;
+ if (isSfiExtensionPresent()) {
+ len += getExtLength();
+ }
+ len += getData().length;
+ byte[] bytes = new byte[len];
+ int pos = 0;
+ System.arraycopy(getIntroducerData(), 0, bytes, pos, INTRODUCER_LENGTH);
+ pos += INTRODUCER_LENGTH;
+ if (isSfiExtensionPresent()) {
+ System.arraycopy(getExtData(), 0, bytes, pos, getExtLength());
+ pos += getExtLength();
+ }
+ System.arraycopy(getData(), 0, bytes, pos, getData().length);
+ return bytes;
+ }
+
+ /**
+ * Writes this structured field to the given {@link OutputStream}.
+ * @param out the output stream
+ * @throws IOException if an I/O error occurs
+ */
+ public void writeTo(OutputStream out) throws IOException {
+ out.write(this.introducerData);
+ if (isSfiExtensionPresent()) {
+ out.write(this.extData);
+ }
+ out.write(this.data);
+ }
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/StructuredFieldReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/StructuredFieldReader.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/StructuredFieldReader.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/util/StructuredFieldReader.java Fri Nov 19 18:52:09 2010
@@ -54,80 +54,27 @@ public class StructuredFieldReader {
}
/**
- * Get the next structured field as identified by the identifer
- * parameter (this must be a valid MO:DCA structured field.
+ * Get the next structured field as identified by the identifier
+ * parameter (this must be a valid MO:DCA structured field).
+ * Note: The returned data does not include the field length and identifier!
* @param identifier the three byte identifier
* @throws IOException if an I/O exception occurred
* @return the next structured field or null when there are no more
*/
public byte[] getNext(byte[] identifier) throws IOException {
- int bufferPointer = 0;
- byte[] bufferData = new byte[identifier.length + 2];
- for (int x = 0; x < identifier.length; x++) {
- bufferData[x] = 0x00;
- }
-
- int c;
- while ((c = inputStream.read()) > -1) {
-
- bufferData[bufferPointer] = (byte) c;
-
- // Check the last characters in the buffer
- int index = 0;
- boolean found = true;
-
- for (int i = identifier.length - 1; i > -1; i--) {
-
- int p = bufferPointer - index;
- if (p < 0) {
- p = bufferData.length + p;
- }
-
- index++;
-
- if (identifier[i] != bufferData[p]) {
- found = false;
- break;
- }
-
- }
-
- if (found) {
-
- byte[] length = new byte[2];
-
- int a = bufferPointer - identifier.length;
- if (a < 0) {
- a = bufferData.length + a;
- }
-
- int b = bufferPointer - identifier.length - 1;
- if (b < 0) {
- b = bufferData.length + b;
- }
-
- length[0] = bufferData[b];
- length[1] = bufferData[a];
-
- int reclength = ((length[0] & 0xFF) << 8)
- + (length[1] & 0xFF) - identifier.length - 2;
-
- byte[] retval = new byte[reclength];
-
- inputStream.read(retval, 0, reclength);
-
- return retval;
-
- }
-
- bufferPointer++;
- if (bufferPointer >= bufferData.length) {
- bufferPointer = 0;
- }
+ byte[] bytes = AFPResourceUtil.getNext(identifier, this.inputStream);
+ if (bytes != null) {
+ //Users of this class expect the field data without length and identifier
+ int srcPos = 2 + identifier.length;
+ byte[] tmp = new byte[bytes.length - srcPos];
+ System.arraycopy(bytes, srcPos, tmp, 0, tmp.length);
+ bytes = tmp;
}
- return null;
+ return bytes;
+
}
+
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Area.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Area.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Area.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Area.java Fri Nov 19 18:52:09 2010
@@ -39,6 +39,8 @@ import org.apache.fop.traits.BorderProps
*/
public class Area extends AreaTreeObject implements Serializable {
+ private static final long serialVersionUID = 6342888466142626492L;
+
// orientations for reference areas
/**
* Normal orientation
@@ -119,7 +121,7 @@ public class Area extends AreaTreeObject
/**
* logging instance
*/
- protected static Log log = LogFactory.getLog(Area.class);
+ protected static final Log log = LogFactory.getLog(Area.class);
/**
* Get the area class of this area.
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeModel.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeModel.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeModel.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeModel.java Fri Nov 19 18:52:09 2010
@@ -42,7 +42,7 @@ public class AreaTreeModel {
protected PageSequence currentPageSequence;
// private List offDocumentItems = new java.util.ArrayList();
/** logger instance */
- protected static Log log = LogFactory.getLog(AreaTreeModel.class);
+ protected static final Log log = LogFactory.getLog(AreaTreeModel.class);
/**
* Create a new store pages model
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeParser.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeParser.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeParser.java Fri Nov 19 18:52:09 2010
@@ -98,7 +98,7 @@ import org.apache.fop.util.XMLUtil;
public class AreaTreeParser {
/** Logger instance */
- protected static Log log = LogFactory.getLog(AreaTreeParser.class);
+ protected static final Log log = LogFactory.getLog(AreaTreeParser.class);
private static SAXTransformerFactory tFactory
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BeforeFloat.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BeforeFloat.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BeforeFloat.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BeforeFloat.java Fri Nov 19 18:52:09 2010
@@ -25,6 +25,9 @@ package org.apache.fop.area;
* See fo:region-body definition in the XSL Rec for more information.
*/
public class BeforeFloat extends BlockParent {
+
+ private static final long serialVersionUID = 4101415711488333380L;
+
// this is an optional block area that will be rendered
// as the separator only if there are float areas
private Block separator = null;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java Fri Nov 19 18:52:09 2010
@@ -32,6 +32,9 @@ package org.apache.fop.area;
* It holds child block areas such as other blocks or lines.
*/
public class Block extends BlockParent {
+
+ private static final long serialVersionUID = 6843727817993665788L;
+
/**
* Normally stacked with other blocks.
*/
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BlockParent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BlockParent.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BlockParent.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BlockParent.java Fri Nov 19 18:52:09 2010
@@ -27,6 +27,8 @@ import java.util.List;
*/
public class BlockParent extends Area {
+ private static final long serialVersionUID = 7076916890348533805L;
+
// this position is used for absolute position
// or as an indent
// this has the size in the block progression dimension
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BlockViewport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BlockViewport.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BlockViewport.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BlockViewport.java Fri Nov 19 18:52:09 2010
@@ -25,6 +25,9 @@ package org.apache.fop.area;
* The block-container creates this area.
*/
public class BlockViewport extends Block {
+
+ private static final long serialVersionUID = -7840580922580735157L;
+
// clipping for this viewport
private boolean clip = false;
// transform if rotated or absolute
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BodyRegion.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BodyRegion.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BodyRegion.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/BodyRegion.java Fri Nov 19 18:52:09 2010
@@ -30,6 +30,9 @@ import org.apache.fop.fo.pagination.Regi
* See fo:region-body definition in the XSL Rec for more information.
*/
public class BodyRegion extends RegionReference {
+
+ private static final long serialVersionUID = -1848872997724078080L;
+
private BeforeFloat beforeFloat; // optional
private MainReference mainReference; // mandatory
private Footnote footnote; // optional
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/CTM.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/CTM.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/CTM.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/CTM.java Fri Nov 19 18:52:09 2010
@@ -35,6 +35,8 @@ import org.apache.fop.traits.WritingMode
*/
public class CTM implements Serializable {
+ private static final long serialVersionUID = -8743287485623778341L;
+
private double a, b, c, d, e, f;
private static final CTM CTM_LRTB = new CTM(1, 0, 0, 1, 0, 0);
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Footnote.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Footnote.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Footnote.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Footnote.java Fri Nov 19 18:52:09 2010
@@ -27,6 +27,9 @@ package org.apache.fop.area;
* See fo:region-body definition in the XSL Rec for more information.
*/
public class Footnote extends BlockParent {
+
+ private static final long serialVersionUID = -7907428219886367161L;
+
private Block separator = null;
// footnote has an optional separator
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java Fri Nov 19 18:52:09 2010
@@ -32,12 +32,17 @@ import java.util.List;
*/
public class LineArea extends Area {
+ private static final long serialVersionUID = 7670235908329290684L;
+
/**
* this class stores information about line width and potential adjustments
* that can be used in order to re-compute adjustement and / or indents when a
* page-number or a page-number-citation is resolved
*/
private final class LineAdjustingInfo implements Serializable {
+
+ private static final long serialVersionUID = -6103629976229458273L;
+
private int lineAlignment;
private int difference;
private int availableStretch;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LinkResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LinkResolver.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LinkResolver.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LinkResolver.java Fri Nov 19 18:52:09 2010
@@ -33,6 +33,9 @@ import org.apache.fop.area.Area;
* Link resolving for resolving internal links.
*/
public class LinkResolver implements Resolvable, Serializable {
+
+ private static final long serialVersionUID = -7102134165192960718L;
+
private boolean resolved = false;
private String idRef;
private Area area;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/MainReference.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/MainReference.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/MainReference.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/MainReference.java Fri Nov 19 18:52:09 2010
@@ -31,6 +31,8 @@ import java.util.List;
*/
public class MainReference extends Area {
+ private static final long serialVersionUID = 7635126485620012448L;
+
private BodyRegion parent;
private List spanAreas = new java.util.ArrayList();
private boolean isEmpty = true;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/NormalFlow.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/NormalFlow.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/NormalFlow.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/NormalFlow.java Fri Nov 19 18:52:09 2010
@@ -25,6 +25,9 @@ package org.apache.fop.area;
* See fo:region-body definition in the XSL Rec for more information.
*/
public class NormalFlow extends BlockParent {
+
+ private static final long serialVersionUID = -3753538631016929004L;
+
/**
* Constructor.
* @param ipd of Normal flow object
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java Fri Nov 19 18:52:09 2010
@@ -47,6 +47,9 @@ import org.apache.fop.layoutmgr.TraitSet
* the top level page and regions.
*/
public class Page extends AreaTreeObject implements Serializable, Cloneable {
+
+ private static final long serialVersionUID = 6272157047421543866L;
+
// contains before, start, body, end and after regions
private RegionViewport regionBefore = null;
private RegionViewport regionStart = null;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/PageViewport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/PageViewport.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/PageViewport.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/PageViewport.java Fri Nov 19 18:52:09 2010
@@ -87,7 +87,7 @@ public class PageViewport extends AreaTr
/**
* logging instance
*/
- protected static Log log = LogFactory.getLog(PageViewport.class);
+ protected static final Log log = LogFactory.getLog(PageViewport.class);
/**
* Create a page viewport.
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionReference.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionReference.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionReference.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionReference.java Fri Nov 19 18:52:09 2010
@@ -31,13 +31,14 @@ import org.apache.fop.fo.pagination.Regi
*/
public class RegionReference extends Area implements Cloneable {
+ private static final long serialVersionUID = -298980963268244238L;
+
/** Reference to the region FO. */
//protected Region regionFO;
private int regionClass;
private String regionName;
private CTM ctm;
-
// the list of block areas from the static flow
private ArrayList blocks = new ArrayList();
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionViewport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionViewport.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionViewport.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionViewport.java Fri Nov 19 18:52:09 2010
@@ -30,6 +30,9 @@ import java.util.HashMap;
* in the fo:region-body description in the XSL Recommendation.
*/
public class RegionViewport extends Area implements Cloneable {
+
+ private static final long serialVersionUID = 505781815165102572L;
+
// this rectangle is relative to the page
private RegionReference regionReference;
private Rectangle2D viewArea;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Span.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Span.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Span.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Span.java Fri Nov 19 18:52:09 2010
@@ -30,6 +30,9 @@ import java.util.List;
* See fo:region-body definition in the XSL Rec for more information.
*/
public class Span extends Area {
+
+ private static final long serialVersionUID = -5551430053660081549L;
+
// the list of flow reference areas in this span area
private List flowAreas;
private int colCount;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java Fri Nov 19 18:52:09 2010
@@ -38,6 +38,8 @@ import org.apache.fop.util.ColorUtil;
*/
public final class Trait implements Serializable {
+ private static final long serialVersionUID = 3234280285391611437L;
+
private Trait() {
}
@@ -332,6 +334,8 @@ public final class Trait implements Seri
*/
public static class InternalLink implements Serializable {
+ private static final long serialVersionUID = -8993505060996723039L;
+
/** The unique key of the PageViewport. */
private String pvKey;
@@ -466,6 +470,8 @@ public final class Trait implements Seri
*/
public static class ExternalLink implements Serializable {
+ private static final long serialVersionUID = -3720707599232620946L;
+
private String destination;
private boolean newWindow;
@@ -539,6 +545,8 @@ public final class Trait implements Seri
*/
public static class Background implements Serializable {
+ private static final long serialVersionUID = 8452078676273242870L;
+
/** The background color if any. */
private Color color = null;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/AbstractTextArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/AbstractTextArea.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/AbstractTextArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/AbstractTextArea.java Fri Nov 19 18:52:09 2010
@@ -24,6 +24,8 @@ package org.apache.fop.area.inline;
*/
public abstract class AbstractTextArea extends InlineParent {
+ private static final long serialVersionUID = -1246306443569094371L;
+
/**
* this class stores information about spaces and potential adjustments
* that can be used in order to re-compute adjustments when a
@@ -31,6 +33,8 @@ public abstract class AbstractTextArea e
*/
protected class TextAdjustingInfo extends InlineAdjustingInfo {
+ private static final long serialVersionUID = -2412095162983479947L;
+
/** difference between the optimal width of a space
* and the default width of a space according to the font
* (this is equivalent to the property word-spacing.optimum)
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Anchor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Anchor.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Anchor.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Anchor.java Fri Nov 19 18:52:09 2010
@@ -25,6 +25,8 @@ package org.apache.fop.area.inline;
*/
public class Anchor extends InlineArea {
+ private static final long serialVersionUID = 5227798744787823499L;
+
// has a keep with adjacent area
// has reference to associated footnote or float out-of-line area
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Container.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Container.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Container.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Container.java Fri Nov 19 18:52:09 2010
@@ -32,6 +32,9 @@ import java.util.ArrayList;
* This allows an inline area to have blocks as children.
*/
public class Container extends Area {
+
+ private static final long serialVersionUID = 5256423939348189260L;
+
/**
* The list of block areas stacked inside this container
*/
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/FilledArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/FilledArea.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/FilledArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/FilledArea.java Fri Nov 19 18:52:09 2010
@@ -34,6 +34,9 @@ import java.util.Iterator;
* this as a normal inline parent.
*/
public class FilledArea extends InlineParent {
+
+ private static final long serialVersionUID = 8586584705587017474L;
+
private int unitWidth;
/**
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Image.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Image.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Image.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Image.java Fri Nov 19 18:52:09 2010
@@ -27,6 +27,9 @@ import org.apache.fop.area.Area;
* The url of the image is used as a key to reference the image cache.
*/
public class Image extends Area {
+
+ private static final long serialVersionUID = 4800834714349695386L;
+
private String url;
/**
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java Fri Nov 19 18:52:09 2010
@@ -32,12 +32,17 @@ import org.apache.fop.area.Trait;
*/
public class InlineArea extends Area {
+ private static final long serialVersionUID = -8940066479810170980L;
+
/**
* this class stores information about potential adjustments
* that can be used in order to re-compute adjustments when a
* page-number or a page-number-citation is resolved
*/
protected class InlineAdjustingInfo implements Serializable {
+
+ private static final long serialVersionUID = -5601387735459712149L;
+
/** stretch of the inline area */
protected int availableStretch;
/** shrink of the inline area */
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineBlockParent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineBlockParent.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineBlockParent.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineBlockParent.java Fri Nov 19 18:52:09 2010
@@ -29,6 +29,9 @@ import org.apache.fop.area.Block;
*/
public class InlineBlockParent extends InlineArea {
+
+ private static final long serialVersionUID = -3661746143321407377L;
+
/**
* The list of inline areas added to this inline parent.
*/
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java Fri Nov 19 18:52:09 2010
@@ -30,6 +30,9 @@ import java.util.List;
* This is an inline area that can have other inlines as children.
*/
public class InlineParent extends InlineArea {
+
+ private static final long serialVersionUID = -3047168298770354813L;
+
/**
* The list of inline areas added to this inline parent.
*/
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Leader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Leader.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Leader.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Leader.java Fri Nov 19 18:52:09 2010
@@ -32,6 +32,9 @@ public class Leader extends InlineArea {
// if space replaced with a space
// otherwise this is a holder for a line
+
+ private static final long serialVersionUID = -8011373048313956301L;
+
private int ruleStyle = Constants.EN_SOLID;
private int ruleThickness = 1000;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Space.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Space.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Space.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Space.java Fri Nov 19 18:52:09 2010
@@ -25,4 +25,6 @@ package org.apache.fop.area.inline;
*/
public class Space extends InlineArea {
+ private static final long serialVersionUID = -8748265505356839796L;
+
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java Fri Nov 19 18:52:09 2010
@@ -24,6 +24,8 @@ package org.apache.fop.area.inline;
*/
public class SpaceArea extends InlineArea {
+ private static final long serialVersionUID = 2218803009825411416L;
+
/**
* The space for this space area
*/
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/TextArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/TextArea.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/TextArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/TextArea.java Fri Nov 19 18:52:09 2010
@@ -26,6 +26,8 @@ import org.apache.fop.util.CharUtilities
*/
public class TextArea extends AbstractTextArea {
+ private static final long serialVersionUID = 7315900267242540809L;
+
/**
* Create a text inline area
*/
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java Fri Nov 19 18:52:09 2010
@@ -32,6 +32,9 @@ import java.util.List;
*/
public class UnresolvedPageNumber extends TextArea implements Resolvable {
+
+ private static final long serialVersionUID = -1758090835371647980L;
+
private boolean resolved = false;
private String pageIDRef;
private String text;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Viewport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Viewport.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Viewport.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/Viewport.java Fri Nov 19 18:52:09 2010
@@ -32,6 +32,9 @@ import java.util.HashMap;
* holds the area and positions it.
*/
public class Viewport extends InlineArea {
+
+ private static final long serialVersionUID = 813338534627918689L;
+
// contents could be container, foreign object or image
private Area content;
// clipping for the viewport
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/WordArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/WordArea.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/WordArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/WordArea.java Fri Nov 19 18:52:09 2010
@@ -28,6 +28,8 @@ import org.apache.fop.util.CharUtilities
*/
public class WordArea extends InlineArea {
+ private static final long serialVersionUID = 6444644662158970942L;
+
/** The text for this word area */
protected String word;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/LengthBase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/LengthBase.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/LengthBase.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/datatypes/LengthBase.java Fri Nov 19 18:52:09 2010
@@ -62,7 +62,7 @@ public class LengthBase implements Perce
/**
* logging instance
*/
- protected static Log log = LogFactory.getLog(LengthBase.class);
+ protected static final Log log = LogFactory.getLog(LengthBase.class);
/**
* The FO for which this property is to be calculated.
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FONode.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FONode.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FONode.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FONode.java Fri Nov 19 18:52:09 2010
@@ -69,7 +69,7 @@ public abstract class FONode implements
protected Locator locator;
/** Logger for fo-tree related messages **/
- protected static Log log = LogFactory.getLog(FONode.class);
+ protected static final Log log = LogFactory.getLog(FONode.class);
/**
* Base constructor
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/XMPMetadata.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/XMPMetadata.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/XMPMetadata.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/XMPMetadata.java Fri Nov 19 18:52:09 2010
@@ -33,6 +33,8 @@ import org.xml.sax.SAXException;
*/
public class XMPMetadata implements ExtensionAttachment, Serializable, XMLizable {
+ private static final long serialVersionUID = 591347206217931578L;
+
/** The category URI for this extension attachment. */
public static final String CATEGORY = XMPConstants.XMP_NAMESPACE;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/properties/Property.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/properties/Property.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/properties/Property.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/properties/Property.java Fri Nov 19 18:52:09 2010
@@ -36,7 +36,7 @@ import org.apache.fop.fo.Constants;
public class Property {
/** Logger for all property classes */
- protected static Log log = LogFactory.getLog(PropertyMaker.class);
+ protected static final Log log = LogFactory.getLog(PropertyMaker.class);
/**
* The original specified value for properties which inherit
@@ -197,6 +197,6 @@ public class Property {
if (obj != this) {
return obj.toString();
}
- return null;
+ return "";
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/EncodingMode.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/EncodingMode.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/EncodingMode.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/EncodingMode.java Fri Nov 19 18:52:09 2010
@@ -19,25 +19,19 @@
package org.apache.fop.fonts;
-import java.io.ObjectStreamException;
-import java.io.Serializable;
-
-
/**
* This class enumerates all supported encoding modes for fonts: auto, single-byte and CID.
*/
-public final class EncodingMode implements Serializable {
-
- private static final long serialVersionUID = 8311486102457779529L;
+public enum EncodingMode {
/** Automatic selection of encoding mode. */
- public static final EncodingMode AUTO = new EncodingMode("auto");
+ AUTO("auto"),
/** Single-byte encoding */
- public static final EncodingMode SINGLE_BYTE = new EncodingMode("single-byte");
+ SINGLE_BYTE("single-byte"),
/** CID encoding */
- public static final EncodingMode CID = new EncodingMode("cid");
+ CID("cid");
private String name;
@@ -58,25 +52,18 @@ public final class EncodingMode implemen
* @param name the name of the encoding mode to look up
* @return the encoding mode constant
*/
- public static EncodingMode valueOf(String name) {
- if (name.equalsIgnoreCase(EncodingMode.AUTO.getName())) {
- return EncodingMode.AUTO;
- } else if (name.equalsIgnoreCase(EncodingMode.SINGLE_BYTE.getName())) {
- return EncodingMode.SINGLE_BYTE;
- } else if (name.equalsIgnoreCase(EncodingMode.CID.getName())) {
- return EncodingMode.CID;
- } else {
- throw new IllegalArgumentException("Invalid encoding mode: " + name);
+ public static EncodingMode getEncodingMode(String name) {
+ for (EncodingMode em : EncodingMode.values()) {
+ if (name.equalsIgnoreCase(em.getName())) {
+ return em;
+ }
}
- }
-
- private Object readResolve() throws ObjectStreamException {
- return valueOf(getName());
+ throw new IllegalArgumentException("Invalid encoding mode: " + name);
}
/** {@inheritDoc} */
public String toString() {
- return "EncodingMode:" + getName();
+ return "EncodingMode: " + getName();
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontInfo.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontInfo.java Fri Nov 19 18:52:09 2010
@@ -41,7 +41,7 @@ import org.apache.commons.logging.LogFac
public class FontInfo {
/** logging instance */
- protected static Log log = LogFactory.getLog(FontInfo.class);
+ protected static final Log log = LogFactory.getLog(FontInfo.class);
/** Map containing fonts that have been used */
private Map/*<String,FontMetrics>*/ usedFonts = null; //(String = font key)
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontInfoConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontInfoConfigurator.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontInfoConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontInfoConfigurator.java Fri Nov 19 18:52:09 2010
@@ -44,7 +44,7 @@ import org.apache.fop.util.LogUtil;
*/
public class FontInfoConfigurator {
/** logger instance */
- protected static Log log = LogFactory.getLog(FontInfoConfigurator.class);
+ protected static final Log log = LogFactory.getLog(FontInfoConfigurator.class);
private Configuration cfg;
private FontManager fontManager;
@@ -255,7 +255,7 @@ public class FontInfoConfigurator {
boolean useKerning = fontCfg.getAttributeAsBoolean("kerning", true);
boolean useAdvanced = fontCfg.getAttributeAsBoolean("advanced", true);
- EncodingMode encodingMode = EncodingMode.valueOf(
+ EncodingMode encodingMode = EncodingMode.getEncodingMode(
fontCfg.getAttribute("encoding-mode", EncodingMode.AUTO.getName()));
EmbedFontInfo embedFontInfo
= new EmbedFontInfo(metricsUrl, useKerning, useAdvanced, tripletList, embedUrl,
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontLoader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontLoader.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontLoader.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontLoader.java Fri Nov 19 18:52:09 2010
@@ -40,7 +40,7 @@ import org.apache.fop.fonts.type1.Type1F
public abstract class FontLoader {
/** logging instance */
- protected static Log log = LogFactory.getLog(FontLoader.class);
+ protected static final Log log = LogFactory.getLog(FontLoader.class);
/** URI representing the font file */
protected String fontFileURI;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionTable.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionTable.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/GlyphSubstitutionTable.java Fri Nov 19 18:52:09 2010
@@ -330,7 +330,7 @@ public class GlyphSubstitutionTable exte
public int getGlyphForCoverageIndex ( int ci, int gi ) throws IllegalArgumentException {
if ( glyphs == null ) {
return -1;
- } else if ( ci >=glyphs.length ) {
+ } else if ( ci >= glyphs.length ) {
throw new IllegalArgumentException ( "coverage index " + ci + " out of range, maximum coverage index is " + glyphs.length );
} else {
return glyphs [ ci ];
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/substitute/FontSubstitutions.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/substitute/FontSubstitutions.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/substitute/FontSubstitutions.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/substitute/FontSubstitutions.java Fri Nov 19 18:52:09 2010
@@ -35,7 +35,7 @@ public class FontSubstitutions extends j
private static final long serialVersionUID = -9173104935431899722L;
/** logging instance */
- protected static Log log = LogFactory.getLog(FontSubstitutions.class);
+ protected static final Log log = LogFactory.getLog(FontSubstitutions.class);
/**
* Adjusts a given fontInfo using this font substitution catalog
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/substitute/FontWeightRange.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/substitute/FontWeightRange.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/substitute/FontWeightRange.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/substitute/FontWeightRange.java Fri Nov 19 18:52:09 2010
@@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFac
public class FontWeightRange {
/** logging instance */
- protected static Log log = LogFactory.getLog("org.apache.fop.render.fonts");
+ protected static final Log log = LogFactory.getLog("org.apache.fop.render.fonts");
/**
* Returns an <code>FontWeightRange</code> object holding the
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/ByteVector.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/ByteVector.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/ByteVector.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/ByteVector.java Fri Nov 19 18:52:09 2010
@@ -29,6 +29,8 @@ import java.io.Serializable;
*/
public class ByteVector implements Serializable {
+ private static final long serialVersionUID = 1554572867863466772L;
+
/**
* Capacity increment size
*/
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/CharVector.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/CharVector.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/CharVector.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/CharVector.java Fri Nov 19 18:52:09 2010
@@ -29,6 +29,8 @@ import java.io.Serializable;
*/
public class CharVector implements Cloneable, Serializable {
+ private static final long serialVersionUID = 4263472982169004048L;
+
/**
* Capacity increment size
*/
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/Hyphen.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/Hyphen.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/Hyphen.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/Hyphen.java Fri Nov 19 18:52:09 2010
@@ -39,6 +39,8 @@ import java.io.Serializable;
*/
public class Hyphen implements Serializable {
+ private static final long serialVersionUID = 8989909741110279085L;
+
/** pre break string */
public String preBreak; // CSOK: VisibilityModifier
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/Hyphenator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/Hyphenator.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/Hyphenator.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/Hyphenator.java Fri Nov 19 18:52:09 2010
@@ -43,7 +43,7 @@ import org.xml.sax.InputSource;
public final class Hyphenator {
/** logging instance */
- protected static Log log = LogFactory.getLog(Hyphenator.class);
+ protected static final Log log = LogFactory.getLog(Hyphenator.class);
private static HyphenationTreeCache hTreeCache = null;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/TernaryTree.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/TernaryTree.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/TernaryTree.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/hyphenation/TernaryTree.java Fri Nov 19 18:52:09 2010
@@ -75,6 +75,8 @@ public class TernaryTree implements Clon
* if it ain't broken, don't fix it.
*/
+ private static final long serialVersionUID = 3175412271203716160L;
+
/**
* Pointer to low branch and to rest of the key when it is
* stored directly in this node, we don't have unions in java!
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java Fri Nov 19 18:52:09 2010
@@ -40,7 +40,7 @@ import org.apache.fop.util.ListUtil;
public abstract class AbstractBreaker {
/** logging instance */
- protected static Log log = LogFactory.getLog(AbstractBreaker.class);
+ protected static final Log log = LogFactory.getLog(AbstractBreaker.class);
/**
* A page break position.
@@ -93,6 +93,8 @@ public abstract class AbstractBreaker {
*/
public class BlockSequence extends BlockKnuthSequence {
+ private static final long serialVersionUID = -5348831120146774118L;
+
/** Number of elements to ignore at the beginning of the list. */
int ignoreAtStart = 0; // CSOK: VisibilityModifier
/** Number of elements to ignore at the end of the list. */
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java Fri Nov 19 18:52:09 2010
@@ -27,6 +27,8 @@ import java.util.List;
*/
public class BlockKnuthSequence extends KnuthSequence {
+ private static final long serialVersionUID = 1648962416582509095L;
+
private boolean isClosed = false;
/**
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java Fri Nov 19 18:52:09 2010
@@ -42,7 +42,7 @@ import org.apache.fop.fo.Constants;
public abstract class BreakingAlgorithm {
/** the logger for the class */
- protected static Log log = LogFactory.getLog(BreakingAlgorithm.class);
+ protected static final Log log = LogFactory.getLog(BreakingAlgorithm.class);
/** Maximum adjustment ration */
protected static final int INFINITE_RATIO = 1000;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java Fri Nov 19 18:52:09 2010
@@ -32,6 +32,8 @@ import org.apache.fop.layoutmgr.inline.K
*/
public class InlineKnuthSequence extends KnuthSequence {
+ private static final long serialVersionUID = 1354774188859946549L;
+
private boolean isClosed = false;
/**
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java Fri Nov 19 18:52:09 2010
@@ -30,7 +30,7 @@ import org.apache.fop.traits.MinOptMax;
public abstract class UnresolvedListElementWithLength extends UnresolvedListElement {
/** Logger instance */
- protected static Log log = LogFactory.getLog(UnresolvedListElementWithLength.class);
+ protected static final Log log = LogFactory.getLog(UnresolvedListElementWithLength.class);
private MinOptMax length;
private boolean conditional;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java Fri Nov 19 18:52:09 2010
@@ -521,11 +521,11 @@ public class AlignmentContext implements
/** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer(64);
- sb.append("ah=" + areaHeight);
- sb.append(" lp=" + lineHeight);
- sb.append(" ap=" + alignmentPoint);
- sb.append(" ab=" + alignmentBaselineIdentifier);
- sb.append(" bs=" + baselineShiftValue);
+ sb.append("areaHeight=" + areaHeight);
+ sb.append(" lineHeight=" + lineHeight);
+ sb.append(" alignmentPoint=" + alignmentPoint);
+ sb.append(" alignmentBaselineID=" + alignmentBaselineIdentifier);
+ sb.append(" baselineShift=" + baselineShiftValue);
return sb.toString();
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java Fri Nov 19 18:52:09 2010
@@ -37,7 +37,7 @@ import org.apache.fop.fo.properties.Leng
public class ImageLayout implements Constants {
/** logging instance */
- protected static Log log = LogFactory.getLog(ImageLayout.class);
+ protected static final Log log = LogFactory.getLog(ImageLayout.class);
//Input
private GraphicsProperties props;
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java Fri Nov 19 18:52:09 2010
@@ -56,7 +56,7 @@ public abstract class LeafNodeLayoutMana
/**
* logging instance
*/
- protected static Log log = LogFactory.getLog(LeafNodeLayoutManager.class);
+ protected static final Log log = LogFactory.getLog(LeafNodeLayoutManager.class);
/**
* The inline area that this leafnode will add.
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Fri Nov 19 18:52:09 2010
@@ -83,6 +83,14 @@ public class LineLayoutManager extends I
implements BlockLevelLayoutManager {
/**
+ * this constant is used to create elements when text-align is center:
+ * every TextLM descendant of LineLM must use the same value,
+ * otherwise the line breaking algorithm does not find the right
+ * break point
+ */
+ public static final int DEFAULT_SPACE_WIDTH = 3336;
+
+ /**
* logging instance
*/
private static Log log = LogFactory.getLog(LineLayoutManager.class);
@@ -90,30 +98,6 @@ public class LineLayoutManager extends I
private Block fobj;
private boolean isFirstInBlock;
- /** {@inheritDoc} */
- public void initialize() {
- bidiLevel = fobj.getBidiLevel();
- textAlignment = fobj.getTextAlign();
- textAlignmentLast = fobj.getTextAlignLast();
- textIndent = fobj.getTextIndent();
- lastLineEndIndent = fobj.getLastLineEndIndent();
- hyphenationProperties = fobj.getCommonHyphenation();
- hyphenationLadderCount = fobj.getHyphenationLadderCount();
- wrapOption = fobj.getWrapOption();
- whiteSpaceTreament = fobj.getWhitespaceTreatment();
- //
- effectiveAlignment = getEffectiveAlignment(textAlignment, textAlignmentLast);
- isFirstInBlock = (this == getParent().getChildLMs().get(0));
- }
-
- private int getEffectiveAlignment(int alignment, int alignmentLast) {
- if (textAlignment != EN_JUSTIFY && textAlignmentLast == EN_JUSTIFY) {
- return 0;
- } else {
- return textAlignment;
- }
- }
-
/**
* Private class to store information about inline breaks.
* Each value holds the start and end indexes into a List of
@@ -186,15 +170,6 @@ public class LineLayoutManager extends I
private boolean hyphenationPerformed;
/**
- * this constant is used to create elements when text-align is center:
- * every TextLM descendant of LineLM must use the same value,
- * otherwise the line breaking algorithm does not find the right
- * break point
- */
- public static final int DEFAULT_SPACE_WIDTH = 3336;
-
-
- /**
* This class is used to remember
* which was the first element in the paragraph
* returned by each LM.
@@ -211,6 +186,9 @@ public class LineLayoutManager extends I
// this class represents a paragraph
private class Paragraph extends InlineKnuthSequence {
+
+ private static final long serialVersionUID = 5862072380375189105L;
+
/** Number of elements to ignore at the beginning of the list. */
private int ignoreAtStart = 0;
/** Number of elements to ignore at the end of the list. */
@@ -561,12 +539,38 @@ public class LineLayoutManager extends I
}
/** {@inheritDoc} */
+ public void initialize() {
+ bidiLevel = fobj.getBidiLevel();
+ textAlignment = fobj.getTextAlign();
+ textAlignmentLast = fobj.getTextAlignLast();
+ textIndent = fobj.getTextIndent();
+ lastLineEndIndent = fobj.getLastLineEndIndent();
+ hyphenationProperties = fobj.getCommonHyphenation();
+ hyphenationLadderCount = fobj.getHyphenationLadderCount();
+ wrapOption = fobj.getWrapOption();
+ whiteSpaceTreament = fobj.getWhitespaceTreatment();
+ //
+ effectiveAlignment = getEffectiveAlignment(textAlignment, textAlignmentLast);
+ isFirstInBlock = (this == getParent().getChildLMs().get(0));
+ }
+
+ private int getEffectiveAlignment(int alignment, int alignmentLast) {
+ if (textAlignment != EN_JUSTIFY && textAlignmentLast == EN_JUSTIFY) {
+ return 0;
+ } else {
+ return textAlignment;
+ }
+ }
+
+ /** {@inheritDoc} */
public List getNextKnuthElements(LayoutContext context, int alignment) {
- FontInfo fi = fobj.getFOEventHandler().getFontInfo();
- FontTriplet[] fontkeys = fobj.getCommonFont().getFontState(fi);
- Font fs = fi.getFontInstance(fontkeys[0], fobj.getCommonFont().fontSize.getValue(this));
- alignmentContext = new AlignmentContext(fs, lineHeight.getValue(this),
- context.getWritingMode());
+ if (alignmentContext == null) {
+ FontInfo fi = fobj.getFOEventHandler().getFontInfo();
+ FontTriplet[] fontkeys = fobj.getCommonFont().getFontState(fi);
+ Font fs = fi.getFontInstance(fontkeys[0], fobj.getCommonFont().fontSize.getValue(this));
+ alignmentContext = new AlignmentContext(fs, lineHeight.getValue(this),
+ context.getWritingMode());
+ }
context.setAlignmentContext(alignmentContext);
ipd = context.getRefIPD();
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/pdf/PDFMetadata.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/pdf/PDFMetadata.java?rev=1036979&r1=1036978&r2=1036979&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/pdf/PDFMetadata.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/pdf/PDFMetadata.java Fri Nov 19 18:52:09 2010
@@ -151,6 +151,9 @@ public class PDFMetadata extends PDFStre
}
dc.addDate(info.getCreationDate());
+ //Somewhat redundant but some PDF/A checkers issue a warning without this.
+ dc.setFormat("application/pdf");
+
//PDF/A identification
PDFAMode pdfaMode = pdfDoc.getProfile().getPDFAMode();
if (pdfaMode.isPDFA1LevelB()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org