Browse Source

findbugs-reported bug squashing; 959 bugs left (findbugs 1.3.9)

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1036179 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-1_1rc1old
Simon Pepping 13 years ago
parent
commit
cfa853d5b2
100 changed files with 316 additions and 208 deletions
  1. 1
    1
      checkstyle-5.1.xml
  2. 2
    2
      examples/embedding/java/embedding/ExampleFO2PDF.java
  3. 2
    2
      examples/embedding/java/embedding/MultipleFO2PDF.java
  4. 1
    1
      src/java/org/apache/fop/afp/AbstractAFPPainter.java
  5. 1
    1
      src/java/org/apache/fop/afp/modca/AbstractAFPObject.java
  6. 1
    1
      src/java/org/apache/fop/apps/PageSequenceResults.java
  7. 4
    1
      src/java/org/apache/fop/area/Area.java
  8. 1
    1
      src/java/org/apache/fop/area/AreaTreeModel.java
  9. 1
    1
      src/java/org/apache/fop/area/AreaTreeParser.java
  10. 3
    0
      src/java/org/apache/fop/area/BeforeFloat.java
  11. 3
    0
      src/java/org/apache/fop/area/Block.java
  12. 5
    0
      src/java/org/apache/fop/area/BlockParent.java
  13. 3
    0
      src/java/org/apache/fop/area/BlockViewport.java
  14. 3
    0
      src/java/org/apache/fop/area/BodyRegion.java
  15. 2
    0
      src/java/org/apache/fop/area/CTM.java
  16. 3
    0
      src/java/org/apache/fop/area/Footnote.java
  17. 5
    0
      src/java/org/apache/fop/area/LineArea.java
  18. 3
    0
      src/java/org/apache/fop/area/LinkResolver.java
  19. 2
    0
      src/java/org/apache/fop/area/MainReference.java
  20. 3
    0
      src/java/org/apache/fop/area/NormalFlow.java
  21. 3
    0
      src/java/org/apache/fop/area/Page.java
  22. 1
    1
      src/java/org/apache/fop/area/PageViewport.java
  23. 2
    1
      src/java/org/apache/fop/area/RegionReference.java
  24. 3
    0
      src/java/org/apache/fop/area/RegionViewport.java
  25. 3
    0
      src/java/org/apache/fop/area/Span.java
  26. 8
    0
      src/java/org/apache/fop/area/Trait.java
  27. 4
    0
      src/java/org/apache/fop/area/inline/AbstractTextArea.java
  28. 2
    0
      src/java/org/apache/fop/area/inline/Anchor.java
  29. 3
    0
      src/java/org/apache/fop/area/inline/Container.java
  30. 3
    0
      src/java/org/apache/fop/area/inline/FilledArea.java
  31. 3
    0
      src/java/org/apache/fop/area/inline/Image.java
  32. 5
    0
      src/java/org/apache/fop/area/inline/InlineArea.java
  33. 3
    0
      src/java/org/apache/fop/area/inline/InlineBlockParent.java
  34. 3
    0
      src/java/org/apache/fop/area/inline/InlineParent.java
  35. 3
    0
      src/java/org/apache/fop/area/inline/Leader.java
  36. 2
    0
      src/java/org/apache/fop/area/inline/Space.java
  37. 2
    0
      src/java/org/apache/fop/area/inline/SpaceArea.java
  38. 2
    0
      src/java/org/apache/fop/area/inline/TextArea.java
  39. 3
    0
      src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java
  40. 3
    0
      src/java/org/apache/fop/area/inline/Viewport.java
  41. 2
    0
      src/java/org/apache/fop/area/inline/WordArea.java
  42. 103
    103
      src/java/org/apache/fop/cli/CommandLineOptions.java
  43. 1
    1
      src/java/org/apache/fop/datatypes/LengthBase.java
  44. 1
    1
      src/java/org/apache/fop/fo/FONode.java
  45. 1
    1
      src/java/org/apache/fop/fo/FOText.java
  46. 2
    0
      src/java/org/apache/fop/fo/extensions/xmp/XMPMetadata.java
  47. 2
    2
      src/java/org/apache/fop/fo/properties/Property.java
  48. 1
    1
      src/java/org/apache/fop/fonts/FontInfo.java
  49. 1
    1
      src/java/org/apache/fop/fonts/FontInfoConfigurator.java
  50. 1
    1
      src/java/org/apache/fop/fonts/FontLoader.java
  51. 2
    2
      src/java/org/apache/fop/fonts/apps/PFMReader.java
  52. 1
    1
      src/java/org/apache/fop/fonts/substitute/FontSubstitutions.java
  53. 1
    1
      src/java/org/apache/fop/fonts/substitute/FontWeightRange.java
  54. 5
    5
      src/java/org/apache/fop/fonts/type1/PFMFile.java
  55. 2
    2
      src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
  56. 2
    0
      src/java/org/apache/fop/hyphenation/ByteVector.java
  57. 2
    0
      src/java/org/apache/fop/hyphenation/CharVector.java
  58. 2
    0
      src/java/org/apache/fop/hyphenation/Hyphen.java
  59. 1
    1
      src/java/org/apache/fop/hyphenation/Hyphenator.java
  60. 2
    0
      src/java/org/apache/fop/hyphenation/TernaryTree.java
  61. 3
    1
      src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
  62. 2
    0
      src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java
  63. 1
    1
      src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
  64. 2
    0
      src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java
  65. 1
    1
      src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java
  66. 1
    1
      src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java
  67. 1
    1
      src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
  68. 3
    0
      src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
  69. 1
    1
      src/java/org/apache/fop/pdf/PDFObject.java
  70. 1
    1
      src/java/org/apache/fop/render/AbstractConfigurator.java
  71. 1
    1
      src/java/org/apache/fop/render/AbstractGenericSVGHandler.java
  72. 1
    1
      src/java/org/apache/fop/render/AbstractRenderer.java
  73. 1
    1
      src/java/org/apache/fop/render/PrintRendererConfigurator.java
  74. 1
    1
      src/java/org/apache/fop/render/XMLHandler.java
  75. 1
    1
      src/java/org/apache/fop/render/XMLHandlerConfigurator.java
  76. 1
    1
      src/java/org/apache/fop/render/XMLHandlerRegistry.java
  77. 1
    1
      src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java
  78. 1
    1
      src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java
  79. 2
    0
      src/java/org/apache/fop/render/awt/viewer/PageChangeEvent.java
  80. 7
    3
      src/java/org/apache/fop/render/bitmap/TIFFRenderer.java
  81. 1
    1
      src/java/org/apache/fop/render/intermediate/IFParser.java
  82. 1
    1
      src/java/org/apache/fop/render/intermediate/IFRenderer.java
  83. 4
    4
      src/java/org/apache/fop/render/intermediate/IFSerializer.java
  84. 4
    4
      src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java
  85. 4
    4
      src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java
  86. 2
    2
      src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java
  87. 4
    4
      src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java
  88. 3
    3
      src/java/org/apache/fop/render/intermediate/extensions/URIAction.java
  89. 6
    6
      src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java
  90. 1
    1
      src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java
  91. 1
    1
      src/java/org/apache/fop/render/ps/PSFontUtils.java
  92. 1
    1
      src/java/org/apache/fop/render/ps/PSImageFormResource.java
  93. 1
    1
      src/java/org/apache/fop/render/ps/ResourceHandler.java
  94. 1
    1
      src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java
  95. 1
    1
      src/java/org/apache/fop/render/rtf/TextAttributesConverter.java
  96. 0
    13
      src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java
  97. 0
    2
      src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfJforCmd.java
  98. 2
    3
      src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java
  99. 1
    1
      src/java/org/apache/fop/render/xml/XMLXMLHandler.java
  100. 0
    0
      src/java/org/apache/fop/servlet/FopPrintServlet.java

+ 1
- 1
checkstyle-5.1.xml View File

@@ -96,7 +96,7 @@
<property name="severity" value="warning"/>
</module>
<module name="ConstantNameCheck">
<property name="format" value="^[A-Z](_?[A-Z0-9]+)*$"/>
<property name="format" value="^([A-Z](_?[A-Z0-9]+)*)|(log)$"/>
<property name="severity" value="warning"/>
</module>
<module name="LocalFinalVariableNameCheck">

+ 2
- 2
examples/embedding/java/embedding/ExampleFO2PDF.java View File

