aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/render')
-rw-r--r--src/java/org/apache/fop/render/AbstractConfigurator.java2
-rw-r--r--src/java/org/apache/fop/render/AbstractRenderer.java10
-rw-r--r--src/java/org/apache/fop/render/PrintRenderer.java2
-rw-r--r--src/java/org/apache/fop/render/afp/AFPDocumentHandler.java2
-rw-r--r--src/java/org/apache/fop/render/afp/AFPSVGHandler.java2
-rw-r--r--src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java4
-rw-r--r--src/java/org/apache/fop/render/awt/AWTRenderer.java2
-rw-r--r--src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java12
-rw-r--r--src/java/org/apache/fop/render/bitmap/TIFFRenderer.java2
-rw-r--r--src/java/org/apache/fop/render/intermediate/AbstractIFPainter.java2
-rw-r--r--src/java/org/apache/fop/render/intermediate/IFRenderer.java2
-rw-r--r--src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java2
-rw-r--r--src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java4
-rw-r--r--src/java/org/apache/fop/render/java2d/Java2DFontMetrics.java16
-rw-r--r--src/java/org/apache/fop/render/java2d/Java2DRenderer.java10
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java4
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLGenerator.java8
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLGraphics2D.java2
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLPainter.java2
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLRenderingContext.java2
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLRenderingUtil.java6
-rw-r--r--src/java/org/apache/fop/render/pdf/ImageRawCCITTFaxAdapter.java2
-rw-r--r--src/java/org/apache/fop/render/pdf/ImageRawJPEGAdapter.java2
-rw-r--r--src/java/org/apache/fop/render/pdf/ImageRenderedAdapter.java2
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFContentGenerator.java2
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRendererConfig.java2
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRendererOption.java6
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRendererOptionsConfig.java5
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java1
-rw-r--r--src/java/org/apache/fop/render/pdf/extensions/AbstractPDFExtensionElement.java2
-rw-r--r--src/java/org/apache/fop/render/pdf/extensions/PDFElementMapping.java2
-rw-r--r--src/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachment.java6
-rw-r--r--src/java/org/apache/fop/render/pdf/extensions/PDFExtensionAttachment.java2
-rw-r--r--src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java5
-rw-r--r--src/java/org/apache/fop/render/print/PageableRenderer.java2
-rw-r--r--src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java2
-rw-r--r--src/java/org/apache/fop/render/ps/NativeTextHandler.java2
-rw-r--r--src/java/org/apache/fop/render/ps/PSDocumentHandler.java2
-rw-r--r--src/java/org/apache/fop/render/ps/PSFontUtils.java2
-rw-r--r--src/java/org/apache/fop/render/ps/PSPainter.java2
-rw-r--r--src/java/org/apache/fop/render/ps/PSRenderingUtil.java6
-rw-r--r--src/java/org/apache/fop/render/ps/PSTextPainter.java4
-rw-r--r--src/java/org/apache/fop/render/ps/extensions/PSSetPageDevice.java2
-rw-r--r--src/java/org/apache/fop/render/ps/extensions/PSSetupCode.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/RTFHandler.java8
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java4
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmark.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmarkContainerImpl.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java8
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExternalGraphic.java10
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExtraRowSet.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java6
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFootnote.java8
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfHyperLink.java4
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfLeader.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java4
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java6
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSpaceManager.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfStyleSheetTable.java8
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTable.java10
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTemplate.java4
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java2
-rw-r--r--src/java/org/apache/fop/render/rtf/rtflib/tools/TableContext.java2
-rw-r--r--src/java/org/apache/fop/render/txt/TXTRenderer.java2
-rw-r--r--src/java/org/apache/fop/render/txt/TXTStream.java2
-rw-r--r--src/java/org/apache/fop/render/xml/XMLRenderer.java4
73 files changed, 143 insertions, 136 deletions
diff --git a/src/java/org/apache/fop/render/AbstractConfigurator.java b/src/java/org/apache/fop/render/AbstractConfigurator.java
index c890d0830..eb135dfd2 100644
--- a/src/java/org/apache/fop/render/AbstractConfigurator.java
+++ b/src/java/org/apache/fop/render/AbstractConfigurator.java
@@ -34,7 +34,7 @@ public abstract class AbstractConfigurator {
private static final String MIME = "mime";
/** fop factory configuration */
- protected FOUserAgent userAgent = null;
+ protected FOUserAgent userAgent;
/**
* Default constructor
diff --git a/src/java/org/apache/fop/render/AbstractRenderer.java b/src/java/org/apache/fop/render/AbstractRenderer.java
index 9a94e0cc6..15a792db8 100644
--- a/src/java/org/apache/fop/render/AbstractRenderer.java
+++ b/src/java/org/apache/fop/render/AbstractRenderer.java
@@ -86,29 +86,29 @@ public abstract class AbstractRenderer
/**
* user agent
*/
- protected FOUserAgent userAgent = null;
+ protected FOUserAgent userAgent;
/**
* block progression position
*/
- protected int currentBPPosition = 0;
+ protected int currentBPPosition;
/**
* inline progression position
*/
- protected int currentIPPosition = 0;
+ protected int currentIPPosition;
/**
* the block progression position of the containing block used for
* absolutely positioned blocks
*/
- protected int containingBPPosition = 0;
+ protected int containingBPPosition;
/**
* the inline progression position of the containing block used for
* absolutely positioned blocks
*/
- protected int containingIPPosition = 0;
+ protected int containingIPPosition;
/** the currently active PageViewport */
protected PageViewport currentPageViewport;
diff --git a/src/java/org/apache/fop/render/PrintRenderer.java b/src/java/org/apache/fop/render/PrintRenderer.java
index b1ff59c84..620c3e621 100644
--- a/src/java/org/apache/fop/render/PrintRenderer.java
+++ b/src/java/org/apache/fop/render/PrintRenderer.java
@@ -53,7 +53,7 @@ public abstract class PrintRenderer extends AbstractRenderer {
protected FontInfo fontInfo;
/** list of fonts */
- protected List<EmbedFontInfo> embedFontInfoList = null;
+ protected List<EmbedFontInfo> embedFontInfoList;
/**
* Adds a font list to current list of fonts
diff --git a/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java b/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
index 8962da304..092e2a425 100644
--- a/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
+++ b/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
@@ -92,7 +92,7 @@ public class AFPDocumentHandler extends AbstractBinaryWritingIFDocumentHandler
private Map<String, String> roundedCornerNameCache
= new HashMap<String, String>();
- private int roundedCornerCount = 0;
+ private int roundedCornerCount;
private static enum Location {
ELSEWHERE, IN_DOCUMENT_HEADER, FOLLOWING_PAGE_SEQUENCE, IN_PAGE_HEADER
diff --git a/src/java/org/apache/fop/render/afp/AFPSVGHandler.java b/src/java/org/apache/fop/render/afp/AFPSVGHandler.java
index e05bc007c..aa3ed824d 100644
--- a/src/java/org/apache/fop/render/afp/AFPSVGHandler.java
+++ b/src/java/org/apache/fop/render/afp/AFPSVGHandler.java
@@ -64,7 +64,7 @@ import org.apache.fop.svg.font.AggregatingFontFamilyResolver;
*/
public class AFPSVGHandler extends AbstractGenericSVGHandler {
- private boolean paintAsBitmap = false;
+ private boolean paintAsBitmap;
/** {@inheritDoc} */
public void handleXML(RendererContext context,
diff --git a/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java b/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
index 1e6aee7d5..49fdf38ed 100644
--- a/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
+++ b/src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
@@ -39,12 +39,12 @@ public class AFPPageOverlay extends AFPExtensionAttachment {
/**
* The x coordinate
*/
- private int x = 0;
+ private int x;
/**
* The y coordinate
*/
- private int y = 0;
+ private int y;
/**
* Default constructor.
diff --git a/src/java/org/apache/fop/render/awt/AWTRenderer.java b/src/java/org/apache/fop/render/awt/AWTRenderer.java
index 0ba158631..f10640a09 100644
--- a/src/java/org/apache/fop/render/awt/AWTRenderer.java
+++ b/src/java/org/apache/fop/render/awt/AWTRenderer.java
@@ -67,7 +67,7 @@ public class AWTRenderer extends Java2DRenderer implements Pageable {
/**
* Will be notified when rendering progresses
*/
- protected StatusListener statusListener = null;
+ protected StatusListener statusListener;
/**
diff --git a/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java b/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
index ab5d78a64..36ded2f7f 100644
--- a/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
+++ b/src/java/org/apache/fop/render/awt/viewer/PreviewPanel.java
@@ -116,10 +116,10 @@ public class PreviewPanel extends JPanel {
*/
protected Renderable renderable;
/** The number of the page which is currently selected */
- private int currentPage = 0;
+ private int currentPage;
/** The index of the first page displayed on screen. */
- private int firstPage = 0;
+ private int firstPage;
/** The number of pages concurrently displayed on screen. */
private int pageRange = 1;
@@ -128,13 +128,13 @@ public class PreviewPanel extends JPanel {
private int displayMode = SINGLE;
/** The component(s) that hold the rendered page(s) */
- private ImageProxyPanel[] pagePanels = null;
+ private ImageProxyPanel[] pagePanels;
/**
* Panel showing the page panels in a grid. Usually the dimensions
* of the grid are 1x1, nx1 or nx2.
*/
- private JPanel gridPanel = null;
+ private JPanel gridPanel;
/** Asynchronous reloader thread, used when reload() method is called. */
private Reloader reloader;
@@ -283,9 +283,9 @@ public class PreviewPanel extends JPanel {
/** The viewport to be scrolled */
private final JViewport viewport;
/** Starting position of a mouse drag - X co-ordinate */
- private int startPosX = 0;
+ private int startPosX;
/** Starting position of a mouse drag - Y co-ordinate */
- private int startPosY = 0;
+ private int startPosY;
ViewportScroller(JViewport vp) {
viewport = vp;
diff --git a/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java b/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java
index 48da62ef7..619d0625e 100644
--- a/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java
+++ b/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java
@@ -161,7 +161,7 @@ public class TIFFRenderer extends Java2DRenderer {
private int count;
- private int current = 0;
+ private int current;
/**
* Main constructor
diff --git a/src/java/org/apache/fop/render/intermediate/AbstractIFPainter.java b/src/java/org/apache/fop/render/intermediate/AbstractIFPainter.java
index f69fe2091..2c04a0714 100644
--- a/src/java/org/apache/fop/render/intermediate/AbstractIFPainter.java
+++ b/src/java/org/apache/fop/render/intermediate/AbstractIFPainter.java
@@ -245,7 +245,7 @@ public abstract class AbstractIFPainter<T extends IFDocumentHandler> implements
if (log.isTraceEnabled()) {
log.trace("Using ImageHandler: " + handler.getClass().getName());
}
-
+ context.putHint("fontinfo", getFontInfo());
handler.handleImage(context, effImage, rect);
}
diff --git a/src/java/org/apache/fop/render/intermediate/IFRenderer.java b/src/java/org/apache/fop/render/intermediate/IFRenderer.java
index e40a8f6b3..6ec1541c9 100644
--- a/src/java/org/apache/fop/render/intermediate/IFRenderer.java
+++ b/src/java/org/apache/fop/render/intermediate/IFRenderer.java
@@ -122,7 +122,7 @@ public class IFRenderer extends AbstractPathOrientedRenderer {
/** If not null, the XMLRenderer will mimic another renderer by using its font setup. */
protected Renderer mimic;
- private boolean inPageSequence = false;
+ private boolean inPageSequence;
private Stack graphicContextStack = new Stack();
private Stack viewportDimensionStack = new Stack();
diff --git a/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java b/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java
index b980f1051..080a33a81 100644
--- a/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java
+++ b/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java
@@ -29,7 +29,7 @@ import java.util.Map;
*/
public class ActionSet {
- private int lastGeneratedID = 0;
+ private int lastGeneratedID;
private Map actionRegistry = new java.util.HashMap();
/**
diff --git a/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java b/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java
index 71ee7a0b0..b4b08cc42 100644
--- a/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java
+++ b/src/java/org/apache/fop/render/intermediate/util/IFConcatenator.java
@@ -47,7 +47,7 @@ public class IFConcatenator {
private IFDocumentHandler targetHandler;
- private int nextPageIndex = 0;
+ private int nextPageIndex;
private boolean inFirstDocument = true;
/**
@@ -109,7 +109,7 @@ public class IFConcatenator {
private class IFPageSequenceFilter extends IFDocumentHandlerProxy {
- private boolean inPageSequence = false;
+ private boolean inPageSequence;
public IFPageSequenceFilter(IFDocumentHandler delegate) {
super(delegate);
diff --git a/src/java/org/apache/fop/render/java2d/Java2DFontMetrics.java b/src/java/org/apache/fop/render/java2d/Java2DFontMetrics.java
index 5e681e9e2..e7f6d989f 100644
--- a/src/java/org/apache/fop/render/java2d/Java2DFontMetrics.java
+++ b/src/java/org/apache/fop/render/java2d/Java2DFontMetrics.java
@@ -59,29 +59,29 @@ public class Java2DFontMetrics {
/**
* The width of all 256 character, if requested
*/
- private int[] width = null;
+ private int[] width;
/**
* The typical height of a small cap latter (often derived from "x", value in mpt)
*/
- private int xHeight = 0;
+ private int xHeight;
/**
* The highest point of the font above the baseline (usually derived from "d", value in mpt)
*/
- private int ascender = 0;
+ private int ascender;
/**
* The lowest point of the font under the baseline (usually derived from "p", value in mpt)
*/
- private int descender = 0;
+ private int descender;
/**
* Buffered font.
* f1 is bufferd for metric measurements during layout.
* fSized is buffered for display purposes
*/
- private Font f1 = null; // , fSized = null;
+ private Font f1; // , fSized;
/**
* The family type of the font last used
@@ -91,17 +91,17 @@ public class Java2DFontMetrics {
/**
* The style of the font last used
*/
- private int style = 0;
+ private int style;
/**
* The size of the font last used
*/
- private float size = 0;
+ private float size;
/**
* The FontMetrics object used to calculate character width etc.
*/
- private FontMetrics fmt = null;
+ private FontMetrics fmt;
/** A LineMetrics to access high-resolution metrics information. */
private LineMetrics lineMetrics;
diff --git a/src/java/org/apache/fop/render/java2d/Java2DRenderer.java b/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
index d343c55d8..576f042ce 100644
--- a/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
+++ b/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
@@ -116,16 +116,16 @@ public abstract class Java2DRenderer extends AbstractPathOrientedRenderer implem
protected double scaleFactor = 1;
/** The page width in pixels */
- protected int pageWidth = 0;
+ protected int pageWidth;
/** The page height in pixels */
- protected int pageHeight = 0;
+ protected int pageHeight;
/** List of Viewports */
protected List pageViewportList = new java.util.ArrayList();
/** The 0-based current page number */
- private int currentPageNumber = 0;
+ private int currentPageNumber;
/** true if anti-aliasing is set */
protected boolean antialiasing = true;
@@ -134,7 +134,7 @@ public abstract class Java2DRenderer extends AbstractPathOrientedRenderer implem
protected boolean qualityRendering = true;
/** false: paints a non-transparent white background, true: for a transparent background */
- protected boolean transparentPageBackground = false;
+ protected boolean transparentPageBackground;
/** The current state, holds a Graphics2D and its context */
protected Java2DGraphicsState state;
@@ -144,7 +144,7 @@ public abstract class Java2DRenderer extends AbstractPathOrientedRenderer implem
/** true if the renderer has finished rendering all the pages */
private boolean renderingDone;
- private GeneralPath currentPath = null;
+ private GeneralPath currentPath;
/**
* Default constructor
diff --git a/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java b/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
index a44205d06..4d0efd8ed 100644
--- a/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
+++ b/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
@@ -64,9 +64,9 @@ public class PCLDocumentHandler extends AbstractBinaryWritingIFDocumentHandler
private PCLPageDefinition currentPageDefinition;
/** contains the pageWith of the last printed page */
- private long pageWidth = 0;
+ private long pageWidth;
/** contains the pageHeight of the last printed page */
- private long pageHeight = 0;
+ private long pageHeight;
/** the current page image (only set when all-bitmap painting is activated) */
private BufferedImage currentImage;
diff --git a/src/java/org/apache/fop/render/pcl/PCLGenerator.java b/src/java/org/apache/fop/render/pcl/PCLGenerator.java
index 99aa40f22..7b3878627 100644
--- a/src/java/org/apache/fop/render/pcl/PCLGenerator.java
+++ b/src/java/org/apache/fop/render/pcl/PCLGenerator.java
@@ -831,10 +831,10 @@ public class PCLGenerator {
private byte[] rle; //compressed (RLE)
private byte[] uncompressed; //uncompressed
private int lastcount = -1;
- private byte lastbyte = 0;
- private int rlewidth = 0;
- private byte ib = 0; //current image bits
- private int x = 0;
+ private byte lastbyte;
+ private int rlewidth;
+ private byte ib; //current image bits
+ private int x;
private boolean zeroRow = true;
public Encoder(RenderedImage img) {
diff --git a/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java b/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java
index 009306620..9d9118aaa 100644
--- a/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java
+++ b/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java
@@ -56,7 +56,7 @@ public class PCLGraphics2D extends AbstractGraphics2D {
protected PCLGenerator gen;
private final boolean failOnUnsupportedFeature = true;
- private boolean clippingDisabled = false;
+ private boolean clippingDisabled;
/**
* Create a new PCLGraphics2D.
diff --git a/src/java/org/apache/fop/render/pcl/PCLPainter.java b/src/java/org/apache/fop/render/pcl/PCLPainter.java
index f934eed8c..9f7de4930 100644
--- a/src/java/org/apache/fop/render/pcl/PCLPainter.java
+++ b/src/java/org/apache/fop/render/pcl/PCLPainter.java
@@ -67,7 +67,7 @@ public class PCLPainter extends AbstractIFPainter<PCLDocumentHandler> implements
private PCLGenerator gen;
private PCLPageDefinition currentPageDefinition;
- private int currentPrintDirection = 0;
+ private int currentPrintDirection;
//private GeneralPath currentPath = null;
private Stack<GraphicContext> graphicContextStack = new Stack<GraphicContext>();
diff --git a/src/java/org/apache/fop/render/pcl/PCLRenderingContext.java b/src/java/org/apache/fop/render/pcl/PCLRenderingContext.java
index 8ac7fc973..5efa6f4fc 100644
--- a/src/java/org/apache/fop/render/pcl/PCLRenderingContext.java
+++ b/src/java/org/apache/fop/render/pcl/PCLRenderingContext.java
@@ -35,7 +35,7 @@ public abstract class PCLRenderingContext extends AbstractRenderingContext {
private PCLGenerator generator;
private PCLRenderingUtil pclUtil;
- private boolean sourceTransparency = false;
+ private boolean sourceTransparency;
/**
* Main constructor.
diff --git a/src/java/org/apache/fop/render/pcl/PCLRenderingUtil.java b/src/java/org/apache/fop/render/pcl/PCLRenderingUtil.java
index e01bcdc5f..3fc8b5258 100644
--- a/src/java/org/apache/fop/render/pcl/PCLRenderingUtil.java
+++ b/src/java/org/apache/fop/render/pcl/PCLRenderingUtil.java
@@ -54,19 +54,19 @@ public class PCLRenderingUtil {
* Controls whether all text should be painted as text. This is a fallback setting in case
* the mixture of native and bitmapped text does not provide the necessary quality.
*/
- private boolean allTextAsBitmaps = false;
+ private boolean allTextAsBitmaps;
/**
* Controls whether an RGB canvas is used when converting Java2D graphics to bitmaps.
* This can be used to work around problems with Apache Batik, for example, but setting
* this to true will increase memory consumption.
*/
- private boolean useColorCanvas = false;
+ private boolean useColorCanvas;
/**
* Controls whether the generation of PJL commands gets disabled.
*/
- private boolean disabledPJL = false;
+ private boolean disabledPJL;
PCLRenderingUtil(FOUserAgent userAgent) {
this.userAgent = userAgent;
diff --git a/src/java/org/apache/fop/render/pdf/ImageRawCCITTFaxAdapter.java b/src/java/org/apache/fop/render/pdf/ImageRawCCITTFaxAdapter.java
index f158f6a14..877a76d21 100644
--- a/src/java/org/apache/fop/render/pdf/ImageRawCCITTFaxAdapter.java
+++ b/src/java/org/apache/fop/render/pdf/ImageRawCCITTFaxAdapter.java
@@ -37,7 +37,7 @@ import org.apache.fop.pdf.PDFFilterList;
*/
public class ImageRawCCITTFaxAdapter extends AbstractImageAdapter {
- private PDFFilter pdfFilter = null;
+ private PDFFilter pdfFilter;
/**
* Creates a new PDFImage from an Image instance.
diff --git a/src/java/org/apache/fop/render/pdf/ImageRawJPEGAdapter.java b/src/java/org/apache/fop/render/pdf/ImageRawJPEGAdapter.java
index a60c9e92c..d76a805c2 100644
--- a/src/java/org/apache/fop/render/pdf/ImageRawJPEGAdapter.java
+++ b/src/java/org/apache/fop/render/pdf/ImageRawJPEGAdapter.java
@@ -46,7 +46,7 @@ import org.apache.fop.pdf.PDFFilterList;
*/
public class ImageRawJPEGAdapter extends AbstractImageAdapter {
- private PDFFilter pdfFilter = null;
+ private PDFFilter pdfFilter;
/**
* Creates a new PDFImage from an Image instance.
diff --git a/src/java/org/apache/fop/render/pdf/ImageRenderedAdapter.java b/src/java/org/apache/fop/render/pdf/ImageRenderedAdapter.java
index 1b87958c2..f1e816233 100644
--- a/src/java/org/apache/fop/render/pdf/ImageRenderedAdapter.java
+++ b/src/java/org/apache/fop/render/pdf/ImageRenderedAdapter.java
@@ -52,7 +52,7 @@ public class ImageRenderedAdapter extends AbstractImageAdapter {
private ImageEncodingHelper encodingHelper;
- private PDFFilter pdfFilter = null;
+ private PDFFilter pdfFilter;
private String maskRef;
private PDFReference softMask;
diff --git a/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java b/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
index 3f75554fb..6558bddc2 100644
--- a/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
+++ b/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
@@ -281,7 +281,7 @@ public class PDFContentGenerator {
}
}
- private int ocNameIndex = 0;
+ private int ocNameIndex;
private void beginOptionalContent(String layerId) {
String name;
diff --git a/src/java/org/apache/fop/render/pdf/PDFRendererConfig.java b/src/java/org/apache/fop/render/pdf/PDFRendererConfig.java
index 5e87deb6b..f01cdb717 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRendererConfig.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRendererConfig.java
@@ -56,6 +56,7 @@ import static org.apache.fop.render.pdf.PDFEncryptionOption.OWNER_PASSWORD;
import static org.apache.fop.render.pdf.PDFEncryptionOption.USER_PASSWORD;
import static org.apache.fop.render.pdf.PDFRendererOption.DISABLE_SRGB_COLORSPACE;
import static org.apache.fop.render.pdf.PDFRendererOption.FILTER_LIST;
+import static org.apache.fop.render.pdf.PDFRendererOption.MERGE_FONTS;
import static org.apache.fop.render.pdf.PDFRendererOption.OUTPUT_PROFILE;
import static org.apache.fop.render.pdf.PDFRendererOption.PDF_A_MODE;
import static org.apache.fop.render.pdf.PDFRendererOption.PDF_X_MODE;
@@ -135,6 +136,7 @@ public final class PDFRendererConfig implements RendererConfig {
configureEncryptionParams(cfg, userAgent, strict);
parseAndPut(OUTPUT_PROFILE, cfg);
parseAndPut(DISABLE_SRGB_COLORSPACE, cfg);
+ parseAndPut(MERGE_FONTS, cfg);
parseAndPut(VERSION, cfg);
} catch (ConfigurationException e) {
diff --git a/src/java/org/apache/fop/render/pdf/PDFRendererOption.java b/src/java/org/apache/fop/render/pdf/PDFRendererOption.java
index 2ebd691fe..9c45f981d 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRendererOption.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRendererOption.java
@@ -66,6 +66,12 @@ public enum PDFRendererOption implements RendererConfigOption {
return Boolean.valueOf(value);
}
},
+ MERGE_FONTS("merge-fonts", false) {
+ @Override
+ Boolean deserialize(String value) {
+ return Boolean.valueOf(value);
+ }
+ },
/** Rendering Options key for the ICC profile for the output intent. */
OUTPUT_PROFILE("output-profile") {
@Override
diff --git a/src/java/org/apache/fop/render/pdf/PDFRendererOptionsConfig.java b/src/java/org/apache/fop/render/pdf/PDFRendererOptionsConfig.java
index 71102ecf0..3a1a24339 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRendererOptionsConfig.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRendererOptionsConfig.java
@@ -31,6 +31,7 @@ import org.apache.fop.pdf.Version;
import static org.apache.fop.render.pdf.PDFRendererOption.DISABLE_SRGB_COLORSPACE;
import static org.apache.fop.render.pdf.PDFRendererOption.FILTER_LIST;
+import static org.apache.fop.render.pdf.PDFRendererOption.MERGE_FONTS;
import static org.apache.fop.render.pdf.PDFRendererOption.OUTPUT_PROFILE;
import static org.apache.fop.render.pdf.PDFRendererOption.PDF_A_MODE;
import static org.apache.fop.render.pdf.PDFRendererOption.PDF_X_MODE;
@@ -120,4 +121,8 @@ public final class PDFRendererOptionsConfig {
public Version getPDFVersion() {
return (Version) properties.get(VERSION);
}
+
+ public Boolean getMergeFontsEnabled() {
+ return (Boolean)properties.get(MERGE_FONTS);
+ }
}
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java b/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
index 411916c74..ef4824c6a 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
@@ -581,6 +581,7 @@ class PDFRenderingUtil {
}
this.pdfDoc.enableAccessibility(userAgent.isAccessibilityEnabled());
+ pdfDoc.setMergeFontsEnabled(rendererConfig.getMergeFontsEnabled());
return this.pdfDoc;
}
diff --git a/src/java/org/apache/fop/render/pdf/extensions/AbstractPDFExtensionElement.java b/src/java/org/apache/fop/render/pdf/extensions/AbstractPDFExtensionElement.java
index b66fe4fad..15be455d4 100644
--- a/src/java/org/apache/fop/render/pdf/extensions/AbstractPDFExtensionElement.java
+++ b/src/java/org/apache/fop/render/pdf/extensions/AbstractPDFExtensionElement.java
@@ -22,8 +22,6 @@ package org.apache.fop.render.pdf.extensions;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.extensions.ExtensionAttachment;
-// CSOFF: LineLengthCheck
-
/**
* Base class for the PDF-specific extension elements.
*/
diff --git a/src/java/org/apache/fop/render/pdf/extensions/PDFElementMapping.java b/src/java/org/apache/fop/render/pdf/extensions/PDFElementMapping.java
index f0e838f78..5831b1f2a 100644
--- a/src/java/org/apache/fop/render/pdf/extensions/PDFElementMapping.java
+++ b/src/java/org/apache/fop/render/pdf/extensions/PDFElementMapping.java
@@ -22,8 +22,6 @@ package org.apache.fop.render.pdf.extensions;
import org.apache.fop.fo.ElementMapping;
import org.apache.fop.fo.FONode;
-// CSOFF: LineLengthCheck
-
/**
* This class provides the element mapping for the PDF-specific extensions.
*/
diff --git a/src/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachment.java b/src/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachment.java
index a62b35a4b..f00fc2635 100644
--- a/src/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachment.java
+++ b/src/java/org/apache/fop/render/pdf/extensions/PDFEmbeddedFileAttachment.java
@@ -43,13 +43,13 @@ public class PDFEmbeddedFileAttachment extends PDFExtensionAttachment {
private static final String ATT_DESC = "desc";
/** filename attribute */
- private String filename = null;
+ private String filename;
/** description attribute (optional) */
- private String desc = null;
+ private String desc;
/** source name attribute */
- private String src = null;
+ private String src;
/**
* No-argument contructor.
diff --git a/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionAttachment.java b/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionAttachment.java
index 9ac858309..0339f10a2 100644
--- a/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionAttachment.java
+++ b/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionAttachment.java
@@ -23,8 +23,6 @@ import org.apache.xmlgraphics.util.XMLizable;
import org.apache.fop.fo.extensions.ExtensionAttachment;
-// CSOFF: LineLengthCheck
-
public abstract class PDFExtensionAttachment implements ExtensionAttachment, XMLizable {
/** The category URI for this extension attachment. */
diff --git a/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java b/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java
index 700f056a6..fb0647fd5 100644
--- a/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java
+++ b/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java
@@ -32,8 +32,6 @@ import org.apache.commons.logging.LogFactory;
import org.apache.fop.util.ContentHandlerFactory;
import org.apache.fop.util.ContentHandlerFactory.ObjectBuiltListener;
-// CSOFF: LineLengthCheck
-
/**
* ContentHandler (parser) for restoring PDF extension objects from XML.
*/
@@ -170,7 +168,8 @@ public class PDFExtensionHandler extends DefaultHandler implements ContentHandle
} else if (dictionary.getDictionaryType() != PDFDictionaryType.Dictionary) {
this.returnedObject = new PDFDictionaryAttachment(dictionary);
} else {
- throw new SAXException(new IllegalStateException("generic dictionary not permitted at outer level"));
+ throw new SAXException(
+ new IllegalStateException("generic dictionary not permitted at outer level"));
}
} else {
throw new SAXException(new IllegalStateException("collections stack is empty or not a dictionary"));
diff --git a/src/java/org/apache/fop/render/print/PageableRenderer.java b/src/java/org/apache/fop/render/print/PageableRenderer.java
index 70a7f84a6..7f2f40956 100644
--- a/src/java/org/apache/fop/render/print/PageableRenderer.java
+++ b/src/java/org/apache/fop/render/print/PageableRenderer.java
@@ -61,7 +61,7 @@ public class PageableRenderer extends Java2DRenderer implements Pageable {
/** first valid page number (1-based) */
- protected int startNumber = 0;
+ protected int startNumber;
/** last valid page number (1-based) */
protected int endNumber = -1;
diff --git a/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java b/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java
index 96886910e..24a48d225 100644
--- a/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java
+++ b/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java
@@ -71,7 +71,7 @@ import org.apache.fop.svg.font.FOPFontFamilyResolverImpl;
public abstract class AbstractPSTranscoder extends AbstractFOPTranscoder {
/** the root Graphics2D instance for generating PostScript */
- protected AbstractPSDocumentGraphics2D graphics = null;
+ protected AbstractPSDocumentGraphics2D graphics;
private FontInfo fontInfo;
diff --git a/src/java/org/apache/fop/render/ps/NativeTextHandler.java b/src/java/org/apache/fop/render/ps/NativeTextHandler.java
index e8f123dc5..b9784d69c 100644
--- a/src/java/org/apache/fop/render/ps/NativeTextHandler.java
+++ b/src/java/org/apache/fop/render/ps/NativeTextHandler.java
@@ -47,7 +47,7 @@ public class NativeTextHandler implements PSTextHandler {
protected Font font;
/** Overriding FontState */
- protected Font overrideFont = null;
+ protected Font overrideFont;
/** the current (internal) font name */
protected String currentFontName;
diff --git a/src/java/org/apache/fop/render/ps/PSDocumentHandler.java b/src/java/org/apache/fop/render/ps/PSDocumentHandler.java
index 897ed8fb8..dcf968e03 100644
--- a/src/java/org/apache/fop/render/ps/PSDocumentHandler.java
+++ b/src/java/org/apache/fop/render/ps/PSDocumentHandler.java
@@ -89,7 +89,7 @@ public class PSDocumentHandler extends AbstractBinaryWritingIFDocumentHandler {
private static final TempResourceURIGenerator TEMP_URI_GENERATOR
= new TempResourceURIGenerator("ps-optimize");
- private int currentPageNumber = 0;
+ private int currentPageNumber;
private PageDefinition currentPageDefinition;
/** Is used to determine the document's bounding box */
diff --git a/src/java/org/apache/fop/render/ps/PSFontUtils.java b/src/java/org/apache/fop/render/ps/PSFontUtils.java
index 5bb723eea..b98919ca2 100644
--- a/src/java/org/apache/fop/render/ps/PSFontUtils.java
+++ b/src/java/org/apache/fop/render/ps/PSFontUtils.java
@@ -324,7 +324,7 @@ public class PSFontUtils extends org.apache.xmlgraphics.ps.PSFontUtils {
boolean embed = true;
if (font.getEmbeddingMode() == EmbeddingMode.SUBSET) {
Type1SubsetFile subset = new Type1SubsetFile();
- byte[] byteSubset = subset.createSubset(fontStream, font, "");
+ byte[] byteSubset = subset.createSubset(fontStream, font);
fontStream = new ByteArrayInputStream(byteSubset);
}
embedType1Font(gen, fontStream);
diff --git a/src/java/org/apache/fop/render/ps/PSPainter.java b/src/java/org/apache/fop/render/ps/PSPainter.java
index 547662c47..f3fa3cc79 100644
--- a/src/java/org/apache/fop/render/ps/PSPainter.java
+++ b/src/java/org/apache/fop/render/ps/PSPainter.java
@@ -70,7 +70,7 @@ public class PSPainter extends AbstractIFPainter<PSDocumentHandler> {
private BorderPainter borderPainter;
- private boolean inTextMode = false;
+ private boolean inTextMode;
/**
* Default constructor.
diff --git a/src/java/org/apache/fop/render/ps/PSRenderingUtil.java b/src/java/org/apache/fop/render/ps/PSRenderingUtil.java
index 4033c304f..47e46da02 100644
--- a/src/java/org/apache/fop/render/ps/PSRenderingUtil.java
+++ b/src/java/org/apache/fop/render/ps/PSRenderingUtil.java
@@ -46,7 +46,7 @@ public class PSRenderingUtil {
private FOUserAgent userAgent;
/** Whether or not the safe set page device macro will be used or not */
- private boolean safeSetPageDevice = false;
+ private boolean safeSetPageDevice;
/**
* Whether or not PostScript Document Structuring Conventions (DSC) compliant output are
@@ -54,11 +54,11 @@ public class PSRenderingUtil {
*/
private boolean dscCompliant = true;
- private boolean autoRotateLandscape = false;
+ private boolean autoRotateLandscape;
private int languageLevel = PSGenerator.DEFAULT_LANGUAGE_LEVEL;
/** Determines whether the PS file is generated in two passes to minimize file size */
- private boolean optimizeResources = false;
+ private boolean optimizeResources;
/**
* Determines whether the generated PostScript code is optimized for minimum file size
diff --git a/src/java/org/apache/fop/render/ps/PSTextPainter.java b/src/java/org/apache/fop/render/ps/PSTextPainter.java
index 44b7b08a3..189a6bd8f 100644
--- a/src/java/org/apache/fop/render/ps/PSTextPainter.java
+++ b/src/java/org/apache/fop/render/ps/PSTextPainter.java
@@ -259,8 +259,8 @@ public class PSTextPainter extends NativeTextPainter {
private AffineTransform textTransform;
private List<Point2D> relativePositions = new LinkedList<Point2D>();
private StringBuffer currentGlyphs = new StringBuffer();
- private int horizChanges = 0;
- private int vertChanges = 0;
+ private int horizChanges;
+ private int vertChanges;
public void reset() {
textTransform = null;
diff --git a/src/java/org/apache/fop/render/ps/extensions/PSSetPageDevice.java b/src/java/org/apache/fop/render/ps/extensions/PSSetPageDevice.java
index 8bdb2adc0..b463fc3d5 100644
--- a/src/java/org/apache/fop/render/ps/extensions/PSSetPageDevice.java
+++ b/src/java/org/apache/fop/render/ps/extensions/PSSetPageDevice.java
@@ -37,7 +37,7 @@ public class PSSetPageDevice extends PSExtensionAttachment {
/**
* name attribute
*/
- protected String name = null;
+ protected String name;
/**
* default constructor
diff --git a/src/java/org/apache/fop/render/ps/extensions/PSSetupCode.java b/src/java/org/apache/fop/render/ps/extensions/PSSetupCode.java
index e2236629c..f2d580582 100644
--- a/src/java/org/apache/fop/render/ps/extensions/PSSetupCode.java
+++ b/src/java/org/apache/fop/render/ps/extensions/PSSetupCode.java
@@ -37,7 +37,7 @@ public class PSSetupCode extends PSExtensionAttachment {
/**
* name attribute
*/
- protected String name = null;
+ protected String name;
/**
* No-argument contructor.
diff --git a/src/java/org/apache/fop/render/rtf/RTFHandler.java b/src/java/org/apache/fop/render/rtf/RTFHandler.java
index 2bb7befc1..eeb1aff06 100644
--- a/src/java/org/apache/fop/render/rtf/RTFHandler.java
+++ b/src/java/org/apache/fop/render/rtf/RTFHandler.java
@@ -141,13 +141,13 @@ public class RTFHandler extends FOEventHandler {
private RtfDocumentArea docArea;
private boolean bDefer; //true, if each called handler shall be
//processed at later time.
- private boolean bPrevHeaderSpecified = false; //true, if there has been a
+ private boolean bPrevHeaderSpecified; //true, if there has been a
//header in any page-sequence
- private boolean bPrevFooterSpecified = false; //true, if there has been a
+ private boolean bPrevFooterSpecified; //true, if there has been a
//footer in any page-sequence
- private boolean bHeaderSpecified = false; //true, if there is a header
+ private boolean bHeaderSpecified; //true, if there is a header
//in current page-sequence
- private boolean bFooterSpecified = false; //true, if there is a footer
+ private boolean bFooterSpecified; //true, if there is a footer
//in current page-sequence
private BuilderContext builderContext = new BuilderContext(null);
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java
index 146a8c19c..ce6212a59 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java
@@ -35,8 +35,8 @@ package org.apache.fop.render.rtf.rtflib.rtfdoc;
public final class ParagraphKeeptogetherContext {
- private static int paraKeepTogetherOpen = 0;
- private static boolean paraResetProperties = false;
+ private static int paraKeepTogetherOpen;
+ private static boolean paraResetProperties;
private ParagraphKeeptogetherContext() {
}
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java
index 5ab3ce26d..6fa84d44c 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfAttributes.java
@@ -185,7 +185,7 @@ public class RtfAttributes implements Cloneable {
return values.keySet().iterator();
}
- private Attributes xslAttributes = null;
+ private Attributes xslAttributes;
/**
* Added by Normand Masse
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmark.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmark.java
index 01f29c7ee..e82a50eca 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmark.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmark.java
@@ -42,7 +42,7 @@ public class RtfBookmark extends RtfElement {
//////////////////////////////////////////////////
/** Name of the bokkmark */
- private String bookmark = null;
+ private String bookmark;
/** Word 2000 supports a length of 40 characters only */
public static final int MAX_BOOKMARK_LENGTH = 40;
/** Word 2000 converts '.' in bookmarks to "_", thats why we control this replacement. */
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmarkContainerImpl.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmarkContainerImpl.java
index 7bbe65ef0..9733df1e7 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmarkContainerImpl.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfBookmarkContainerImpl.java
@@ -42,7 +42,7 @@ public class RtfBookmarkContainerImpl extends RtfContainer implements IRtfBookma
//////////////////////////////////////////////////
/** Rtf bookmark */
- private RtfBookmark mBookmark = null;
+ private RtfBookmark mBookmark;
//////////////////////////////////////////////////
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java
index 3ce0376d6..593b2583f 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java
@@ -53,14 +53,14 @@ public final class RtfColorTable {
//////////////////////////////////////////////////
/** Singelton instance */
- private static RtfColorTable instance = null;
+ private static RtfColorTable instance;
/** Index table for the colors */
- private Hashtable colorIndex = null;
+ private Hashtable colorIndex;
/** Used colors to this vector */
- private Vector colorTable = null;
+ private Vector colorTable;
/** Map of color names to color numbers */
- private Hashtable namedColors = null;
+ private Hashtable namedColors;
//////////////////////////////////////////////////
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExternalGraphic.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExternalGraphic.java
index 6540cfd72..040118eb5 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExternalGraphic.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExternalGraphic.java
@@ -226,7 +226,7 @@ public class RtfExternalGraphic extends RtfElement {
/**
* The url of the image
*/
- protected URL url = null;
+ protected URL url;
/**
* The height of the image (in pixels)
@@ -246,7 +246,7 @@ public class RtfExternalGraphic extends RtfElement {
/**
* Flag whether the desired height is a percentage
*/
- protected boolean perCentH = false;
+ protected boolean perCentH;
/**
* The width of the image (in pixels)
@@ -266,12 +266,12 @@ public class RtfExternalGraphic extends RtfElement {
/**
* Flag whether the desired width is a percentage
*/
- protected boolean perCentW = false;
+ protected boolean perCentW;
/**
* Flag whether the image size shall be adjusted
*/
- protected boolean scaleUniform = false;
+ protected boolean scaleUniform;
/** cropping on left/top/right/bottom edges for \piccrop*N */
private int[] cropValues = new int[4];
@@ -282,7 +282,7 @@ public class RtfExternalGraphic extends RtfElement {
protected int graphicCompressionRate = 80;
/** The image data */
- private byte[] imagedata = null;
+ private byte[] imagedata;
/** The image format */
private FormatBase imageformat;
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExtraRowSet.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExtraRowSet.java
index 14418432e..22a2a7462 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExtraRowSet.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfExtraRowSet.java
@@ -58,7 +58,7 @@ public class RtfExtraRowSet extends RtfContainer {
/** Parent table context
* (added by Boris Poudérous on july 2002 in order to process nested tables)
*/
- private ITableColumnsInfo parentITableColumnsInfo = null;
+ private ITableColumnsInfo parentITableColumnsInfo;
/** While a top-level RtfTableRow is being rendered, we build a list of
* RtfTableCells that must be rendered in extra rows.
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java
index ceade4ede..cd28a518c 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFile.java
@@ -50,7 +50,7 @@ extends RtfContainer {
private RtfDocumentArea docArea;
// private ConverterLogChannel m_log;
private RtfContainer listTableContainer;
- private int listNum = 0;
+ private int listNum;
/**
* Create an RTF file that outputs to the given Writer
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java
index d7a56f00e..0a48d9b37 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java
@@ -41,12 +41,12 @@ public final class RtfFontManager {
//////////////////////////////////////////////////
/** Singelton instance */
- private static RtfFontManager instance = null;
+ private static RtfFontManager instance;
/** Index table for the fonts */
- private Hashtable fontIndex = null;
+ private Hashtable fontIndex;
/** Used fonts to this vector */
- private Vector fontTable = null;
+ private Vector fontTable;
//////////////////////////////////////////////////
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFootnote.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFootnote.java
index 1f57ec846..47b6944b5 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFootnote.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFootnote.java
@@ -30,10 +30,10 @@ import java.io.Writer;
*/
public class RtfFootnote extends RtfContainer
implements IRtfTextrunContainer, IRtfListContainer {
- RtfTextrun textrunInline = null;
- RtfContainer body = null;
- RtfList list = null;
- boolean bBody = false;
+ RtfTextrun textrunInline;
+ RtfContainer body;
+ RtfList list;
+ boolean bBody;
/**
* Create an RTF list item as a child of given container with default attributes.
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfHyperLink.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfHyperLink.java
index 816e67f9b..58d93e45d 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfHyperLink.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfHyperLink.java
@@ -47,10 +47,10 @@ implements IRtfTextContainer,
//////////////////////////////////////////////////
/** The url of the image */
- protected String url = null;
+ protected String url;
/** RtfText */
- protected RtfText mText = null;
+ protected RtfText mText;
//////////////////////////////////////////////////
// @@ Construction
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfLeader.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfLeader.java
index f9835ef0a..66759e060 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfLeader.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfLeader.java
@@ -46,7 +46,7 @@ public class RtfLeader extends RtfContainer {
* \\ululdbwave Double wave underline.
*/
- private RtfAttributes attrs = null;
+ private RtfAttributes attrs;
/** Private attribute: tab style */
public static final String LEADER_TABLEAD = "tablead";
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java
index b7d01db00..a89159109 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java
@@ -42,8 +42,8 @@ public class RtfList extends RtfContainer {
private RtfListTable listTable;
private final boolean hasTableParent;
private RtfListStyle defaultListStyle;
- private Integer listTemplateId = null;
- private Integer listId = null;
+ private Integer listTemplateId;
+ private Integer listId;
private static Random listIdGenerator = new Random(0);
/** Create an RTF list as a child of given container with given attributes */
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java
index ac1c7e46b..209cbe102 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfListItem.java
@@ -43,7 +43,7 @@ public class RtfListItem extends RtfContainer
private RtfList parentList;
private RtfParagraph paragraph;
private RtfListStyle listStyle;
- private int number = 0;
+ private int number;
/**
* special RtfParagraph that writes list item setup code before its content
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java
index 96fa53d9c..6cd78f03b 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfPageNumberCitation.java
@@ -49,7 +49,7 @@ public class RtfPageNumberCitation extends RtfContainer {
public static final String RTF_FIELD_RESULT = "fldrslt";
// The 'id' of the referenced page
- private String id = null;
+ private String id;
/** Create an RTF page number citation as a child of given container with default attributes */
RtfPageNumberCitation(RtfContainer parent, Writer w, String id)
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java
index 30f573dd5..4b5554acf 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java
@@ -50,8 +50,8 @@ implements IRtfTextContainer, IRtfPageBreakContainer, IRtfHyperLinkContainer,
private RtfPageNumber pageNumber;
private RtfPageNumberCitation pageNumberCitation;
// Above line added by Boris POUDEROUS on 2002/07/09
- private boolean keepn = false;
- private boolean resetProperties = false;
+ private boolean keepn;
+ private boolean resetProperties;
/* needed for importing Rtf into FrameMaker
FrameMaker is not as forgiving as word in rtf
@@ -59,7 +59,7 @@ implements IRtfTextContainer, IRtfPageBreakContainer, IRtfHyperLinkContainer,
after a table. /pard is probably needed in other places
also, this is just a hack to make FrameMaker import Jfor rtf
correctly */
- private boolean writeForBreak = false;
+ private boolean writeForBreak;
/** Set of attributes that must be copied at the start of a paragraph */
private static final String[] PARA_ATTRIBUTES = {"intbl"};
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSpaceManager.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSpaceManager.java
index da55e54b0..e38a78c95 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSpaceManager.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfSpaceManager.java
@@ -40,7 +40,7 @@ public class RtfSpaceManager {
* inside, then the next block should has increased value of space-before
* property.
*/
- private int accumulatedSpace = 0;
+ private int accumulatedSpace;
/**
* Construct a newly allocated <code>RtfSpaceManager</code> object.
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfStyleSheetTable.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfStyleSheetTable.java
index 4d45c4859..d72f7ecb5 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfStyleSheetTable.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfStyleSheetTable.java
@@ -60,7 +60,7 @@ public final class RtfStyleSheetTable {
//////////////////////////////////////////////////
/** Singelton instance */
- private static RtfStyleSheetTable instance = null;
+ private static RtfStyleSheetTable instance;
//////////////////////////////////////////////////
@@ -69,13 +69,13 @@ public final class RtfStyleSheetTable {
/** Table of styles */
- private Hashtable styles = null;
+ private Hashtable styles;
/** Used, style attributes to this vector */
- private Hashtable attrTable = null;
+ private Hashtable attrTable;
/** Used, style names to this vector */
- private Vector nameTable = null;
+ private Vector nameTable;
/** Default style */
private String defaultStyleName = STANDARD_STYLE;
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTable.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTable.java
index ee9923d90..aecf30dce 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTable.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTable.java
@@ -39,16 +39,16 @@ import org.apache.fop.apps.FOPException;
public class RtfTable extends RtfContainer {
private RtfTableRow row;
- private int highestRow = 0;
- private Boolean isNestedTable = null;
- private RtfAttributes borderAttributes = null;
+ private int highestRow;
+ private Boolean isNestedTable;
+ private RtfAttributes borderAttributes;
/** Added by Boris Poudérous on 07/22/2002 in order to process
* number-columns-spanned attribute */
private ITableColumnsInfo tableContext;
/** Shows the table depth necessary for nested tables */
- private int nestedTableDepth = 0;
+ private int nestedTableDepth;
/** Create an RTF element as a child of given container */
RtfTable(IRtfTableContainer parent, Writer w, ITableColumnsInfo tc)
@@ -154,7 +154,7 @@ public class RtfTable extends RtfContainer {
return this.tableContext;
}
- private RtfAttributes headerAttribs = null;
+ private RtfAttributes headerAttribs;
/**
* Added by Normand Masse
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
index 8127d9a15..e37070905 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableCell.java
@@ -48,7 +48,7 @@ public class RtfTableCell
private boolean setCenter;
private boolean setRight;
private int id;
- private RtfParagraphBreak lastBreak = null;
+ private RtfParagraphBreak lastBreak;
private int lastBreakDepth = Integer.MIN_VALUE;
private static final String TABLE_CELL_PARAGRAPH = "cell";
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java
index e4f9cd9dc..5013e0958 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTableRow.java
@@ -44,7 +44,7 @@ public class RtfTableRow extends RtfContainer implements ITableAttributes {
private RtfTableCell cell;
// private RtfExtraRowSet extraRowSet;
private int id;
- private int highestCell = 0;
+ private int highestCell;
/** Create an RTF element as a child of given container */
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTemplate.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTemplate.java
index 98896d286..f3831da53 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTemplate.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTemplate.java
@@ -36,9 +36,9 @@ import java.io.IOException;
public final class RtfTemplate {
/** Singelton instance */
- private static RtfTemplate instance = null;
+ private static RtfTemplate instance;
- private String templateFilePath = null;
+ private String templateFilePath;
/**
* Constructor.
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java
index afa4416ed..b0391e7cc 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java
@@ -49,7 +49,7 @@ public class RtfTextrun extends RtfContainer {
/** Constant for a odd page break */
public static final int BREAK_ODD_PAGE = 4;
- private boolean bSuppressLastPar = false;
+ private boolean bSuppressLastPar;
private RtfListItem rtfListItem;
/**
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java b/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java
index 2d0444927..a1d76478c 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/tools/PercentContext.java
@@ -45,7 +45,7 @@ public class PercentContext implements PercentBaseContext {
private Map tableUnitMap = new java.util.HashMap();
/** Variable to check if a base width is set */
- private boolean baseWidthSet = false;
+ private boolean baseWidthSet;
/**
* Returns the available width for a specific FObj
diff --git a/src/java/org/apache/fop/render/rtf/rtflib/tools/TableContext.java b/src/java/org/apache/fop/render/rtf/rtflib/tools/TableContext.java
index 5fa53d750..85f1261f7 100644
--- a/src/java/org/apache/fop/render/rtf/rtflib/tools/TableContext.java
+++ b/src/java/org/apache/fop/render/rtf/rtflib/tools/TableContext.java
@@ -69,7 +69,7 @@ public class TableContext implements ITableColumnsInfo {
*/
private final List colFirstSpanningCol = new java.util.ArrayList();
- private boolean bNextRowBelongsToHeader = false;
+ private boolean bNextRowBelongsToHeader;
/**
*
diff --git a/src/java/org/apache/fop/render/txt/TXTRenderer.java b/src/java/org/apache/fop/render/txt/TXTRenderer.java
index 5b398711f..6f646f813 100644
--- a/src/java/org/apache/fop/render/txt/TXTRenderer.java
+++ b/src/java/org/apache/fop/render/txt/TXTRenderer.java
@@ -97,7 +97,7 @@ public class TXTRenderer extends AbstractPathOrientedRenderer {
private final String pageEnding = "\f";
/** Equals true, if current page is first. */
- private boolean firstPage = false;
+ private boolean firstPage;
/** Manager for storing border's information. */
private BorderManager bm;
diff --git a/src/java/org/apache/fop/render/txt/TXTStream.java b/src/java/org/apache/fop/render/txt/TXTStream.java
index a534d4108..44a237b34 100644
--- a/src/java/org/apache/fop/render/txt/TXTStream.java
+++ b/src/java/org/apache/fop/render/txt/TXTStream.java
@@ -29,7 +29,7 @@ public class TXTStream {
private static final String DEFAULT_ENCODING = "UTF-8";
- private OutputStream out = null;
+ private OutputStream out;
private boolean doOutput = true;
private String encoding = DEFAULT_ENCODING;
diff --git a/src/java/org/apache/fop/render/xml/XMLRenderer.java b/src/java/org/apache/fop/render/xml/XMLRenderer.java
index 68e2e3c62..d6da9d57d 100644
--- a/src/java/org/apache/fop/render/xml/XMLRenderer.java
+++ b/src/java/org/apache/fop/render/xml/XMLRenderer.java
@@ -112,8 +112,8 @@ public class XMLRenderer extends AbstractXMLRenderer {
/** XML MIME type */
public static final String XML_MIME_TYPE = MimeConstants.MIME_FOP_AREA_TREE;
- private boolean startedSequence = false;
- private boolean compactFormat = false;
+ private boolean startedSequence;
+ private boolean compactFormat;
/** If not null, the XMLRenderer will mimic another renderer by using its font setup. */
protected Renderer mimic;