git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1547372 13f79535-47bb-0310-9956-ffa450edef68tags/fop-2_0
@@ -50,6 +50,12 @@ | |||
<!-- ===================================================================================================== --> | |||
<module name="TreeWalker"> | |||
<!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... --> | |||
<module name="LineLength"> | |||
<property name="max" value="120"/> | |||
</module> | |||
<!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... --> | |||
<!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... --> | |||
<module name="AnnotationUseStyle"/> | |||
<!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... --> |
@@ -35,6 +35,8 @@ import org.apache.fop.util.CharUtilities; | |||
*/ | |||
public final class CharScript { | |||
// CSOFF: LineLength | |||
// | |||
// The following script codes are based on ISO 15924. Codes less than 1000 are | |||
// official assignments from 15924; those equal to or greater than 1000 are FOP |
@@ -36,7 +36,8 @@ public abstract class FunctionBase implements Function { | |||
/** {@inheritDoc} */ | |||
public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException { | |||
if (index >= getOptionalArgsCount()) { | |||
PropertyException e = new PropertyException(new IndexOutOfBoundsException("illegal optional argument index")); | |||
PropertyException e = new PropertyException( | |||
new IndexOutOfBoundsException("illegal optional argument index")); | |||
e.setPropertyInfo(pi); | |||
throw e; | |||
} else { |
@@ -385,7 +385,8 @@ public final class PropertyParser extends PropertyTokenizer { | |||
} | |||
int numArgs = args.size(); | |||
if (numArgs < numReq) { | |||
throw new PropertyException("Expected " + numReq + " required arguments, but only " + numArgs + " specified"); | |||
throw new PropertyException("Expected " + numReq + " required arguments, but only " | |||
+ numArgs + " specified"); | |||
} else { | |||
for (int i = 0; i < numOpt; i++) { | |||
if (args.size() < (numReq + i + 1)) { |
@@ -27,7 +27,8 @@ import java.io.Serializable; | |||
*/ | |||
public class FontTriplet implements Comparable<FontTriplet>, Serializable { | |||
public static final FontTriplet DEFAULT_FONT_TRIPLET = new FontTriplet("any", Font.STYLE_NORMAL, Font.WEIGHT_NORMAL); | |||
public static final FontTriplet DEFAULT_FONT_TRIPLET | |||
= new FontTriplet("any", Font.STYLE_NORMAL, Font.WEIGHT_NORMAL); | |||
/** serial version UID */ | |||
private static final long serialVersionUID = 1168991106658033508L; |
@@ -451,7 +451,8 @@ public class OTFSubSetFile extends OTFFile { | |||
localUniques = foundLocalUniquesB.get(subsetFDSelect.get(subsetGlyphs.get(gid)).getNewFDIndex()); | |||
byte[] data = charStringsIndex.getValue(gid); | |||
subsetLocalIndexSubr = fdSubrs.get(subsetFDSelect.get(subsetGlyphs.get(gid)).getNewFDIndex()); | |||
subsetLocalSubrCount = foundLocalUniques.get(subsetFDSelect.get(subsetGlyphs.get(gid)).getNewFDIndex()).size(); | |||
subsetLocalSubrCount = foundLocalUniques.get( | |||
subsetFDSelect.get(subsetGlyphs.get(gid)).getNewFDIndex()).size(); | |||
data = readCharStringData(data, subsetLocalSubrCount); | |||
subsetCharStringsIndex.add(data); | |||
} |
@@ -316,8 +316,8 @@ public final class AFPFontConfig implements FontConfig { | |||
private final String characterset; | |||
private CIDKeyedFontConfig(List<FontTriplet> triplets, String type, String codePage, | |||
String encoding, String characterset, String name, CharacterSetType charsetType, boolean embeddable, String uri) { | |||
private CIDKeyedFontConfig(List<FontTriplet> triplets, String type, String codePage, String encoding, | |||
String characterset, String name, CharacterSetType charsetType, boolean embeddable, String uri) { | |||
super(triplets, type, codePage, encoding, name, embeddable, uri); | |||
this.characterset = characterset; | |||
this.charsetType = charsetType; |
@@ -103,7 +103,8 @@ public final class AFPRendererConfig implements RendererConfig { | |||
} | |||
} | |||
private final EnumMap<AFPRendererOption, Object> params = new EnumMap<AFPRendererOption, Object>(AFPRendererOption.class); | |||
private final EnumMap<AFPRendererOption, Object> params | |||
= new EnumMap<AFPRendererOption, Object>(AFPRendererOption.class); | |||
private final EnumMap<ImagesModeOptions, Object> imageModeParams | |||
= new EnumMap<ImagesModeOptions, Object>(ImagesModeOptions.class); |
@@ -463,7 +463,8 @@ class PDFRenderingUtil { | |||
private PDFDictionary augmentDictionary(PDFDictionary dictionary, PDFDictionaryExtension extension) { | |||
for (PDFCollectionEntryExtension entry : extension.getEntries()) { | |||
if (entry instanceof PDFDictionaryExtension) { | |||
dictionary.put(entry.getKey(), augmentDictionary(new PDFDictionary(dictionary), (PDFDictionaryExtension) entry)); | |||
dictionary.put(entry.getKey(), | |||
augmentDictionary(new PDFDictionary(dictionary), (PDFDictionaryExtension) entry)); | |||
} else if (entry instanceof PDFArrayExtension) { | |||
dictionary.put(entry.getKey(), augmentArray(new PDFArray(dictionary), (PDFArrayExtension) entry)); | |||
} else { |
@@ -119,7 +119,8 @@ public class PSSVGGraphics2D extends PSGraphics2D implements GradientRegistrar { | |||
List<Double> theCoords = new java.util.ArrayList<Double>(); | |||
AffineTransform start = applyTransform(lgp.getTransform(), lgp.getStartPoint().getX(), lgp.getStartPoint().getY()); | |||
AffineTransform start = applyTransform(lgp.getTransform(), | |||
lgp.getStartPoint().getX(), lgp.getStartPoint().getY()); | |||
AffineTransform end = applyTransform(lgp.getTransform(), lgp.getEndPoint().getX(), lgp.getEndPoint().getY()); | |||
double startX = start.getTranslateX(); | |||
double startY = start.getTranslateY(); | |||
@@ -177,8 +178,10 @@ public class PSSVGGraphics2D extends PSGraphics2D implements GradientRegistrar { | |||
transform.concatenate(getTransform()); | |||
transform.concatenate(rgp.getTransform()); | |||
AffineTransform resultCentre = applyTransform(rgp.getTransform(), rgp.getCenterPoint().getX(), rgp.getCenterPoint().getY()); | |||
AffineTransform resultFocus = applyTransform(rgp.getTransform(), rgp.getFocusPoint().getX(), rgp.getFocusPoint().getY()); | |||
AffineTransform resultCentre = applyTransform(rgp.getTransform(), | |||
rgp.getCenterPoint().getX(), rgp.getCenterPoint().getY()); | |||
AffineTransform resultFocus = applyTransform(rgp.getTransform(), | |||
rgp.getFocusPoint().getX(), rgp.getFocusPoint().getY()); | |||
double scale = Math.sqrt(rgp.getTransform().getDeterminant()); | |||
double radius = rgp.getRadius() * scale; | |||
double centreX = resultCentre.getTranslateX(); |
@@ -88,7 +88,8 @@ public class PDFDocumentGraphics2DConfigurator { | |||
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()); |