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 2014/01/13 21:39:41 UTC
svn commit: r1557840 [6/9] - in
/xmlgraphics/fop/branches/Temp_InlineContainer: ./ examples/fo/basic/ lib/
src/codegen/unicode/java/org/apache/fop/complexscripts/bidi/
src/documentation/intermediate-format-ng/ src/java/org/apache/fop/
src/java/org/apac...
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java Mon Jan 13 20:39:34 2014
@@ -278,7 +278,6 @@ public class PDFDocumentGraphics2D exten
PDFStream pdfStream = this.pdfDoc.getFactory().makeStream(
PDFFilterList.CONTENT_FILTER, false);
pdfStream.add(getString());
- currentStream = null;
this.pdfDoc.registerObject(pdfStream);
pdfContext.getCurrentPage().setContents(pdfStream);
PDFAnnotList annots = pdfContext.getCurrentPage().getAnnotations();
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFDocumentGraphics2DConfigurator.java Mon Jan 13 20:39:34 2014
@@ -88,7 +88,8 @@ public class PDFDocumentGraphics2DConfig
final boolean strict = false;
if (cfg != null) {
URI thisUri = new File(".").getAbsoluteFile().toURI();
- InternalResourceResolver resourceResolver = ResourceResolverFactory.createDefaultInternalResourceResolver(thisUri);
+ InternalResourceResolver resourceResolver
+ = ResourceResolverFactory.createDefaultInternalResourceResolver(thisUri);
//TODO The following could be optimized by retaining the FontManager somewhere
FontManager fontManager = new FontManager(resourceResolver, FontDetectorFactory.createDefault(),
FontCacheManagerFactory.createDefault());
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFGraphics2D.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFGraphics2D.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/PDFGraphics2D.java Mon Jan 13 20:39:34 2014
@@ -80,6 +80,7 @@ import org.apache.fop.pdf.PDFColorHandle
import org.apache.fop.pdf.PDFConformanceException;
import org.apache.fop.pdf.PDFDeviceColorSpace;
import org.apache.fop.pdf.PDFDocument;
+import org.apache.fop.pdf.PDFFunction;
import org.apache.fop.pdf.PDFGState;
import org.apache.fop.pdf.PDFImage;
import org.apache.fop.pdf.PDFImageXObject;
@@ -89,11 +90,18 @@ import org.apache.fop.pdf.PDFPaintingSta
import org.apache.fop.pdf.PDFPattern;
import org.apache.fop.pdf.PDFResourceContext;
import org.apache.fop.pdf.PDFResources;
+import org.apache.fop.pdf.PDFShading;
import org.apache.fop.pdf.PDFText;
import org.apache.fop.pdf.PDFXObject;
import org.apache.fop.render.pdf.ImageRawCCITTFaxAdapter;
import org.apache.fop.render.pdf.ImageRawJPEGAdapter;
import org.apache.fop.render.pdf.ImageRenderedAdapter;
+import org.apache.fop.render.shading.Function;
+import org.apache.fop.render.shading.GradientFactory;
+import org.apache.fop.render.shading.GradientRegistrar;
+import org.apache.fop.render.shading.PDFGradientFactory;
+import org.apache.fop.render.shading.Pattern;
+import org.apache.fop.render.shading.Shading;
/**
* <p>PDF Graphics 2D.
@@ -104,7 +112,7 @@ import org.apache.fop.render.pdf.ImageRe
*
* @see org.apache.batik.ext.awt.g2d.AbstractGraphics2D
*/
-public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHandler {
+public class PDFGraphics2D extends AbstractGraphics2D implements NativeImageHandler, GradientRegistrar {
private static final AffineTransform IDENTITY_TRANSFORM = new AffineTransform();
/** The number of decimal places. */
@@ -868,11 +876,10 @@ public class PDFGraphics2D extends Abstr
}
//Gradients are currently restricted to sRGB
- PDFDeviceColorSpace aColorSpace;
- aColorSpace = new PDFDeviceColorSpace(PDFDeviceColorSpace.DEVICE_RGB);
- PDFPattern myPat = pdfDoc.getFactory().makeGradient(
- resourceContext, false, aColorSpace,
- someColors, theBounds, theCoords, theMatrix);
+ PDFDeviceColorSpace colSpace = new PDFDeviceColorSpace(PDFDeviceColorSpace.DEVICE_RGB);
+ PDFGradientFactory gradientFactory = (PDFGradientFactory)GradientFactory.newInstance(this);
+ PDFPattern myPat = gradientFactory.createGradient(false, colSpace, someColors, theBounds,
+ theCoords, theMatrix);
currentStream.write(myPat.getColorSpaceOut(fill));
return true;
@@ -944,13 +951,10 @@ public class PDFGraphics2D extends Abstr
float offset = fractions[count];
theBounds.add(new Double(offset));
}
- PDFDeviceColorSpace colSpace;
- colSpace = new PDFDeviceColorSpace(PDFDeviceColorSpace.DEVICE_RGB);
-
- PDFPattern myPat = pdfDoc.getFactory().makeGradient(
- resourceContext, true, colSpace,
- someColors, theBounds, theCoords, theMatrix);
-
+ PDFDeviceColorSpace colSpace = new PDFDeviceColorSpace(PDFDeviceColorSpace.DEVICE_RGB);
+ PDFGradientFactory gradientFactory = (PDFGradientFactory) GradientFactory.newInstance(this);
+ PDFPattern myPat = gradientFactory.createGradient(true, colSpace, someColors, theBounds,
+ theCoords, theMatrix);
currentStream.write(myPat.getColorSpaceOut(fill));
return true;
@@ -1856,4 +1860,36 @@ public class PDFGraphics2D extends Abstr
//NYI
}
+ /**
+ * Registers a function object against the output format document
+ * @param function The function object to register
+ * @return Returns either the function which has already been registered
+ * or the current new registered object.
+ */
+ public Function registerFunction(Function function) {
+ return pdfDoc.getFactory().registerFunction((PDFFunction)function);
+ }
+
+ /**
+ * Registers a shading object against the otuput format document
+ * @param shading The shading object to register
+ * @return Returs either the shading which has already been registered
+ * or the current new registered object
+ */
+ public Shading registerShading(Shading shading) {
+ assert shading instanceof PDFShading;
+ return pdfDoc.getFactory().registerShading(resourceContext, (PDFShading)shading);
+ }
+
+ /**
+ * Registers a pattern object against the output format document
+ * @param pattern The pattern object to register
+ * @return Returns either the pattern which has already been registered
+ * or the current new registered object
+ */
+ public Pattern registerPattern(Pattern pattern) {
+ assert pattern instanceof PDFPattern;
+ return pdfDoc.getFactory().registerPattern(resourceContext, (PDFPattern)pattern);
+ }
+
}
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/SimpleSVGUserAgent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/SimpleSVGUserAgent.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/SimpleSVGUserAgent.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/svg/SimpleSVGUserAgent.java Mon Jan 13 20:39:34 2014
@@ -23,8 +23,11 @@ import java.awt.Dimension;
import java.awt.geom.AffineTransform;
import java.awt.geom.Dimension2D;
+import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
+import org.xml.sax.SAXException;
+
import org.apache.batik.bridge.UserAgentAdapter;
/**
@@ -79,17 +82,28 @@ public class SimpleSVGUserAgent extends
return null; // userStyleSheetURI;
}
+
+ private static final String XML_PARSER_CLASS_NAME;
+
+ static {
+ String result;
+ try {
+ SAXParserFactory factory = SAXParserFactory.newInstance();
+ result = factory.newSAXParser().getXMLReader().getClass().getName();
+ } catch (SAXException e) {
+ result = null;
+ } catch (ParserConfigurationException e) {
+ result = null;
+ }
+ XML_PARSER_CLASS_NAME = result;
+ }
+
/**
* Returns the class name of the XML parser.
* @return the XML parser class name
*/
public String getXMLParserClassName() {
- try {
- SAXParserFactory factory = SAXParserFactory.newInstance();
- return factory.newSAXParser().getXMLReader().getClass().getName();
- } catch (Exception e) {
- return null;
- }
+ return XML_PARSER_CLASS_NAME;
}
/**
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/text/linebreak/LineBreakUtils.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/text/linebreak/LineBreakUtils.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/text/linebreak/LineBreakUtils.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/text/linebreak/LineBreakUtils.java Mon Jan 13 20:39:34 2014
@@ -29,7 +29,6 @@ package org.apache.fop.text.linebreak;
* - commit BOTH changed files
*/
-// CSOFF: WhitespaceAfterCheck
// CSOFF: LineLengthCheck
/** Line breaking utilities. */
@@ -694,11 +693,11 @@ public final class LineBreakUtils {
"CP", "CR", "EX", "GL", "H2", "H3", "HY", "ID", "IN", "IS", "JL", "JT", "JV", "LF", "NL", "NS", "NU", "OP",
"PO", "PR", "QU", "SA", "SG", "SP", "SY", "WJ", "XX", "ZW"};
- private static String[] lineBreakPropertyLongNames = {"Ambiguous","Alphabetic","Break_Both","Break_After","Break_Before",
- "Mandatory_Break","Contingent_Break","Close_Punctuation","Combining_Mark","Close_Parenthesis","Carriage_Return",
- "Exclamation","Glue","H2","H3","Hyphen","Ideographic","Inseparable","Infix_Numeric","JL","JT","JV","Line_Feed",
- "Next_Line","Nonstarter","Numeric","Open_Punctuation","Postfix_Numeric","Prefix_Numeric","Quotation","Complex_Context",
- "Surrogate","Space","Break_Symbols","Word_Joiner","Unknown","ZWSpace"};
+ private static String[] lineBreakPropertyLongNames = {"Ambiguous", "Alphabetic", "Break_Both", "Break_After", "Break_Before",
+ "Mandatory_Break", "Contingent_Break", "Close_Punctuation", "Combining_Mark", "Close_Parenthesis", "Carriage_Return",
+ "Exclamation", "Glue", "H2", "H3", "Hyphen", "Ideographic", "Inseparable", "Infix_Numeric", "JL", "JT", "JV", "Line_Feed",
+ "Next_Line", "Nonstarter", "Numeric", "Open_Punctuation", "Postfix_Numeric", "Prefix_Numeric", "Quotation", "Complex_Context",
+ "Surrogate", "Space", "Break_Symbols", "Word_Joiner", "Unknown", "ZWSpace"};
/**
* Return the short name for the linebreak property corresponding
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingMode.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingMode.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingMode.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingMode.java Mon Jan 13 20:39:34 2014
@@ -54,8 +54,9 @@ public final class WritingMode extends T
* Assign writing mode traits from this trait to the specified
* writing mode traits setter.
* @param wms a writing mode traits setter
+ * @param explicit true if writing mode property explicitly specified
*/
- public void assignWritingModeTraits(WritingModeTraitsSetter wms) {
+ public void assignWritingModeTraits(WritingModeTraitsSetter wms, boolean explicit) {
Direction inlineProgressionDirection;
Direction blockProgressionDirection;
Direction columnProgressionDirection;
@@ -97,7 +98,7 @@ public final class WritingMode extends T
wms.setColumnProgressionDirection(columnProgressionDirection);
wms.setRowProgressionDirection(rowProgressionDirection);
wms.setShiftDirection(shiftDirection);
- wms.setWritingMode(this);
+ wms.setWritingMode(this, explicit);
}
/**
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraits.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraits.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraits.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraits.java Mon Jan 13 20:39:34 2014
@@ -31,20 +31,21 @@ public class WritingModeTraits implement
private Direction rowProgressionDirection;
private Direction shiftDirection;
private WritingMode writingMode;
+ private boolean explicit;
/**
* Default writing mode traits constructor.
*/
public WritingModeTraits() {
- this (WritingMode.LR_TB);
+ this (WritingMode.LR_TB, false);
}
/**
* Construct writing mode traits using the specified writing mode.
* @param writingMode a writing mode traits object
*/
- public WritingModeTraits(WritingMode writingMode) {
- assignWritingModeTraits(writingMode);
+ public WritingModeTraits(WritingMode writingMode, boolean explicit) {
+ assignWritingModeTraits(writingMode, explicit);
}
/**
@@ -125,17 +126,25 @@ public class WritingModeTraits implement
}
/**
+ * @return the "explicit-writing-mode" trait.
+ */
+ public boolean getExplicitWritingMode() {
+ return explicit;
+ }
+
+ /**
* @param writingMode the "writing-mode" trait.
*/
- public void setWritingMode(WritingMode writingMode) {
+ public void setWritingMode(WritingMode writingMode, boolean explicit) {
this.writingMode = writingMode;
+ this.explicit = explicit;
}
/**
* @param writingMode the "writing-mode" trait.
*/
- public void assignWritingModeTraits(WritingMode writingMode) {
- writingMode.assignWritingModeTraits(this);
+ public void assignWritingModeTraits(WritingMode writingMode, boolean explicit) {
+ writingMode.assignWritingModeTraits(this, explicit);
}
/**
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraitsGetter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraitsGetter.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraitsGetter.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraitsGetter.java Mon Jan 13 20:39:34 2014
@@ -55,4 +55,9 @@ public interface WritingModeTraitsGetter
*/
WritingMode getWritingMode();
+ /**
+ * @return the "explicit-writing-mode" trait
+ */
+ boolean getExplicitWritingMode();
+
}
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraitsSetter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraitsSetter.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraitsSetter.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/traits/WritingModeTraitsSetter.java Mon Jan 13 20:39:34 2014
@@ -58,13 +58,14 @@ public interface WritingModeTraitsSetter
* Set value of writing-mode trait.
* @param writingMode the "writing-mode" trait
*/
- void setWritingMode(WritingMode writingMode);
+ void setWritingMode(WritingMode writingMode, boolean explicit);
/**
* Collectivelly assign values to all writing mode traits based upon a specific
* writing mode.
* @param writingMode the "writing-mode" trait
+ * @param explicit true if writing mode explicitly specified
*/
- void assignWritingModeTraits(WritingMode writingMode);
+ void assignWritingModeTraits(WritingMode writingMode, boolean explicit);
}
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/util/AbstractPaintingState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/util/AbstractPaintingState.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/util/AbstractPaintingState.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/java/org/apache/fop/util/AbstractPaintingState.java Mon Jan 13 20:39:34 2014
@@ -24,7 +24,6 @@ import java.awt.geom.AffineTransform;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Iterator;
import java.util.List;
import java.util.Stack;
@@ -36,10 +35,10 @@ public abstract class AbstractPaintingSt
private static final long serialVersionUID = 5998356138437094188L;
/** current state data */
- private AbstractData data = null;
+ private AbstractData data;
/** the state stack */
- private StateStack/*<AbstractData>*/ stateStack = new StateStack/*<AbstractData>*/();
+ private StateStack<AbstractData> stateStack = new StateStack<AbstractData>();
/**
* Instantiates a new state data object
@@ -216,8 +215,7 @@ public abstract class AbstractPaintingSt
*/
public AffineTransform getTransform() {
AffineTransform at = new AffineTransform();
- for (Iterator iter = stateStack.iterator(); iter.hasNext();) {
- AbstractData data = (AbstractData)iter.next();
+ for (AbstractData data : stateStack) {
AffineTransform stackTrans = data.getTransform();
at.concatenate(stackTrans);
}
@@ -249,7 +247,7 @@ public abstract class AbstractPaintingSt
if (stateStack.isEmpty()) {
return null;
} else {
- AbstractData baseData = (AbstractData)stateStack.get(0);
+ AbstractData baseData = stateStack.get(0);
return (AffineTransform) baseData.getTransform().clone();
}
}
@@ -297,7 +295,7 @@ public abstract class AbstractPaintingSt
*/
public AbstractData restore() {
if (!stateStack.isEmpty()) {
- setData((AbstractData)stateStack.pop());
+ setData(stateStack.pop());
return this.data;
} else {
return null;
@@ -310,12 +308,11 @@ public abstract class AbstractPaintingSt
*
* @param dataList a state data list
*/
- public void saveAll(List/*<AbstractData>*/ dataList) {
- Iterator it = dataList.iterator();
- while (it.hasNext()) {
+ public void saveAll(List<AbstractData> dataList) {
+ for (AbstractData data : dataList) {
// save current data on stack
save();
- setData((AbstractData)it.next());
+ setData(data);
}
}
@@ -325,8 +322,8 @@ public abstract class AbstractPaintingSt
*
* @return a list of state data popped from the stack
*/
- public List/*<AbstractData>*/ restoreAll() {
- List/*<AbstractData>*/ dataList = new java.util.ArrayList/*<AbstractData>*/();
+ public List<AbstractData> restoreAll() {
+ List<AbstractData> dataList = new java.util.ArrayList<AbstractData>();
AbstractData data;
while (true) {
data = getData();
@@ -361,7 +358,7 @@ public abstract class AbstractPaintingSt
*
* @return the state stack
*/
- protected Stack/*<AbstractData>*/ getStateStack() {
+ protected Stack<AbstractData> getStateStack() {
return this.stateStack;
}
@@ -369,8 +366,10 @@ public abstract class AbstractPaintingSt
@Override
public Object clone() {
AbstractPaintingState state = instantiate();
- state.stateStack = new StateStack(this.stateStack);
- state.data = (AbstractData)this.data.clone();
+ state.stateStack = new StateStack<AbstractData>(this.stateStack);
+ if (this.data != null) {
+ state.data = (AbstractData)this.data.clone();
+ }
return state;
}
@@ -385,7 +384,7 @@ public abstract class AbstractPaintingSt
/**
* A stack implementation which holds state objects
*/
- public class StateStack extends java.util.Stack {
+ public class StateStack<E> extends java.util.Stack<E> {
private static final long serialVersionUID = 4897178211223823041L;
@@ -393,7 +392,6 @@ public abstract class AbstractPaintingSt
* Default constructor
*/
public StateStack() {
- super();
}
/**
@@ -419,25 +417,28 @@ public abstract class AbstractPaintingSt
private static final long serialVersionUID = 5208418041189828624L;
/** The current color */
- protected Color color = null;
+ protected Color color;
/** The current background color */
- protected Color backColor = null;
+ protected Color backColor;
/** The current font name */
- protected String fontName = null;
+ protected String fontName;
/** The current font size */
- protected int fontSize = 0;
+ protected int fontSize;
/** The current line width */
- protected float lineWidth = 0;
+ protected float lineWidth;
/** The dash array for the current basic stroke (line type) */
- protected float[] dashArray = null;
+ protected float[] dashArray;
/** The current transform */
- protected AffineTransform transform = null;
+ protected AffineTransform transform;
+
+ /** The current (optional content group) layer. */
+ protected String layer;
/**
* Returns a newly create data object
@@ -485,6 +486,18 @@ public abstract class AbstractPaintingSt
transform = new AffineTransform();
}
+ public void setLayer(String layer) {
+ if (layer != null) {
+ this.layer = layer;
+ } else {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public String getLayer() {
+ return this.layer;
+ }
+
/**
* Returns the derived rotation from the current transform
*
@@ -523,6 +536,7 @@ public abstract class AbstractPaintingSt
this.transform = new AffineTransform();
}
data.transform = new AffineTransform(this.transform);
+ data.layer = this.layer;
return data;
}
@@ -535,7 +549,8 @@ public abstract class AbstractPaintingSt
+ ", fontSize=" + fontSize
+ ", lineWidth=" + lineWidth
+ ", dashArray=" + dashArray
- + ", transform=" + transform;
+ + ", transform=" + transform
+ + ", layer=" + layer;
}
}
}
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/src/sandbox/org/apache/fop/render/svg/SVGPainter.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/src/sandbox/org/apache/fop/render/svg/SVGPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/src/sandbox/org/apache/fop/render/svg/SVGPainter.java Mon Jan 13 20:39:34 2014
@@ -146,16 +146,16 @@ public class SVGPainter extends Abstract
}
/** {@inheritDoc} */
- public void startGroup(AffineTransform[] transforms) throws IFException {
- startGroup(SVGUtil.formatAffineTransformsMptToPt(transforms));
+ public void startGroup(AffineTransform[] transforms, String layer) throws IFException {
+ startGroup(SVGUtil.formatAffineTransformsMptToPt(transforms), layer);
}
/** {@inheritDoc} */
- public void startGroup(AffineTransform transform) throws IFException {
- startGroup(SVGUtil.formatAffineTransformMptToPt(transform));
+ public void startGroup(AffineTransform transform, String layer) throws IFException {
+ startGroup(SVGUtil.formatAffineTransformMptToPt(transform), layer);
}
- private void startGroup(String transform) throws IFException {
+ private void startGroup(String transform, String layer) throws IFException {
try {
AttributesImpl atts = new AttributesImpl();
if (transform != null && transform.length() > 0) {
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/status.xml?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/status.xml (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/status.xml Mon Jan 13 20:39:34 2014
@@ -58,7 +58,16 @@
users, i.e. when the behaviour changes and could affect the layout of existing
documents. Example: the fix of marks layering will be such a case when it's done.
-->
- <release version="FOP Trunk" date="TBD">
+ <release version="FOP Trunk" date="01 November 2013">
+ <action context="Code" dev="GA" type="fix" fixes-bug="FOP-2311">
+ Eliminate regression to shorthand properties from Bugzilla 37114 (FOP-1069).
+ </action>
+ <action context="Renderers" dev="GA" type="add" fixes-bug="FOP-2301">
+ Enable support for PDF sub-page transitions.
+ </action>
+ <action context="Layout" dev="GA" type="fix" fixes-bug="FOP-2310">
+ Fix misplaced table cell border in WM RTL context.
+ </action>
<action context="Renderers" dev="GA" type="add" fixes-bug="FOP-2298">
Enable support for PDF page transitions.
</action>
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/AbstractBasicTranscoderTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/AbstractBasicTranscoderTest.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/AbstractBasicTranscoderTest.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/AbstractBasicTranscoderTest.java Mon Jan 13 20:39:34 2014
@@ -24,13 +24,15 @@ import java.io.InputStream;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.commons.io.output.ByteArrayOutputStream;
+
import org.apache.batik.transcoder.Transcoder;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
-import org.apache.commons.io.output.ByteArrayOutputStream;
import static org.apache.fop.FOPTestUtils.getBaseDir;
-import static org.junit.Assert.assertTrue;
/**
* Basic runtime test for FOP's transcoders. It is used to verify that
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicDriverTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicDriverTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicDriverTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicDriverTestCase.java Mon Jan 13 20:39:34 2014
@@ -28,11 +28,13 @@ import javax.xml.transform.TransformerFa
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.stream.StreamSource;
-import org.apache.fop.apps.FOPException;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
import org.apache.commons.io.output.ByteArrayOutputStream;
+import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FopFactory;
@@ -40,7 +42,6 @@ import org.apache.fop.apps.MimeConstants
import org.apache.fop.cli.InputHandler;
import static org.apache.fop.FOPTestUtils.getBaseDir;
-import static org.junit.Assert.assertTrue;
/**
* Basic runtime test for the old Fop class. It is used to verify that
@@ -136,7 +137,7 @@ public class BasicDriverTestCase {
InputHandler handler = new InputHandler(xmlFile, xsltFile, null);
try {
handler.renderTo(foUserAgent, MimeConstants.MIME_PDF, baout);
- } catch (FOPException e) {}
+ } catch (FOPException e) { /* NOP */ }
}
}
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicDriverTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicDriverTestSuite.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicDriverTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicDriverTestSuite.java Mon Jan 13 20:39:34 2014
@@ -27,6 +27,6 @@ import org.junit.runners.Suite.SuiteClas
* Test suite for basic functionality of FOP's Driver API.
*/
@RunWith(Suite.class)
-@SuiteClasses({ BasicDriverTestCase.class })
+@SuiteClasses(BasicDriverTestCase.class)
public class BasicDriverTestSuite {
}
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicPSTranscoderTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicPSTranscoderTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicPSTranscoderTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/BasicPSTranscoderTestCase.java Mon Jan 13 20:39:34 2014
@@ -20,6 +20,7 @@
package org.apache.fop;
import org.apache.batik.transcoder.Transcoder;
+
import org.apache.fop.render.ps.PSTranscoder;
/**
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/DebugHelper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/DebugHelper.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/DebugHelper.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/DebugHelper.java Mon Jan 13 20:39:34 2014
@@ -25,7 +25,10 @@ import org.apache.fop.logging.LoggingEle
/**
* Handles some standard tasks for debugging.
*/
-public class DebugHelper {
+public final class DebugHelper {
+
+ private DebugHelper() {
+ }
private static boolean elObserversRegistered = false;
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/DigestFilterTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/DigestFilterTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/DigestFilterTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/DigestFilterTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,8 +19,6 @@
package org.apache.fop;
-import static org.junit.Assert.assertTrue;
-
import java.io.IOException;
import java.io.StringReader;
import java.security.NoSuchAlgorithmException;
@@ -28,13 +26,16 @@ import java.security.NoSuchAlgorithmExce
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
-import org.apache.fop.util.DigestFilter;
import org.junit.Before;
import org.junit.Test;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.fop.util.DigestFilter;
+
/**
* Test case for digesting SAX filter.
*
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/KnuthAlgorithmTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/KnuthAlgorithmTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/KnuthAlgorithmTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/KnuthAlgorithmTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,10 +19,13 @@
package org.apache.fop;
-import static org.junit.Assert.assertEquals;
-
import java.util.List;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
import org.apache.fop.layoutmgr.BlockKnuthSequence;
import org.apache.fop.layoutmgr.BreakingAlgorithm;
import org.apache.fop.layoutmgr.ElementListObserver;
@@ -30,8 +33,6 @@ import org.apache.fop.layoutmgr.KnuthBox
import org.apache.fop.layoutmgr.KnuthGlue;
import org.apache.fop.layoutmgr.KnuthPenalty;
import org.apache.fop.layoutmgr.KnuthSequence;
-import org.junit.Before;
-import org.junit.Test;
/**
* Tests the Knuth algorithm implementation.
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/URIResolutionTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/URIResolutionTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/URIResolutionTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/URIResolutionTestCase.java Mon Jan 13 20:39:34 2014
@@ -41,6 +41,9 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.w3c.dom.Document;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.apache.xpath.XPathAPI;
@@ -59,8 +62,6 @@ import org.apache.fop.apps.io.ResourceRe
import org.apache.fop.render.xml.XMLRenderer;
import static org.apache.fop.FOPTestUtils.getBaseDir;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
/**
* Tests URI resolution facilities.
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPObjectAreaInfoTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPObjectAreaInfoTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPObjectAreaInfoTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPObjectAreaInfoTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,11 +19,11 @@
package org.apache.fop.afp;
-import static org.junit.Assert.assertEquals;
-
import org.junit.Before;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+
/**
* Test case for {@link AFPObjectAreaInfo}.
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPPaintingStateTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPPaintingStateTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPPaintingStateTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPPaintingStateTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,11 +19,11 @@
package org.apache.fop.afp;
-import static org.junit.Assert.assertEquals;
-
import org.junit.Before;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+
/**
* Test case for {@link AFPPaintingState}.
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPResourceManagerTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPResourceManagerTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPResourceManagerTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPResourceManagerTestCase.java Mon Jan 13 20:39:34 2014
@@ -26,13 +26,13 @@ import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import org.apache.xmlgraphics.util.MimeConstants;
import org.apache.fop.apps.io.ResourceResolverFactory;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
/**
* Test case for {@link AFPResourceManager}.
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPResourceUtilTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPResourceUtilTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPResourceUtilTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/AFPResourceUtilTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,8 +19,6 @@
package org.apache.fop.afp;
-import static org.junit.Assert.assertTrue;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -29,11 +27,11 @@ import java.util.Arrays;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
import org.apache.commons.io.IOUtils;
-import org.apache.fop.afp.util.AFPResourceUtil;
-import org.junit.Test;
-import static org.junit.Assert.assertTrue;
+import org.apache.fop.afp.util.AFPResourceUtil;
/**
* Tests the {@link AFPResourceUtil} class.
@@ -133,7 +131,7 @@ public class AFPResourceUtilTestCase {
* names fails.
* @throws Exception -
*/
- @Test(expected=Exception.class)
+ @Test(expected = Exception.class)
public void testResourceNameMismatch() throws Exception {
testResource(RESOURCE_NAME_MISMATCH, PSEG_B);
}
@@ -156,6 +154,6 @@ public class AFPResourceUtilTestCase {
}
private interface ResourceCopier {
- public void copy(InputStream in, OutputStream out) throws IOException;
+ void copy(InputStream in, OutputStream out) throws IOException;
}
}
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/goca/GraphicsCharacterStringTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/goca/GraphicsCharacterStringTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/goca/GraphicsCharacterStringTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/goca/GraphicsCharacterStringTestCase.java Mon Jan 13 20:39:34 2014
@@ -16,16 +16,17 @@
*/
package org.apache.fop.afp.goca;
-import static org.junit.Assert.assertEquals;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
import org.apache.fop.afp.fonts.CharacterSet;
import org.apache.fop.afp.fonts.CharacterSetBuilder;
import org.apache.fop.fonts.Typeface;
-import org.junit.Before;
-import org.junit.Test;
public class GraphicsCharacterStringTestCase {
private GraphicsCharacterString gcsCp500;
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractAFPObjectTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractAFPObjectTest.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractAFPObjectTest.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractAFPObjectTest.java Mon Jan 13 20:39:34 2014
@@ -19,10 +19,6 @@
package org.apache.fop.afp.modca;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
@@ -30,9 +26,14 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import org.apache.fop.afp.Streamable;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.apache.fop.afp.Streamable;
+
/**
* Tests the {@link AbstractAFPObject} class.
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractNamedAFPObjectTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractNamedAFPObjectTest.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractNamedAFPObjectTest.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractNamedAFPObjectTest.java Mon Jan 13 20:39:34 2014
@@ -19,12 +19,12 @@
package org.apache.fop.afp.modca;
-import static org.junit.Assert.assertTrue;
-
import java.util.Arrays;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
/**
* Tests the {@linkplain AbstractAFPObject} class.
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractStructuredObjectTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractStructuredObjectTest.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractStructuredObjectTest.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractStructuredObjectTest.java Mon Jan 13 20:39:34 2014
@@ -21,7 +21,8 @@ package org.apache.fop.afp.modca;
import java.io.IOException;
-public abstract class AbstractStructuredObjectTest<S extends AbstractStructuredObject> extends AbstractAFPObjectTest<S> {
+public abstract class AbstractStructuredObjectTest<S extends AbstractStructuredObject>
+ extends AbstractAFPObjectTest<S> {
/**
* Test writeStart() - test that the contract is maintained with
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractTripletStructuredObjectTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractTripletStructuredObjectTest.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractTripletStructuredObjectTest.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/AbstractTripletStructuredObjectTest.java Mon Jan 13 20:39:34 2014
@@ -19,10 +19,6 @@
package org.apache.fop.afp.modca;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
@@ -33,6 +29,10 @@ import java.util.List;
import org.junit.Before;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import org.apache.fop.afp.modca.triplets.AbstractTriplet;
import org.apache.fop.afp.modca.triplets.AttributeQualifierTriplet;
import org.apache.fop.afp.modca.triplets.CommentTriplet;
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/IncludeObjectTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/IncludeObjectTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/IncludeObjectTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/modca/IncludeObjectTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,16 +19,17 @@
package org.apache.fop.afp.modca;
-import static org.junit.Assert.assertTrue;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Arrays;
-import org.apache.fop.afp.util.BinaryUtils;
import org.junit.Before;
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.fop.afp.util.BinaryUtils;
+
/**
* Test {@link IncludeObject}
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/parser/MODCAParserTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/parser/MODCAParserTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/parser/MODCAParserTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/parser/MODCAParserTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,11 +19,6 @@
package org.apache.fop.afp.parser;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.EOFException;
@@ -32,6 +27,11 @@ import java.util.Arrays;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* MODCAParser and MODCAParser.UnparsedStructuredField Unit tests
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/ptoca/TransparentDataControlSequenceTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/ptoca/TransparentDataControlSequenceTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/ptoca/TransparentDataControlSequenceTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/afp/ptoca/TransparentDataControlSequenceTestCase.java Mon Jan 13 20:39:34 2014
@@ -24,15 +24,16 @@ import java.io.OutputStream;
import org.junit.Test;
-import org.apache.fop.afp.fonts.CharactersetEncoder.EncodedChars;
-import org.apache.fop.afp.ptoca.TransparentDataControlSequence.TransparentData;
-
-import static org.apache.fop.afp.ptoca.PtocaConstants.TRANSPARENT_DATA_MAX_SIZE;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import org.apache.fop.afp.fonts.CharactersetEncoder.EncodedChars;
+import org.apache.fop.afp.ptoca.TransparentDataControlSequence.TransparentData;
+
+import static org.apache.fop.afp.ptoca.PtocaConstants.TRANSPARENT_DATA_MAX_SIZE;
+
public class TransparentDataControlSequenceTestCase {
private EncodedChars encodedChars;
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/AbstractRendererConfigParserTester.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/AbstractRendererConfigParserTester.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/AbstractRendererConfigParserTester.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/AbstractRendererConfigParserTester.java Mon Jan 13 20:39:34 2014
@@ -19,6 +19,9 @@
package org.apache.fop.apps;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
@@ -28,9 +31,6 @@ import org.apache.fop.fonts.FontManager;
import org.apache.fop.render.RendererConfig;
import org.apache.fop.render.RendererConfig.RendererConfigParser;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
public abstract class AbstractRendererConfigParserTester<B extends RendererConfBuilder,
C extends RendererConfig> {
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/AbstractRendererConfiguratorTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/AbstractRendererConfiguratorTest.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/AbstractRendererConfiguratorTest.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/AbstractRendererConfiguratorTest.java Mon Jan 13 20:39:34 2014
@@ -24,16 +24,17 @@ import java.io.IOException;
import org.xml.sax.SAXException;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
import org.apache.fop.render.PrintRendererConfigurator;
import org.apache.fop.render.intermediate.IFDocumentHandler;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public abstract class AbstractRendererConfiguratorTest<T extends PrintRendererConfigurator, B extends RendererConfBuilder> {
+public abstract class AbstractRendererConfiguratorTest<T extends PrintRendererConfigurator,
+ B extends RendererConfBuilder> {
protected final String mimeType;
protected FOUserAgent userAgent;
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/EnvironmentalProfileFactoryTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/EnvironmentalProfileFactoryTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/EnvironmentalProfileFactoryTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/EnvironmentalProfileFactoryTestCase.java Mon Jan 13 20:39:34 2014
@@ -21,7 +21,6 @@ import java.net.URI;
import org.junit.Test;
-
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopConfParserTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopConfParserTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopConfParserTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopConfParserTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,6 +19,7 @@
package org.apache.fop.apps;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
@@ -127,4 +128,41 @@ public class FopConfParserTestCase {
builder.setPreferRenderer(true);
assertTrue(buildFactory().getRendererFactory().isRendererPreferred());
}
+
+ @Test
+ public void testRelativeURINoBaseNoFont() throws Exception {
+ checkRelativeURIs("test/config/relative-uri/no-base_no-font.xconf",
+ "", "");
+ }
+
+ @Test
+ public void testRelativeURINoBaseFont() throws Exception {
+ checkRelativeURIs("test/config/relative-uri/no-base_font.xconf",
+ "", "test/config/relative-uri/fonts/");
+ }
+
+ @Test
+ public void testRelativeURIBaseNoFont() throws Exception {
+ checkRelativeURIs("test/config/relative-uri/base_no-font.xconf",
+ "test/config/relative-uri/relative/", "test/config/relative-uri/relative/");
+ }
+
+ @Test
+ public void testRelativeURIBaseFont() throws Exception {
+ checkRelativeURIs("test/config/relative-uri/base_font.xconf",
+ "test/config/relative-uri/relative/", "test/config/relative-uri/fonts/");
+ }
+
+ private void checkRelativeURIs(String conf, String expectedBase, String expectedFontBase)
+ throws SAXException, IOException {
+ File configFile = new File(conf);
+ URI currentDir = new File(".").getCanonicalFile().toURI();
+ FopConfParser parser = new FopConfParser(configFile, currentDir);
+ FopFactoryBuilder fopFactoryBuilder = parser.getFopFactoryBuilder();
+ assertEquals("base URI", currentDir.resolve(expectedBase),
+ fopFactoryBuilder.getBaseURI());
+ assertEquals("font base", currentDir.resolve(expectedFontBase),
+ fopFactoryBuilder.getFontManager().getResourceResolver().getBaseURI());
+ }
+
}
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopFactoryBuilderTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopFactoryBuilderTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopFactoryBuilderTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopFactoryBuilderTestCase.java Mon Jan 13 20:39:34 2014
@@ -27,6 +27,12 @@ import java.util.List;
import org.junit.Before;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import org.apache.fop.apps.io.ResourceResolverFactory;
import org.apache.fop.area.AreaTreeHandler;
import org.apache.fop.area.Block;
@@ -45,12 +51,6 @@ import org.apache.fop.layoutmgr.PageSequ
import org.apache.fop.layoutmgr.StaticContentLayoutManager;
import org.apache.fop.layoutmgr.inline.ContentLayoutManager;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
/**
* Test case for {@link FopFactoryBuilder}.
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopFactoryTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopFactoryTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopFactoryTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/FopFactoryTestCase.java Mon Jan 13 20:39:34 2014
@@ -24,16 +24,15 @@ import java.io.IOException;
import org.junit.Test;
import org.xml.sax.SAXException;
-import org.apache.fop.apps.MimeConstants;
-import org.apache.fop.config.BaseConstructiveUserConfigTest;
-import org.apache.fop.render.RendererConfig.RendererConfigParser;
-import org.apache.fop.render.pdf.PDFRendererConfig;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import org.apache.fop.config.BaseConstructiveUserConfigTest;
+import org.apache.fop.render.RendererConfig.RendererConfigParser;
+import org.apache.fop.render.pdf.PDFRendererConfig;
+
public class FopFactoryTestCase extends BaseConstructiveUserConfigTest {
public FopFactoryTestCase() throws SAXException, IOException {
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java Mon Jan 13 20:39:34 2014
@@ -22,10 +22,8 @@ package org.apache.fop.apps;
import org.w3c.dom.Element;
import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder;
-import org.apache.fop.pdf.PDFEncryptionParams;
import org.apache.fop.render.RendererConfigOption;
import org.apache.fop.render.pdf.PDFEncryptionOption;
-import org.apache.fop.render.pdf.PDFRendererOption;
import static org.apache.fop.render.pdf.PDFEncryptionOption.ENCRYPTION_LENGTH;
import static org.apache.fop.render.pdf.PDFEncryptionOption.ENCRYPTION_PARAMS;
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/io/BaseURIResolutionTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/io/BaseURIResolutionTest.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/io/BaseURIResolutionTest.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/io/BaseURIResolutionTest.java Mon Jan 13 20:39:34 2014
@@ -34,6 +34,8 @@ import javax.xml.transform.stream.Stream
import org.xml.sax.SAXException;
+import static org.junit.Assert.assertTrue;
+
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.ByteArrayOutputStream;
@@ -48,7 +50,6 @@ import org.apache.fop.apps.FopFactoryBui
import org.apache.fop.apps.MimeConstants;
import static org.apache.fop.FOPTestUtils.getBaseDir;
-import static org.junit.Assert.assertTrue;
public abstract class BaseURIResolutionTest {
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/io/FontURIResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/io/FontURIResolver.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/io/FontURIResolver.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/apps/io/FontURIResolver.java Mon Jan 13 20:39:34 2014
@@ -33,14 +33,13 @@ import javax.xml.transform.TransformerEx
import org.junit.Test;
import org.xml.sax.SAXException;
-import org.apache.fop.apps.FopConfBuilder;
-import org.apache.fop.apps.MimeConstants;
-import org.apache.fop.apps.PDFRendererConfBuilder;
-
import static org.junit.Assert.assertTrue;
import org.apache.xmlgraphics.io.Resource;
+import org.apache.fop.apps.FopConfBuilder;
+import org.apache.fop.apps.PDFRendererConfBuilder;
+
public class FontURIResolver extends BaseURIResolutionTest {
public enum Event {
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/ViewportTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/ViewportTest.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/ViewportTest.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/ViewportTest.java Mon Jan 13 20:39:34 2014
@@ -19,13 +19,13 @@
package org.apache.fop.area;
+import java.awt.Rectangle;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import java.awt.Rectangle;
-
/**
* Tests implementations of the {@linkplain Viewport} interface.
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/ViewportTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/ViewportTestSuite.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/ViewportTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/ViewportTestSuite.java Mon Jan 13 20:39:34 2014
@@ -19,11 +19,12 @@
package org.apache.fop.area;
-import org.apache.fop.area.inline.InlineViewportTestCase;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
+import org.apache.fop.area.inline.InlineViewportTestCase;
+
/**
* A suite of all the tests relating to the {@linkplain Viewport} interface.
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/inline/InlineViewportTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/inline/InlineViewportTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/inline/InlineViewportTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/area/inline/InlineViewportTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,9 +19,10 @@
package org.apache.fop.area.inline;
-import org.apache.fop.area.ViewportTest;
import org.junit.Test;
+import org.apache.fop.area.ViewportTest;
+
/**
* Tests the {@linkplain InlineViewport} class.
*/
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/check/ChecksFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/check/ChecksFactory.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/check/ChecksFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/check/ChecksFactory.java Mon Jan 13 20:39:34 2014
@@ -37,7 +37,7 @@ public abstract class ChecksFactory<C ex
/**
* A factory to create a particular kind of check.
*/
- protected static interface CheckFactory<C> {
+ protected interface CheckFactory<C> {
/**
* Creates a {@link Check} instance from the given XML element.
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/cli/CommandLineOptionsTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/cli/CommandLineOptionsTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/cli/CommandLineOptionsTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/cli/CommandLineOptionsTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,15 +19,16 @@
package org.apache.fop.cli;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
import java.io.IOException;
-import org.apache.fop.apps.FOPException;
import org.junit.Before;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.fop.apps.FOPException;
+
public class CommandLineOptionsTestCase {
private final CommandLineOptions clo = new CommandLineOptions();
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiAlgorithmTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiAlgorithmTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiAlgorithmTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiAlgorithmTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,26 +19,23 @@
package org.apache.fop.complexscripts.bidi;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.apache.fop.complexscripts.bidi.UnicodeBidiAlgorithm;
-
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
/**
* <p>Test case for Unicode Bidi Algorithm.</p>
- * @author Glenn Adams
*/
public class BidiAlgorithmTestCase {
/**
* logging instance
*/
- private static final Log log = LogFactory.getLog(BidiAlgorithmTestCase.class); // CSOK: ConstantNameCheck
+ private static final Log log = LogFactory.getLog(BidiAlgorithmTestCase.class);
/**
* Concatenated array of <test-set,test-sequence> tuples
@@ -122,7 +119,7 @@ public class BidiAlgorithmTestCase {
}
if (includeSequence(testSet, testSequence)) {
includedSequences++;
- if (! excludeSequence(testSet, testSequence)) {
+ if (!excludeSequence(testSet, testSequence)) {
if (testBidiAlgorithm(testSet, testSequence, la, ra, ta, bs)) {
passedSequences++;
}
@@ -151,7 +148,7 @@ public class BidiAlgorithmTestCase {
}
private boolean includeSequence(int testSet, int testSequence) {
- if (! includeTestSet(testSet)) {
+ if (!includeTestSet(testSet)) {
return false;
} else {
for (int i = 0, n = INCLUSIONS.length / 2; i < n; i++) {
@@ -196,7 +193,8 @@ public class BidiAlgorithmTestCase {
return false;
}
- private boolean testBidiAlgorithm(int testSet, int testSequence, int[] la, int[] ra, int[] ta, int bs) throws Exception {
+ private boolean testBidiAlgorithm(int testSet, int testSequence, int[] la, int[] ra, int[] ta, int bs)
+ throws Exception {
boolean passed = true;
int n = la.length;
if (ra.length != n) {
@@ -211,14 +209,14 @@ public class BidiAlgorithmTestCase {
// LTR
if ((bs & 2) != 0) {
int[] levels = UnicodeBidiAlgorithm.resolveLevels(null, ta, 0, new int [ n ], true);
- if (! verifyResults(la, levels, ta, 0, testSet, testSequence)) {
+ if (!verifyResults(la, levels, ta, 0, testSet, testSequence)) {
passed = false;
}
}
// RTL
if ((bs & 4) != 0) {
int[] levels = UnicodeBidiAlgorithm.resolveLevels(null, ta, 1, new int [ n ], true);
- if (! verifyResults(la, levels, ta, 1, testSet, testSequence)) {
+ if (!verifyResults(la, levels, ta, 1, testSet, testSequence)) {
passed = false;
}
}
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiClassTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiClassTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiClassTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiClassTestCase.java Mon Jan 13 20:39:34 2014
@@ -19,14 +19,13 @@
package org.apache.fop.complexscripts.bidi;
-import org.apache.fop.complexscripts.bidi.BidiClass;
-import org.apache.fop.util.CharUtilities;
-
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
+import org.apache.fop.util.CharUtilities;
+
public class BidiClassTestCase {
@Test
@@ -46,8 +45,8 @@ public class BidiClassTestCase {
private void testBidiClass(int[] da) throws Exception {
int bc = da[0];
for (int i = 1, n = da.length; i < n; i += 2) {
- int s = da[i+0];
- int e = da[i+1];
+ int s = da[i + 0];
+ int e = da[i + 1];
for (int c = s; c < e; c++) {
int cbc = BidiClass.getBidiClass(c);
assertEquals("bad bidi class for CH(" + CharUtilities.format(c) + ")", bc, cbc);
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiTestData.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiTestData.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiTestData.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/bidi/BidiTestData.java Mon Jan 13 20:39:34 2014
@@ -23,7 +23,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
-// CSOFF: WhitespaceAfterCheck
/*
* !!! THIS IS A GENERATED FILE !!!
@@ -66,7 +65,7 @@ public final class BidiTestData {
data = null;
} finally {
if (is != null) {
- try { is.close(); } catch (Exception e) {}
+ try { is.close(); } catch (Exception e) { /* NOP */ }
}
}
return data;
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GDEFTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GDEFTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GDEFTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GDEFTestCase.java Mon Jan 13 20:39:34 2014
@@ -21,21 +21,14 @@ package org.apache.fop.complexscripts.fo
import java.io.File;
-import org.apache.fop.complexscripts.fonts.GlyphSubtable;
-import org.apache.fop.complexscripts.fonts.GlyphDefinitionSubtable;
-import org.apache.fop.complexscripts.fonts.GlyphDefinitionTable;
-import org.apache.fop.complexscripts.fonts.GlyphTable.LookupSpec;
-import org.apache.fop.complexscripts.fonts.GlyphTable.LookupTable;
-import org.apache.fop.complexscripts.fonts.ttx.TTXFile;
-import org.apache.fop.complexscripts.util.GlyphContextTester;
-import org.apache.fop.complexscripts.util.GlyphSequence;
-
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import org.apache.fop.complexscripts.fonts.ttx.TTXFile;
+
public class GDEFTestCase {
private static String ttxFilesRoot = "test/resources/complexscripts";
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GPOSTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GPOSTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GPOSTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GPOSTestCase.java Mon Jan 13 20:39:34 2014
@@ -20,18 +20,6 @@
package org.apache.fop.complexscripts.fonts;
import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.fop.complexscripts.fonts.GlyphSubtable;
-import org.apache.fop.complexscripts.fonts.GlyphPositioningSubtable;
-import org.apache.fop.complexscripts.fonts.GlyphPositioningTable;
-import org.apache.fop.complexscripts.fonts.GlyphTable.LookupSpec;
-import org.apache.fop.complexscripts.fonts.GlyphTable.LookupTable;
-import org.apache.fop.complexscripts.fonts.ttx.TTXFile;
-import org.apache.fop.complexscripts.util.GlyphContextTester;
-import org.apache.fop.complexscripts.util.GlyphSequence;
-import org.apache.fop.complexscripts.util.ScriptContextTester;
import org.junit.Test;
@@ -40,6 +28,14 @@ import static org.junit.Assert.assertNot
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import org.apache.fop.complexscripts.fonts.GlyphTable.LookupTable;
+import org.apache.fop.complexscripts.fonts.ttx.TTXFile;
+import org.apache.fop.complexscripts.util.GlyphContextTester;
+import org.apache.fop.complexscripts.util.GlyphSequence;
+import org.apache.fop.complexscripts.util.ScriptContextTester;
+
+// CSOFF: LineLength
+
public class GPOSTestCase implements ScriptContextTester, GlyphContextTester {
private static String ttxFilesRoot = "test/resources/complexscripts";
Modified: xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GSUBTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GSUBTestCase.java?rev=1557840&r1=1557839&r2=1557840&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GSUBTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_InlineContainer/test/java/org/apache/fop/complexscripts/fonts/GSUBTestCase.java Mon Jan 13 20:39:34 2014
@@ -21,18 +21,6 @@ package org.apache.fop.complexscripts.fo
import java.io.File;
import java.nio.IntBuffer;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.fop.complexscripts.fonts.GlyphSubtable;
-import org.apache.fop.complexscripts.fonts.GlyphSubstitutionSubtable;
-import org.apache.fop.complexscripts.fonts.GlyphSubstitutionTable;
-import org.apache.fop.complexscripts.fonts.GlyphTable.LookupSpec;
-import org.apache.fop.complexscripts.fonts.GlyphTable.LookupTable;
-import org.apache.fop.complexscripts.fonts.ttx.TTXFile;
-import org.apache.fop.complexscripts.util.GlyphContextTester;
-import org.apache.fop.complexscripts.util.GlyphSequence;
-import org.apache.fop.complexscripts.util.ScriptContextTester;
import org.junit.Test;
@@ -41,6 +29,14 @@ import static org.junit.Assert.assertNot
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import org.apache.fop.complexscripts.fonts.GlyphTable.LookupTable;
+import org.apache.fop.complexscripts.fonts.ttx.TTXFile;
+import org.apache.fop.complexscripts.util.GlyphContextTester;
+import org.apache.fop.complexscripts.util.GlyphSequence;
+import org.apache.fop.complexscripts.util.ScriptContextTester;
+
+// CSOFF: LineLength
+
public class GSUBTestCase implements ScriptContextTester, GlyphContextTester {
private static String ttxFilesRoot = "test/resources/complexscripts";
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org