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 2008/03/06 14:34:59 UTC
svn commit: r634267 [5/39] - in
/xmlgraphics/fop/branches/Temp_ProcessingFeedback: ./ examples/embedding/
examples/embedding/java/embedding/
examples/embedding/java/embedding/intermediate/ examples/embedding/xml/xml/
examples/fo/ examples/fo/advanced/ ...
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/documentation/sitemap.xmap
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/documentation/sitemap.xmap?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/documentation/sitemap.xmap (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/documentation/sitemap.xmap Thu Mar 6 05:33:44 2008
@@ -20,44 +20,13 @@
</map:components>
<map:pipelines>
- <map:pipeline>
-
- <map:match type="regexp" pattern="^(.*?)([^/]*)changes.xml$">
- <map:generate type="file" src="{project:status}" />
- <map:transform src="resources/stylesheets/changes2document.xsl" >
- <map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
- <map:parameter name="path" value="{1}{2}"/>
- </map:transform>
- <map:serialize type="xml-document"/>
- </map:match>
-
- <map:match type="regexp" pattern="^(.*?)([^/]*)changes_(.*).xml$">
- <map:generate type="file" src="{project:status}" />
- <map:transform src="resources/stylesheets/changes2document.xsl" >
- <map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
- <map:parameter name="path" value="{1}{2}"/>
- <map:parameter name="versionNumber" value="{3}"/>
- </map:transform>
- <map:serialize type="xml-document"/>
- </map:match>
-
- <map:match type="regexp" pattern="^(.*?)([^/]*)releaseNotes_(.*).xml$">
- <map:generate type="file" src="{project:status}" />
- <map:transform src="resources/stylesheets/releaseNotes2document.xsl">
- <map:parameter name="versionNumber" value="{3}"/>
- <map:parameter name="path" value="{1}{2}"/>
- </map:transform>
- <map:serialize type="xml-document"/>
- </map:match>
-
- </map:pipeline>
<!-- This is used by xinclude statements in knownissues.xml -->
<map:pipeline internal-only="true">
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-layoutengine.xml$">
<map:generate type="file" src="../../test/layoutengine/disabled-testcases.xml"/>
<map:transform src="resources/stylesheets/disabled-testcases2document.xsl" >
- <map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
+ <map:parameter name="bugtracking-url" value="{properties:bugtracking-url}"/>
<map:parameter name="path" value="{1}{2}"/>
</map:transform>
<map:serialize type="xml-document"/>
@@ -65,13 +34,13 @@
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-fotree.xml$">
<map:generate type="file" src="../../test/fotree/disabled-testcases.xml"/>
<map:transform src="resources/stylesheets/disabled-testcases2document.xsl" >
- <map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
+ <map:parameter name="bugtracking-url" value="{properties:bugtracking-url}"/>
<map:parameter name="path" value="{1}{2}"/>
</map:transform>
<map:serialize type="xml-document"/>
</map:match>
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-static.xml$">
- <!--<map:generate type="file" src="{project:knownissues}"/>-->
+ <!--<map:generate type="file" src="{properties:knownissues}"/>-->
<map:generate type="file" src="../../known-issues.xml"/>
<map:transform src="resources/stylesheets/known-issues2document.xsl"/>
<map:serialize type="xml-document"/>
@@ -80,7 +49,7 @@
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-layoutengine_(.*).xml$">
<map:generate type="file" src="content/xdocs/{3}/layoutengine/disabled-testcases.xml"/>
<map:transform src="resources/stylesheets/disabled-testcases2document.xsl" >
- <map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
+ <map:parameter name="bugtracking-url" value="{properties:bugtracking-url}"/>
<map:parameter name="path" value="{1}{2}"/>
</map:transform>
<map:serialize type="xml-document"/>
@@ -88,13 +57,13 @@
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-fotree_(.*).xml$">
<map:generate type="file" src="content/xdocs/{3}/fotree/disabled-testcases.xml"/>
<map:transform src="resources/stylesheets/disabled-testcases2document.xsl" >
- <map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
+ <map:parameter name="bugtracking-url" value="{properties:bugtracking-url}"/>
<map:parameter name="path" value="{1}{2}"/>
</map:transform>
<map:serialize type="xml-document"/>
</map:match>
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-static_(.*).xml$">
- <!--<map:generate type="file" src="{project:knownissues}"/>-->
+ <!--<map:generate type="file" src="{properties:knownissues}"/>-->
<map:generate type="file" src="content/xdocs/{3}/known-issues.xml"/>
<map:transform src="resources/stylesheets/known-issues2document.xsl"/>
<map:serialize type="xml-document"/>
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/documentation/skinconf.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/documentation/skinconf.xml?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/documentation/skinconf.xml (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/documentation/skinconf.xml Thu Mar 6 05:33:44 2008
@@ -91,7 +91,7 @@
<favicon-url></favicon-url>
<!-- The following used to construct a copyright statement -->
- <year>1999-2007</year>
+ <year>1999-2008</year>
<vendor>The Apache Software Foundation.</vendor>
<copyright-link>http://www.apache.org/licenses/</copyright-link>
@@ -311,8 +311,8 @@
portrait).
Supported text alignments are left, right, justify (default left).
-->
- <page size="letter" orientation="portrait" text-align="left"/>
-
+ <page size="letter" orientation="portrait" text-align="justify"/>
+ <page-numbering-format>1</page-numbering-format>
<!--
Margins can be specified for top, bottom, inner, and outer
edges. If double-sided="false", the inner edge is always left
@@ -322,10 +322,10 @@
Specified below are the default settings.
-->
<margins double-sided="false">
- <top>1in</top>
- <bottom>1in</bottom>
+ <top>0.5in</top>
+ <bottom>0.5in</bottom>
<inner>1in</inner>
- <outer>1in</outer>
+ <outer>0.5in</outer>
</margins>
<!--
@@ -372,6 +372,13 @@
<name>ApacheCon Europe 2008</name>
<url>http://eu.apachecon.com/</url>
<image>http://apache.org/ads/ApacheCon/2008-europe-125x125.png</image>
+ <width>125</width>
+ <height>125</height>
+ </credit>
+ <credit box-location="alt2">
+ <name>ApacheCon US 2008</name>
+ <url>http://us.apachecon.com/</url>
+ <image>http://apache.org/ads/ApacheCon/2008-usa-125x125.png</image>
<width>125</width>
<height>125</height>
</credit>
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/documentation/skinconf.xml
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Revision Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java-1.3/org/apache/fop/svg/GraphicsConfiguration.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java-1.4/org/apache/fop/svg/GraphicsConfiguration.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/Version.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/Version.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/Version.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/Version.java Thu Mar 6 05:33:44 2008
@@ -41,7 +41,7 @@
if (version == null) {
//Fallback if FOP is used in a development environment
String headURL
- = "$HeadURL$";
+ = "$HeadURL: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ImagePackageRedesign/src/java/org/apache/fop/Version.java $";
version = headURL;
final String pathPrefix = "/xmlgraphics/fop/";
int pos = version.indexOf(pathPrefix);
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/Version.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-HeadURL Id LastChangedRevision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FOPException.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FOUserAgent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FOUserAgent.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FOUserAgent.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FOUserAgent.java Thu Mar 6 05:33:44 2008
@@ -42,11 +42,9 @@
import org.apache.fop.events.EventListener;
import org.apache.fop.fo.FOEventHandler;
import org.apache.fop.fo.FOValidationEventListenerProxy;
-import org.apache.fop.pdf.PDFEncryptionParams;
import org.apache.fop.render.Renderer;
import org.apache.fop.render.RendererFactory;
import org.apache.fop.render.XMLHandlerRegistry;
-import org.apache.fop.render.pdf.PDFRenderer;
/**
* This is the user agent for FOP.
@@ -72,7 +70,7 @@
/** Defines the default target resolution (72dpi) for FOP */
public static final float DEFAULT_TARGET_RESOLUTION
- = FopFactoryConfigurator.DEFAULT_TARGET_RESOLUTION;
+ = FopFactoryConfigurator.DEFAULT_TARGET_RESOLUTION;
private static Log log = LogFactory.getLog("FOP");
@@ -137,16 +135,6 @@
};
/**
- * Default constructor
- * @see org.apache.fop.apps.FopFactory
- * @deprecated Provided for compatibility only. Please use the methods from
- * FopFactory to construct FOUserAgent instances!
- */
- public FOUserAgent() throws FOPException {
- this(FopFactory.newInstance());
- }
-
- /**
* Main constructor. <b>This constructor should not be called directly. Please use the
* methods from FopFactory to construct FOUserAgent instances!</b>
* @param factory the factory that provides environment-level information
@@ -347,29 +335,6 @@
public URIResolver getURIResolver() {
return this.uriResolver;
}
-
- /**
- * Returns the parameters for PDF encryption.
- * @return the PDF encryption parameters, null if not applicable
- * @deprecated Use (PDFEncryptionParams)getRendererOptions().get("encryption-params")
- * instead.
- */
- public PDFEncryptionParams getPDFEncryptionParams() {
- return (PDFEncryptionParams)getRendererOptions().get(PDFRenderer.ENCRYPTION_PARAMS);
- }
-
- /**
- * Sets the parameters for PDF encryption.
- * @param pdfEncryptionParams the PDF encryption parameters, null to
- * disable PDF encryption
- * @deprecated Use getRendererOptions().put("encryption-params",
- * new PDFEncryptionParams(..)) instead or set every parameter separately:
- * getRendererOptions().put("noprint", Boolean.TRUE).
- */
- public void setPDFEncryptionParams(PDFEncryptionParams pdfEncryptionParams) {
- getRendererOptions().put(PDFRenderer.ENCRYPTION_PARAMS, pdfEncryptionParams);
- }
-
/**
* Attempts to resolve the given URI.
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FOUserAgent.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/Fop.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/Fop.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/Fop.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/Fop.java Thu Mar 6 05:33:44 2008
@@ -22,10 +22,8 @@
// Java
import java.io.OutputStream;
-// XML
import org.xml.sax.helpers.DefaultHandler;
-// FOP
import org.apache.fop.fo.FOTreeBuilder;
/**
@@ -66,10 +64,8 @@
* @param ua FOUserAgent object
* @param stream the output stream
* @throws FOPException if setting up the DefaultHandler fails
- * @deprecated End-users should use {@link FopFactory#newFop(String, FOUserAgent, OutputStream)}
- * instead! This constructor will become invisible with FOP 1.0.
*/
- public Fop(String outputFormat, FOUserAgent ua, OutputStream stream) throws FOPException {
+ Fop(String outputFormat, FOUserAgent ua, OutputStream stream) throws FOPException {
this.outputFormat = outputFormat;
foUserAgent = ua;
@@ -83,39 +79,7 @@
}
/**
- * Constructor for use with already-created FOUserAgents. It uses MIME types to select the
- * output format (ex. "application/pdf" for PDF).
- * @param outputFormat the MIME type of the output format to use (ex. "application/pdf").
- * @param ua FOUserAgent object
- * @throws FOPException if setting up the DefaultHandler fails
- * @deprecated End-users should use {@link FopFactory#newFop(String, FOUserAgent)} instead!
- * This constructor will become invisible with FOP 1.0.
- */
- public Fop(String outputFormat, FOUserAgent ua) throws FOPException {
- this.outputFormat = outputFormat;
-
- foUserAgent = ua;
- if (foUserAgent == null) {
- foUserAgent = FopFactory.newInstance().newFOUserAgent();
- }
-
- createDefaultHandler();
- }
-
- /**
- * Constructor for FOP with a default FOUserAgent. It uses MIME types to select the
- * output format (ex. "application/pdf" for PDF).
- * @param outputFormat the MIME type of the output format to use (ex. "application/pdf").
- * @deprecated End-users should use {@link FopFactory#newFop(String)} instead!
- * This constructor will become invisible with FOP 1.0.
- */
- public Fop(String outputFormat) {
- this.outputFormat = outputFormat;
- foUserAgent = FopFactory.newInstance().newFOUserAgent();
- }
-
- /**
- * Get the FOUserAgent instance for this process
+ * Get the FOUserAgent instance associated with the rendering run represented by this instance.
* @return the user agent
*/
public FOUserAgent getUserAgent() {
@@ -123,17 +87,6 @@
}
/**
- * Set the OutputStream to use to output the result of the Render
- * (if applicable)
- * @param stream the stream to output the result of rendering to
- * @deprecated Use one of the factory methods on {@link FopFactory} with an OutputStream
- * parameter instead. This method will be removed with FOP 1.0.
- */
- public void setOutputStream(OutputStream stream) {
- this.stream = stream;
- }
-
- /**
* Creates a DefaultHandler object used to generate the document.
* Note this object implements the ContentHandler interface.
* For processing with a Transformer object, this DefaultHandler object
@@ -148,8 +101,8 @@
}
/**
- * Returns the DefaultHandler object used to generate the document.
- * Checking for null and the exception is only for the deprecated constructor.
+ * Returns the DefaultHandler object that will receive the SAX stream containing the
+ * FO document to be rendered.
* @return the SAX DefaultHandler for handling the SAX events.
* @throws FOPException if setting up the DefaultHandler fails
*/
@@ -178,13 +131,4 @@
}
}
- /**
- * Get the version of FOP
- * @return the version string
- * @deprecated Use {@link org.apache.fop.Version#getVersion()} instead!
- * This method will be removed with FOP 1.0.
- */
- public static String getVersion() {
- return org.apache.fop.Version.getVersion();
- }
}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/Fop.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FopFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FopFactory.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FopFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FopFactory.java Thu Mar 6 05:33:44 2008
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.apps;
@@ -195,7 +195,7 @@
* @throws FOPException when the constructor fails
*/
public Fop newFop(String outputFormat) throws FOPException {
- return new Fop(outputFormat, newFOUserAgent());
+ return newFop(outputFormat, newFOUserAgent());
}
/**
@@ -212,10 +212,7 @@
* @throws FOPException when the constructor fails
*/
public Fop newFop(String outputFormat, FOUserAgent userAgent) throws FOPException {
- if (userAgent == null) {
- throw new NullPointerException("The userAgent parameter must not be null!");
- }
- return new Fop(outputFormat, userAgent);
+ return newFop(outputFormat, userAgent, null);
}
/**
@@ -230,7 +227,7 @@
* @throws FOPException when the constructor fails
*/
public Fop newFop(String outputFormat, OutputStream stream) throws FOPException {
- return new Fop(outputFormat, newFOUserAgent(), stream);
+ return newFop(outputFormat, newFOUserAgent(), stream);
}
/**
@@ -333,11 +330,10 @@
}
/**
- * cleans the base url
- * @param base
- * @return
- * @throws MalformedURLException
- * @throws URISyntaxException
+ * Checks if the given base URL is acceptable. It also normalizes the URL.
+ * @param base the base URL to check
+ * @return the normalized URL
+ * @throws MalformedURLException if there's a problem with a file URL
*/
private String checkBaseURL(String base) throws MalformedURLException {
if (!base.endsWith("/")) {
@@ -364,8 +360,7 @@
/**
* Sets the base URL.
* @param base base URL
- * @throws MalformedURLException
- * @throws URISyntaxException
+ * @throws MalformedURLException if there's a problem with a file URL
*/
public void setBaseURL(String base) throws MalformedURLException {
this.base = checkBaseURL(base);
@@ -382,8 +377,7 @@
/**
* Sets the font base URL.
* @param fontBase font base URL
- * @throws MalformedURLException
- * @throws URISyntaxException
+ * @throws MalformedURLException if there's a problem with a file URL
*/
public void setFontBaseURL(String fontBase) throws MalformedURLException {
this.fontBase = checkBaseURL(fontBase);
@@ -402,8 +396,7 @@
/**
* Sets the hyphen base URL.
* @param hyphenBase hythen base URL
- * @throws MalformedURLException
- * @throws URISyntaxException
+ * @throws MalformedURLException if there's a problem with a file URL
* */
public void setHyphenBaseURL(final String hyphenBase) throws MalformedURLException {
if (hyphenBase != null) {
@@ -440,8 +433,8 @@
}
/**
- * sets the HyphenationTreeResolver
- * @param hyphResolver
+ * Sets the HyphenationTreeResolver to be used for resolving user-supplied hyphenation files.
+ * @param hyphResolver the HyphenationTreeResolver instance
*/
public void setHyphenationTreeResolver(HyphenationTreeResolver hyphResolver) {
this.hyphResolver = hyphResolver;
@@ -724,6 +717,10 @@
return (this.fontCache != null);
}
+ /**
+ * Returns the font cache instance used by this factory.
+ * @return the font cache
+ */
public FontCache getFontCache() {
return this.fontCache;
}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FopFactory.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FopFactoryConfigurator.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FopFactoryConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FopFactoryConfigurator.java Thu Mar 6 05:33:44 2008
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.apps;
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FormattingResults.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FormattingResults.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FormattingResults.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FormattingResults.java Thu Mar 6 05:33:44 2008
@@ -1,85 +1,85 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.apps;
-
-import java.util.List;
-
-import org.apache.fop.fo.pagination.AbstractPageSequence;
-
-/**
- * Class for reporting back formatting results to the calling application.
- */
-public class FormattingResults {
-
- private int pageCount = 0;
- private List pageSequences = null;
-
- /**
- * Constructor for the FormattingResults object
- */
- public FormattingResults() {
- }
-
- /**
- * Gets the number of pages rendered
- *
- * @return The number of pages overall
- */
- public int getPageCount() {
- return this.pageCount;
- }
-
- /**
- * Gets the results for the individual page-sequences.
- *
- * @return A List with PageSequenceResults objects
- */
- public List getPageSequences() {
- return this.pageSequences;
- }
-
- /**
- * Resets this object
- */
- public void reset() {
- this.pageCount = 0;
- if (this.pageSequences != null) {
- this.pageSequences.clear();
- }
- }
-
- /**
- * Reports the result of one page sequence rendering
- * back into this object.
- *
- * @param pageSequence the page sequence which just completed rendering
- * @param pageCount the number of pages rendered for that PageSequence
- */
- public void haveFormattedPageSequence(AbstractPageSequence pageSequence, int pageCount) {
- this.pageCount += pageCount;
- if (this.pageSequences == null) {
- this.pageSequences = new java.util.ArrayList();
- }
- this.pageSequences.add(
- new PageSequenceResults(pageSequence.getId(),
- pageCount));
- }
-}
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.apps;
+
+import java.util.List;
+
+import org.apache.fop.fo.pagination.AbstractPageSequence;
+
+/**
+ * Class for reporting back formatting results to the calling application.
+ */
+public class FormattingResults {
+
+ private int pageCount = 0;
+ private List pageSequences = null;
+
+ /**
+ * Constructor for the FormattingResults object
+ */
+ public FormattingResults() {
+ }
+
+ /**
+ * Gets the number of pages rendered
+ *
+ * @return The number of pages overall
+ */
+ public int getPageCount() {
+ return this.pageCount;
+ }
+
+ /**
+ * Gets the results for the individual page-sequences.
+ *
+ * @return A List with PageSequenceResults objects
+ */
+ public List getPageSequences() {
+ return this.pageSequences;
+ }
+
+ /**
+ * Resets this object
+ */
+ public void reset() {
+ this.pageCount = 0;
+ if (this.pageSequences != null) {
+ this.pageSequences.clear();
+ }
+ }
+
+ /**
+ * Reports the result of one page sequence rendering
+ * back into this object.
+ *
+ * @param pageSequence the page sequence which just completed rendering
+ * @param pageCount the number of pages rendered for that PageSequence
+ */
+ public void haveFormattedPageSequence(AbstractPageSequence pageSequence, int pageCount) {
+ this.pageCount += pageCount;
+ if (this.pageSequences == null) {
+ this.pageSequences = new java.util.ArrayList();
+ }
+ this.pageSequences.add(
+ new PageSequenceResults(pageSequence.getId(),
+ pageCount));
+ }
+}
+
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/FormattingResults.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/MimeConstants.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/MimeConstants.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/MimeConstants.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/MimeConstants.java Thu Mar 6 05:33:44 2008
@@ -1,80 +1,80 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.apps;
-
-/**
- * Frequently used MIME types for various file formats used when working with Apache FOP.
- */
-public interface MimeConstants {
-
- /** Portable Document Format */
- String MIME_PDF = "application/pdf";
-
- /** PostScript */
- String MIME_POSTSCRIPT = "application/postscript";
- /** Encapsulated PostScript (same MIME type as PostScript) */
- String MIME_EPS = MIME_POSTSCRIPT;
-
- /** HP's PCL */
- String MIME_PCL = "application/x-pcl";
- /** HP's PCL (alternative MIME type) */
- String MIME_PCL_ALT = "application/vnd.hp-PCL";
-
- /** IBM's AFP */
- String MIME_AFP = "application/x-afp";
- /** IBM's AFP (alternative MIME type) */
- String MIME_AFP_ALT = "application/vnd.ibm.modcap";
-
- /** Plain text */
- String MIME_PLAIN_TEXT = "text/plain";
-
- /** Rich text format */
- String MIME_RTF = "application/rtf";
- /** Rich text format (alternative 1) */
- String MIME_RTF_ALT1 = "text/richtext";
- /** Rich text format (alternative 2) */
- String MIME_RTF_ALT2 = "text/rtf";
-
- /** FrameMaker's MIF */
- String MIME_MIF = "application/mif";
-
- /** Structured Vector Graphics */
- String MIME_SVG = "image/svg+xml";
-
- /** GIF images */
- String MIME_GIF = "image/gif";
- /** PNG images */
- String MIME_PNG = "image/png";
- /** JPEG images */
- String MIME_JPEG = "image/jpeg";
- /** TIFF images */
- String MIME_TIFF = "image/tiff";
-
- /** Apache FOP's AWT preview (non-standard MIME type) */
- String MIME_FOP_AWT_PREVIEW = "application/X-fop-awt-preview";
- /** Apache FOP's Direct Printing (non-standard MIME type) */
- String MIME_FOP_PRINT = "application/X-fop-print";
- /** Apache FOP's area tree XML */
- String MIME_FOP_AREA_TREE = "application/X-fop-areatree";
-
- /** Proposed but non-registered MIME type for XSL-FO */
- String MIME_XSL_FO = "text/xsl";
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.apps;
+
+/**
+ * Frequently used MIME types for various file formats used when working with Apache FOP.
+ */
+public interface MimeConstants {
+
+ /** Portable Document Format */
+ String MIME_PDF = "application/pdf";
+
+ /** PostScript */
+ String MIME_POSTSCRIPT = "application/postscript";
+ /** Encapsulated PostScript (same MIME type as PostScript) */
+ String MIME_EPS = MIME_POSTSCRIPT;
+
+ /** HP's PCL */
+ String MIME_PCL = "application/x-pcl";
+ /** HP's PCL (alternative MIME type) */
+ String MIME_PCL_ALT = "application/vnd.hp-PCL";
+
+ /** IBM's AFP */
+ String MIME_AFP = "application/x-afp";
+ /** IBM's AFP (alternative MIME type) */
+ String MIME_AFP_ALT = "application/vnd.ibm.modcap";
+
+ /** Plain text */
+ String MIME_PLAIN_TEXT = "text/plain";
+
+ /** Rich text format */
+ String MIME_RTF = "application/rtf";
+ /** Rich text format (alternative 1) */
+ String MIME_RTF_ALT1 = "text/richtext";
+ /** Rich text format (alternative 2) */
+ String MIME_RTF_ALT2 = "text/rtf";
+
+ /** FrameMaker's MIF */
+ String MIME_MIF = "application/mif";
+
+ /** Structured Vector Graphics */
+ String MIME_SVG = "image/svg+xml";
+
+ /** GIF images */
+ String MIME_GIF = "image/gif";
+ /** PNG images */
+ String MIME_PNG = "image/png";
+ /** JPEG images */
+ String MIME_JPEG = "image/jpeg";
+ /** TIFF images */
+ String MIME_TIFF = "image/tiff";
+
+ /** Apache FOP's AWT preview (non-standard MIME type) */
+ String MIME_FOP_AWT_PREVIEW = "application/X-fop-awt-preview";
+ /** Apache FOP's Direct Printing (non-standard MIME type) */
+ String MIME_FOP_PRINT = "application/X-fop-print";
+ /** Apache FOP's area tree XML */
+ String MIME_FOP_AREA_TREE = "application/X-fop-areatree";
+
+ /** Proposed but non-registered MIME type for XSL-FO */
+ String MIME_XSL_FO = "text/xsl";
+
+}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/MimeConstants.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/PageSequenceResults.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/PageSequenceResults.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/PageSequenceResults.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/PageSequenceResults.java Thu Mar 6 05:33:44 2008
@@ -1,59 +1,59 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.apps;
-
-/**
- * Class for reporting back formatting results to the calling application. This
- * particular class is used to report the results of a single page-sequence.
- */
-public class PageSequenceResults {
-
- private String id;
- private int pageCount;
-
- /**
- * Constructor for the PageSequenceResults object
- *
- * @param id ID of the page-sequence, if available
- * @param pageCount The number of resulting pages
- */
- public PageSequenceResults(String id, int pageCount) {
- this.id = id;
- this.pageCount = pageCount;
- }
-
- /**
- * Gets the ID of the page-sequence if one was specified.
- *
- * @return The ID
- */
- public String getID() {
- return this.id;
- }
-
- /**
- * Gets the number of pages that resulted by processing the page-sequence.
- *
- * @return The number of pages generated
- */
- public int getPageCount() {
- return this.pageCount;
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.apps;
+
+/**
+ * Class for reporting back formatting results to the calling application. This
+ * particular class is used to report the results of a single page-sequence.
+ */
+public class PageSequenceResults {
+
+ private String id;
+ private int pageCount;
+
+ /**
+ * Constructor for the PageSequenceResults object
+ *
+ * @param id ID of the page-sequence, if available
+ * @param pageCount The number of resulting pages
+ */
+ public PageSequenceResults(String id, int pageCount) {
+ this.id = id;
+ this.pageCount = pageCount;
+ }
+
+ /**
+ * Gets the ID of the page-sequence if one was specified.
+ *
+ * @return The ID
+ */
+ public String getID() {
+ return this.id;
+ }
+
+ /**
+ * Gets the number of pages that resulted by processing the page-sequence.
+ *
+ * @return The number of pages generated
+ */
+ public int getPageCount() {
+ return this.pageCount;
+ }
+}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/apps/PageSequenceResults.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeModel.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeModel.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeModel.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeModel.java Thu Mar 6 05:33:44 2008
@@ -22,10 +22,8 @@
// Java
import java.util.List;
-// XML
import org.xml.sax.SAXException;
-// Apache
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -55,10 +53,13 @@
/**
* Start a page sequence on this model.
- * @param title the title of the new page sequence
+ * @param pageSequence the page sequence about to start
*/
- public void startPageSequence(LineArea title) {
- currentPageSequence = new PageSequence(title);
+ public void startPageSequence(PageSequence pageSequence) {
+ if (pageSequence == null) {
+ throw new NullPointerException("pageSequence must not be null");
+ }
+ this.currentPageSequence = pageSequence;
pageSequenceList.add(currentPageSequence);
currentPageSequenceIndex = pageSequenceList.size() - 1;
}
@@ -90,6 +91,14 @@
*/
public void endDocument() throws SAXException {};
+ /**
+ * Returns the currently active page-sequence.
+ * @return the currently active page-sequence
+ */
+ public PageSequence getCurrentPageSequence() {
+ return this.currentPageSequence;
+ }
+
/**
* Get the page sequence count.
* @return the number of page sequences in the document.
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeObject.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeParser.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeParser.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeParser.java Thu Mar 6 05:33:44 2008
@@ -141,7 +141,6 @@
private Stack areaStack = new Stack();
private boolean firstFlow;
- private boolean pendingStartPageSequence;
private Stack delegateStack = new Stack();
private ContentHandler delegate;
@@ -349,8 +348,12 @@
private class PageSequenceMaker extends AbstractMaker {
public void startElement(Attributes attributes) {
- pendingStartPageSequence = true;
- //treeModel.startPageSequence(null); Done after title or on the first viewport
+ PageSequence pageSequence = new PageSequence(null);
+ String lang = attributes.getValue("language");
+ pageSequence.setLanguage(lang);
+ String country = attributes.getValue("country");
+ pageSequence.setCountry(country);
+ areaStack.push(pageSequence);
}
}
@@ -364,19 +367,19 @@
public void endElement() {
LineArea line = (LineArea)areaStack.pop();
- treeModel.startPageSequence(line);
- pendingStartPageSequence = false;
+ PageSequence pageSequence = (PageSequence)areaStack.peek();
+ pageSequence.setTitle(line);
}
-
}
private class PageViewportMaker extends AbstractMaker {
public void startElement(Attributes attributes) {
- if (pendingStartPageSequence) {
- treeModel.startPageSequence(null);
- pendingStartPageSequence = false;
+ if (!areaStack.isEmpty()) {
+ PageSequence pageSequence = (PageSequence)areaStack.peek();
+ treeModel.startPageSequence(pageSequence);
+ areaStack.pop();
}
if (currentPageViewport != null) {
throw new IllegalStateException("currentPageViewport must be null");
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/AreaTreeParser.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/Block.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/Block.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/Block.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/Block.java Thu Mar 6 05:33:44 2008
@@ -19,7 +19,6 @@
package org.apache.fop.area;
-import java.util.ArrayList;
// block areas hold either more block areas or line
// areas can also be used as a block spacer
@@ -59,6 +58,8 @@
private int stacking = TB;
private int positioning = STACK;
+ protected transient boolean allowBPDUpdate = true;
+
// a block with may contain the dominant styling info in
// terms of most lines or blocks with info
@@ -78,7 +79,7 @@
* @param autoHeight increase the height of the block.
*/
public void addBlock(Block block, boolean autoHeight) {
- if (autoHeight) {
+ if (autoHeight && allowBPDUpdate) {
bpd += block.getAllocBPD();
}
addChildArea(block);
@@ -113,12 +114,20 @@
}
/**
+ * Indicates whether this block is stacked, rather than absolutely positioned.
+ * @return true if it is stacked
+ */
+ public boolean isStacked() {
+ return (getPositioning() == Block.STACK || getPositioning() == Block.RELATIVE);
+ }
+
+ /**
* @return the start-indent trait
*/
public int getStartIndent() {
Integer startIndent = (Integer)getTrait(Trait.START_INDENT);
return (startIndent != null ? startIndent.intValue() : 0);
}
-
+
}
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/BlockViewport.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/BlockViewport.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/BlockViewport.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/BlockViewport.java Thu Mar 6 05:33:44 2008
@@ -34,6 +34,15 @@
* Create a new block viewport area.
*/
public BlockViewport() {
+ this(false);
+ }
+
+ /**
+ * Create a new block viewport area.
+ * @param allowBPDUpdate true allows the BPD to be updated when children are added
+ */
+ public BlockViewport(boolean allowBPDUpdate) {
+ this.allowBPDUpdate = allowBPDUpdate;
}
/**
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/BookmarkData.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/LinkResolver.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/NormalFlow.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/NormalFlow.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/NormalFlow.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/NormalFlow.java Thu Mar 6 05:33:44 2008
@@ -37,7 +37,9 @@
/** {@inheritDoc} */
public void addBlock(Block block) {
super.addBlock(block);
- bpd += block.getAllocBPD();
+ if (block.isStacked()) {
+ bpd += block.getAllocBPD();
+ }
}
}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/NormalFlow.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/OffDocumentItem.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/PageSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/PageSequence.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/PageSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/PageSequence.java Thu Mar 6 05:33:44 2008
@@ -28,13 +28,15 @@
private List pages = new java.util.ArrayList();
private LineArea title;
+ private String language;
+ private String country;
/**
* Main constructor
* @param title the title for the page-sequence, may be null
*/
public PageSequence(LineArea title) {
- this.title = title;
+ setTitle(title);
}
/**
@@ -45,6 +47,14 @@
}
/**
+ * Sets the page sequence's title.
+ * @param title the title
+ */
+ public void setTitle(LineArea title) {
+ this.title = title;
+ }
+
+ /**
* Adds a new page to the page sequence
* @param page the page to be added
*/
@@ -76,4 +86,45 @@
public boolean isFirstPage(PageViewport page) {
return page.equals(getPage(0));
}
+
+ /**
+ * Returns the language of the page-sequence.
+ * @return the language (the value of the language property, "none" is mapped to null)
+ */
+ public String getLanguage() {
+ return this.language;
+ }
+
+ /**
+ * Sets the language that applies to this page-sequence.
+ * @param language the language to set ("none" is mapped to null)
+ */
+ public void setLanguage(String language) {
+ if ("none".equals(language)) {
+ this.language = null;
+ } else {
+ this.language = language;
+ }
+ }
+
+ /**
+ * Returns the country of the page-sequence.
+ * @return the country (the value of the country property, "none" is mapped to null)
+ */
+ public String getCountry() {
+ return this.country;
+ }
+
+ /**
+ * Sets the country that applies to this page-sequence.
+ * @param country the country to set ("none" is mapped to null)
+ */
+ public void setCountry(String country) {
+ if ("none".equals(country)) {
+ this.country = null;
+ } else {
+ this.country = country;
+ }
+ }
+
}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/PageSequence.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/RenderPagesModel.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/RenderPagesModel.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/RenderPagesModel.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/RenderPagesModel.java Thu Mar 6 05:33:44 2008
@@ -81,16 +81,11 @@
}
}
- /**
- * Start a new page sequence.
- * This tells the renderer that a new page sequence has
- * started with the given title.
- * @param title the title of the new page sequence
- */
- public void startPageSequence(LineArea title) {
- super.startPageSequence(title);
+ /** {@inheritDoc} */
+ public void startPageSequence(PageSequence pageSequence) {
+ super.startPageSequence(pageSequence);
if (renderer.supportsOutOfOrder()) {
- renderer.startPageSequence(title);
+ renderer.startPageSequence(getCurrentPageSequence());
}
}
@@ -112,7 +107,7 @@
boolean ready = renderer.supportsOutOfOrder() && page.isResolved();
if (ready) {
if (!renderer.supportsOutOfOrder() && page.getPageSequence().isFirstPage(page)) {
- renderer.startPageSequence(this.currentPageSequence.getTitle());
+ renderer.startPageSequence(getCurrentPageSequence());
}
try {
renderer.renderPage(page);
@@ -159,7 +154,7 @@
if (pageViewport.isResolved() || renderUnresolved) {
if (!renderer.supportsOutOfOrder()
&& pageViewport.getPageSequence().isFirstPage(pageViewport)) {
- renderer.startPageSequence(this.currentPageSequence.getTitle());
+ renderer.startPageSequence(getCurrentPageSequence());
}
try {
renderer.renderPage(pageViewport);
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/Resolvable.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/SpaceArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/SpaceArea.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/SpaceArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/SpaceArea.java Thu Mar 6 05:33:44 2008
@@ -1,59 +1,59 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-package org.apache.fop.area.inline;
-
-/**
- * A space
- */
-public class SpaceArea extends InlineArea {
-
- /**
- * The space for this space area
- */
- protected String space;
-
- /**
- * Is this space adjustable?
- */
- protected boolean isAdjustable;
-
- /**
- * Create a space area
- * @param s the space character
- * @param o the offset for the next area
- * @param a is this space adjustable?
- */
- public SpaceArea(char s, int o, boolean a) {
- space = new String() + s;
- offset = o;
- isAdjustable = a;
- }
-
- /**
- * @return Returns the space.
- */
- public String getSpace() {
- return new String(space);
- }
-
- /** @return true if the space is adjustable (WRT word-space processing) */
- public boolean isAdjustable() {
- return this.isAdjustable;
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+package org.apache.fop.area.inline;
+
+/**
+ * A space
+ */
+public class SpaceArea extends InlineArea {
+
+ /**
+ * The space for this space area
+ */
+ protected String space;
+
+ /**
+ * Is this space adjustable?
+ */
+ protected boolean isAdjustable;
+
+ /**
+ * Create a space area
+ * @param s the space character
+ * @param o the offset for the next area
+ * @param a is this space adjustable?
+ */
+ public SpaceArea(char s, int o, boolean a) {
+ space = new String() + s;
+ offset = o;
+ isAdjustable = a;
+ }
+
+ /**
+ * @return Returns the space.
+ */
+ public String getSpace() {
+ return new String(space);
+ }
+
+ /** @return true if the space is adjustable (WRT word-space processing) */
+ public boolean isAdjustable() {
+ return this.isAdjustable;
+ }
+}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/SpaceArea.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/TextArea.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/WordArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/WordArea.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/WordArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/WordArea.java Thu Mar 6 05:33:44 2008
@@ -1,72 +1,72 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-package org.apache.fop.area.inline;
-
-/**
- * A string of characters without spaces
- */
-public class WordArea extends InlineArea {
-
- /** The text for this word area */
- protected String word;
-
- /** The correction offset for the next area */
- protected int offset = 0;
-
- /** An array of width for adjusting the individual letters (optional) */
- protected int[] letterAdjust;
-
- /**
- * Create a word area
- * @param w the word string
- * @param o the offset for the next area
- * @param la the letter adjust array (may be null)
- */
- public WordArea(String w, int o, int[] la) {
- word = w;
- offset = o;
- this.letterAdjust = la;
- }
-
- /**
- * @return Returns the word.
- */
- public String getWord() {
- return word;
- }
-
- /**
- * @return Returns the offset.
- */
- public int getOffset() {
- return offset;
- }
- /**
- * @param o The offset to set.
- */
- public void setOffset(int o) {
- offset = o;
- }
-
- /** @return the array of letter adjust widths */
- public int[] getLetterAdjustArray() {
- return this.letterAdjust;
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+package org.apache.fop.area.inline;
+
+/**
+ * A string of characters without spaces
+ */
+public class WordArea extends InlineArea {
+
+ /** The text for this word area */
+ protected String word;
+
+ /** The correction offset for the next area */
+ protected int offset = 0;
+
+ /** An array of width for adjusting the individual letters (optional) */
+ protected int[] letterAdjust;
+
+ /**
+ * Create a word area
+ * @param w the word string
+ * @param o the offset for the next area
+ * @param la the letter adjust array (may be null)
+ */
+ public WordArea(String w, int o, int[] la) {
+ word = w;
+ offset = o;
+ this.letterAdjust = la;
+ }
+
+ /**
+ * @return Returns the word.
+ */
+ public String getWord() {
+ return word;
+ }
+
+ /**
+ * @return Returns the offset.
+ */
+ public int getOffset() {
+ return offset;
+ }
+ /**
+ * @param o The offset to set.
+ */
+ public void setOffset(int o) {
+ offset = o;
+ }
+
+ /** @return the array of letter adjust widths */
+ public int[] getLetterAdjustArray() {
+ return this.letterAdjust;
+ }
+
+}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/area/inline/WordArea.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/cli/InputHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/cli/InputHandler.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/cli/InputHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/cli/InputHandler.java Thu Mar 6 05:33:44 2008
@@ -21,9 +21,13 @@
// Imported java.io classes
import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
import java.io.OutputStream;
import java.util.Vector;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.ErrorListener;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
@@ -31,9 +35,14 @@
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -133,11 +142,30 @@
}
/**
- * Creates a Source for the main input file.
+ * Creates a Source for the main input file. Processes XInclude if
+ * available in the XML parser.
+ *
* @return the Source for the main input file
*/
protected Source createMainSource() {
- return new StreamSource(this.sourcefile);
+ Source result;
+ try {
+ InputSource is = new InputSource(new FileInputStream(
+ this.sourcefile));
+ is.setSystemId(this.sourcefile.toURI().toASCIIString());
+ SAXParserFactory spf = SAXParserFactory.newInstance();
+ spf.setFeature("http://xml.org/sax/features/namespaces", true);
+ spf.setFeature("http://apache.org/xml/features/xinclude", true);
+ XMLReader xr = spf.newSAXParser().getXMLReader();
+ result = new SAXSource(xr, is);
+ } catch (SAXException e) {
+ result = new StreamSource(this.sourcefile);
+ } catch (IOException e) {
+ result = new StreamSource(this.sourcefile);
+ } catch (ParserConfigurationException e) {
+ result = new StreamSource(this.sourcefile);
+ }
+ return result;
}
/**
@@ -196,7 +224,7 @@
* {@inheritDoc}
*/
public void warning(TransformerException exc) {
- log.warn(exc.toString());
+ log.warn(exc.getLocalizedMessage());
}
/**
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/cli/InputHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/datatypes/LengthBase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/datatypes/LengthBase.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/datatypes/LengthBase.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/datatypes/LengthBase.java Thu Mar 6 05:33:44 2008
@@ -130,5 +130,17 @@
return baseLen;
}
+ /** {@inheritDoc} */
+ public String toString() {
+ return super.toString()
+ + "[fo=" + fobj + ","
+ + "baseType=" + baseType + ","
+ + "baseLength=" + baseLength + "]";
+ }
+
+ /**@return the base length as a {@link Length} */
+ public Length getBaseLength() {
+ return baseLength;
+ }
}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/datatypes/Numeric.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/Constants.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/ElementMappingRegistry.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FOEventHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FONode.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FONode.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FONode.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FONode.java Thu Mar 6 05:33:44 2008
@@ -380,7 +380,7 @@
* @param problem text to display that indicates the problem
* @deprecated Not localizable!
*/
- protected void attributeWarning(String problem) {
+ public void attributeWarning(String problem) {
log.warn(warningText(locator) + getName() + ", " + problem);
}
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FOPropertyMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FOPropertyMapping.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FOPropertyMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FOPropertyMapping.java Thu Mar 6 05:33:44 2008
@@ -26,7 +26,7 @@
import org.apache.fop.datatypes.LengthBase;
import org.apache.fop.fo.expr.PropertyException;
import org.apache.fop.fo.flow.table.TableFObj.ColumnNumberPropertyMaker;
-import org.apache.fop.fo.properties.BackgroundPositionShorthandParser;
+import org.apache.fop.fo.properties.BackgroundPositionShorthand;
import org.apache.fop.fo.properties.BorderSpacingShorthandParser;
import org.apache.fop.fo.properties.BorderWidthPropertyMaker;
import org.apache.fop.fo.properties.BoxPropShorthandParser;
@@ -66,6 +66,7 @@
import org.apache.fop.fo.properties.ToBeImplementedProperty;
import org.apache.fop.fo.properties.VerticalAlignShorthandParser;
import org.apache.fop.fo.properties.WhiteSpaceShorthandParser;
+import org.apache.fop.fo.properties.XMLLangShorthandParser;
/**
* This class creates and returns an array of Property.Maker instances
@@ -1060,12 +1061,14 @@
m = new StringProperty.Maker(PR_COUNTRY);
m.setInherited(true);
m.setDefault("none");
+ m.addShorthand(s_generics[PR_XML_LANG]);
addPropertyMaker("country", m);
// language
m = new StringProperty.Maker(PR_LANGUAGE);
m.setInherited(true);
m.setDefault("none");
+ m.addShorthand(s_generics[PR_XML_LANG]);
addPropertyMaker("language", m);
// script
@@ -1150,7 +1153,7 @@
m.useGeneric(genericSpace);
corr = new SpacePropertyMaker(m);
corr.setCorresponding(PR_MARGIN_BOTTOM, PR_MARGIN_BOTTOM, PR_MARGIN_LEFT);
- corr.setUseParent(true);
+ corr.setUseParent(false);
corr.setRelative(true);
addPropertyMaker("space-after", m);
@@ -1160,7 +1163,7 @@
m.setDefault("0pt");
IndentPropertyMaker sCorr = new IndentPropertyMaker(m);
sCorr.setCorresponding(PR_MARGIN_LEFT, PR_MARGIN_RIGHT, PR_MARGIN_TOP);
- sCorr.setUseParent(true);
+ sCorr.setUseParent(false);
sCorr.setRelative(true);
sCorr.setPaddingCorresponding(new int[] {
PR_PADDING_LEFT, PR_PADDING_RIGHT, PR_PADDING_TOP
@@ -1176,7 +1179,7 @@
m.setDefault("0pt");
IndentPropertyMaker eCorr = new IndentPropertyMaker(m);
eCorr.setCorresponding(PR_MARGIN_RIGHT, PR_MARGIN_LEFT, PR_MARGIN_BOTTOM);
- eCorr.setUseParent(true);
+ eCorr.setUseParent(false);
eCorr.setRelative(true);
eCorr.setPaddingCorresponding(new int[] {
PR_PADDING_RIGHT, PR_PADDING_LEFT, PR_PADDING_BOTTOM
@@ -2531,15 +2534,33 @@
addPropertyMaker("background", m);
// background-position
- m = new ListProperty.Maker(PR_BACKGROUND_POSITION);
+ m = new BackgroundPositionShorthand.Maker(PR_BACKGROUND_POSITION);
m.setInherited(false);
m.addKeyword("left", "0% 50%");
+ m.addKeyword("left center", "0% 50%");
+ m.addKeyword("center left", "0% 50%");
m.addKeyword("right", "100% 50%");
+ m.addKeyword("right center", "100% 50%");
+ m.addKeyword("center right", "100% 50%");
m.addKeyword("center", "50% 50%");
+ m.addKeyword("center center", "50% 50%");
m.addKeyword("top", "50% 0%");
+ m.addKeyword("top center", "50% 0%");
+ m.addKeyword("center top", "50% 0%");
m.addKeyword("bottom", "50% 100%");
+ m.addKeyword("bottom center", "50% 100%");
+ m.addKeyword("center bottom", "50% 100%");
+ m.addKeyword("top left", "0% 0%");
+ m.addKeyword("left top", "0% 0%");
+ m.addKeyword("top right", "100% 0%");
+ m.addKeyword("right top", "100% 0%");
+ m.addKeyword("bottom left", "0% 100%");
+ m.addKeyword("left bottom", "0% 100%");
+ m.addKeyword("bottom right", "100% 100%");
+ m.addKeyword("right bottom", "100% 100%");
m.setDefault("0% 0%");
- m.setDatatypeParser(new BackgroundPositionShorthandParser());
+ m.setPercentBase(LengthBase.CUSTOM_BASE);
+ m.setDatatypeParser(new BackgroundPositionShorthand.Parser());
addPropertyMaker("background-position", m);
// border
@@ -2722,9 +2743,10 @@
addPropertyMaker("white-space", m);
// xml:lang
- m = new ToBeImplementedProperty.Maker(PR_XML_LANG);
+ m = new StringProperty.Maker(PR_XML_LANG);
m.setInherited(true);
m.setDefault("");
+ m.setDatatypeParser(new XMLLangShorthandParser());
addPropertyMaker("xml:lang", m);
}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FOPropertyMapping.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FOTreeBuilder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FOTreeBuilder.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FOTreeBuilder.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/FOTreeBuilder.java Thu Mar 6 05:33:44 2008
@@ -59,9 +59,7 @@
/** The registry for ElementMapping instances */
protected ElementMappingRegistry elementMappingRegistry;
- /**
- * The root of the formatting object tree
- */
+ /** The root of the formatting object tree */
protected Root rootFObj = null;
/** Main DefaultHandler that handles the FO namespace. */
@@ -70,10 +68,7 @@
/** Current delegate ContentHandler to receive the SAX events */
protected ContentHandler delegate;
- /**
- * The class that handles formatting and rendering to a stream
- * (mark-fop@inomial.com)
- */
+ /** The object that handles formatting and rendering to a stream */
private FOEventHandler foEventHandler;
/** The SAX locator object managing the line and column counters */
@@ -88,14 +83,18 @@
private int depth;
/**
- * FOTreeBuilder constructor
+ * <code>FOTreeBuilder</code> constructor
+ *
* @param outputFormat the MIME type of the output format to use (ex. "application/pdf").
- * @param foUserAgent in effect for this process
- * @param stream OutputStream to direct results
- * @throws FOPException if the FOTreeBuilder cannot be properly created
- */
- public FOTreeBuilder(String outputFormat, FOUserAgent foUserAgent,
- OutputStream stream) throws FOPException {
+ * @param foUserAgent the {@link FOUserAgent} in effect for this process
+ * @param stream the <code>OutputStream</code> to direct the results to
+ * @throws FOPException if the <code>FOTreeBuilder</code> cannot be properly created
+ */
+ public FOTreeBuilder(
+ String outputFormat,
+ FOUserAgent foUserAgent,
+ OutputStream stream)
+ throws FOPException {
this.userAgent = foUserAgent;
this.elementMappingRegistry = userAgent.getFactory().getElementMappingRegistry();
@@ -110,40 +109,25 @@
});
}
- /**
- * This method enables to reduce memory consumption of the FO tree slightly. When it returns
- * true no Locator is passed to the FO tree nodes which would copy the information into
- * a SAX LocatorImpl instance.
- * @return true if no context information should be stored on each node in the FO tree.
- * @deprecated Use FOUserAgent.isLocatorEnabled() instead.
- */
- protected boolean isLocatorDisabled() {
- return !userAgent.isLocatorEnabled();
- }
-
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void setDocumentLocator(Locator locator) {
this.locator = locator;
}
- /** @return a Locator instance if it is available and not disabled */
+ /**
+ * @return a {@link Locator} instance if it is available and not disabled
+ */
protected Locator getEffectiveLocator() {
return (userAgent.isLocatorEnabled() ? this.locator : null);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void characters(char[] data, int start, int length)
throws SAXException {
delegate.characters(data, start, length);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void startDocument() throws SAXException {
if (used) {
throw new IllegalStateException("FOTreeBuilder (and the Fop class) cannot be reused."
@@ -170,9 +154,7 @@
this.delegate = this.mainFOHandler;
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void endDocument() throws SAXException {
this.delegate.endDocument();
if (this.rootFObj == null && empty) {
@@ -190,18 +172,14 @@
imageFactory.removeContext(this.userAgent);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void startElement(String namespaceURI, String localName, String rawName,
Attributes attlist) throws SAXException {
this.depth++;
delegate.startElement(namespaceURI, localName, rawName, attlist);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void endElement(String uri, String localName, String rawName)
throws SAXException {
this.delegate.endElement(uri, localName, rawName);
@@ -217,7 +195,8 @@
}
/**
- * Finds the Maker used to create node objects of a particular type
+ * Finds the {@link Maker} used to create {@link FONode} objects of a particular type
+ *
* @param namespaceURI URI for the namespace of the element
* @param localName name of the Element
* @return the ElementMapping.Maker that can create an FO object for this element
@@ -229,7 +208,7 @@
/** {@inheritDoc} */
public void warning(SAXParseException e) {
- log.warn(e.toString());
+ log.warn(e.getLocalizedMessage());
}
/** {@inheritDoc} */
@@ -244,7 +223,8 @@
}
/**
- * Provides access to the underlying FOEventHandler object.
+ * Provides access to the underlying {@link FOEventHandler} object.
+ *
* @return the FOEventHandler object
*/
public FOEventHandler getEventHandler() {
@@ -255,6 +235,7 @@
* Returns the results of the rendering process. Information includes
* the total number of pages generated and the number of pages per
* page-sequence.
+ *
* @return the results of the rendering process.
*/
public FormattingResults getResults() {
@@ -268,23 +249,17 @@
}
/**
- * Main DefaultHandler implementation which builds the FO tree.
+ * Main <code>DefaultHandler</code> implementation which builds the FO tree.
*/
private class MainFOHandler extends DefaultHandler {
- /**
- * Current formatting object being handled
- */
+ /** Current formatting object being handled */
protected FONode currentFObj = null;
- /**
- * Current propertyList for the node being handled.
- */
+ /** Current propertyList for the node being handled */
protected PropertyList currentPropertyList;
- /**
- * Current marker nesting-depth
- */
+ /** Current marker nesting-depth */
private int nestedMarkerDepth = 0;
/** {@inheritDoc} */
@@ -309,11 +284,7 @@
} else { // check that incoming node is valid for currentFObj
if (namespaceURI.equals(FOElementMapping.URI)
|| namespaceURI.equals(ExtensionElementMapping.URI)) {
- try {
- currentFObj.validateChildNode(locator, namespaceURI, localName);
- } catch (ValidationException e) {
- throw e;
- }
+ currentFObj.validateChildNode(locator, namespaceURI, localName);
}
}
@@ -402,12 +373,11 @@
if (currentFObj.getParent() == null) {
log.debug("endElement for top-level " + currentFObj.getName());
}
+
currentFObj = currentFObj.getParent();
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public void characters(char[] data, int start, int length)
throws FOPException {
if (currentFObj != null) {
@@ -416,6 +386,7 @@
}
}
+ /** {@inheritDoc} */
public void endDocument() throws SAXException {
currentFObj = null;
}
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/PropertyList.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/PropertyList.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/PropertyList.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/PropertyList.java Thu Mar 6 05:33:44 2008
@@ -309,11 +309,13 @@
String attributeNS;
FopFactory factory = getFObj().getUserAgent().getFactory();
for (int i = 0; i < attributes.getLength(); i++) {
- /* convert all attributes with the same namespace as the fo element for this fObj */
+ /* convert all attributes with the same namespace as the fo element
+ * the "xml:lang" property is a special case */
attributeNS = attributes.getURI(i);
attributeName = attributes.getQName(i);
attributeValue = attributes.getValue(i);
- if (attributeNS == null || attributeNS.length() == 0) {
+ if (attributeNS == null || attributeNS.length() == 0
+ || "xml:lang".equals(attributeName)) {
convertAttributeToProperty(attributes, attributeName, attributeValue);
} else if (!factory.isNamespaceIgnored(attributeNS)) {
ElementMapping mapping = factory.getElementMappingRegistry().getElementMapping(
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/PropertyListMaker.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/StaticPropertyList.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/fo/ValidationException.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org