diff options
Diffstat (limited to 'src/java/org/apache/fop/render')
30 files changed, 56 insertions, 66 deletions
diff --git a/src/java/org/apache/fop/render/AbstractConfigurator.java b/src/java/org/apache/fop/render/AbstractConfigurator.java index 096007b98..874bb4d1b 100644 --- a/src/java/org/apache/fop/render/AbstractConfigurator.java +++ b/src/java/org/apache/fop/render/AbstractConfigurator.java @@ -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"; diff --git a/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java b/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java index 392eb875e..f2c86b35f 100644 --- a/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java +++ b/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java @@ -178,7 +178,7 @@ public abstract class AbstractGenericSVGHandler implements XMLHandler, RendererC } /** {@inheritDoc} */ - public String getNamespace() { + public String getNameSpace() { return SVGDOMImplementation.SVG_NAMESPACE_URI; } diff --git a/src/java/org/apache/fop/render/AbstractRenderer.java b/src/java/org/apache/fop/render/AbstractRenderer.java index 72be1b0b8..d70d8113f 100644 --- a/src/java/org/apache/fop/render/AbstractRenderer.java +++ b/src/java/org/apache/fop/render/AbstractRenderer.java @@ -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 diff --git a/src/java/org/apache/fop/render/PrintRendererConfigurator.java b/src/java/org/apache/fop/render/PrintRendererConfigurator.java index dd7a05067..8f94684b2 100644 --- a/src/java/org/apache/fop/render/PrintRendererConfigurator.java +++ b/src/java/org/apache/fop/render/PrintRendererConfigurator.java @@ -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 diff --git a/src/java/org/apache/fop/render/XMLHandler.java b/src/java/org/apache/fop/render/XMLHandler.java index f8152fcbf..1060bec51 100644 --- a/src/java/org/apache/fop/render/XMLHandler.java +++ b/src/java/org/apache/fop/render/XMLHandler.java @@ -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(); } diff --git a/src/java/org/apache/fop/render/XMLHandlerConfigurator.java b/src/java/org/apache/fop/render/XMLHandlerConfigurator.java index fb2420572..b93d4003a 100644 --- a/src/java/org/apache/fop/render/XMLHandlerConfigurator.java +++ b/src/java/org/apache/fop/render/XMLHandlerConfigurator.java @@ -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 diff --git a/src/java/org/apache/fop/render/XMLHandlerRegistry.java b/src/java/org/apache/fop/render/XMLHandlerRegistry.java index 81d9fcc93..84177df45 100644 --- a/src/java/org/apache/fop/render/XMLHandlerRegistry.java +++ b/src/java/org/apache/fop/render/XMLHandlerRegistry.java @@ -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 { diff --git a/src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java b/src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java index 2687d9071..cffcf8a25 100644 --- a/src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java +++ b/src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java @@ -124,7 +124,7 @@ public class AFPRendererImageInfo { * * @return the uri */ - public String getURI() { + public String getUri() { return this.uri; } diff --git a/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java b/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java index f2e77ec33..d916738eb 100644 --- a/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java +++ b/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java @@ -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; diff --git a/src/java/org/apache/fop/render/awt/viewer/PageChangeEvent.java b/src/java/org/apache/fop/render/awt/viewer/PageChangeEvent.java index 045ce7fe4..78f09b537 100644 --- a/src/java/org/apache/fop/render/awt/viewer/PageChangeEvent.java +++ b/src/java/org/apache/fop/render/awt/viewer/PageChangeEvent.java @@ -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; diff --git a/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java b/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java index 7dd3bcd95..5a9cfa21b 100644 --- a/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java +++ b/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java @@ -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()) diff --git a/src/java/org/apache/fop/render/intermediate/IFParser.java b/src/java/org/apache/fop/render/intermediate/IFParser.java index da5d8a623..645d1ebc6 100644 --- a/src/java/org/apache/fop/render/intermediate/IFParser.java +++ b/src/java/org/apache/fop/render/intermediate/IFParser.java @@ -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(); diff --git a/src/java/org/apache/fop/render/intermediate/IFRenderer.java b/src/java/org/apache/fop/render/intermediate/IFRenderer.java index bdeb1e9a1..046d1703b 100644 --- a/src/java/org/apache/fop/render/intermediate/IFRenderer.java +++ b/src/java/org/apache/fop/render/intermediate/IFRenderer.java @@ -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; diff --git a/src/java/org/apache/fop/render/intermediate/IFSerializer.java b/src/java/org/apache/fop/render/intermediate/IFSerializer.java index edeef9766..dcc0d3523 100644 --- a/src/java/org/apache/fop/render/intermediate/IFSerializer.java +++ b/src/java/org/apache/fop/render/intermediate/IFSerializer.java @@ -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 { diff --git a/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java b/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java index 340b2e068..8d8a30cf6 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java @@ -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; } 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..719d2225b 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java @@ -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; } diff --git a/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java b/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java index 5ca480f4a..1d5bc23fe 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java @@ -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); diff --git a/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java b/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java index a2b4f31b6..d905c7800 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java @@ -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"); diff --git a/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java b/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java index 22e7a270c..4251619ff 100644 --- a/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java +++ b/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java @@ -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()) { diff --git a/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java b/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java index c215243a7..4a51cb176 100644 --- a/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java +++ b/src/java/org/apache/fop/render/pdf/PDFDocumentNavigationHandler.java @@ -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); } } 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 04c95545c..e7e863a23 100644 --- a/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java +++ b/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java @@ -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; diff --git a/src/java/org/apache/fop/render/ps/PSFontUtils.java b/src/java/org/apache/fop/render/ps/PSFontUtils.java index 8acc390d0..0d0975045 100644 --- a/src/java/org/apache/fop/render/ps/PSFontUtils.java +++ b/src/java/org/apache/fop/render/ps/PSFontUtils.java @@ -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 diff --git a/src/java/org/apache/fop/render/ps/PSImageFormResource.java b/src/java/org/apache/fop/render/ps/PSImageFormResource.java index 11c3205e6..4c40c6f92 100644 --- a/src/java/org/apache/fop/render/ps/PSImageFormResource.java +++ b/src/java/org/apache/fop/render/ps/PSImageFormResource.java @@ -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; } diff --git a/src/java/org/apache/fop/render/ps/ResourceHandler.java b/src/java/org/apache/fop/render/ps/ResourceHandler.java index 502242c17..06d6b9034 100644 --- a/src/java/org/apache/fop/render/ps/ResourceHandler.java +++ b/src/java/org/apache/fop/render/ps/ResourceHandler.java @@ -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; diff --git a/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java b/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java index bf970d0a6..d499ef6ab 100644 --- a/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java +++ b/src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java @@ -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; diff --git a/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java b/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java index d377f740d..29bbecded 100644 --- a/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java +++ b/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java @@ -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; } 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 f231a1f06..146a8c19c 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 @@ -37,24 +37,11 @@ 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 */ public static int getKeepTogetherOpenValue() { diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfJforCmd.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfJforCmd.java index d7b77f633..b9e53d42f 100644 --- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfJforCmd.java +++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfJforCmd.java @@ -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(); } 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 128c9a3df..927159ffc 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 @@ -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++; } diff --git a/src/java/org/apache/fop/render/xml/XMLXMLHandler.java b/src/java/org/apache/fop/render/xml/XMLXMLHandler.java index d1cf1cf9a..f181e1911 100644 --- a/src/java/org/apache/fop/render/xml/XMLXMLHandler.java +++ b/src/java/org/apache/fop/render/xml/XMLXMLHandler.java @@ -48,7 +48,7 @@ public class XMLXMLHandler implements XMLHandler { } /** {@inheritDoc} */ - public String getNamespace() { + public String getNameSpace() { return null; //Handle all XML content } |