@@ -94,8 +94,8 @@ public class ExampleFO2PDF {
for (java.util.Iterator it = pageSequences.iterator(); it.hasNext();) {
PageSequenceResults pageSequenceResults = (PageSequenceResults)it.next();
System.out.println("PageSequence "
+ (String.valueOf(pageSequenceResults.getID()).length() > 0
? pageSequenceResults.getID() : "<no id>")
+ (String.valueOf(pageSequenceResults.getId()).length() > 0
? pageSequenceResults.getId() : "<no id>")
+ " generated " + pageSequenceResults.getPageCount() + " pages.");
}
System.out.println("Generated " + foResults.getPageCount() + " pages in total.");

+ 2
- 2
examples/embedding/java/embedding/MultipleFO2PDF.java View File

@@ -147,8 +147,8 @@ public class MultipleFO2PDF {
for (java.util.Iterator it = pageSequences.iterator(); it.hasNext();) {
PageSequenceResults pageSequenceResults = (PageSequenceResults)it.next();
System.out.println("PageSequence "
+ (String.valueOf(pageSequenceResults.getID()).length() > 0
? pageSequenceResults.getID() : "<no id>")
+ (String.valueOf(pageSequenceResults.getId()).length() > 0
? pageSequenceResults.getId() : "<no id>")
+ " generated " + pageSequenceResults.getPageCount() + " pages.");
}
System.out.println("Generated " + foResults.getPageCount() + " pages in total.");

+ 1
- 1
src/java/org/apache/fop/afp/AbstractAFPPainter.java View File

@@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory;
public abstract class AbstractAFPPainter {

/** Static logging instance */
protected static Log log = LogFactory.getLog("org.apache.xmlgraphics.afp");
protected static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp");

/** data stream */
protected final DataStream dataStream;

+ 1
- 1
src/java/org/apache/fop/afp/modca/AbstractAFPObject.java View File

@@ -45,7 +45,7 @@ public abstract class AbstractAFPObject implements Streamable {
protected static final byte SF_CLASS = (byte)0xD3;

/** the structure field header */
protected static final byte[] SF_HEADER = new byte[] {
static final byte[] SF_HEADER = new byte[] {
0x5A, // Structured field identifier
0x00, // Length byte 1
0x10, // Length byte 2

+ 1
- 1
src/java/org/apache/fop/apps/PageSequenceResults.java View File

@@ -44,7 +44,7 @@ public class PageSequenceResults {
*
* @return The ID
*/
public String getID() {
public String getId() {
return this.id;
}


+ 4
- 1
src/java/org/apache/fop/area/Area.java View File

@@ -38,6 +38,9 @@ import org.apache.fop.traits.BorderProps;
* Base object for all areas.
*/
public class Area extends AreaTreeObject implements Serializable {

private static final long serialVersionUID = 6342888466142626492L;

// stacking directions
/**
* Stacking left to right
@@ -134,7 +137,7 @@ public class Area extends AreaTreeObject implements Serializable {
/**
* logging instance
*/
protected static Log log = LogFactory.getLog(Area.class);
protected static final Log log = LogFactory.getLog(Area.class);


/**

+ 1
- 1
src/java/org/apache/fop/area/AreaTreeModel.java View File

@@ -42,7 +42,7 @@ public class AreaTreeModel {
protected PageSequence currentPageSequence;
// private List offDocumentItems = new java.util.ArrayList();
/** logger instance */
protected static Log log = LogFactory.getLog(AreaTreeModel.class);
protected static final Log log = LogFactory.getLog(AreaTreeModel.class);

/**
* Create a new store pages model

+ 1
- 1
src/java/org/apache/fop/area/AreaTreeParser.java View File

@@ -98,7 +98,7 @@ import org.apache.fop.util.XMLUtil;
public class AreaTreeParser {

/** Logger instance */
protected static Log log = LogFactory.getLog(AreaTreeParser.class);
protected static final Log log = LogFactory.getLog(AreaTreeParser.class);

private static SAXTransformerFactory tFactory
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();

+ 3
- 0
src/java/org/apache/fop/area/BeforeFloat.java View File

@@ -25,6 +25,9 @@ package org.apache.fop.area;
* See fo:region-body definition in the XSL Rec for more information.
*/
public class BeforeFloat extends BlockParent {

private static final long serialVersionUID = 4101415711488333380L;

// this is an optional block area that will be rendered
// as the separator only if there are float areas
private Block separator = null;

+ 3
- 0
src/java/org/apache/fop/area/Block.java View File

@@ -32,6 +32,9 @@ package org.apache.fop.area;
* It holds child block areas such as other blocks or lines.
*/
public class Block extends BlockParent {

private static final long serialVersionUID = 6843727817993665788L;

/**
* Normally stacked with other blocks.
*/

+ 5
- 0
src/java/org/apache/fop/area/BlockParent.java View File

@@ -27,6 +27,11 @@ import java.util.List;
*/
public class BlockParent extends Area {

/**
*
*/
private static final long serialVersionUID = 7076916890348533805L;

// this position is used for absolute position
// or as an indent
// this has the size in the block progression dimension

+ 3
- 0
src/java/org/apache/fop/area/BlockViewport.java View File

@@ -25,6 +25,9 @@ package org.apache.fop.area;
* The block-container creates this area.
*/
public class BlockViewport extends Block {

private static final long serialVersionUID = -7840580922580735157L;

// clipping for this viewport
private boolean clip = false;
// transform if rotated or absolute

+ 3
- 0
src/java/org/apache/fop/area/BodyRegion.java View File

@@ -30,6 +30,9 @@ import org.apache.fop.fo.pagination.RegionBody;
* See fo:region-body definition in the XSL Rec for more information.
*/
public class BodyRegion extends RegionReference {

private static final long serialVersionUID = -1848872997724078080L;

private BeforeFloat beforeFloat; // optional
private MainReference mainReference; // mandatory
private Footnote footnote; // optional

+ 2
- 0
src/java/org/apache/fop/area/CTM.java View File

@@ -34,6 +34,8 @@ import org.apache.fop.fo.Constants;
*/
public class CTM implements Serializable {

private static final long serialVersionUID = -8743287485623778341L;

private double a, b, c, d, e, f;

private static final CTM CTM_LRTB = new CTM(1, 0, 0, 1, 0, 0);

+ 3
- 0
src/java/org/apache/fop/area/Footnote.java View File

@@ -27,6 +27,9 @@ package org.apache.fop.area;
* See fo:region-body definition in the XSL Rec for more information.
*/
public class Footnote extends BlockParent {

private static final long serialVersionUID = -7907428219886367161L;

private Block separator = null;

// footnote has an optional separator

+ 5
- 0
src/java/org/apache/fop/area/LineArea.java View File

@@ -32,12 +32,17 @@ import java.util.List;
*/
public class LineArea extends Area {

private static final long serialVersionUID = 7670235908329290684L;

/**
* this class stores information about line width and potential adjustments
* that can be used in order to re-compute adjustement and / or indents when a
* page-number or a page-number-citation is resolved
*/
private final class LineAdjustingInfo implements Serializable {
private static final long serialVersionUID = -6103629976229458273L;

private int lineAlignment;
private int difference;
private int availableStretch;

+ 3
- 0
src/java/org/apache/fop/area/LinkResolver.java View File

@@ -33,6 +33,9 @@ import org.apache.fop.area.Area;
* Link resolving for resolving internal links.
*/
public class LinkResolver implements Resolvable, Serializable {

private static final long serialVersionUID = -7102134165192960718L;

private boolean resolved = false;
private String idRef;
private Area area;

+ 2
- 0
src/java/org/apache/fop/area/MainReference.java View File

@@ -31,6 +31,8 @@ import java.util.List;
*/
public class MainReference extends Area {

private static final long serialVersionUID = 7635126485620012448L;

private BodyRegion parent;
private List spanAreas = new java.util.ArrayList();
private boolean isEmpty = true;

+ 3
- 0
src/java/org/apache/fop/area/NormalFlow.java View File

@@ -25,6 +25,9 @@ package org.apache.fop.area;
* See fo:region-body definition in the XSL Rec for more information.
*/
public class NormalFlow extends BlockParent {

private static final long serialVersionUID = -3753538631016929004L;

/**
* Constructor.
* @param ipd of Normal flow object

+ 3
- 0
src/java/org/apache/fop/area/Page.java View File

@@ -47,6 +47,9 @@ import org.apache.fop.layoutmgr.TraitSetter;
* the top level page and regions.
*/
public class Page extends AreaTreeObject implements Serializable, Cloneable {

private static final long serialVersionUID = 6272157047421543866L;

// contains before, start, body, end and after regions
private RegionViewport regionBefore = null;
private RegionViewport regionStart = null;

+ 1
- 1
src/java/org/apache/fop/area/PageViewport.java View File

@@ -87,7 +87,7 @@ public class PageViewport extends AreaTreeObject implements Resolvable, Cloneabl
/**
* logging instance
*/
protected static Log log = LogFactory.getLog(PageViewport.class);
protected static final Log log = LogFactory.getLog(PageViewport.class);

/**
* Create a page viewport.

+ 2
- 1
src/java/org/apache/fop/area/RegionReference.java View File

@@ -31,13 +31,14 @@ import org.apache.fop.fo.pagination.Region;
*/
public class RegionReference extends Area implements Cloneable {

private static final long serialVersionUID = -298980963268244238L;

/** Reference to the region FO. */
//protected Region regionFO;
private int regionClass;
private String regionName;
private CTM ctm;


// the list of block areas from the static flow
private ArrayList blocks = new ArrayList();


+ 3
- 0
src/java/org/apache/fop/area/RegionViewport.java View File

@@ -30,6 +30,9 @@ import java.util.HashMap;
* in the fo:region-body description in the XSL Recommendation.
*/
public class RegionViewport extends Area implements Cloneable {

private static final long serialVersionUID = 505781815165102572L;

// this rectangle is relative to the page
private RegionReference regionReference;
private Rectangle2D viewArea;

+ 3
- 0
src/java/org/apache/fop/area/Span.java View File

@@ -30,6 +30,9 @@ import java.util.List;
* See fo:region-body definition in the XSL Rec for more information.
*/
public class Span extends Area {

private static final long serialVersionUID = -5551430053660081549L;

// the list of flow reference areas in this span area
private List flowAreas;
private int colCount;

+ 8
- 0
src/java/org/apache/fop/area/Trait.java View File

@@ -36,6 +36,8 @@ import org.apache.fop.util.ColorUtil;
*/
public final class Trait implements Serializable {

private static final long serialVersionUID = 3234280285391611437L;

private Trait() {
}

@@ -313,6 +315,8 @@ public final class Trait implements Serializable {
*/
public static class InternalLink implements Serializable {

private static final long serialVersionUID = -8993505060996723039L;

/** The unique key of the PageViewport. */
private String pvKey;

@@ -447,6 +451,8 @@ public final class Trait implements Serializable {
*/
public static class ExternalLink implements Serializable {

private static final long serialVersionUID = -3720707599232620946L;

private String destination;
private boolean newWindow;

@@ -520,6 +526,8 @@ public final class Trait implements Serializable {
*/
public static class Background implements Serializable {

private static final long serialVersionUID = 8452078676273242870L;

/** The background color if any. */
private Color color = null;


+ 4
- 0
src/java/org/apache/fop/area/inline/AbstractTextArea.java View File

@@ -24,6 +24,8 @@ package org.apache.fop.area.inline;
*/
public abstract class AbstractTextArea extends InlineParent {

private static final long serialVersionUID = -1246306443569094371L;

/**
* this class stores information about spaces and potential adjustments
* that can be used in order to re-compute adjustments when a
@@ -31,6 +33,8 @@ public abstract class AbstractTextArea extends InlineParent {
*/
protected class TextAdjustingInfo extends InlineAdjustingInfo {

private static final long serialVersionUID = -2412095162983479947L;

/** difference between the optimal width of a space
* and the default width of a space according to the font
* (this is equivalent to the property word-spacing.optimum)

+ 2
- 0
src/java/org/apache/fop/area/inline/Anchor.java View File

@@ -25,6 +25,8 @@ package org.apache.fop.area.inline;
*/
public class Anchor extends InlineArea {

private static final long serialVersionUID = 5227798744787823499L;

// has a keep with adjacent area
// has reference to associated footnote or float out-of-line area


+ 3
- 0
src/java/org/apache/fop/area/inline/Container.java View File

@@ -32,6 +32,9 @@ import java.util.ArrayList;
* This allows an inline area to have blocks as children.
*/
public class Container extends Area {

private static final long serialVersionUID = 5256423939348189260L;

/**
* The list of block areas stacked inside this container
*/

+ 3
- 0
src/java/org/apache/fop/area/inline/FilledArea.java View File

@@ -34,6 +34,9 @@ import java.util.Iterator;
* this as a normal inline parent.
*/
public class FilledArea extends InlineParent {

private static final long serialVersionUID = 8586584705587017474L;

private int unitWidth;

/**

+ 3
- 0
src/java/org/apache/fop/area/inline/Image.java View File

@@ -27,6 +27,9 @@ import org.apache.fop.area.Area;
* The url of the image is used as a key to reference the image cache.
*/
public class Image extends Area {

private static final long serialVersionUID = 4800834714349695386L;

private String url;
/**

+ 5
- 0
src/java/org/apache/fop/area/inline/InlineArea.java View File

@@ -32,12 +32,17 @@ import org.apache.fop.area.Trait;
*/
public class InlineArea extends Area {

private static final long serialVersionUID = -8940066479810170980L;

/**
* this class stores information about potential adjustments
* that can be used in order to re-compute adjustments when a
* page-number or a page-number-citation is resolved
*/
protected class InlineAdjustingInfo implements Serializable {

private static final long serialVersionUID = -5601387735459712149L;

/** stretch of the inline area */
protected int availableStretch;
/** shrink of the inline area */

+ 3
- 0
src/java/org/apache/fop/area/inline/InlineBlockParent.java View File

@@ -29,6 +29,9 @@ import org.apache.fop.area.Block;
*/
public class InlineBlockParent extends InlineArea {


private static final long serialVersionUID = -3661746143321407377L;

/**
* The list of inline areas added to this inline parent.
*/

+ 3
- 0
src/java/org/apache/fop/area/inline/InlineParent.java View File

@@ -29,6 +29,9 @@ import java.util.ArrayList;
* This is an inline area that can have other inlines as children.
*/
public class InlineParent extends InlineArea {

private static final long serialVersionUID = -3047168298770354813L;

/**
* The list of inline areas added to this inline parent.
*/

+ 3
- 0
src/java/org/apache/fop/area/inline/Leader.java View File

@@ -32,6 +32,9 @@ public class Leader extends InlineArea {
// if space replaced with a space
// otherwise this is a holder for a line


private static final long serialVersionUID = -8011373048313956301L;

private int ruleStyle = Constants.EN_SOLID;
private int ruleThickness = 1000;


+ 2
- 0
src/java/org/apache/fop/area/inline/Space.java View File

@@ -25,4 +25,6 @@ package org.apache.fop.area.inline;
*/
public class Space extends InlineArea {

private static final long serialVersionUID = -8748265505356839796L;

}

+ 2
- 0
src/java/org/apache/fop/area/inline/SpaceArea.java View File

@@ -24,6 +24,8 @@ package org.apache.fop.area.inline;
*/
public class SpaceArea extends InlineArea {

private static final long serialVersionUID = 2218803009825411416L;

/**
* The space for this space area
*/

+ 2
- 0
src/java/org/apache/fop/area/inline/TextArea.java View File

@@ -24,6 +24,8 @@ package org.apache.fop.area.inline;
*/
public class TextArea extends AbstractTextArea {

private static final long serialVersionUID = 7315900267242540809L;

/**
* Create a text inline area
*/

+ 3
- 0
src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java View File

@@ -32,6 +32,9 @@ import java.util.List;
*/
public class UnresolvedPageNumber extends TextArea implements Resolvable {


private static final long serialVersionUID = -1758090835371647980L;

private boolean resolved = false;
private String pageIDRef;
private String text;

+ 3
- 0
src/java/org/apache/fop/area/inline/Viewport.java View File

@@ -32,6 +32,9 @@ import java.util.HashMap;
* holds the area and positions it.
*/
public class Viewport extends InlineArea {

private static final long serialVersionUID = 813338534627918689L;

// contents could be container, foreign object or image
private Area content;
// clipping for the viewport

+ 2
- 0
src/java/org/apache/fop/area/inline/WordArea.java View File

@@ -24,6 +24,8 @@ package org.apache.fop.area.inline;
*/
public class WordArea extends InlineArea {

private static final long serialVersionUID = 6444644662158970942L;

/** The text for this word area */
protected String word;


+ 103
- 103
src/java/org/apache/fop/cli/CommandLineOptions.java View File

@@ -89,23 +89,23 @@ public class CommandLineOptions {
/* user configuration file */
private File userConfigFile = null;
/* input fo file */
private File fofile = null;
private File foFile = null;
/* xsltfile (xslt transformation as input) */
private File xsltfile = null;
private File xsltFile = null;
/* xml file (xslt transformation as input) */
private File xmlfile = null;
private File xmlFile = null;
/* area tree input file */
private File areatreefile = null;
private File areatreeFile = null;
/* intermediate format input file */
private File iffile = null;
private File ifFile = null;
/* area tree input file */
private File imagefile = null;
private File imageFile = null;
/* output file */
private File outfile = null;
private File outFile = null;
/* input mode */
private int inputmode = NOT_SET;
private int inputMode = NOT_SET;
/* output mode */
private String outputmode = null;
private String outputMode = null;
/* true if System.in (stdin) should be used for the input file */
private boolean useStdIn = false;
/* true if System.out (stdout) should be used for the output file */
@@ -194,7 +194,7 @@ public class CommandLineOptions {

inputHandler = createInputHandler();

if (MimeConstants.MIME_FOP_AWT_PREVIEW.equals(outputmode)) {
if (MimeConstants.MIME_FOP_AWT_PREVIEW.equals(outputMode)) {
//set the system look&feel for the preview dialog
try {
UIManager.setLookAndFeel(
@@ -207,7 +207,7 @@ public class CommandLineOptions {
renderer.setRenderable(inputHandler); //set before user agent!
renderer.setUserAgent(foUserAgent);
foUserAgent.setRendererOverride(renderer);
} else if (MimeConstants.MIME_FOP_AREA_TREE.equals(outputmode)
} else if (MimeConstants.MIME_FOP_AREA_TREE.equals(outputMode)
&& mimicRenderer != null) {
// render from FO to Intermediate Format
Renderer targetRenderer = foUserAgent.getRendererFactory().createRenderer(
@@ -220,7 +220,7 @@ public class CommandLineOptions {

//Make sure the prepared XMLRenderer is used
foUserAgent.setRendererOverride(xmlRenderer);
} else if (MimeConstants.MIME_FOP_IF.equals(outputmode)
} else if (MimeConstants.MIME_FOP_IF.equals(outputMode)
&& mimicRenderer != null) {
// render from FO to Intermediate Format
IFSerializer serializer = new IFSerializer();
@@ -447,7 +447,7 @@ public class CommandLineOptions {
if (isSystemInOutFile(filename)) {
this.useStdIn = true;
} else {
fofile = new File(filename);
foFile = new File(filename);
}
return 1;
}
@@ -460,7 +460,7 @@ public class CommandLineOptions {
throw new FOPException("you must specify the stylesheet "
+ "file for the '-xsl' option");
} else {
xsltfile = new File(args[i + 1]);
xsltFile = new File(args[i + 1]);
return 1;
}
}
@@ -476,7 +476,7 @@ public class CommandLineOptions {
if (isSystemInOutFile(filename)) {
this.useStdIn = true;
} else {
xmlfile = new File(filename);
xmlFile = new File(filename);
}
return 1;
}
@@ -508,7 +508,7 @@ public class CommandLineOptions {
if (isSystemInOutFile(filename)) {
this.useStdOut = true;
} else {
outfile = new File(filename);
outFile = new File(filename);
}
}

@@ -701,16 +701,16 @@ public class CommandLineOptions {
}

private int parseUnknownOption(String[] args, int i) throws FOPException {
if (inputmode == NOT_SET) {
inputmode = FO_INPUT;
if (inputMode == NOT_SET) {
inputMode = FO_INPUT;
String filename = args[i];
if (isSystemInOutFile(filename)) {
this.useStdIn = true;
} else {
fofile = new File(filename);
foFile = new File(filename);
}
} else if (outputmode == null) {
outputmode = MimeConstants.MIME_PDF;
} else if (outputMode == null) {
outputMode = MimeConstants.MIME_PDF;
setOutputFile(args[i]);
} else {
throw new FOPException("Don't know what to do with "
@@ -765,7 +765,7 @@ public class CommandLineOptions {
if (isSystemInOutFile(filename)) {
this.useStdIn = true;
} else {
areatreefile = new File(filename);
areatreeFile = new File(filename);
}
return 1;
}
@@ -781,7 +781,7 @@ public class CommandLineOptions {
if (isSystemInOutFile(filename)) {
this.useStdIn = true;
} else {
iffile = new File(filename);
ifFile = new File(filename);
}
return 1;
}
@@ -797,7 +797,7 @@ public class CommandLineOptions {
if (isSystemInOutFile(filename)) {
this.useStdIn = true;
} else {
imagefile = new File(filename);
imageFile = new File(filename);
}
return 1;
}
@@ -867,8 +867,8 @@ public class CommandLineOptions {
}

private void setOutputMode(String mime) throws FOPException {
if (outputmode == null) {
outputmode = mime;
if (outputMode == null) {
outputMode = mime;
} else {
throw new FOPException("you can only set one output method");
}
@@ -896,8 +896,8 @@ public class CommandLineOptions {
}

private void setInputFormat(int format) throws FOPException {
if (inputmode == NOT_SET || inputmode == format) {
inputmode = format;
if (inputMode == NOT_SET || inputMode == format) {
inputMode = format;
} else {
throw new FOPException("Only one input mode can be specified!");
}
@@ -907,100 +907,100 @@ public class CommandLineOptions {
* checks whether all necessary information has been given in a consistent way
*/
private void checkSettings() throws FOPException, FileNotFoundException {
if (inputmode == NOT_SET) {
if (inputMode == NOT_SET) {
throw new FOPException("No input file specified");
}

if (outputmode == null) {
if (outputMode == null) {
throw new FOPException("No output file specified");
}

if ((outputmode.equals(MimeConstants.MIME_FOP_AWT_PREVIEW)
|| outputmode.equals(MimeConstants.MIME_FOP_PRINT))
&& outfile != null) {
if ((outputMode.equals(MimeConstants.MIME_FOP_AWT_PREVIEW)
|| outputMode.equals(MimeConstants.MIME_FOP_PRINT))
&& outFile != null) {
throw new FOPException("Output file may not be specified "
+ "for AWT or PRINT output");
}

if (inputmode == XSLT_INPUT) {
if (inputMode == XSLT_INPUT) {
// check whether xml *and* xslt file have been set
if (xmlfile == null && !this.useStdIn) {
if (xmlFile == null && !this.useStdIn) {
throw new FOPException("XML file must be specified for the transform mode");
}
if (xsltfile == null) {
if (xsltFile == null) {
throw new FOPException("XSLT file must be specified for the transform mode");
}

// warning if fofile has been set in xslt mode
if (fofile != null) {
if (foFile != null) {
log.warn("Can't use fo file with transform mode! Ignoring.\n"
+ "Your input is " + "\n xmlfile: "
+ xmlfile.getAbsolutePath()
+ xmlFile.getAbsolutePath()
+ "\nxsltfile: "
+ xsltfile.getAbsolutePath()
+ xsltFile.getAbsolutePath()
+ "\n fofile: "
+ fofile.getAbsolutePath());
+ foFile.getAbsolutePath());
}
if (xmlfile != null && !xmlfile.exists()) {
if (xmlFile != null && !xmlFile.exists()) {
throw new FileNotFoundException("Error: xml file "
+ xmlfile.getAbsolutePath()
+ xmlFile.getAbsolutePath()
+ " not found ");
}
if (!xsltfile.exists()) {
if (!xsltFile.exists()) {
throw new FileNotFoundException("Error: xsl file "
+ xsltfile.getAbsolutePath()
+ xsltFile.getAbsolutePath()
+ " not found ");
}

} else if (inputmode == FO_INPUT) {
if (outputmode.equals(MimeConstants.MIME_XSL_FO)) {
} else if (inputMode == FO_INPUT) {
if (outputMode.equals(MimeConstants.MIME_XSL_FO)) {
throw new FOPException(
"FO output mode is only available if you use -xml and -xsl");
}
if (fofile != null && !fofile.exists()) {
if (foFile != null && !foFile.exists()) {
throw new FileNotFoundException("Error: fo file "
+ fofile.getAbsolutePath()
+ foFile.getAbsolutePath()
+ " not found ");
}
} else if (inputmode == AREATREE_INPUT) {
if (outputmode.equals(MimeConstants.MIME_XSL_FO)) {
} else if (inputMode == AREATREE_INPUT) {
if (outputMode.equals(MimeConstants.MIME_XSL_FO)) {
throw new FOPException(
"FO output mode is only available if you use -xml and -xsl");
} else if (outputmode.equals(MimeConstants.MIME_FOP_AREA_TREE)) {
} else if (outputMode.equals(MimeConstants.MIME_FOP_AREA_TREE)) {
throw new FOPException(
"Area Tree Output is not available if Area Tree is used as input!");
}
if (areatreefile != null && !areatreefile.exists()) {
if (areatreeFile != null && !areatreeFile.exists()) {
throw new FileNotFoundException("Error: area tree file "
+ areatreefile.getAbsolutePath()
+ areatreeFile.getAbsolutePath()
+ " not found ");
}
} else if (inputmode == IF_INPUT) {
if (outputmode.equals(MimeConstants.MIME_XSL_FO)) {
} else if (inputMode == IF_INPUT) {
if (outputMode.equals(MimeConstants.MIME_XSL_FO)) {
throw new FOPException(
"FO output mode is only available if you use -xml and -xsl");
} else if (outputmode.equals(MimeConstants.MIME_FOP_AREA_TREE)) {
} else if (outputMode.equals(MimeConstants.MIME_FOP_AREA_TREE)) {
throw new FOPException(
"Area Tree Output is not available if Intermediate Format"
+ " is used as input!");
} else if (outputmode.equals(MimeConstants.MIME_FOP_IF)) {
} else if (outputMode.equals(MimeConstants.MIME_FOP_IF)) {
throw new FOPException(
"Intermediate Output is not available if Intermediate Format"
+ " is used as input!");
}
if (iffile != null && !iffile.exists()) {
if (ifFile != null && !ifFile.exists()) {
throw new FileNotFoundException("Error: intermediate format file "
+ iffile.getAbsolutePath()
+ ifFile.getAbsolutePath()
+ " not found ");
}
} else if (inputmode == IMAGE_INPUT) {
if (outputmode.equals(MimeConstants.MIME_XSL_FO)) {
} else if (inputMode == IMAGE_INPUT) {
if (outputMode.equals(MimeConstants.MIME_XSL_FO)) {
throw new FOPException(
"FO output mode is only available if you use -xml and -xsl");
}
if (imagefile != null && !imagefile.exists()) {
if (imageFile != null && !imageFile.exists()) {
throw new FileNotFoundException("Error: image file "
+ imagefile.getAbsolutePath()
+ imageFile.getAbsolutePath()
+ " not found ");
}
}
@@ -1027,13 +1027,13 @@ public class CommandLineOptions {
* @throws FOPException for invalid output formats
*/
protected String getOutputFormat() throws FOPException {
if (outputmode == null) {
if (outputMode == null) {
throw new FOPException("Renderer has not been set!");
}
if (outputmode.equals(MimeConstants.MIME_FOP_AREA_TREE)) {
if (outputMode.equals(MimeConstants.MIME_FOP_AREA_TREE)) {
renderingOptions.put("fineDetail", isCoarseAreaXml());
}
return outputmode;
return outputMode;
}

/**
@@ -1042,21 +1042,21 @@ public class CommandLineOptions {
* @throws IllegalArgumentException if invalid/missing parameters
*/
private InputHandler createInputHandler() {
switch (inputmode) {
switch (inputMode) {
case FO_INPUT:
return new InputHandler(fofile);
return new InputHandler(foFile);
case AREATREE_INPUT:
return new AreaTreeInputHandler(areatreefile);
return new AreaTreeInputHandler(areatreeFile);
case IF_INPUT:
return new IFInputHandler(iffile);
return new IFInputHandler(ifFile);
case XSLT_INPUT:
InputHandler handler = new InputHandler(xmlfile, xsltfile, xsltParams);
InputHandler handler = new InputHandler(xmlFile, xsltFile, xsltParams);
if (useCatalogResolver) {
handler.createCatalogResolver(foUserAgent);
}
return handler;
case IMAGE_INPUT:
return new ImageInputHandler(imagefile, xsltfile, xsltParams);
return new ImageInputHandler(imageFile, xsltFile, xsltParams);
default:
throw new IllegalArgumentException("Error creating InputHandler object.");
}
@@ -1074,24 +1074,24 @@ public class CommandLineOptions {
* Returns the XSL-FO file if set.
* @return the XSL-FO file, null if not set
*/
public File getFOFile() {
return fofile;
public File getFoFile() {
return foFile;
}

/**
* Returns the input XML file if set.
* @return the input XML file, null if not set
*/
public File getXMLFile() {
return xmlfile;
public File getXmlFile() {
return xmlFile;
}

/**
* Returns the stylesheet to be used for transformation to XSL-FO.
* @return stylesheet
*/
public File getXSLFile() {
return xsltfile;
public File getXslFile() {
return xsltFile;
}

/**
@@ -1099,7 +1099,7 @@ public class CommandLineOptions {
* @return the output file
*/
public File getOutputFile() {
return outfile;
return outFile;
}

/**
@@ -1139,13 +1139,13 @@ public class CommandLineOptions {
* @return either the fofile or the xmlfile
*/
public File getInputFile() {
switch (inputmode) {
switch (inputMode) {
case FO_INPUT:
return fofile;
return foFile;
case XSLT_INPUT:
return xmlfile;
return xmlFile;
default:
return fofile;
return foFile;
}
}

@@ -1270,7 +1270,7 @@ public class CommandLineOptions {
*/
private void dumpConfiguration() {
log.info("Input mode: ");
switch (inputmode) {
switch (inputMode) {
case NOT_SET:
log.info("not set");
break;
@@ -1279,7 +1279,7 @@ public class CommandLineOptions {
if (isInputFromStdIn()) {
log.info("fo input file: from stdin");
} else {
log.info("fo input file: " + fofile.toString());
log.info("fo input file: " + foFile.toString());
}
break;
case XSLT_INPUT:
@@ -1287,16 +1287,16 @@ public class CommandLineOptions {
if (isInputFromStdIn()) {
log.info("xml input file: from stdin");
} else {
log.info("xml input file: " + xmlfile.toString());
log.info("xml input file: " + xmlFile.toString());
}
log.info("xslt stylesheet: " + xsltfile.toString());
log.info("xslt stylesheet: " + xsltFile.toString());
break;
case AREATREE_INPUT:
log.info("AT ");
if (isInputFromStdIn()) {
log.info("area tree input file: from stdin");
} else {
log.info("area tree input file: " + areatreefile.toString());
log.info("area tree input file: " + areatreeFile.toString());
}
break;
case IF_INPUT:
@@ -1304,7 +1304,7 @@ public class CommandLineOptions {
if (isInputFromStdIn()) {
log.info("intermediate input file: from stdin");
} else {
log.info("intermediate input file: " + iffile.toString());
log.info("intermediate input file: " + ifFile.toString());
}
break;
case IMAGE_INPUT:
@@ -1312,28 +1312,28 @@ public class CommandLineOptions {
if (isInputFromStdIn()) {
log.info("image input file: from stdin");
} else {
log.info("image input file: " + imagefile.toString());
log.info("image input file: " + imageFile.toString());
}
break;
default:
log.info("unknown input type");
}
log.info("Output mode: ");
if (outputmode == null) {
if (outputMode == null) {
log.info("not set");
} else if (MimeConstants.MIME_FOP_AWT_PREVIEW.equals(outputmode)) {
} else if (MimeConstants.MIME_FOP_AWT_PREVIEW.equals(outputMode)) {
log.info("awt on screen");
if (outfile != null) {
if (outFile != null) {
log.error("awt mode, but outfile is set:");
log.error("out file: " + outfile.toString());
log.error("out file: " + outFile.toString());
}
} else if (MimeConstants.MIME_FOP_PRINT.equals(outputmode)) {
} else if (MimeConstants.MIME_FOP_PRINT.equals(outputMode)) {
log.info("print directly");
if (outfile != null) {
if (outFile != null) {
log.error("print mode, but outfile is set:");
log.error("out file: " + outfile.toString());
log.error("out file: " + outFile.toString());
}
} else if (MimeConstants.MIME_FOP_AREA_TREE.equals(outputmode)) {
} else if (MimeConstants.MIME_FOP_AREA_TREE.equals(outputMode)) {
log.info("area tree");
if (mimicRenderer != null) {
log.info("mimic renderer: " + mimicRenderer);
@@ -1341,17 +1341,17 @@ public class CommandLineOptions {
if (isOutputToStdOut()) {
log.info("output file: to stdout");
} else {
log.info("output file: " + outfile.toString());
log.info("output file: " + outFile.toString());
}
} else if (MimeConstants.MIME_FOP_IF.equals(outputmode)) {
} else if (MimeConstants.MIME_FOP_IF.equals(outputMode)) {
log.info("intermediate format");
log.info("output file: " + outfile.toString());
log.info("output file: " + outFile.toString());
} else {
log.info(outputmode);
log.info(outputMode);
if (isOutputToStdOut()) {
log.info("output file: to stdout");
} else {
log.info("output file: " + outfile.toString());
log.info("output file: " + outFile.toString());
}
}


+ 1
- 1
src/java/org/apache/fop/datatypes/LengthBase.java View File

@@ -62,7 +62,7 @@ public class LengthBase implements PercentBase {
/**
* logging instance
*/
protected static Log log = LogFactory.getLog(LengthBase.class);
protected static final Log log = LogFactory.getLog(LengthBase.class);

/**
* The FO for which this property is to be calculated.

+ 1
- 1
src/java/org/apache/fop/fo/FONode.java View File

@@ -69,7 +69,7 @@ public abstract class FONode implements Cloneable {
protected Locator locator;

/** Logger for fo-tree related messages **/
protected static Log log = LogFactory.getLog(FONode.class);
protected static final Log log = LogFactory.getLog(FONode.class);

/**
* Base constructor

+ 1
- 1
src/java/org/apache/fop/fo/FOText.java View File

@@ -619,7 +619,7 @@ public class FOText extends FONode implements CharSequence {
}

/** @return the baseline-shift property */
public Length getBaseLineShift() {
public Length getBaselineShift() {
return baselineShift;
}


+ 2
- 0
src/java/org/apache/fop/fo/extensions/xmp/XMPMetadata.java View File

@@ -33,6 +33,8 @@ import org.xml.sax.SAXException;
*/
public class XMPMetadata implements ExtensionAttachment, Serializable, XMLizable {

private static final long serialVersionUID = 591347206217931578L;

/** The category URI for this extension attachment. */
public static final String CATEGORY = XMPConstants.XMP_NAMESPACE;


+ 2
- 2
src/java/org/apache/fop/fo/properties/Property.java View File

@@ -36,7 +36,7 @@ import org.apache.fop.fo.Constants;
public class Property {

/** Logger for all property classes */
protected static Log log = LogFactory.getLog(PropertyMaker.class);
protected static final Log log = LogFactory.getLog(PropertyMaker.class);

/**
* The original specified value for properties which inherit
@@ -197,6 +197,6 @@ public class Property {
if (obj != this) {
return obj.toString();
}
return null;
return "";
}
}

+ 1
- 1
src/java/org/apache/fop/fonts/FontInfo.java View File

@@ -41,7 +41,7 @@ import org.apache.commons.logging.LogFactory;
public class FontInfo {

/** logging instance */
protected static Log log = LogFactory.getLog(FontInfo.class);
protected static final Log log = LogFactory.getLog(FontInfo.class);

/** Map containing fonts that have been used */
private Map/*<String,FontMetrics>*/ usedFonts = null; //(String = font key)

+ 1
- 1
src/java/org/apache/fop/fonts/FontInfoConfigurator.java View File

@@ -44,7 +44,7 @@ import org.apache.fop.util.LogUtil;
*/
public class FontInfoConfigurator {
/** logger instance */
protected static Log log = LogFactory.getLog(FontInfoConfigurator.class);
protected static final Log log = LogFactory.getLog(FontInfoConfigurator.class);

private Configuration cfg;
private FontManager fontManager;

+ 1
- 1
src/java/org/apache/fop/fonts/FontLoader.java View File

@@ -40,7 +40,7 @@ import org.apache.fop.fonts.type1.Type1FontLoader;
public abstract class FontLoader {

/** logging instance */
protected static Log log = LogFactory.getLog(FontLoader.class);
protected static final Log log = LogFactory.getLog(FontLoader.class);

/** URI representing the font file */
protected String fontFileURI = null;

+ 2
- 2
src/java/org/apache/fop/fonts/apps/PFMReader.java View File

@@ -173,7 +173,7 @@ public class PFMReader extends AbstractFontReader {
public void preview(PFMFile pfm) {
if (log != null && log.isInfoEnabled()) {
log.info("Font: " + pfm.getWindowsName());
log.info("Name: " + pfm.getPostscriptName());
log.info("Name: " + pfm.getPostScriptName());
log.info("CharSet: " + pfm.getCharSetName());
log.info("CapHeight: " + pfm.getCapHeight());
log.info("XHeight: " + pfm.getXHeight());
@@ -217,7 +217,7 @@ public class PFMReader extends AbstractFontReader {

Element el = doc.createElement("font-name");
root.appendChild(el);
el.appendChild(doc.createTextNode(pfm.getPostscriptName()));
el.appendChild(doc.createTextNode(pfm.getPostScriptName()));

// Currently unused.
// String s = pfm.getPostscriptName();

+ 1
- 1
src/java/org/apache/fop/fonts/substitute/FontSubstitutions.java View File

@@ -35,7 +35,7 @@ public class FontSubstitutions extends java.util.ArrayList/*<Substitutions>*/ {
private static final long serialVersionUID = -9173104935431899722L;

/** logging instance */
protected static Log log = LogFactory.getLog(FontSubstitutions.class);
protected static final Log log = LogFactory.getLog(FontSubstitutions.class);

/**
* Adjusts a given fontInfo using this font substitution catalog

+ 1
- 1
src/java/org/apache/fop/fonts/substitute/FontWeightRange.java View File

@@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory;
public class FontWeightRange {

/** logging instance */
protected static Log log = LogFactory.getLog("org.apache.fop.render.fonts");
protected static final Log log = LogFactory.getLog("org.apache.fop.render.fonts");

/**
* Returns an <code>FontWeightRange</code> object holding the

+ 5
- 5
src/java/org/apache/fop/fonts/type1/PFMFile.java View File

@@ -38,7 +38,7 @@ public class PFMFile {

// Header stuff
private String windowsName;
private String postscriptName;
private String postScriptName;
private short dfItalic;
private int dfWeight;
private short dfCharSet;
@@ -164,7 +164,7 @@ public class PFMFile {

inStream.reset();
inStream.skip(driverInfoOffset);
postscriptName = inStream.readString();
postScriptName = inStream.readString();

if (extMetricsOffset != 0) {
inStream.reset();
@@ -279,8 +279,8 @@ public class PFMFile {
*
* @return The Postscript name.
*/
public String getPostscriptName() {
return postscriptName;
public String getPostScriptName() {
return postScriptName;
}

/**
@@ -304,7 +304,7 @@ public class PFMFile {
case 0:
return "WinAnsi"; // AKA ISOAdobe
case 2:
if ("Symbol".equals(getPostscriptName())) {
if ("Symbol".equals(getPostScriptName())) {
return "Symbol";
}
break;

+ 2
- 2
src/java/org/apache/fop/fonts/type1/Type1FontLoader.java View File

@@ -226,8 +226,8 @@ public class Type1FontLoader extends FontLoader {
names.add(afm.getFamilyName());
returnFont.setFamilyNames(names);
} else {
returnFont.setFontName(pfm.getPostscriptName());
String fullName = pfm.getPostscriptName();
returnFont.setFontName(pfm.getPostScriptName());
String fullName = pfm.getPostScriptName();
fullName = fullName.replace('-', ' '); //Hack! Try to emulate full name
returnFont.setFullName(fullName); //emulate afm.getFullName()
Set names = new java.util.HashSet();

+ 2
- 0
src/java/org/apache/fop/hyphenation/ByteVector.java View File

@@ -29,6 +29,8 @@ import java.io.Serializable;
*/
public class ByteVector implements Serializable {

private static final long serialVersionUID = 1554572867863466772L;

/**
* Capacity increment size
*/

+ 2
- 0
src/java/org/apache/fop/hyphenation/CharVector.java View File

@@ -29,6 +29,8 @@ import java.io.Serializable;
*/
public class CharVector implements Cloneable, Serializable {

private static final long serialVersionUID = 4263472982169004048L;

/**
* Capacity increment size
*/

+ 2
- 0
src/java/org/apache/fop/hyphenation/Hyphen.java View File

@@ -39,6 +39,8 @@ import java.io.Serializable;
*/
public class Hyphen implements Serializable {

private static final long serialVersionUID = 8989909741110279085L;

/** pre break string */
public String preBreak; // CSOK: VisibilityModifier


+ 1
- 1
src/java/org/apache/fop/hyphenation/Hyphenator.java View File

@@ -43,7 +43,7 @@ import org.xml.sax.InputSource;
public final class Hyphenator {

/** logging instance */
protected static Log log = LogFactory.getLog(Hyphenator.class);
protected static final Log log = LogFactory.getLog(Hyphenator.class);

private static HyphenationTreeCache hTreeCache = null;


+ 2
- 0
src/java/org/apache/fop/hyphenation/TernaryTree.java View File

@@ -75,6 +75,8 @@ public class TernaryTree implements Cloneable, Serializable {
* if it ain't broken, don't fix it.
*/

private static final long serialVersionUID = 3175412271203716160L;

/**
* Pointer to low branch and to rest of the key when it is
* stored directly in this node, we don't have unions in java!

+ 3
- 1
src/java/org/apache/fop/layoutmgr/AbstractBreaker.java View File

@@ -40,7 +40,7 @@ import org.apache.fop.util.ListUtil;
public abstract class AbstractBreaker {

/** logging instance */
protected static Log log = LogFactory.getLog(AbstractBreaker.class);
protected static final Log log = LogFactory.getLog(AbstractBreaker.class);

/**
* A page break position.
@@ -93,6 +93,8 @@ public abstract class AbstractBreaker {
*/
public class BlockSequence extends BlockKnuthSequence {

private static final long serialVersionUID = -5348831120146774118L;

/** Number of elements to ignore at the beginning of the list. */
int ignoreAtStart = 0; // CSOK: VisibilityModifier
/** Number of elements to ignore at the end of the list. */

+ 2
- 0
src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java View File

@@ -27,6 +27,8 @@ import java.util.List;
*/
public class BlockKnuthSequence extends KnuthSequence {

private static final long serialVersionUID = 1648962416582509095L;

private boolean isClosed = false;

/**

+ 1
- 1
src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java View File

@@ -42,7 +42,7 @@ import org.apache.fop.fo.Constants;
public abstract class BreakingAlgorithm {

/** the logger for the class */
protected static Log log = LogFactory.getLog(BreakingAlgorithm.class);
protected static final Log log = LogFactory.getLog(BreakingAlgorithm.class);

/** Maximum adjustment ration */
protected static final int INFINITE_RATIO = 1000;

+ 2
- 0
src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java View File

@@ -32,6 +32,8 @@ import org.apache.fop.layoutmgr.inline.KnuthInlineBox;
*/
public class InlineKnuthSequence extends KnuthSequence {

private static final long serialVersionUID = 1354774188859946549L;

private boolean isClosed = false;

/**

+ 1
- 1
src/java/org/apache/fop/layoutmgr/UnresolvedListElementWithLength.java View File

@@ -30,7 +30,7 @@ import org.apache.fop.traits.MinOptMax;
public abstract class UnresolvedListElementWithLength extends UnresolvedListElement {

/** Logger instance */
protected static Log log = LogFactory.getLog(UnresolvedListElementWithLength.class);
protected static final Log log = LogFactory.getLog(UnresolvedListElementWithLength.class);

private MinOptMax length;
private boolean conditional;

+ 1
- 1
src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java View File

@@ -37,7 +37,7 @@ import org.apache.fop.fo.properties.LengthRangeProperty;
public class ImageLayout implements Constants {

/** logging instance */
protected static Log log = LogFactory.getLog(ImageLayout.class);
protected static final Log log = LogFactory.getLog(ImageLayout.class);

//Input
private GraphicsProperties props;

+ 1
- 1
src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java View File

@@ -56,7 +56,7 @@ public abstract class LeafNodeLayoutManager extends AbstractLayoutManager
/**
* logging instance
*/
protected static Log log = LogFactory.getLog(LeafNodeLayoutManager.class);
protected static final Log log = LogFactory.getLog(LeafNodeLayoutManager.class);

/**
* The inline area that this leafnode will add.

+ 3
- 0
src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java View File

@@ -184,6 +184,9 @@ public class LineLayoutManager extends InlineStackingLayoutManager

// this class represents a paragraph
private class Paragraph extends InlineKnuthSequence {

private static final long serialVersionUID = 5862072380375189105L;

/** Number of elements to ignore at the beginning of the list. */
private int ignoreAtStart = 0;
/** Number of elements to ignore at the end of the list. */

+ 1
- 1
src/java/org/apache/fop/pdf/PDFObject.java View File

@@ -42,7 +42,7 @@ import org.apache.commons.logging.LogFactory;
public abstract class PDFObject implements PDFWritable {

/** logger for all PDFObjects (and descendants) */
protected static Log log = LogFactory.getLog(PDFObject.class.getName());
protected static final Log log = LogFactory.getLog(PDFObject.class.getName());

/**
* the object's number

+ 1
- 1
src/java/org/apache/fop/render/AbstractConfigurator.java View File

@@ -30,7 +30,7 @@ import org.apache.fop.apps.FOUserAgent;
*/
public abstract class AbstractConfigurator {
/** logger instance */
protected static Log log = LogFactory.getLog(AbstractConfigurator.class);
protected static final Log log = LogFactory.getLog(AbstractConfigurator.class);

private static final String MIME = "mime";

+ 1
- 1
src/java/org/apache/fop/render/AbstractGenericSVGHandler.java View File

@@ -178,7 +178,7 @@ public abstract class AbstractGenericSVGHandler implements XMLHandler, RendererC
}

/** {@inheritDoc} */
public String getNamespace() {
public String getNameSpace() {
return SVGDOMImplementation.SVG_NAMESPACE_URI;
}


+ 1
- 1
src/java/org/apache/fop/render/AbstractRenderer.java View File

@@ -79,7 +79,7 @@ public abstract class AbstractRenderer
implements Renderer, Constants {

/** logging instance */
protected static Log log = LogFactory.getLog("org.apache.fop.render");
protected static final Log log = LogFactory.getLog("org.apache.fop.render");

/**
* user agent

+ 1
- 1
src/java/org/apache/fop/render/PrintRendererConfigurator.java View File

@@ -48,7 +48,7 @@ public class PrintRendererConfigurator extends AbstractRendererConfigurator
implements RendererConfigurator, IFDocumentHandlerConfigurator {

/** logger instance */
protected static Log log = LogFactory.getLog(PrintRendererConfigurator.class);
protected static final Log log = LogFactory.getLog(PrintRendererConfigurator.class);

/**
* Default constructor

+ 1
- 1
src/java/org/apache/fop/render/XMLHandler.java View File

@@ -60,6 +60,6 @@ public interface XMLHandler {
* @return the XML namespace for the XML dialect this XMLHandler supports,
* null if all XML content is handled by this instance.
*/
String getNamespace();
String getNameSpace();
}


+ 1
- 1
src/java/org/apache/fop/render/XMLHandlerConfigurator.java View File

@@ -32,7 +32,7 @@ import org.apache.fop.apps.FOUserAgent;
public class XMLHandlerConfigurator extends AbstractRendererConfigurator {

/** logger instance */
protected static Log log = LogFactory.getLog(XMLHandlerConfigurator.class);
protected static final Log log = LogFactory.getLog(XMLHandlerConfigurator.class);

/**
* Default constructor

+ 1
- 1
src/java/org/apache/fop/render/XMLHandlerRegistry.java View File

@@ -85,7 +85,7 @@ public class XMLHandlerRegistry {
* @param handler the XMLHandler instance
*/
public void addXMLHandler(XMLHandler handler) {
String ns = handler.getNamespace();
String ns = handler.getNameSpace();
if (ns == null) {
setDefaultXMLHandler(handler);
} else {

+ 1
- 1
src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java View File

@@ -124,7 +124,7 @@ public class AFPRendererImageInfo {
*
* @return the uri
*/
public String getURI() {
public String getUri() {
return this.uri;
}


+ 1
- 1
src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java View File

@@ -41,7 +41,7 @@ public class AFPExtensionHandler extends DefaultHandler
implements ContentHandlerFactory.ObjectSource {

/** Logger instance */
protected static Log log = LogFactory.getLog(AFPExtensionHandler.class);
protected static final Log log = LogFactory.getLog(AFPExtensionHandler.class);

private StringBuffer content = new StringBuffer();
private Attributes lastAttributes;

+ 2
- 0
src/java/org/apache/fop/render/awt/viewer/PageChangeEvent.java View File

@@ -27,6 +27,8 @@ import java.util.EventObject;
*/
public class PageChangeEvent extends EventObject {

private static final long serialVersionUID = -5969283475959932887L;

private int oldPage;
private int newPage;


+ 7
- 3
src/java/org/apache/fop/render/bitmap/TIFFRenderer.java View File

@@ -31,6 +31,7 @@ import java.awt.image.SinglePixelPackedSampleModel;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Iterator;
import java.util.NoSuchElementException;

import org.apache.commons.logging.Log;

@@ -133,7 +134,11 @@ public class TIFFRenderer extends Java2DRenderer implements TIFFConstants {
multiWriter.close();
}
} else {
writer.writeImage((RenderedImage) pageImagesItr.next(), outputStream, writerParams);
RenderedImage renderedImage = null;
if (pageImagesItr.hasNext()) {
renderedImage = (RenderedImage) pageImagesItr.next();
}
writer.writeImage(renderedImage, outputStream, writerParams);
if (pageImagesItr.hasNext()) {
BitmapRendererEventProducer eventProducer
= BitmapRendererEventProducer.Provider.get(
@@ -186,8 +191,7 @@ public class TIFFRenderer extends Java2DRenderer implements TIFFConstants {
try {
pageImage = getPageImage(current++);
} catch (FOPException e) {
log.error(e);
return null;
throw new NoSuchElementException(e.getMessage());
}

if (COMPRESSION_CCITT_T4.equalsIgnoreCase(writerParams.getCompressionMethod())

+ 1
- 1
src/java/org/apache/fop/render/intermediate/IFParser.java View File

@@ -71,7 +71,7 @@ import org.apache.fop.util.XMLUtil;
public class IFParser implements IFConstants {

/** Logger instance */
protected static Log log = LogFactory.getLog(IFParser.class);
protected static final Log log = LogFactory.getLog(IFParser.class);

private static SAXTransformerFactory tFactory
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();

+ 1
- 1
src/java/org/apache/fop/render/intermediate/IFRenderer.java View File

@@ -110,7 +110,7 @@ public class IFRenderer extends AbstractPathOrientedRenderer {
//if optimizations can be done to avoid int->float->int conversions.

/** logging instance */
protected static Log log = LogFactory.getLog(IFRenderer.class);
protected static final Log log = LogFactory.getLog(IFRenderer.class);

/** XML MIME type */
public static final String IF_MIME_TYPE = MimeConstants.MIME_FOP_IF;

+ 4
- 4
src/java/org/apache/fop/render/intermediate/IFSerializer.java View File

@@ -668,8 +668,8 @@ public class IFSerializer extends AbstractXMLWritingIFDocumentHandler
throw new NullPointerException("action must not be null");
}
if (!action.isComplete()) {
assert action.hasID();
incompleteActions.put(action.getID(), action);
assert action.hasId();
incompleteActions.put(action.getId(), action);
}
}

@@ -744,8 +744,8 @@ public class IFSerializer extends AbstractXMLWritingIFDocumentHandler
/** {@inheritDoc} */
public void addResolvedAction(AbstractAction action) throws IFException {
assert action.isComplete();
assert action.hasID();
AbstractAction noted = (AbstractAction)incompleteActions.remove(action.getID());
assert action.hasId();
AbstractAction noted = (AbstractAction)incompleteActions.remove(action.getId());
if (noted != null) {
completeActions.add(action);
} else {

+ 4
- 4
src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java View File

@@ -33,7 +33,7 @@ public abstract class AbstractAction implements XMLizable {
* Sets an ID to make the action referencable.
* @param id the ID
*/
public void setID(String id) {
public void setId(String id) {
this.id = id;
}

@@ -41,7 +41,7 @@ public abstract class AbstractAction implements XMLizable {
* Returns an optional ID for this action.
* @return the ID or null
*/
public String getID() {
public String getId() {
return this.id;
}

@@ -65,7 +65,7 @@ public abstract class AbstractAction implements XMLizable {
* Indicates whether the action has an ID and is therefore referencable.
* @return true if the action has an ID
*/
public boolean hasID() {
public boolean hasId() {
return this.id != null;
}

@@ -90,7 +90,7 @@ public abstract class AbstractAction implements XMLizable {
* Returns a string that is used to prefix a generated ID to make it unique.
* @return the prefix string
*/
public String getIDPrefix() {
public String getIdPrefix() {
return null;
}


+ 4
- 4
src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java View File

@@ -39,7 +39,7 @@ public class ActionSet {
*/
public synchronized String generateNewID(AbstractAction action) {
this.lastGeneratedID++;
String prefix = action.getIDPrefix();
String prefix = action.getIdPrefix();
if (prefix == null) {
throw new IllegalArgumentException("Action class is not compatible");
}
@@ -62,12 +62,12 @@ public class ActionSet {
* @return the action instance that should be used in place of the given one
*/
public AbstractAction put(AbstractAction action) {
if (!action.hasID()) {
action.setID(generateNewID(action));
if (!action.hasId()) {
action.setId(generateNewID(action));
}
AbstractAction effAction = normalize(action);
if (effAction == action) {
this.actionRegistry.put(action.getID(), action);
this.actionRegistry.put(action.getId(), action);
}
return effAction;
}

+ 2
- 2
src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java View File

@@ -41,7 +41,7 @@ public class DocumentNavigationHandler extends DefaultHandler
implements DocumentNavigationExtensionConstants {

/** Logger instance */
protected static Log log = LogFactory.getLog(DocumentNavigationHandler.class);
protected static final Log log = LogFactory.getLog(DocumentNavigationHandler.class);

private StringBuffer content = new StringBuffer();
private Stack objectStack = new Stack();
@@ -132,7 +132,7 @@ public class DocumentNavigationHandler extends DefaultHandler
boolean newWindow = "new".equals(showDestination);
URIAction action = new URIAction(gotoURI, newWindow);
if (id != null) {
action.setID(id);
action.setId(id);
}
if (structurePointer != null) {
action.setStructurePointer(structurePointer);

+ 4
- 4
src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java View File

@@ -52,7 +52,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx
* or null, if the position isn't known, yet
*/
public GoToXYAction(String id, int pageIndex, Point targetLocation) {
setID(id);
setId(id);
if (pageIndex < 0 && targetLocation != null) {
throw new IllegalArgumentException(
"Page index may not be null if target location is known!");
@@ -144,7 +144,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx
AttributesImpl atts = new AttributesImpl();
if (this.isCompleteExceptTargetLocation()) {
final Point reportedTargetLocation = this.getTargetLocation();
atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getID());
atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getId());
atts.addAttribute(null, "page-index", "page-index",
XMLUtil.CDATA, Integer.toString(pageIndex));
atts.addAttribute(null, "x", "x", XMLUtil.CDATA,
@@ -152,7 +152,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx
atts.addAttribute(null, "y", "y", XMLUtil.CDATA,
Integer.toString(reportedTargetLocation.y));
} else {
atts.addAttribute(null, "idref", "idref", XMLUtil.CDATA, getID());
atts.addAttribute(null, "idref", "idref", XMLUtil.CDATA, getId());
}
handler.startElement(GOTO_XY.getNamespaceURI(),
GOTO_XY.getLocalName(), GOTO_XY.getQName(), atts);
@@ -162,7 +162,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx

/** {@inheritDoc} */
public String toString() {
return "GoToXY: ID=" + getID()
return "GoToXY: ID=" + getId()
+ ", page=" + getPageIndex()
+ ", loc=" + getTargetLocation() + ", "
+ (isComplete() ? "complete" : "INCOMPLETE");

+ 3
- 3
src/java/org/apache/fop/render/intermediate/extensions/URIAction.java View File

@@ -82,15 +82,15 @@ public class URIAction extends AbstractAction implements DocumentNavigationExten
}

/** {@inheritDoc} */
public String getIDPrefix() {
public String getIdPrefix() {
return "fop-" + GOTO_URI.getLocalName();
}

/** {@inheritDoc} */
public void toSAX(ContentHandler handler) throws SAXException {
AttributesImpl atts = new AttributesImpl();
if (hasID()) {
atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getID());
if (hasId()) {
atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getId());
}
atts.addAttribute(null, "uri", "uri", XMLUtil.CDATA, getURI());
if (isNewWindow()) {

+ 6
- 6
src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java View File

@@ -129,7 +129,7 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler
/** {@inheritDoc} */
public void addResolvedAction(AbstractAction action) throws IFException {
assert action.isComplete();
PDFAction pdfAction = (PDFAction)this.incompleteActions.remove(action.getID());
PDFAction pdfAction = (PDFAction)this.incompleteActions.remove(action.getId());
if (pdfAction == null) {
getAction(action);
} else if (pdfAction instanceof PDFGoTo) {
@@ -145,11 +145,11 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler
if (action == null) {
return null;
}
PDFAction pdfAction = (PDFAction)this.completeActions.get(action.getID());
PDFAction pdfAction = (PDFAction)this.completeActions.get(action.getId());
if (pdfAction != null) {
return pdfAction;
} else if (action instanceof GoToXYAction) {
pdfAction = (PDFAction) incompleteActions.get(action.getID());
pdfAction = (PDFAction) incompleteActions.get(action.getId());
if (pdfAction != null) {
return pdfAction;
} else {
@@ -159,7 +159,7 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler
if (action.isComplete()) {
updateTargetLocation(pdfGoTo, a);
} else {
this.incompleteActions.put(action.getID(), pdfGoTo);
this.incompleteActions.put(action.getId(), pdfGoTo);
}
return pdfGoTo;
}
@@ -173,7 +173,7 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler
//Some PDF actions are pooled
getPDFDoc().registerObject(pdfAction);
}
this.completeActions.put(action.getID(), pdfAction);
this.completeActions.put(action.getId(), pdfAction);
return pdfAction;
} else {
throw new UnsupportedOperationException("Unsupported action type: "
@@ -195,7 +195,7 @@ public class PDFDocumentNavigationHandler implements IFDocumentNavigationHandler

//Queue this object now that it's complete
getPDFDoc().addObject(pdfGoTo);
this.completeActions.put(action.getID(), pdfGoTo);
this.completeActions.put(action.getId(), pdfGoTo);
}

}

+ 1
- 1
src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java View File

@@ -37,7 +37,7 @@ public class PDFExtensionHandler extends DefaultHandler
implements ContentHandlerFactory.ObjectSource {

/** Logger instance */
protected static Log log = LogFactory.getLog(PDFExtensionHandler.class);
protected static final Log log = LogFactory.getLog(PDFExtensionHandler.class);

private Attributes lastAttributes;


+ 1
- 1
src/java/org/apache/fop/render/ps/PSFontUtils.java View File

@@ -54,7 +54,7 @@ import org.apache.fop.fonts.Typeface;
public class PSFontUtils extends org.apache.xmlgraphics.ps.PSFontUtils {

/** logging instance */
protected static Log log = LogFactory.getLog(PSFontUtils.class);
protected static final Log log = LogFactory.getLog(PSFontUtils.class);

/**
* Generates the PostScript code for the font dictionary. This method should only be

+ 1
- 1
src/java/org/apache/fop/render/ps/PSImageFormResource.java View File

@@ -53,7 +53,7 @@ public class PSImageFormResource extends PSResource {
* Returns the image URI.
* @return the image URI
*/
public String getImageURI() {
public String getImageUri() {
return this.uri;
}


+ 1
- 1
src/java/org/apache/fop/render/ps/ResourceHandler.java View File

@@ -281,7 +281,7 @@ public class ResourceHandler implements DSCParserConstants, PSSupportedFlavors {

private void generateFormForImage(PSGenerator gen, PSImageFormResource form)
throws IOException {
final String uri = form.getImageURI();
final String uri = form.getImageUri();

ImageManager manager = userAgent.getFactory().getImageManager();
ImageInfo info = null;

+ 1
- 1
src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java View File

@@ -37,7 +37,7 @@ public class PSExtensionHandler extends DefaultHandler
implements ContentHandlerFactory.ObjectSource {

/** Logger instance */
protected static Log log = LogFactory.getLog(PSExtensionHandler.class);
protected static final Log log = LogFactory.getLog(PSExtensionHandler.class);

private StringBuffer content = new StringBuffer();
private Attributes lastAttributes;

+ 1
- 1
src/java/org/apache/fop/render/rtf/TextAttributesConverter.java View File

@@ -149,7 +149,7 @@ final class TextAttributesConverter {
attrFont(fobj.getCommonFont(), attrib);
attrFontColor(fobj.getColor(), attrib);
attrTextDecoration(fobj.getTextDecoration(), attrib);
attrBaseLineShift(fobj.getBaseLineShift(), attrib);
attrBaseLineShift(fobj.getBaselineShift(), attrib);
return attrib;
}


+ 0
- 13
src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/ParagraphKeeptogetherContext.java View File

@@ -37,23 +37,10 @@ public final class ParagraphKeeptogetherContext {

private static int paraKeepTogetherOpen = 0;
private static boolean paraResetProperties = false;
private static ParagraphKeeptogetherContext instance = null;

private ParagraphKeeptogetherContext() {
}

/**
* Singelton.
*
* @return The instance of ParagraphKeeptogetherContext
*/
public static ParagraphKeeptogetherContext getInstance() {
if (instance == null) {
instance = new ParagraphKeeptogetherContext();
}
return instance;
}

/**
* @return the level of current "keep whith next" paragraph
*/

+ 0
- 2
src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfJforCmd.java View File

@@ -39,14 +39,12 @@ public class RtfJforCmd extends RtfContainer {
private static final String PARA_KEEP_OFF = "para-keep:off";

private final RtfAttributes attrib;
private ParagraphKeeptogetherContext paragraphKeeptogetherContext;



RtfJforCmd(RtfContainer parent, Writer w, RtfAttributes attrs) throws IOException {
super((RtfContainer)parent, w);
attrib = attrs;
paragraphKeeptogetherContext = ParagraphKeeptogetherContext.getInstance();
}



+ 2
- 3
src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTextrun.java View File

@@ -54,7 +54,7 @@ public class RtfTextrun extends RtfContainer {
/**
* logging instance
*/
protected static Log log = LogFactory.getLog(RtfTextrun.class);
protected static final Log log = LogFactory.getLog(RtfTextrun.class);

/** Manager for handling space-* property. */
private RtfSpaceManager rtfSpaceManager = new RtfSpaceManager();
@@ -271,7 +271,6 @@ public class RtfTextrun extends RtfContainer {
//add RtfSpaceSplitter to inherit accumulated space
rtfSpaceManager.pushRtfSpaceSplitter(attrs);
rtfSpaceManager.setCandidate(attrs);
RtfString r = new RtfString(this, writer, s);
rtfSpaceManager.popRtfSpaceSplitter();
}

@@ -301,7 +300,7 @@ public class RtfTextrun extends RtfContainer {
ListIterator lit = children.listIterator(children.size());
while (lit.hasPrevious()
&& (lit.previous() instanceof RtfCloseGroupMark)) {
tmp.push(new Integer(((RtfCloseGroupMark)lit.next()).getBreakType()));
tmp.push(Integer.valueOf(((RtfCloseGroupMark)lit.next()).getBreakType()));
lit.remove();
deletedCloseGroupCount++;
}

+ 1
- 1
src/java/org/apache/fop/render/xml/XMLXMLHandler.java View File

@@ -48,7 +48,7 @@ public class XMLXMLHandler implements XMLHandler {
}

/** {@inheritDoc} */
public String getNamespace() {
public String getNameSpace() {
return null; //Handle all XML content
}


+ 0
- 0
src/java/org/apache/fop/servlet/FopPrintServlet.java View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save