You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/12/23 12:43:57 UTC
svn commit: r358794 - in /xmlgraphics/fop/branches/fop-0_91:
src/java/org/apache/fop/apps/Fop.java
src/java/org/apache/fop/fo/Constants.java status.xml
Author: jeremias
Date: Fri Dec 23 03:43:48 2005
New Revision: 358794
URL: http://svn.apache.org/viewcvs?rev=358794&view=rev
Log:
Deprecated Fop constructors that use the integer constants for output format selection removed as discussed.
Modified:
xmlgraphics/fop/branches/fop-0_91/src/java/org/apache/fop/apps/Fop.java
xmlgraphics/fop/branches/fop-0_91/src/java/org/apache/fop/fo/Constants.java
xmlgraphics/fop/branches/fop-0_91/status.xml
Modified: xmlgraphics/fop/branches/fop-0_91/src/java/org/apache/fop/apps/Fop.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/branches/fop-0_91/src/java/org/apache/fop/apps/Fop.java?rev=358794&r1=358793&r2=358794&view=diff
==============================================================================
--- xmlgraphics/fop/branches/fop-0_91/src/java/org/apache/fop/apps/Fop.java (original)
+++ xmlgraphics/fop/branches/fop-0_91/src/java/org/apache/fop/apps/Fop.java Fri Dec 23 03:43:48 2005
@@ -47,9 +47,6 @@
*/
public class Fop implements Constants {
- // desired output type: RENDER_PDF, RENDER_PS, etc.
- //private int renderType = NOT_SET;
-
// desired output format: MIME type such as "application/pdf", "application/postscript" etc.
private String outputFormat = null;
@@ -86,66 +83,6 @@
this(outputFormat, null);
}
- /**
- * Constructor for use with already-created FOUserAgents
- * @param renderType the type of renderer to use. Must be one of
- * <ul>
- * <li>Fop.RENDER_PDF</li>
- * <li>Fop.RENDER_AWT</li>
- * <li>Fop.RENDER_PRINT</li>
- * <li>Fop.RENDER_MIF</li>
- * <li>Fop.RENDER_XML</li>
- * <li>Fop.RENDER_PCL</li>
- * <li>Fop.RENDER_PS</li>
- * <li>Fop.RENDER_TXT</li>
- * <li>Fop.RENDER_SVG</li>
- * <li>Fop.RENDER_RTF</li>
- * <li>Fop.RENDER_TIFF</li>
- * <li>Fop.RENDER_PNG</li>
- * </ul>
- * @param ua FOUserAgent object
- * @deprecated Use {@link org.apache.fop.apps.Fop#Fop(java.lang.String, FOUserAgent)} instead!
- * This constructor will be removed.
- */
- public Fop(int renderType, FOUserAgent ua) {
- this(getMimeTypeForRenderType(renderType), ua);
- }
-
- /**
- * Constructor that creates a default FOUserAgent
- * @see org.apache.fop.apps.Fop#Fop(int, FOUserAgent)
- * @deprecated Use {@link org.apache.fop.apps.Fop#Fop(java.lang.String)} instead!
- * This constructor will be removed.
- */
- public Fop(int renderType) {
- this(renderType, null);
- }
-
- private static String getMimeTypeForRenderType(int renderType) {
- switch(renderType) {
- case Constants.RENDER_PDF: return MimeConstants.MIME_PDF;
- case Constants.RENDER_PS: return MimeConstants.MIME_POSTSCRIPT;
- case Constants.RENDER_PCL: return MimeConstants.MIME_PCL;
- case Constants.RENDER_MIF: return MimeConstants.MIME_MIF;
- case Constants.RENDER_RTF: return MimeConstants.MIME_RTF;
- case Constants.RENDER_SVG: return MimeConstants.MIME_SVG;
- case Constants.RENDER_TXT: return MimeConstants.MIME_PLAIN_TEXT;
-
- //Bitmap formats
- case Constants.RENDER_PNG: return MimeConstants.MIME_PNG;
- case Constants.RENDER_TIFF: return MimeConstants.MIME_TIFF;
-
- //Area tree XML: FOP-specific
- case Constants.RENDER_XML: return MimeConstants.MIME_FOP_AREA_TREE;
-
- //Non-standard pseudo MIME types
- case Constants.RENDER_AWT: return MimeConstants.MIME_FOP_AWT_PREVIEW;
- case Constants.RENDER_PRINT: return MimeConstants.MIME_FOP_PRINT;
- default:
- throw new IllegalArgumentException("Illegal renderType value: " + renderType);
- }
- }
-
/**
* Get the FOUserAgent instance for this process
* @return the user agent
Modified: xmlgraphics/fop/branches/fop-0_91/src/java/org/apache/fop/fo/Constants.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/branches/fop-0_91/src/java/org/apache/fop/fo/Constants.java?rev=358794&r1=358793&r2=358794&view=diff
==============================================================================
--- xmlgraphics/fop/branches/fop-0_91/src/java/org/apache/fop/fo/Constants.java (original)
+++ xmlgraphics/fop/branches/fop-0_91/src/java/org/apache/fop/fo/Constants.java Fri Dec 23 03:43:48 2005
@@ -30,44 +30,15 @@
*/
public interface Constants {
- /* These constants are used by apps.CommandLineOptions and
- apps.Fop to describe the input (either .FO or .XML/.XSL)
- and desired output (PDF, PS, AWT, etc.) of the document */
+ /* These constants are used by apps.CommandLineOptions
+ to describe the input (either .FO or .XML/.XSL) */
- /** render constants for bounds checking */
- int RENDER_MIN_CONST = 1;
- /** render constants for bounds checking */
- int RENDER_MAX_CONST = 12;
- /** input / output not set */
+ /** (input) not set */
int NOT_SET = 0;
/** input: fo file */
int FO_INPUT = 1;
/** input: xml+xsl file */
int XSLT_INPUT = 2;
- /** output: pdf file */
- int RENDER_PDF = 1;
- /** output: screen using swing */
- int RENDER_AWT = 2;
- /** output: mif file */
- int RENDER_MIF = 3;
- /** output: sent swing rendered file to printer */
- int RENDER_PRINT = 4;
- /** output: pcl file */
- int RENDER_PCL = 5;
- /** output: postscript file */
- int RENDER_PS = 6;
- /** output: text file */
- int RENDER_TXT = 7;
- /** output: svg file */
- int RENDER_SVG = 8;
- /** output: XML area tree */
- int RENDER_XML = 9;
- /** output: RTF file */
- int RENDER_RTF = 10;
- /** output: TIFF file */
- int RENDER_TIFF = 11;
- /** output: PNG file */
- int RENDER_PNG = 12;
// element constants
/** FObj base class */
Modified: xmlgraphics/fop/branches/fop-0_91/status.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/branches/fop-0_91/status.xml?rev=358794&r1=358793&r2=358794&view=diff
==============================================================================
--- xmlgraphics/fop/branches/fop-0_91/status.xml (original)
+++ xmlgraphics/fop/branches/fop-0_91/status.xml Fri Dec 23 03:43:48 2005
@@ -29,6 +29,11 @@
<release version="FOP Trunk">
</release>
<release version="0.91beta" date="23 Dec 2005">
+ <action context="Code" dev="JM" type="update">
+ Deprecated Fop constructors that use integer constants to select the
+ output format have been removed in favor or the constructors that use
+ MIME types.
+ </action>
<action context="Code" dev="JM" type="fix" fixes-bug="37964">
Bugfix: hard breaks with even-page or odd-page were not handled correctly
when spaces were surrounding the break.
@@ -141,9 +146,9 @@
didn't get removed.
</action>
<action context="Code" dev="JM" type="fix">
- The validation check for non-zero borders and padding on a region-* is now turned off
- when relaxed validation is active to improve compatibility with FO documents written
- for other FO implementations.
+ The validation check for non-zero borders and padding on a region-* and for empty static-content
+ elements is now turned off when relaxed validation is active to improve compatibility with
+ FO documents written for other FO implementations.
</action>
<action context="Code" dev="JM" type="fix">
Bugfix for "/ by zero" ArithmeticExceptions when an URL to a non-existing image is used
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org