aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-06-17 10:30:54 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-06-17 10:30:54 +0000
commit08f0da8adadb9fda358992ad204948570ad41d11 (patch)
tree63839a088e22c7224abbd11ffa8befff0715169f
parentf25d75a80cbb96a31e6d5b5a4da9d5e95d164cd8 (diff)
downloadxmlgraphics-fop-08f0da8adadb9fda358992ad204948570ad41d11.tar.gz
xmlgraphics-fop-08f0da8adadb9fda358992ad204948570ad41d11.zip
Merged revisions 666596,666967,667367,667831,667862,667864,667893,668177,668576 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r666596 | vhennebert | 2008-06-11 10:52:04 +0100 (Wed, 11 Jun 2008) | 2 lines Fixed typo ........ r666967 | maxberger | 2008-06-12 07:07:28 +0100 (Thu, 12 Jun 2008) | 1 line Added PMD and Findbugs report, 'reports' target' ........ r667367 | maxberger | 2008-06-13 07:03:30 +0100 (Fri, 13 Jun 2008) | 1 line Disabled retroweaver task definition, because it breaks gump ........ r667831 | maxberger | 2008-06-14 17:21:15 +0100 (Sat, 14 Jun 2008) | 1 line minor spelling fixes ........ r667862 | maxberger | 2008-06-14 19:18:14 +0100 (Sat, 14 Jun 2008) | 1 line minor spelling fixes ........ r667864 | maxberger | 2008-06-14 19:23:28 +0100 (Sat, 14 Jun 2008) | 1 line minor spelling & checkstyle fixes ........ r667893 | maxberger | 2008-06-14 23:20:42 +0100 (Sat, 14 Jun 2008) | 1 line removed double storage of 'fobj' ........ r668177 | lfurini | 2008-06-16 15:52:14 +0100 (Mon, 16 Jun 2008) | 2 lines Fixing the PageBreakingAlgorithm, replacing calls to getLineWidth() with getLineWidth(int) so as to take into account each page's real height. This fixes the positioning of footnotes when the page bpd is not the same for all pages. ........ r668576 | jeremias | 2008-06-17 10:04:05 +0100 (Tue, 17 Jun 2008) | 1 line Wrong line number reported in the case of a line overflow. ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@668608 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--build.xml689
-rw-r--r--lib/build/asm-3.1.jarbin0 -> 43033 bytes
-rw-r--r--lib/build/asm-commons-3.1.jarbin0 -> 32694 bytes
-rw-r--r--lib/build/asm-util-3.1.jarbin0 -> 34444 bytes
-rw-r--r--lib/build/asm.LICENSE.txt28
-rw-r--r--lib/build/backport-util-concurrent-3.1.jarbin0 -> 331716 bytes
-rw-r--r--lib/build/backport-util-concurrent.LICENSE.txt2
-rw-r--r--lib/build/jaxen-1.1.1.jarbin0 -> 226915 bytes
-rw-r--r--lib/build/jaxen.LICENSE.txt33
-rw-r--r--lib/build/pmd.LICENSE.txt31
-rw-r--r--lib/build/pmd14-4.2.2.jarbin0 -> 1124295 bytes
-rw-r--r--lib/build/retroweaver-2.0.5.jarbin0 -> 91990 bytes
-rw-r--r--lib/build/retroweaver-rt-2.0.5.jarbin0 -> 122274 bytes
-rw-r--r--lib/build/retroweaver.LICENSE.txt25
-rw-r--r--src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java34
-rw-r--r--src/java/org/apache/fop/layoutmgr/LayoutManager.java4
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java8
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java35
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java16
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java11
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java4
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java3
-rw-r--r--status.xml5
-rw-r--r--test/layoutengine/standard-testcases/footnote_changing-page-bpd.xml97
-rw-r--r--test/layoutengine/standard-testcases/footnote_changing-page-bpd_2.xml102
25 files changed, 603 insertions, 524 deletions
diff --git a/build.xml b/build.xml
index 54356e0ab..ff76686b6 100644
--- a/build.xml
+++ b/build.xml
@@ -52,15 +52,12 @@ list of possible build targets.
============================================================================ -->
<project default="all" basedir="." name="fop">
-
- <!-- See build.properties and build-local.properties for overriding build settings. -->
- <!-- build-local.properties is not stored in SVN and overrides values from build.properties -->
+<!-- See build.properties and build-local.properties for overriding build settings. -->
+<!-- build-local.properties is not stored in SVN and overrides values from build.properties -->
<property file="${basedir}/build-local.properties"/>
<property file="${basedir}/build.properties"/>
<property environment="env"/>
-
- <property name="optional.lib.dir" value="${basedir}/lib"/>
-
+ <property name="build.lib.dir" value="${basedir}/lib/build"/>
<fileset dir="${basedir}" id="dist.bin">
<include name="conf/**"/>
<include name="examples/**"/>
@@ -72,7 +69,6 @@ list of possible build targets.
<include name="fop.bat"/>
<include name="fop"/>
</fileset>
-
<fileset dir="${basedir}" id="dist.bin.lib">
<patternset id="dist.lib">
<include name="lib/avalon-framework*"/>
@@ -87,7 +83,6 @@ list of possible build targets.
<include name="lib/xml-apis*"/>
</patternset>
</fileset>
-
<fileset dir="${basedir}" id="dist.src">
<include name="src/**"/>
<include name="conf/**"/>
@@ -108,58 +103,45 @@ list of possible build targets.
<include name="fop.bat"/>
<include name="fop"/>
</fileset>
-
<path id="libs-build-classpath">
<fileset dir="${basedir}/lib">
<include name="*.jar"/>
</fileset>
- <fileset dir="${optional.lib.dir}">
- <include name="*.jar"/>
- </fileset>
</path>
-
<path id="libs-build-tools-classpath">
<path refid="libs-build-classpath"/>
<fileset dir="${basedir}/lib/build">
<include name="*.jar"/>
</fileset>
</path>
-
<path id="libs-run-classpath">
<path refid="libs-build-classpath"/>
<fileset dir="${basedir}/build">
<include name="fop.jar"/>
- <include name="fop-hyph.jar" />
+ <include name="fop-hyph.jar"/>
</fileset>
</path>
-
<patternset id="exclude-jai">
<exclude name="org/apache/fop/image/JAIImage.java" unless="jai.present"/>
<exclude name="org/apache/fop/render/pcl/JAIMonochromeBitmapConverter.java" unless="jai.present"/>
</patternset>
-
<patternset id="exclude-jce-dependencies">
<exclude name="org/apache/fop/pdf/PDFEncryptionJCE.java" unless="jce.present"/>
</patternset>
-
<property name="Name" value="Apache FOP"/>
<property name="name" value="fop"/>
<property name="NAME" value="FOP"/>
<property name="version" value="svn-trunk"/>
<property name="year" value="1999-2008"/>
-
<property name="javac.debug" value="on"/>
<property name="javac.optimize" value="off"/>
<property name="javac.deprecation" value="on"/>
<property name="javac.source" value="1.4"/>
<property name="javac.target" value="1.4"/>
<property name="javac.fork" value="no"/>
-
<property name="junit.fork" value="on"/>
<property name="junit.haltonfailure" value="off"/>
-
<property name="javadoc.packages" value="org.apache.fop.*"/>
-
<property name="src.dir" value="${basedir}/src"/>
<property name="src.codegen.dir" value="${src.dir}/codegen"/>
<property name="src.codegen.fonts.dir" value="${src.codegen.dir}/fonts"/>
@@ -174,7 +156,6 @@ list of possible build targets.
<property name="fo.examples.force" value="false"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="user.hyph.dir" value="${basedir}/hyph"/>
-
<property name="build.dir" value="${basedir}/build"/>
<property name="build.gensrc.dir" value="${build.dir}/gensrc"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
@@ -182,48 +163,38 @@ list of possible build targets.
<property name="build.codegen-classes.dir" value="${build.dir}/codegen-classes"/>
<property name="build.javadocs.dir" value="${build.dir}/javadocs"/>
<property name="build.examples.dir" value="${build.dir}/examples"/>
-
<property name="build.viewer.resources.dir" value="${build.classes.dir}/org/apache/fop/render/awt/viewer/resources"/>
<property name="build.viewer.images.dir" value="${build.classes.dir}/org/apache/fop/render/awt/viewer/images"/>
-
<property name="build.property.examples.mime.type" value="application/pdf"/>
-
- <!--property name="layoutengine.disabled" value="test/layoutengine/disabled-testcases.txt"/-->
- <!--property name="fotree.disabled" value="test/fotree/disabled-testcases.txt"/-->
+<!--property name="layoutengine.disabled" value="test/layoutengine/disabled-testcases.txt"/-->
+<!--property name="fotree.disabled" value="test/fotree/disabled-testcases.txt"/-->
<property name="layoutengine.disabled" value="test/layoutengine/disabled-testcases.xml"/>
<property name="fotree.disabled" value="test/fotree/disabled-testcases.xml"/>
-
<property name="dist.bin.dir" value="${basedir}/dist-bin"/>
<property name="dist.src.dir" value="${basedir}/dist-src"/>
<property name="dist.bin.result.dir" value="${dist.bin.dir}/${name}-${version}"/>
<property name="dist.src.result.dir" value="${dist.src.dir}/${name}-${version}"/>
<property name="samedir" value="${basedir}"/>
-
<property name="junit.reports.dir" value="${build.dir}/test-reports"/>
<property name="junit.html.reports.dir" value="${build.dir}/test-reports/html"/>
-
- <!-- Importing Apache Forrest for building the docs -->
- <!--
+<!-- Importing Apache Forrest for building the docs -->
+<!--
<property environment="env"/>
<property name="forrest.home" value="${env.FORREST_HOME}"/>
<import file="${env.FORREST_HOME}/main/forrest.build.xml" optional="true"/>
-->
-
- <!-- =================================================================== -->
- <!-- Initialization target -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Initialization target -->
+<!-- =================================================================== -->
<target name="init" depends="init-avail">
</target>
-
<target name="init-avail">
<echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
<echo message="See build.properties and build-local.properties for additional build settings"/>
<echo message="${ant.version}"/>
<echo message="VM: ${java.vm.version}, ${java.vm.vendor}"/>
<echo message="JAVA_HOME: ${env.JAVA_HOME}"/>
-
- <available property="jai.present" classname="javax.media.jai.JAI"
- classpathref="libs-build-classpath"/>
+ <available property="jai.present" classname="javax.media.jai.JAI" classpathref="libs-build-classpath"/>
<condition property="jai.message" value="JAI Support PRESENT">
<equals arg1="${jai.present}" arg2="true"/>
</condition>
@@ -233,9 +204,7 @@ list of possible build targets.
</not>
</condition>
<echo message="${jai.message}"/>
-
- <available property="jce.present" classname="javax.crypto.Cipher"
- classpathref="libs-build-classpath"/>
+ <available property="jce.present" classname="javax.crypto.Cipher" classpathref="libs-build-classpath"/>
<condition property="jce.message" value="JCE Support PRESENT">
<equals arg1="${jce.present}" arg2="true"/>
</condition>
@@ -245,12 +214,9 @@ list of possible build targets.
</not>
</condition>
<echo message="${jce.message}"/>
-
<available property="jdk14.present" classname="java.lang.CharSequence"/>
<fail message="${Name} requires at least Java 1.4!" unless="jdk14.present"/>
-
- <available property="junit.present" classname="junit.framework.TestCase"
- classpathref="libs-build-classpath"/>
+ <available property="junit.present" classname="junit.framework.TestCase" classpathref="libs-build-classpath"/>
<condition property="junit.message" value="JUnit Support PRESENT">
<equals arg1="${junit.present}" arg2="true"/>
</condition>
@@ -260,7 +226,6 @@ list of possible build targets.
</not>
</condition>
<echo message="${junit.message}"/>
-
<condition property="xmlunit.present">
<and>
<available classname="org.custommonkey.xmlunit.XMLTestCase" classpathref="libs-build-classpath"/>
@@ -276,28 +241,22 @@ list of possible build targets.
</not>
</condition>
<echo message="${xmlunit.message}"/>
-
</target>
-
- <!-- =================================================================== -->
- <!-- Help on usage -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Help on usage -->
+<!-- =================================================================== -->
<target name="usage">
<echo message="Use the -projecthelp option instead"/>
</target>
-
- <!-- =================================================================== -->
- <!-- Generate the source code -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Generate the source code -->
+<!-- =================================================================== -->
<target name="codegen" depends="init" description="Generates the java files from the xml resources">
<echo message="Generating the java files from xml resources"/>
<mkdir dir="${build.gensrc.dir}"/>
<mkdir dir="${build.gensrc.dir}/org/apache/fop/fonts/base14"/>
-
- <xslt in="${src.codegen.fonts.dir}/encodings.xml"
- style="${src.codegen.fonts.dir}/code-point-mapping.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/CodePointMapping.java"/>
- <!-- Task unrolled because of a bug in Xalan included in some
+ <xslt in="${src.codegen.fonts.dir}/encodings.xml" style="${src.codegen.fonts.dir}/code-point-mapping.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/CodePointMapping.java"/>
+<!-- Task unrolled because of a bug in Xalan included in some
JDK 1.4 releases
<xslt basedir="src/codegen" includes="Helvetica*.xml,Times*.xml,Courier*.xml"
style="${src.codegen.fonts.dir}/font-file.xsl"
@@ -305,71 +264,52 @@ list of possible build targets.
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
-->
- <xslt in="${src.codegen.fonts.dir}/Courier.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/Courier.java">
+ <xslt in="${src.codegen.fonts.dir}/Courier.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/Courier.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/CourierOblique.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/CourierOblique.java">
+ <xslt in="${src.codegen.fonts.dir}/CourierOblique.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/CourierOblique.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/CourierBold.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/CourierBold.java">
+ <xslt in="${src.codegen.fonts.dir}/CourierBold.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/CourierBold.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/CourierBoldOblique.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/CourierBoldOblique.java">
+ <xslt in="${src.codegen.fonts.dir}/CourierBoldOblique.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/CourierBoldOblique.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/Helvetica.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- destdir="${build.gensrc.dir}/org/apache/fop/fonts/base14"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/Helvetica.java">
+ <xslt in="${src.codegen.fonts.dir}/Helvetica.xml" style="${src.codegen.fonts.dir}/font-file.xsl" destdir="${build.gensrc.dir}/org/apache/fop/fonts/base14" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/Helvetica.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/HelveticaBold.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/HelveticaBold.java">
+ <xslt in="${src.codegen.fonts.dir}/HelveticaBold.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/HelveticaBold.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/HelveticaOblique.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/HelveticaOblique.java">
+ <xslt in="${src.codegen.fonts.dir}/HelveticaOblique.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/HelveticaOblique.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/HelveticaBoldOblique.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/HelveticaBoldOblique.java">
+ <xslt in="${src.codegen.fonts.dir}/HelveticaBoldOblique.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/HelveticaBoldOblique.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/TimesRoman.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/TimesRoman.java">
+ <xslt in="${src.codegen.fonts.dir}/TimesRoman.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/TimesRoman.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/TimesItalic.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/TimesItalic.java">
+ <xslt in="${src.codegen.fonts.dir}/TimesItalic.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/TimesItalic.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/TimesBold.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/TimesBold.java">
+ <xslt in="${src.codegen.fonts.dir}/TimesBold.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/TimesBold.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/TimesBoldItalic.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/TimesBoldItalic.java">
+ <xslt in="${src.codegen.fonts.dir}/TimesBoldItalic.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/TimesBoldItalic.java">
<param name="encoding" expression="WinAnsiEncoding"/>
</xslt>
- <xslt in="${src.codegen.fonts.dir}/Symbol.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/Symbol.java"/>
- <xslt in="${src.codegen.fonts.dir}/ZapfDingbats.xml" style="${src.codegen.fonts.dir}/font-file.xsl"
- out="${build.gensrc.dir}/org/apache/fop/fonts/base14/ZapfDingbats.java"/>
-
+ <xslt in="${src.codegen.fonts.dir}/Symbol.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/Symbol.java"/>
+ <xslt in="${src.codegen.fonts.dir}/ZapfDingbats.xml" style="${src.codegen.fonts.dir}/font-file.xsl" out="${build.gensrc.dir}/org/apache/fop/fonts/base14/ZapfDingbats.java"/>
</target>
-
- <!-- =================================================================== -->
- <!-- Compiles the source directory -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Compiles the source directory -->
+<!-- =================================================================== -->
<target name="compile-java" depends="init, codegen">
- <!-- create directories -->
+<!-- create directories -->
<mkdir dir="${build.classes.dir}"/>
- <javac destdir="${build.classes.dir}" fork="${javac.fork}" debug="${javac.debug}"
- deprecation="${javac.deprecation}" optimize="${javac.optimize}"
- source="${javac.source}" target="${javac.target}">
+ <javac destdir="${build.classes.dir}" fork="${javac.fork}" debug="${javac.debug}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}">
<src path="${build.gensrc.dir}"/>
<src path="${src.java.dir}"/>
<patternset includes="**/*.java"/>
@@ -377,11 +317,8 @@ list of possible build targets.
<patternset refid="exclude-jai"/>
<classpath refid="libs-build-classpath"/>
</javac>
-
<mkdir dir="${build.sandbox-classes.dir}"/>
- <javac destdir="${build.sandbox-classes.dir}" fork="${javac.fork}" debug="${javac.debug}"
- deprecation="${javac.deprecation}" optimize="${javac.optimize}"
- source="${javac.source}" target="${javac.target}">
+ <javac destdir="${build.sandbox-classes.dir}" fork="${javac.fork}" debug="${javac.debug}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}">
<src path="${src.sandbox.dir}"/>
<patternset includes="**/*.java"/>
<patternset refid="exclude-jai"/>
@@ -391,12 +328,9 @@ list of possible build targets.
</classpath>
</javac>
</target>
-
<target name="resourcegen" depends="compile-java">
<mkdir dir="${build.codegen-classes.dir}"/>
- <javac destdir="${build.codegen-classes.dir}" fork="${javac.fork}" debug="${javac.debug}"
- deprecation="${javac.deprecation}" optimize="${javac.optimize}"
- source="${javac.source}" target="${javac.target}">
+ <javac destdir="${build.codegen-classes.dir}" fork="${javac.fork}" debug="${javac.debug}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}">
<src path="${src.codegen.dir}/java"/>
<patternset includes="**/*.java"/>
<classpath>
@@ -409,75 +343,57 @@ list of possible build targets.
<include name="**/*.xsl"/>
</fileset>
</copy>
-
- <taskdef name="eventResourceGenerator"
- classname="org.apache.fop.tools.EventProducerCollectorTask">
+ <taskdef name="eventResourceGenerator" classname="org.apache.fop.tools.EventProducerCollectorTask">
<classpath>
<path refid="libs-build-tools-classpath"/>
<pathelement location="${build.classes.dir}"/>
<pathelement location="${build.codegen-classes.dir}"/>
</classpath>
</taskdef>
-
- <eventResourceGenerator
- modelfile="${build.gensrc.dir}/org/apache/fop/events/event-model.xml"
- translationfile="${src.java.dir}/org/apache/fop/events/EventFormatter.xml">
+ <eventResourceGenerator modelfile="${build.gensrc.dir}/org/apache/fop/events/event-model.xml" translationfile="${src.java.dir}/org/apache/fop/events/EventFormatter.xml">
<fileset dir="${src.java.dir}">
<include name="**/*.java"/>
<exclude name="org/apache/fop/render/*/**/*.java"/>
</fileset>
</eventResourceGenerator>
<fixcrlf file="${src.java.dir}/org/apache/fop/events/EventFormatter.xml" tab="remove" tablength="2"/>
- <eventResourceGenerator
- modelfile="${build.gensrc.dir}/org/apache/fop/render/afp/event-model.xml"
- translationfile="${src.java.dir}/org/apache/fop/render/afp/AFPEventProducer.xml">
+ <eventResourceGenerator modelfile="${build.gensrc.dir}/org/apache/fop/render/afp/event-model.xml" translationfile="${src.java.dir}/org/apache/fop/render/afp/AFPEventProducer.xml">
<fileset dir="${src.java.dir}">
<include name="org/apache/fop/render/afp/**/*.java"/>
</fileset>
</eventResourceGenerator>
<fixcrlf file="${src.java.dir}/org/apache/fop/render/afp/AFPEventProducer.xml" tab="remove" tablength="2"/>
- <eventResourceGenerator
- modelfile="${build.gensrc.dir}/org/apache/fop/render/bitmap/event-model.xml"
- translationfile="${src.java.dir}/org/apache/fop/render/bitmap/BitmapRendererEventProducer.xml">
+ <eventResourceGenerator modelfile="${build.gensrc.dir}/org/apache/fop/render/bitmap/event-model.xml" translationfile="${src.java.dir}/org/apache/fop/render/bitmap/BitmapRendererEventProducer.xml">
<fileset dir="${src.java.dir}">
<include name="org/apache/fop/render/bitmap/**/*.java"/>
</fileset>
</eventResourceGenerator>
<fixcrlf file="${src.java.dir}/org/apache/fop/render/bitmap/BitmapRendererEventProducer.xml" tab="remove" tablength="2"/>
- <eventResourceGenerator
- modelfile="${build.gensrc.dir}/org/apache/fop/render/pcl/event-model.xml"
- translationfile="${src.java.dir}/org/apache/fop/render/pcl/PCLEventProducer.xml">
+ <eventResourceGenerator modelfile="${build.gensrc.dir}/org/apache/fop/render/pcl/event-model.xml" translationfile="${src.java.dir}/org/apache/fop/render/pcl/PCLEventProducer.xml">
<fileset dir="${src.java.dir}">
<include name="org/apache/fop/render/pcl/**/*.java"/>
</fileset>
</eventResourceGenerator>
<fixcrlf file="${src.java.dir}/org/apache/fop/render/pcl/PCLEventProducer.xml" tab="remove" tablength="2"/>
- <eventResourceGenerator
- modelfile="${build.gensrc.dir}/org/apache/fop/render/pdf/event-model.xml"
- translationfile="${src.java.dir}/org/apache/fop/render/pdf/PDFEventProducer.xml">
+ <eventResourceGenerator modelfile="${build.gensrc.dir}/org/apache/fop/render/pdf/event-model.xml" translationfile="${src.java.dir}/org/apache/fop/render/pdf/PDFEventProducer.xml">
<fileset dir="${src.java.dir}">
<include name="org/apache/fop/render/pdf/**/*.java"/>
</fileset>
</eventResourceGenerator>
<fixcrlf file="${src.java.dir}/org/apache/fop/render/pdf/PDFEventProducer.xml" tab="remove" tablength="2"/>
- <eventResourceGenerator
- modelfile="${build.gensrc.dir}/org/apache/fop/render/ps/event-model.xml"
- translationfile="${src.java.dir}/org/apache/fop/render/ps/PSEventProducer.xml">
+ <eventResourceGenerator modelfile="${build.gensrc.dir}/org/apache/fop/render/ps/event-model.xml" translationfile="${src.java.dir}/org/apache/fop/render/ps/PSEventProducer.xml">
<fileset dir="${src.java.dir}">
<include name="org/apache/fop/render/ps/**/*.java"/>
</fileset>
</eventResourceGenerator>
<fixcrlf file="${src.java.dir}/org/apache/fop/render/ps/PSEventProducer.xml" tab="remove" tablength="2"/>
- <eventResourceGenerator
- modelfile="${build.gensrc.dir}/org/apache/fop/render/rtf/event-model.xml"
- translationfile="${src.java.dir}/org/apache/fop/render/rtf/RTFEventProducer.xml">
+ <eventResourceGenerator modelfile="${build.gensrc.dir}/org/apache/fop/render/rtf/event-model.xml" translationfile="${src.java.dir}/org/apache/fop/render/rtf/RTFEventProducer.xml">
<fileset dir="${src.java.dir}">
<include name="org/apache/fop/render/rtf/**/*.java"/>
</fileset>
</eventResourceGenerator>
<fixcrlf file="${src.java.dir}/org/apache/fop/render/rtf/RTFEventProducer.xml" tab="remove" tablength="2"/>
</target>
-
<target name="compile-copy-resources" depends="resourcegen">
<copy todir="${build.classes.dir}">
<fileset dir="${src.java.dir}">
@@ -498,21 +414,17 @@ list of possible build targets.
<copy todir="${build.viewer.images.dir}">
<fileset dir="${src.viewer.images.dir}"/>
</copy>
-
- <!-- sandbox -->
+<!-- sandbox -->
<copy todir="${build.sandbox-classes.dir}">
<fileset dir="${src.sandbox.dir}">
<include name="META-INF/**"/>
</fileset>
</copy>
-
</target>
-
<target name="compile" depends="compile-java, compile-copy-resources" description="Compiles the source code"/>
-
- <!-- =================================================================== -->
- <!-- compiles hyphenation patterns -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- compiles hyphenation patterns -->
+<!-- =================================================================== -->
<target name="compile-hyphenation" depends="compile">
<path id="hyph-classpath">
<path refid="libs-build-classpath"/>
@@ -526,13 +438,11 @@ list of possible build targets.
</fileset>
</serHyph>
</target>
-
<target name="uptodate-jar-hyphenation" depends="compile-hyphenation">
<uptodate property="jar.hyphenation.uptodate" targetfile="${build.dir}/fop-hyph.jar">
<srcfiles dir="${build.classes.dir}/hyph"/>
</uptodate>
</target>
-
<target name="jar-hyphenation" depends="compile-hyphenation,uptodate-jar-hyphenation" description="Generates the hyphenation jar file" unless="jar.hyphenation.uptodate">
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
@@ -546,27 +456,31 @@ list of possible build targets.
</manifest>
</jar>
</target>
-
- <!-- =================================================================== -->
- <!-- main FOP JARs -->
- <!-- =================================================================== -->
-
- <target name="uptodate-jar-main" depends="compile">
+ <target name="retro" depends="compile">
+<!--
+ <taskdef name="retroweaver" classname="net.sourceforge.retroweaver.ant.RetroWeaverTask">
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path refid="libs-build-tools-classpath"/>
+ </classpath>
+ </taskdef>
+RetroWeaver will be added here -->
+ </target>
+<!-- =================================================================== -->
+<!-- main FOP JARs -->
+<!-- =================================================================== -->
+ <target name="uptodate-jar-main" depends="retro">
<uptodate property="jar.main.uptodate" targetfile="${build.dir}/fop.jar">
- <srcfiles dir= "${build.classes.dir}"/>
+ <srcfiles dir="${build.classes.dir}"/>
</uptodate>
</target>
-
- <target name="jar-main" depends="compile,uptodate-jar-main" description="Generates the main jar file" unless="jar.main.uptodate">
+ <target name="jar-main" depends="retro,uptodate-jar-main" description="Generates the main jar file" unless="jar.main.uptodate">
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
-
<pathconvert property="manifest.classpath" dirsep="/" pathsep=" " refid="libs-build-classpath">
<map from="${basedir}${file.separator}lib${file.separator}" to=""/>
- <map from="${optional.lib.dir}${file.separator}" to=""/>
</pathconvert>
-
<jar jarfile="${build.dir}/fop.jar" basedir="${build.classes.dir}">
<manifest>
<attribute name="Main-Class" value="org.apache.fop.cli.Main"/>
@@ -585,14 +499,12 @@ list of possible build targets.
<metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
</jar>
</target>
-
- <target name="uptodate-jar-sandbox" depends="compile">
+ <target name="uptodate-jar-sandbox" depends="retro">
<uptodate property="jar.sandbox.uptodate" targetfile="${build.dir}/fop-sandbox.jar">
- <srcfiles dir= "${build.sandbox-classes.dir}"/>
+ <srcfiles dir="${build.sandbox-classes.dir}"/>
</uptodate>
</target>
-
- <target name="jar-sandbox" depends="compile,uptodate-jar-sandbox" description="Generates the sandbox jar file" unless="jar.sandbox.uptodate">
+ <target name="jar-sandbox" depends="retro,uptodate-jar-sandbox" description="Generates the sandbox jar file" unless="jar.sandbox.uptodate">
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
@@ -603,14 +515,12 @@ list of possible build targets.
<metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
</jar>
</target>
-
<target name="uptodate-jar-sources" depends="codegen">
<uptodate property="jar.sources.uptodate" targetfile="${build.dir}/fop-sources.jar">
<srcfiles dir="${build.gensrc.dir}"/>
<srcfiles dir="${src.java.dir}"/>
</uptodate>
</target>
-
<target name="jar-sources" depends="codegen" description="Generates a jar file with all the sources" unless="jar.sources.uptodate">
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
@@ -634,12 +544,10 @@ list of possible build targets.
</fileset>
</jar>
</target>
-
- <!-- =================================================================== -->
- <!-- Creates the class package -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Creates the class package -->
+<!-- =================================================================== -->
<target name="package" depends="jar-main,jar-hyphenation,jar-sandbox" description="Generates the jar files"/>
-
<target name="servlet" depends="package" description="Generates the WAR with the sample FOP servlet">
<echo message="Creating the WAR file"/>
<war warfile="${build.dir}/fop.war" webxml="${src.dir}/conf/web.xml">
@@ -655,9 +563,8 @@ list of possible build targets.
</lib>
</war>
</target>
-
<patternset id="transcoder-classes">
- <!-- General classes -->
+<!-- General classes -->
<patternset>
<include name="org/apache/fop/Version.class"/>
<include name="org/apache/fop/apps/Fop.class"/>
@@ -680,7 +587,7 @@ list of possible build targets.
<include name="org/apache/fop/util/Finalizable.class"/>
<include name="org/apache/fop/util/CharUtilities.class"/>
</patternset>
- <!-- PDF transcoder -->
+<!-- PDF transcoder -->
<patternset>
<include name="org/apache/fop/render/pdf/**"/>
<exclude name="org/apache/fop/render/pdf/PDFRenderer.class"/>
@@ -688,42 +595,36 @@ list of possible build targets.
<include name="org/apache/fop/render/*RendererConfigurator**"/>
<include name="org/apache/fop/pdf/**"/>
</patternset>
- <!-- PS transcoder -->
+<!-- PS transcoder -->
<patternset>
<include name="org/apache/fop/render/ps/**"/>
<exclude name="org/apache/fop/render/pdf/PSRenderer.class"/>
<exclude name="org/apache/fop/render/pdf/PSXMLHandler*"/>
</patternset>
</patternset>
-
<fileset dir="${build.classes.dir}" id="transcoder-classes-files">
<patternset refid="transcoder-classes"/>
</fileset>
-
<fileset dir="${lib.dir}" id="transcoder-lib-files">
<include name="commons-io*.jar"/>
<include name="avalon-framework*.jar"/>
<include name="commons-logging*.jar"/>
<include name="xmlgraphics-commons*.jar"/>
</fileset>
-
- <target name="uptodate-transcoder-pkg" depends="compile">
+ <target name="uptodate-transcoder-pkg" depends="retro">
<uptodate property="transcoder.pkg.uptodate" targetfile="${build.dir}/fop-transcoder.jar">
<srcfiles refid="transcoder-classes-files"/>
<srcfiles refid="transcoder-lib-files"/>
</uptodate>
</target>
-
- <target name="transcoder-pkg" depends="uptodate-transcoder-pkg, compile" description="Generates the jar for the transcoder package for Batik" unless="transcoder.pkg.uptodate">
+ <target name="transcoder-pkg" depends="uptodate-transcoder-pkg, retro" description="Generates the jar for the transcoder package for Batik" unless="transcoder.pkg.uptodate">
<echo message="Creating the jar file ${build.dir}/fop-transcoder.jar"/>
-
<property name="fop-transcoder.name" value="FOP Transcoder Package"/>
<property name="fop-transcoder.version" value="1.0beta2"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
-
- <!-- lean transcoder jar -->
+<!-- lean transcoder jar -->
<jar jarfile="${build.dir}/fop-transcoder.jar">
<fileset refid="transcoder-classes-files"/>
<manifest>
@@ -734,8 +635,7 @@ list of possible build targets.
</manifest>
<metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
</jar>
-
- <!-- all-in-one transcoder jar -->
+<!-- all-in-one transcoder jar -->
<property name="transcoder-deps" value="${build.dir}/transcoder-dependencies"/>
<mkdir dir="${transcoder-deps}"/>
<unjar dest="${transcoder-deps}">
@@ -748,7 +648,7 @@ list of possible build targets.
<include name="org/apache/commons/io/*.class"/>
<include name="org/apache/commons/io/filefilter/*.class"/>
<include name="org/apache/commons/io/output/*.class"/>
- <!-- TODO Remove the following lines once Batik switches over to using XML Graphics Commons -->
+<!-- TODO Remove the following lines once Batik switches over to using XML Graphics Commons -->
<include name="org/apache/xmlgraphics/java2d/**"/>
<include name="org/apache/xmlgraphics/ps/**"/>
<include name="org/apache/xmlgraphics/fonts/**"/>
@@ -776,12 +676,11 @@ list of possible build targets.
<metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
</jar>
</target>
-
- <target name="all" depends="package, servlet, transcoder-pkg, junit"/> <!-- "all" target for us Makefile converts ;-) -->
-
- <!-- =================================================================== -->
- <!-- Testing -->
- <!-- =================================================================== -->
+ <target name="all" depends="package, servlet, transcoder-pkg, junit"/>
+<!-- "all" target for us Makefile converts ;-) -->
+<!-- =================================================================== -->
+<!-- Testing -->
+<!-- =================================================================== -->
<target name="junit-with-xmlunit" depends="init-avail" if="xmlunit.present">
<patternset id="test-sources"/>
</target>
@@ -790,15 +689,11 @@ list of possible build targets.
<exclude name="**/intermediate/*"/>
</patternset>
</target>
-
<target name="junit-compile-java" depends="package, transcoder-pkg, junit-with-xmlunit, junit-without-xmlunit" if="junit.present">
<mkdir dir="${build.dir}/test-classes"/>
<mkdir dir="${build.dir}/test-gensrc"/>
<mkdir dir="${junit.reports.dir}"/>
- <javac destdir="${build.dir}/test-classes" fork="${javac.fork}"
- debug="${javac.debug}" deprecation="${javac.deprecation}"
- optimize="${javac.optimize}" source="${javac.source}"
- target="${javac.target}">
+ <javac destdir="${build.dir}/test-classes" fork="${javac.fork}" debug="${javac.debug}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}">
<src path="${basedir}/test/java"/>
<patternset refid="test-sources"/>
<classpath>
@@ -814,7 +709,6 @@ list of possible build targets.
</fileset>
</copy>
</target>
-
<target name="junit-compile-copy-resources" if="junit.present">
<eventResourceGenerator modelfile="${build.dir}/test-gensrc/org/apache/fop/events/test-event-model.xml">
<fileset dir="${basedir}/test/java">
@@ -831,9 +725,7 @@ list of possible build targets.
</fileset>
</copy>
</target>
-
<target name="junit-compile" depends="junit-compile-java, junit-compile-copy-resources" description="Compiles FOP's JUnit tests" if="junit.present"/>
-
<target name="junit-transcoder" depends="junit-compile" description="Runs FOP's JUnit transcoder tests" if="junit.present">
<echo message="Running basic functionality tests for fop-transcoder.jar"/>
<junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}">
@@ -852,7 +744,7 @@ list of possible build targets.
<test name="org.apache.fop.BasicTranscoderTestSuite" todir="${junit.reports.dir}" outfile="TEST-transcoder"/>
</junit>
<echo message="Running basic functionality tests for fop-transcoder-allinone.jar"/>
- <!-- These are the same tests as in the block above but testing the "allinone" JAR
+<!-- These are the same tests as in the block above but testing the "allinone" JAR
instead. Please don't add any additional paths other than the test classes, the
allinone JAR and the any Batik JARs to the classpath. If this fails, but the
previous test block succeeded it indicates that the packaging of the allinone
@@ -879,7 +771,6 @@ list of possible build targets.
<test name="org.apache.fop.BasicTranscoderTestSuite" todir="${junit.reports.dir}" outfile="TEST-transcoder-allinone"/>
</junit>
</target>
-
<target name="junit-userconfig" depends="junit-compile" if="junit.present" description="Runs FOP's user config JUnit tests">
<echo message="Running user config tests"/>
<junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
@@ -897,7 +788,6 @@ list of possible build targets.
<test name="org.apache.fop.config.UserConfigTestSuite" todir="${junit.reports.dir}" outfile="TEST-userconfig"/>
</junit>
</target>
-
<target name="junit-basic" depends="junit-compile" description="Runs FOP's JUnit basic tests" if="junit.present">
<echo message="Running basic functionality tests for fop.jar"/>
<junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
@@ -916,10 +806,10 @@ list of possible build targets.
<test name="org.apache.fop.StandardTestSuite" todir="${junit.reports.dir}"/>
</junit>
</target>
-
<target name="hyphenation-present" depends="junit-compile" if="junit.present">
<condition property="hyphenation.present">
- <and><!-- All the hyphenation files required by the layout test cases to be listed here -->
+ <and>
+<!-- All the hyphenation files required by the layout test cases to be listed here -->
<available resource="hyph/en.hyp" classpathref="libs-run-classpath"/>
<available resource="hyph/de.hyp" classpathref="libs-run-classpath"/>
</and>
@@ -934,7 +824,6 @@ list of possible build targets.
</condition>
<echo message="${hyphenation.message}"/>
</target>
-
<target name="junit-layout-standard" depends="junit-compile, junit-fotree" if="junit.present" description="Runs FOP's standard JUnit layout tests">
<echo message="Running standard layout engine tests"/>
<junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
@@ -952,7 +841,6 @@ list of possible build targets.
<test name="org.apache.fop.layoutengine.LayoutEngineTestSuite" todir="${junit.reports.dir}" outfile="TEST-layoutengine-standard"/>
</junit>
</target>
-
<target name="junit-layout-hyphenation" depends="hyphenation-present, junit-compile" if="hyphenation.present" description="Runs FOP's JUnit hyphenation layout tests">
<echo message="Running hyphenation layout engine tests"/>
<junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
@@ -970,9 +858,7 @@ list of possible build targets.
<test name="org.apache.fop.layoutengine.LayoutEngineTestSuite" todir="${junit.reports.dir}" outfile="TEST-layoutengine-hyphenation"/>
</junit>
</target>
-
- <target name="junit-layout" depends="junit-layout-standard, junit-layout-hyphenation" description="Runs all FOP's JUnit layout tests" />
-
+ <target name="junit-layout" depends="junit-layout-standard, junit-layout-hyphenation" description="Runs all FOP's JUnit layout tests"/>
<target name="junit-fotree" depends="junit-compile" description="Runs FOP's FO tree JUnit tests" if="junit.present">
<echo message="Running fo tree tests"/>
<junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
@@ -992,7 +878,6 @@ list of possible build targets.
<test name="org.apache.fop.fotreetest.FOTreeTestSuite" todir="${junit.reports.dir}" outfile="TEST-FO-tree"/>
</junit>
</target>
-
<target name="junit-intermediate-format" depends="junit-compile, junit-layout" description="Runs FOP's intermediate format JUnit tests" if="xmlunit.present">
<echo message="Running intermediate format tests"/>
<junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
@@ -1013,7 +898,6 @@ list of possible build targets.
<test name="org.apache.fop.intermediate.IntermediateFormatTestSuite" todir="${junit.reports.dir}" outfile="TEST-intermediate-format"/>
</junit>
</target>
-
<target name="junit-text-linebreak" depends="junit-compile" description="Runs FOP's JUnit unicode linebreak tests" if="junit.present">
<echo message="Running tests for Unicode UAX#14 support"/>
<junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
@@ -1032,18 +916,8 @@ list of possible build targets.
<test name="org.apache.fop.text.linebreak.LineBreakStatusTest" todir="${junit.reports.dir}"/>
</junit>
</target>
-
<target name="junit" depends="junit-userconfig, junit-basic, junit-transcoder, junit-text-linebreak, junit-layout, junit-fotree, junit-intermediate-format" description="Runs all of FOP's JUnit tests" if="junit.present">
- <fail>
- <condition>
- <or>
- <isset property="fop.junit.error"/>
- <isset property="fop.junit.failure"/>
- <not>
- <isset property="hyphenation.present"/>
- </not>
- </or>
- </condition>
+ <fail><condition><or><isset property="fop.junit.error"/><isset property="fop.junit.failure"/><not><isset property="hyphenation.present"/></not></or></condition>
NOTE:
**************************************************************************
* One or more of the Junit tests had Failures or Errors or were skipped! *
@@ -1054,8 +928,7 @@ NOTE:
<echo>All Junit tests passed!</echo>
<echo>Use the "junit-reports" target to generate HTML test reports</echo>
</target>
-
- <!-- haven't made this dependent on "junit" as that would rerun all tests -->
+<!-- haven't made this dependent on "junit" as that would rerun all tests -->
<target name="junit-reports" description="Generates HTML test reports">
<mkdir dir="${junit.html.reports.dir}"/>
<junitreport todir="${junit.reports.dir}">
@@ -1066,12 +939,11 @@ NOTE:
</junitreport>
<echo>JUnit HTML test reports should be available in ${junit.html.reports.dir}</echo>
</target>
-
- <!-- =================================================================== -->
- <!-- Creates the API documentation -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Creates the API documentation -->
+<!-- =================================================================== -->
<target name="javadocs" depends="codegen" description="Generates javadocs">
- <!--condition property="javadoc.version.ok">
+<!--condition property="javadoc.version.ok">
<not>
<or>
<equals arg1="${ant.java.version}" arg2="1.1"/>
@@ -1081,7 +953,7 @@ NOTE:
</not>
</condition>
<fail message="Building FOP javadocs requires at least Java 1.4" unless="javadoc.version.ok"/-->
- <property name="javadoc.public" value="false"/>
+ <property name="javadoc.public" value="false"/>
<property name="javadoc.package" value="false"/>
<property name="javadoc.private" value="false"/>
<condition property="javadoc.level" value=" (level: private)">
@@ -1096,22 +968,7 @@ NOTE:
<property name="javadoc.level" value=""/>
<echo message="Producing the javadoc files${javadoc.level}"/>
<mkdir dir="${build.javadocs.dir}"/>
-
- <javadoc
- packagenames="${javadoc.packages}"
- destdir="${build.javadocs.dir}"
- author="true"
- version="true"
- windowtitle="${Name} ${version} API"
- doctitle="Apache Formatting Objects Processor (FOP)"
- bottom="Copyright ${year} The Apache Software Foundation. All Rights Reserved."
- overview="${src.dir}/java/org/apache/fop/overview.html"
- use="true"
- failonerror="true"
- source="${javac.source}"
- public="${javadoc.public}"
- package="${javadoc.package}"
- private="${javadoc.private}">
+ <javadoc packagenames="${javadoc.packages}" destdir="${build.javadocs.dir}" author="true" version="true" windowtitle="${Name} ${version} API" doctitle="Apache Formatting Objects Processor (FOP)" bottom="Copyright ${year} The Apache Software Foundation. All Rights Reserved." overview="${src.dir}/java/org/apache/fop/overview.html" use="true" failonerror="true" source="${javac.source}" public="${javadoc.public}" package="${javadoc.package}" private="${javadoc.private}">
<header><![CDATA[${name} ${version}]]></header>
<footer><![CDATA[${name} ${version}]]></footer>
<classpath>
@@ -1173,7 +1030,6 @@ NOTE:
</group>
</javadoc>
</target>
-
<target name="jar-javadocs" depends="javadocs" description="Generates a jar file containing the Javadocs">
<jar jarfile="${build.dir}/${name}-${version}-javadoc.jar">
<manifest>
@@ -1183,134 +1039,103 @@ NOTE:
<metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
</jar>
</target>
-
- <!-- =================================================================== -->
- <!-- Checkstyle -->
- <!-- =================================================================== -->
- <property name="checkstyle.home.dir" value="${optional.lib.dir}"/>
+<!-- =================================================================== -->
+<!-- Checkstyle -->
+<!-- =================================================================== -->
+ <property name="checkstyle.lib" value="${checkstyle.home.dir}"/>
<property name="checkstyle.noframes.xslt" value="${checkstyle.home.dir}/contrib/checkstyle-noframes.xsl"/>
-
- <path id="checkstyle-path">
- <fileset dir="${basedir}/lib">
- <include name="checkstyle-all-*.jar"/>
- <include name="checkstyle-*.jar"/>
- <include name="antlr*.jar"/>
- <include name="commons-beanutils*.jar"/>
- <include name="commons-collections*.jar"/>
- <include name="commons-logging*.jar"/>
- <include name="jakarta-regexp*.jar"/>
- </fileset>
- <fileset dir="${checkstyle.home.dir}">
- <include name="checkstyle-all-*.jar"/>
- <include name="checkstyle-*.jar"/>
- <include name="antlr*.jar"/>
- <include name="commons-beanutils*.jar"/>
- <include name="commons-collections*.jar"/>
- <include name="commons-logging*.jar"/>
- <include name="jakarta-regexp*.jar"/>
- </fileset>
- <!--fileset dir="${optional.lib.dir}">
- <include name="checkstyle-all-*.jar"/>
- <include name="checkstyle-*.jar"/>
- <include name="antlr*.jar"/>
- <include name="commons-beanutils*.jar"/>
- <include name="commons-collections*.jar"/>
- <include name="commons-logging*.jar"/>
- <include name="jakarta-regexp*.jar"/>
- </fileset-->
- </path>
-
- <path id="checkstyle-runpath">
- <path refid="checkstyle-path"/>
- <fileset dir="${basedir}/build">
- <include name="fop.jar"/>
- <include name="fop-hyph.jar" />
+ <path id="libs-checkstyle">
+ <fileset dir="${checkstyle.lib}">
+ <include name="*.jar"/>
</fileset>
</path>
-
- <target name="checkstyle-avail" depends="init">
- <available property="checkstyle.available" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="checkstyle-path"/>
- <available property="checkstyle.4.x" classname="com.puppycrawl.tools.checkstyle.checks.coding.ModifiedControlVariableCheck" classpathref="checkstyle-path"/>
- <available property="checkstyle.noframes.xslt.available" file="${checkstyle.noframes.xslt}"/>
- <condition property="checkstyle.message" value="Checkstyle 4.x Support PRESENT">
- <and>
- <equals arg1="${checkstyle.available}" arg2="true"/>
- <equals arg1="${checkstyle.4.x}" arg2="true"/>
- </and>
- </condition>
- <condition property="checkstyle.message" value="Checkstyle 3.x Support PRESENT">
- <equals arg1="${checkstyle.available}" arg2="true"/>
- </condition>
- <condition property="checkstyle.message" value="Checkstyle Support NOT Present">
- <not>
- <equals arg1="${checkstyle.available}" arg2="true"/>
- </not>
- </condition>
- <echo message="${checkstyle.message}"/>
- <condition property="checkstyle.config" value="checkstyle-4.0.xml">
- <equals arg1="${checkstyle.4.x}" arg2="true"/>
- </condition>
- <condition property="checkstyle.config" value="checkstyle-3.5-fop-head.xml">
- <not>
- <equals arg1="${checkstyle.4.x}" arg2="true"/>
- </not>
- </condition>
- <condition property="checkstyle.noframes.xslt.message" value="Checkstyle HTML style sheet support PRESENT">
- <equals arg1="${checkstyle.noframes.xslt.available}" arg2="true"/>
- </condition>
- <condition property="checkstyle.noframes.xslt.message" value="Checkstyle HTML style sheet support NOT Present">
- <not>
- <equals arg1="${checkstyle.noframes.xslt.available}" arg2="true"/>
- </not>
- </condition>
- <echo message="${checkstyle.noframes.xslt.message}"/>
+ <target name="checkstyle-avail" unless="checkstyle.home.dir">
+ <echo message="Checkstyle Support NOT Present. Please download it from http://checkstyle.sf.net/ and set checkstyle.home.dir in build-local.properties"/>
</target>
-
- <target name="checkstyle-check" depends="checkstyle-avail, codegen" if="checkstyle.available">
-
- <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="checkstyle-runpath"/>
- <checkstyle config="${checkstyle.config}" failonviolation="false"
- classpathref="checkstyle-runpath">
+ <target name="checkstyle" depends="init, checkstyle-avail" if="checkstyle.home.dir" description="Runs Checkstyle for a code quality report">
+ <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="libs-checkstyle"/>
+ <checkstyle config="checkstyle-4.0.xml" failonviolation="false">
<fileset dir="${src.java.dir}" includes="**/*.java"/>
- <formatter type="plain" toFile="${build.dir}/checkstyle_report.txt"/>
- <formatter type="xml" toFile="${build.dir}/checkstyle_report.xml"/>
+ <formatter type="xml" toFile="${build.dir}/report_checkstyle.xml"/>
</checkstyle>
+ <xslt in="${build.dir}/report_checkstyle.xml" out="${build.dir}/report_checkstyle.html" style="${checkstyle.noframes.xslt}"/>
</target>
-
- <target name="checkstyle-html" depends="checkstyle-avail, checkstyle-check" if="checkstyle.noframes.xslt.available">
- <xslt in="${build.dir}/checkstyle_report.xml" out="${build.dir}/checkstyle_report.html" style="${checkstyle.noframes.xslt}"/>
+<!-- =================================================================== -->
+<!-- PMD -->
+<!-- =================================================================== -->
+ <target name="pmd" depends="init" description="Runs PMD for a code quality report">
+ <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
+ <classpath>
+ <path refid="libs-build-classpath"/>
+ <path refid="libs-build-tools-classpath"/>
+ </classpath>
+ </taskdef>
+ <pmd shortFilenames="true" targetjdk="${javac.target}">
+ <ruleset>basic</ruleset>
+ <ruleset>braces</ruleset>
+ <ruleset>codesize</ruleset>
+ <ruleset>clone</ruleset>
+ <ruleset>design</ruleset>
+ <ruleset>finalizers</ruleset>
+ <ruleset>imports</ruleset>
+ <ruleset>strings</ruleset>
+ <ruleset>rulesets/migrating_to_14.xml</ruleset>
+ <ruleset>optimizations</ruleset>
+ <ruleset>sunsecure</ruleset>
+ <ruleset>unusedcode</ruleset>
+ <formatter type="html" toFile="${build.dir}/report_pmd.html"/>
+ <fileset dir="${src.java.dir}">
+ <include name="**/*.java"/>
+ </fileset>
+ </pmd>
</target>
-
- <target name="checkstyle" depends="checkstyle-avail, checkstyle-check, checkstyle-html" description="Runs Checkstyle for a code quality report"/>
-
- <!-- =================================================================== -->
- <!-- Creates the documentation -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Findbugs -->
+<!-- =================================================================== -->
+ <property name="findbugs.lib" value="${findbugs.home.dir}/lib"/>
+ <path id="libs-findbugs">
+ <fileset dir="${findbugs.lib}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ <target name="findbugs-avail" unless="findbugs.home.dir">
+ <echo message="Findbugs Support NOT Present. Please download it from http://findbugs.sf.net/ and set findbugs.home.dir in build-local.properties"/>
+ </target>
+ <target name="findbugs" depends="init, findbugs-avail, compile-java" if="findbugs.home.dir">
+ <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="libs-findbugs"/>
+ <findbugs home="${findbugs.home.dir}" output="html" reportLevel="low" effort="max" outputFile="${build.dir}/report_findbugs.html" jvmargs="-Xmx1024m">
+ <sourcePath path="${src.java.dir}"/>
+ <class location="${build.classes.dir}"/>
+ </findbugs>
+ </target>
+<!-- =================================================================== -->
+<!-- Creates the reports -->
+<!-- =================================================================== -->
+ <target name="reports" depends="checkstyle, pmd, findbugs" description="Runs all configured code quality reports"/>
+<!-- =================================================================== -->
+<!-- Creates the documentation -->
+<!-- =================================================================== -->
<target name="docs" description="Generates documentation">
<echo message="Building documentation with Forrest..."/>
- <!--
+<!--
<echo message="Make sure that you have installed Apache Forrest and"/>
<echo message="the FORREST_HOME environment variable is set (see http://forrest.apache.org/)"/>
<echo message="FORREST_HOME = ${forrest.home}"/>
-->
<echo message="Make sure you have a proper Forrest installation (see http://forrest.apache.org/)"/>
-
<condition property="forrest.call" value="forrest.bat" else="forrest">
<os family="windows"/>
</condition>
<exec executable="${forrest.call}"/>
</target>
-
- <!-- =================================================================== -->
- <!-- Creates the distribution -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Creates the distribution -->
+<!-- =================================================================== -->
<target name="dist" depends="dist-prereq,dist-src,dist-bin" description="Generates the distribution package"/>
-
<target name="dist-prereq" depends="init">
<fail message="A complete binary build requires JAI" unless="jai.present"/>
<fail message="A complete binary build requires JCE" unless="jce.present"/>
</target>
-
<target name="dist-bin" depends="all,javadocs,docs">
<echo message="Building the binary distribution files (zip,tar)"/>
<mkdir dir="${dist.bin.result.dir}"/>
@@ -1327,10 +1152,8 @@ NOTE:
<mkdir dir="${dist.bin.result.dir}/build"/>
<copy todir="${dist.bin.result.dir}/build" file="build/fop.jar"/>
<chmod file="${dist.bin.result.dir}/fop" perm="ugo+rx"/>
-
<zip zipfile="${name}-${version}-bin.zip" basedir="${dist.bin.dir}" includes="**"/>
- <tar longfile="gnu"
- destfile="${name}-${version}-bin.tar">
+ <tar longfile="gnu" destfile="${name}-${version}-bin.tar">
<tarfileset dir="${dist.bin.dir}" mode="755">
<include name="${name}-${version}/fop"/>
</tarfileset>
@@ -1342,7 +1165,6 @@ NOTE:
<gzip zipfile="${name}-${version}-bin.tar.gz" src="${name}-${version}-bin.tar"/>
<delete file="${name}-${version}-bin.tar"/>
</target>
-
<target name="dist-src" depends="all">
<echo message="Building the source distribution files (zip,tar)"/>
<mkdir dir="${dist.src.result.dir}"/>
@@ -1350,10 +1172,8 @@ NOTE:
<fileset refid="dist.src"/>
</copy>
<chmod file="${dist.src.result.dir}/fop" perm="ugo+rx"/>
-
<zip zipfile="${name}-${version}-src.zip" basedir="${dist.src.dir}" includes="**"/>
- <tar longfile="gnu"
- destfile="${name}-${version}-src.tar" >
+ <tar longfile="gnu" destfile="${name}-${version}-src.tar">
<tarfileset dir="${dist.src.dir}" mode="755">
<include name="${name}-${version}/fop"/>
</tarfileset>
@@ -1365,12 +1185,11 @@ NOTE:
<gzip zipfile="${name}-${version}-src.tar.gz" src="${name}-${version}-src.tar"/>
<delete file="${name}-${version}-src.tar"/>
</target>
-
- <!-- =================================================================== -->
- <!-- Maven artifacts -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Maven artifacts -->
+<!-- =================================================================== -->
<target name="maven-artifacts" depends="jar-main, jar-sources, jar-javadocs" description="Builds a Maven artifact that can be uploaded to a Maven repository">
- <filter token="version" value="${version}"/>
+ <filter token="version" value="${version}"/>
<mkdir dir="${build.dir}/maven"/>
<copy file="${basedir}/xmlgraphics-fop-pom-template.pom" tofile="${build.dir}/maven/pom.xml" filtering="true"/>
<copy file="${build.dir}/${name}.jar" tofile="${build.dir}/maven/${name}-${version}.jar"/>
@@ -1386,66 +1205,55 @@ NOTE:
<metainf dir="${basedir}" includes="LICENSE,NOTICE"/>
</jar>
</target>
-
- <!-- =================================================================== -->
- <!-- Generate example PDFs -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Generate example PDFs -->
+<!-- =================================================================== -->
<target name="examples" depends="package" description="Generates example PDF files">
- <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"
- classpathref="libs-run-classpath"/>
+ <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop" classpathref="libs-run-classpath"/>
<mkdir dir="${build.examples.dir}"/>
- <fop format="${build.property.examples.mime.type}" outdir="${build.examples.dir}"
- messagelevel="debug" basedir="${fo.examples.dir}" userconfig="${fo.examples.userconfig}"
- force="${fo.examples.force}">
+ <fop format="${build.property.examples.mime.type}" outdir="${build.examples.dir}" messagelevel="debug" basedir="${fo.examples.dir}" userconfig="${fo.examples.userconfig}" force="${fo.examples.force}">
<fileset dir="${fo.examples.dir}">
<include name="${fo.examples.include}"/>
</fileset>
</fop>
</target>
-
- <!-- =================================================================== -->
- <!-- Helper task to generate source files that have already been -->
- <!-- checked into CVS. For these files, CVS version is the official one -->
- <!-- and may have updates that will *not* be generated by below. This -->
- <!-- target should never be part of the normal build process. -->
- <!-- =================================================================== -->
- <target name="codegen-fo" >
- <style in="${src.codegen.dir}/fo/constants.xml" style="${src.codegen.dir}/fo/constants.xsl"
- out="Constants.java"/>
- <style in="${src.codegen.dir}/fo/foelements.xml" style="${src.codegen.dir}/fo/property-sets.xsl"
- out="PropertySets.java"/>
+<!-- =================================================================== -->
+<!-- Helper task to generate source files that have already been -->
+<!-- checked into CVS. For these files, CVS version is the official one -->
+<!-- and may have updates that will *not* be generated by below. This -->
+<!-- target should never be part of the normal build process. -->
+<!-- =================================================================== -->
+ <target name="codegen-fo">
+ <style in="${src.codegen.dir}/fo/constants.xml" style="${src.codegen.dir}/fo/constants.xsl" out="Constants.java"/>
+ <style in="${src.codegen.dir}/fo/foelements.xml" style="${src.codegen.dir}/fo/property-sets.xsl" out="PropertySets.java"/>
</target>
<!-- =================================================================== -->
- <!-- Helper task to generate source files that have already been -->
- <!-- checked into the repository. For these files, the version in the -->
- <!-- in the repository is the official one and may have updates that will-->
- <!-- *not* be generated by below. -->
- <!-- This target should never be part of the normal build process. -->
+ <!-- Helper task to generate source files that have already been checked -->
+ <!-- into the repository. For these files, the version in the -->
+ <!-- repository is the official one and may have updates that will *not* -->
+ <!-- be generated by below. This target should never be part of the -->
+ <!-- normal build process. -->
<!-- =================================================================== -->
<target name="codegen-unicode" >
<mkdir dir="${build.codegen-classes.dir}"/>
- <javac destdir="${build.codegen-classes.dir}" fork="${javac.fork}" debug="${javac.debug}"
- deprecation="${javac.deprecation}" optimize="${javac.optimize}"
- source="${javac.source}" target="${javac.target}">
+ <javac destdir="${build.codegen-classes.dir}" fork="${javac.fork}" debug="${javac.debug}" deprecation="${javac.deprecation}" optimize="${javac.optimize}" source="${javac.source}" target="${javac.target}">
<src path="${src.codegen.dir}/unicode/java"/>
</javac>
<java classname="org.apache.fop.text.linebreak.GenerateLineBreakUtils" classpath="${build.codegen-classes.dir}">
- <arg line="-o ${src.dir}/java/org/apache/fop/text/linebreak/LineBreakUtils.java" />
+ <arg line="-o ${src.dir}/java/org/apache/fop/text/linebreak/LineBreakUtils.java"/>
</java>
</target>
-
- <!-- =================================================================== -->
- <!-- Special target for Gump -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Special target for Gump -->
+<!-- =================================================================== -->
<target name="gump" depends="all, javadocs"/>
- <!-- =================================================================== -->
- <!-- Clean targets -->
- <!-- =================================================================== -->
+<!-- =================================================================== -->
+<!-- Clean targets -->
+<!-- =================================================================== -->
<target name="clean" description="Cleans the build directory">
<delete dir="${build.dir}"/>
</target>
-
<target name="distclean" depends="clean" description="Cleans the distribution target directories">
<delete dir="${dist.src.dir}"/>
<delete dir="${dist.bin.dir}"/>
@@ -1454,66 +1262,37 @@ NOTE:
<fileset dir="${basedir}" includes="${name}-*.zip"/>
</delete>
</target>
-
- <target name="validate-xdocs" description="Validate the
-xdocs. Point schemas.dir to Forrest's 'schemas' directory.">
+ <target name="validate-xdocs" description="Validate the xdocs. Point schemas.dir to Forrest's 'schemas' directory.">
<property name="schemas.dir" value="../xml-forrest/src/resources/schema"/>
<xmlvalidate failonerror="no">
<fileset dir="${xdocs.dir}" includes="**.xml"/>
<xmlcatalog>
- <entity publicId="-//APACHE//DTD Compliance V1.0//EN"
- location="src/documentation/resources/schema/dtd/compliance-v10.dtd"/>
- <entity publicId="-//APACHE//DTD Documentation V1.1//EN"
- location="${schemas.dir}/dtd/document-v11.dtd"/>
- <entity publicId="-//APACHE//DTD Specification V1.1//EN"
- location="${schemas.dir}/dtd/specification-v11.dtd"/>
- <entity publicId="-//APACHE//DTD FAQ V1.1//EN"
- location="${schemas.dir}/dtd/faq-v11.dtd"/>
- <entity publicId="-//APACHE//DTD Changes V1.1//EN"
- location="${schemas.dir}/dtd/changes-v11.dtd"/>
- <entity publicId="-//APACHE//DTD Todo V1.1//EN"
- location="${schemas.dir}/dtd/todo-v11.dtd"/>
- <entity publicId="-//APACHE//DTD Cocoon Documentation Book V1.0//EN"
- location="${schemas.dir}/dtd/book-cocoon-v10.dtd"/>
- <entity publicId="-//APACHE//DTD Cocoon Documentation Tab V1.0//EN"
- location="${schemas.dir}/dtd/tab-cocoon-v10.dtd"/>
- <entity publicId="-//APACHE//DTD How-to V1.0//EN"
- location="${schemas.dir}/dtd/howto-v10.dtd"/>
- <entity publicId="-//APACHE//DTD Gump Descriptor V1.0//EN"
- location="${schemas.dir}/dtd/xgump-draft.dtd"/>
- <entity publicId="-//APACHE//DTD JavaDoc V1.0//EN"
- location="${schemas.dir}/dtd/javadoc-v04draft.dtd"/>
- <entity publicId="-//APACHE//DTD Contributors V1.0//EN"
- location="${schemas.dir}/dtd/contributors-v10.dtd"/>
- <entity publicId="-//Outerthought//DTD Libre Configuration V0.1//EN"
- location="${schemas.dir}/dtd/libre-v01.dtd"/>
- <entity publicId="-//APACHE//ENTITIES Documentation V1.1//EN"
- location="${schemas.dir}/dtd/document-v11.mod"/>
- <entity publicId="-//APACHE//ENTITIES FAQ V1.1//EN"
- location="${schemas.dir}/dtd/faq-v11.mod"/>
- <entity publicId="-//APACHE//ENTITIES Todo V1.1//EN"
- location="${schemas.dir}/dtd/todo-v11.mod"/>
- <entity publicId="-//APACHE//ENTITIES Common Elements V1.0//EN"
- location="${schemas.dir}/dtd/common-elems-v10.mod"/>
- <entity publicId="-//APACHE//ENTITIES Common Character Entity Sets V1.0//EN"
- location="${schemas.dir}/dtd/common-charents-v10.mod"/>
-
- <entity publicId="ISO 8879-1986//ENTITIES Added Latin 1//EN//XML"
- location="${schemas.dir}/entity/ISOlat1.pen"/>
- <entity publicId="ISO 9573-15:1993//ENTITIES Greek Letters//EN//XML"
- location="${schemas.dir}/entity/ISOgrk1.pen"/>
- <entity publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
- location="${schemas.dir}/entity/ISOpub.pen"/>
- <entity publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
- location="${schemas.dir}/entity/ISOtech.pen"/>
- <entity publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
- location="${schemas.dir}/entity/ISOnum.pen"/>
- <entity publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
- location="${schemas.dir}/entity/ISOdia.pen"/>
- <entity publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
- location="${schemas.dir}/entity/ISOlat1.pen"/>
+ <entity publicId="-//APACHE//DTD Compliance V1.0//EN" location="src/documentation/resources/schema/dtd/compliance-v10.dtd"/>
+ <entity publicId="-//APACHE//DTD Documentation V1.1//EN" location="${schemas.dir}/dtd/document-v11.dtd"/>
+ <entity publicId="-//APACHE//DTD Specification V1.1//EN" location="${schemas.dir}/dtd/specification-v11.dtd"/>
+ <entity publicId="-//APACHE//DTD FAQ V1.1//EN" location="${schemas.dir}/dtd/faq-v11.dtd"/>
+ <entity publicId="-//APACHE//DTD Changes V1.1//EN" location="${schemas.dir}/dtd/changes-v11.dtd"/>
+ <entity publicId="-//APACHE//DTD Todo V1.1//EN" location="${schemas.dir}/dtd/todo-v11.dtd"/>
+ <entity publicId="-//APACHE//DTD Cocoon Documentation Book V1.0//EN" location="${schemas.dir}/dtd/book-cocoon-v10.dtd"/>
+ <entity publicId="-//APACHE//DTD Cocoon Documentation Tab V1.0//EN" location="${schemas.dir}/dtd/tab-cocoon-v10.dtd"/>
+ <entity publicId="-//APACHE//DTD How-to V1.0//EN" location="${schemas.dir}/dtd/howto-v10.dtd"/>
+ <entity publicId="-//APACHE//DTD Gump Descriptor V1.0//EN" location="${schemas.dir}/dtd/xgump-draft.dtd"/>
+ <entity publicId="-//APACHE//DTD JavaDoc V1.0//EN" location="${schemas.dir}/dtd/javadoc-v04draft.dtd"/>
+ <entity publicId="-//APACHE//DTD Contributors V1.0//EN" location="${schemas.dir}/dtd/contributors-v10.dtd"/>
+ <entity publicId="-//Outerthought//DTD Libre Configuration V0.1//EN" location="${schemas.dir}/dtd/libre-v01.dtd"/>
+ <entity publicId="-//APACHE//ENTITIES Documentation V1.1//EN" location="${schemas.dir}/dtd/document-v11.mod"/>
+ <entity publicId="-//APACHE//ENTITIES FAQ V1.1//EN" location="${schemas.dir}/dtd/faq-v11.mod"/>
+ <entity publicId="-//APACHE//ENTITIES Todo V1.1//EN" location="${schemas.dir}/dtd/todo-v11.mod"/>
+ <entity publicId="-//APACHE//ENTITIES Common Elements V1.0//EN" location="${schemas.dir}/dtd/common-elems-v10.mod"/>
+ <entity publicId="-//APACHE//ENTITIES Common Character Entity Sets V1.0//EN" location="${schemas.dir}/dtd/common-charents-v10.mod"/>
+ <entity publicId="ISO 8879-1986//ENTITIES Added Latin 1//EN//XML" location="${schemas.dir}/entity/ISOlat1.pen"/>
+ <entity publicId="ISO 9573-15:1993//ENTITIES Greek Letters//EN//XML" location="${schemas.dir}/entity/ISOgrk1.pen"/>
+ <entity publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML" location="${schemas.dir}/entity/ISOpub.pen"/>
+ <entity publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML" location="${schemas.dir}/entity/ISOtech.pen"/>
+ <entity publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML" location="${schemas.dir}/entity/ISOnum.pen"/>
+ <entity publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML" location="${schemas.dir}/entity/ISOdia.pen"/>
+ <entity publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML" location="${schemas.dir}/entity/ISOlat1.pen"/>
</xmlcatalog>
</xmlvalidate>
</target>
-
</project>
diff --git a/lib/build/asm-3.1.jar b/lib/build/asm-3.1.jar
new file mode 100644
index 000000000..8217cae0a
--- /dev/null
+++ b/lib/build/asm-3.1.jar
Binary files differ
diff --git a/lib/build/asm-commons-3.1.jar b/lib/build/asm-commons-3.1.jar
new file mode 100644
index 000000000..5f696aefc
--- /dev/null
+++ b/lib/build/asm-commons-3.1.jar
Binary files differ
diff --git a/lib/build/asm-util-3.1.jar b/lib/build/asm-util-3.1.jar
new file mode 100644
index 000000000..3702a14d8
--- /dev/null
+++ b/lib/build/asm-util-3.1.jar
Binary files differ
diff --git a/lib/build/asm.LICENSE.txt b/lib/build/asm.LICENSE.txt
new file mode 100644
index 000000000..9496b1785
--- /dev/null
+++ b/lib/build/asm.LICENSE.txt
@@ -0,0 +1,28 @@
+
+ ASM: a very small and fast Java bytecode manipulation framework
+ Copyright (c) 2000-2005 INRIA, France Telecom
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/lib/build/backport-util-concurrent-3.1.jar b/lib/build/backport-util-concurrent-3.1.jar
new file mode 100644
index 000000000..3a4c2797a
--- /dev/null
+++ b/lib/build/backport-util-concurrent-3.1.jar
Binary files differ
diff --git a/lib/build/backport-util-concurrent.LICENSE.txt b/lib/build/backport-util-concurrent.LICENSE.txt
new file mode 100644
index 000000000..c721bde03
--- /dev/null
+++ b/lib/build/backport-util-concurrent.LICENSE.txt
@@ -0,0 +1,2 @@
+Public Domain
+http://creativecommons.org/licenses/publicdomain
diff --git a/lib/build/jaxen-1.1.1.jar b/lib/build/jaxen-1.1.1.jar
new file mode 100644
index 000000000..b63363113
--- /dev/null
+++ b/lib/build/jaxen-1.1.1.jar
Binary files differ
diff --git a/lib/build/jaxen.LICENSE.txt b/lib/build/jaxen.LICENSE.txt
new file mode 100644
index 000000000..a0ca747c8
--- /dev/null
+++ b/lib/build/jaxen.LICENSE.txt
@@ -0,0 +1,33 @@
+/*
+ $Id: LICENSE.txt,v 1.5 2006/02/05 21:49:04 elharo Exp $
+
+ Copyright 2003-2006 The Werken Company. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the Jaxen Project nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ */
diff --git a/lib/build/pmd.LICENSE.txt b/lib/build/pmd.LICENSE.txt
new file mode 100644
index 000000000..49e91d0d1
--- /dev/null
+++ b/lib/build/pmd.LICENSE.txt
@@ -0,0 +1,31 @@
+Copyright (c) 2003, InfoEther, LLC
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+ * The end-user documentation included with the redistribution, if
+any, must include the following acknowledgement:
+ "This product includes software developed in part by support from
+the Defense Advanced Research Project Agency (DARPA)"
+ * Neither the name of InfoEther, LLC nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/lib/build/pmd14-4.2.2.jar b/lib/build/pmd14-4.2.2.jar
new file mode 100644
index 000000000..6321a18ae
--- /dev/null
+++ b/lib/build/pmd14-4.2.2.jar
Binary files differ
diff --git a/lib/build/retroweaver-2.0.5.jar b/lib/build/retroweaver-2.0.5.jar
new file mode 100644
index 000000000..69d488064
--- /dev/null
+++ b/lib/build/retroweaver-2.0.5.jar
Binary files differ
diff --git a/lib/build/retroweaver-rt-2.0.5.jar b/lib/build/retroweaver-rt-2.0.5.jar
new file mode 100644
index 000000000..3edaa9121
--- /dev/null
+++ b/lib/build/retroweaver-rt-2.0.5.jar
Binary files differ
diff --git a/lib/build/retroweaver.LICENSE.txt b/lib/build/retroweaver.LICENSE.txt
new file mode 100644
index 000000000..5e9b12a61
--- /dev/null
+++ b/lib/build/retroweaver.LICENSE.txt
@@ -0,0 +1,25 @@
+Copyright (c) February 2004, Toby Reyelts
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+Neither the name of Toby Reyelts nor the names of his contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
index 7fd289c05..27189bf86 100644
--- a/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
@@ -34,17 +34,17 @@ import org.apache.fop.fo.FObj;
public abstract class AbstractBaseLayoutManager
implements LayoutManager, PercentBaseContext {
- /** Indicator if this LM generates reference areas */
+ /** Indicator if this LM generates reference areas. */
protected boolean generatesReferenceArea = false;
- /** Indicator if this LM generates block areas */
+ /** Indicator if this LM generates block areas. */
protected boolean generatesBlockArea = false;
- /** The formatting object for this LM */
+ /** The formatting object for this LM. */
protected final FObj fobj;
/**
* logging instance
*/
- private static Log log = LogFactory.getLog(AbstractBaseLayoutManager.class);
+ private static final Log LOG = LogFactory.getLog(AbstractBaseLayoutManager.class);
/**
* Abstract base layout manager.
@@ -69,8 +69,8 @@ public abstract class AbstractBaseLayoutManager
// --------- Property Resolution related functions --------- //
/** {@inheritDoc} */
- public int getBaseLength(int lengthBase, FObj fobj) {
- if (fobj == this.fobj) {
+ public int getBaseLength(int lengthBase, FObj fobjx) {
+ if (fobjx == this.fobj) {
switch (lengthBase) {
case LengthBase.CONTAINING_BLOCK_WIDTH:
return getAncestorBlockAreaIPD();
@@ -81,20 +81,20 @@ public abstract class AbstractBaseLayoutManager
case LengthBase.CONTAINING_REFAREA_WIDTH:
return getReferenceAreaIPD();
default:
- log.error("Unknown base type for LengthBase:" + lengthBase);
+ LOG.error("Unknown base type for LengthBase:" + lengthBase);
return 0;
}
} else {
LayoutManager lm = getParent();
- while (lm != null && fobj != lm.getFObj()) {
+ while (lm != null && fobjx != lm.getFObj()) {
lm = lm.getParent();
}
if (lm != null) {
- return lm.getBaseLength(lengthBase, fobj);
+ return lm.getBaseLength(lengthBase, fobjx);
}
}
- log.error("Cannot find LM to handle given FO for LengthBase. ("
- + fobj.getContextInfo() + ")");
+ LOG.error("Cannot find LM to handle given FO for LengthBase. ("
+ + fobjx.getContextInfo() + ")");
return 0;
}
@@ -111,7 +111,7 @@ public abstract class AbstractBaseLayoutManager
}
lm = lm.getParent();
}
- log.error("No parent LM found");
+ LOG.error("No parent LM found");
return 0;
}
@@ -128,7 +128,7 @@ public abstract class AbstractBaseLayoutManager
}
lm = lm.getParent();
}
- log.error("No parent LM found");
+ LOG.error("No parent LM found");
return 0;
}
@@ -141,7 +141,7 @@ public abstract class AbstractBaseLayoutManager
if (lm != null) {
return lm.getContentAreaIPD();
}
- log.error("No parent LM found");
+ LOG.error("No parent LM found");
return 0;
}
@@ -154,7 +154,7 @@ public abstract class AbstractBaseLayoutManager
if (lm != null) {
return lm.getContentAreaBPD();
}
- log.error("No parent LM found");
+ LOG.error("No parent LM found");
return 0;
}
@@ -171,7 +171,7 @@ public abstract class AbstractBaseLayoutManager
}
lm = lm.getParent();
}
- log.error("No parent LM found");
+ LOG.error("No parent LM found");
return 0;
}
@@ -188,7 +188,7 @@ public abstract class AbstractBaseLayoutManager
}
lm = lm.getParent();
}
- log.error("No parent LM found");
+ LOG.error("No parent LM found");
return 0;
}
diff --git a/src/java/org/apache/fop/layoutmgr/LayoutManager.java b/src/java/org/apache/fop/layoutmgr/LayoutManager.java
index 0700ea43a..ad0d9f69c 100644
--- a/src/java/org/apache/fop/layoutmgr/LayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/LayoutManager.java
@@ -134,7 +134,7 @@ public interface LayoutManager extends PercentBaseContext {
* of the node assigned to the LM
*
* @param context the LayoutContext used to store layout information
- * @param alignment the desired text alignement
+ * @param alignment the desired text alignment
* @return the list of KnuthElements
*/
List getNextKnuthElements(LayoutContext context, int alignment);
@@ -145,7 +145,7 @@ public interface LayoutManager extends PercentBaseContext {
*
* In the context of line breaking, this method is called after hyphenation has
* been performed, in order to receive the sequence of elements representing the
- * text together with all possibile hyphenation points.
+ * text together with all possible hyphenation points.
* For example, if the text "representation" originates a single box element
* when getNextKnuthElements() is called, it will be now split in syllables
* (rep-re-sen-ta-tion) each one originating a box and divided by additional
diff --git a/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java b/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
index a3155e102..9e0b42ecb 100644
--- a/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
+++ b/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
@@ -325,7 +325,7 @@ class PageBreakingAlgorithm extends BreakingAlgorithm {
// this page contains some footnote citations
// add the footnote separator width
actualWidth += footnoteSeparatorLength.opt;
- if (actualWidth + allFootnotes <= getLineWidth()) {
+ if (actualWidth + allFootnotes <= getLineWidth(activeNode.line)) {
// there is enough space to insert all footnotes:
// add the whole allFootnotes length
actualWidth += allFootnotes;
@@ -337,7 +337,7 @@ class PageBreakingAlgorithm extends BreakingAlgorithm {
= checkCanDeferOldFootnotes(pageNode, elementIndex))
|| newFootnotes)
&& (footnoteSplit = getFootnoteSplit(pageNode,
- getLineWidth() - actualWidth, canDeferOldFootnotes)) > 0) {
+ getLineWidth(activeNode.line) - actualWidth, canDeferOldFootnotes)) > 0) {
// it is allowed to break or even defer footnotes if either:
// - there are new footnotes in the last piece of content, and
// there is space to add at least a piece of the first one
@@ -683,7 +683,7 @@ class PageBreakingAlgorithm extends BreakingAlgorithm {
insertedFootnotesLength = lastNode.totalFootnotes;
footnoteListIndex = lastNode.footnoteListIndex;
footnoteElementIndex = lastNode.footnoteElementIndex;
- int availableBPD = getLineWidth();
+ int availableBPD = getLineWidth(lastNode.line);
int split = 0;
KnuthPageNode prevNode = lastNode;
@@ -718,7 +718,7 @@ class PageBreakingAlgorithm extends BreakingAlgorithm {
removeNode(prevNode.line, prevNode);
prevNode = node;
- availableBPD = getLineWidth();
+ availableBPD = getLineWidth(node.line);
}
}
// create the last node
diff --git a/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
index e90927699..76002da2f 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java
@@ -39,16 +39,14 @@ import org.apache.fop.layoutmgr.TraitSetter;
*/
public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManager {
- /** The graphics object this LM deals with */
- protected AbstractGraphics fobj;
-
/**
- * Constructor
- * @param node the formatting object that creates this area
+ * Constructor.
+ *
+ * @param node
+ * the formatting object that creates this area
*/
public AbstractGraphicsLayoutManager(AbstractGraphics node) {
super(node);
- fobj = node;
}
/**
@@ -57,6 +55,7 @@ public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManage
* @return the viewport inline area
*/
private Viewport getInlineArea() {
+ final AbstractGraphics fobj = (AbstractGraphics)this.fobj;
Dimension intrinsicSize = new Dimension(
fobj.getIntrinsicWidth(),
fobj.getIntrinsicHeight());
@@ -113,6 +112,7 @@ public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManage
/** {@inheritDoc} */
protected AlignmentContext makeAlignmentContext(LayoutContext context) {
+ final AbstractGraphics fobj = (AbstractGraphics)this.fobj;
return new AlignmentContext(
get(context).getAllocBPD()
, fobj.getAlignmentAdjust()
@@ -128,7 +128,7 @@ public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManage
* the viewport.
* @return the appropriate area
*/
- abstract Area getChildArea();
+ protected abstract Area getChildArea();
// --------- Property Resolution related functions --------- //
@@ -138,31 +138,14 @@ public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManage
public int getBaseLength(int lengthBase, FObj fobj) {
switch (lengthBase) {
case LengthBase.IMAGE_INTRINSIC_WIDTH:
- return getIntrinsicWidth();
+ return ((AbstractGraphics)fobj).getIntrinsicWidth();
case LengthBase.IMAGE_INTRINSIC_HEIGHT:
- return getIntrinsicHeight();
+ return ((AbstractGraphics)fobj).getIntrinsicHeight();
case LengthBase.ALIGNMENT_ADJUST:
return get(null).getBPD();
default: // Delegate to super class
return super.getBaseLength(lengthBase, fobj);
}
}
-
- /**
- * Returns the intrinsic width of the e-g.
- * @return the width of the element
- */
- protected int getIntrinsicWidth() {
- return fobj.getIntrinsicWidth();
- }
-
- /**
- * Returns the intrinsic height of the e-g.
- * @return the height of the element
- */
- protected int getIntrinsicHeight() {
- return fobj.getIntrinsicHeight();
- }
-
}
diff --git a/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java
index 5e3c0e2fa..d7bff5a5c 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/ExternalGraphicLayoutManager.java
@@ -29,24 +29,20 @@ import org.apache.fop.fo.flow.ExternalGraphic;
*/
public class ExternalGraphicLayoutManager extends AbstractGraphicsLayoutManager {
- private ExternalGraphic fobj;
-
/**
- * Constructor
- * @param node the fo:external-graphic formatting object that creates the area
+ * Constructor.
+ *
+ * @param node
+ * the fo:external-graphic formatting object that creates the
+ * area
*/
public ExternalGraphicLayoutManager(ExternalGraphic node) {
super(node);
- this.fobj = node;
}
/** {@inheritDoc} */
protected Area getChildArea() {
- Image img = new Image(fobj.getSrc());
- if (fobj.hasExtensionAttachments()) {
- img.setExtensionAttachments(fobj.getExtensionAttachments());
- }
- return img;
+ return new Image(((ExternalGraphic) fobj).getSrc());
}
}
diff --git a/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java b/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java
index e7da50a9a..5f9365f83 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java
@@ -29,20 +29,19 @@ import org.apache.fop.fo.flow.InstreamForeignObject;
*/
public class InstreamForeignObjectLM extends AbstractGraphicsLayoutManager {
- private InstreamForeignObject fobj;
-
/**
- * Constructor
- * @param node the formatting object that creates this area
+ * Constructor.
+ *
+ * @param node
+ * the formatting object that creates this area
*/
public InstreamForeignObjectLM(InstreamForeignObject node) {
super(node);
- fobj = node;
}
/** {@inheritDoc} */
protected Area getChildArea() {
- XMLObj child = (XMLObj) fobj.getChildXMLObj();
+ XMLObj child = ((InstreamForeignObject) fobj).getChildXMLObj();
org.w3c.dom.Document doc = child.getDOMDocument();
String ns = child.getNamespaceURI();
diff --git a/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
index 552e74889..19a8cdf2d 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
@@ -91,7 +91,7 @@ public abstract class LeafNodeLayoutManager extends AbstractLayoutManager
/**
- * Create a Leaf node layout mananger.
+ * Create a Leaf node layout manager.
* @param node the FObj to attach to this LM.
*/
public LeafNodeLayoutManager(FObj node) {
@@ -99,7 +99,7 @@ public abstract class LeafNodeLayoutManager extends AbstractLayoutManager
}
/**
- * Create a Leaf node layout mananger.
+ * Create a Leaf node layout manager.
*/
public LeafNodeLayoutManager() {
}
diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
index b77f36f0d..87077ee77 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
@@ -387,9 +387,8 @@ public class LineLayoutManager extends InlineStackingLayoutManager
InlineLevelEventProducer eventProducer
= InlineLevelEventProducer.Provider.get(
getFObj().getUserAgent().getEventBroadcaster());
- eventProducer.lineOverflows(this, addedPositions + 1,
+ eventProducer.lineOverflows(this, bestActiveNode.line,
-lack, getFObj().getLocator());
- String textDiff = (lack < -50000 ? "more than 50 points" : (-lack) + "mpt");
}
}
diff --git a/status.xml b/status.xml
index d8e09fa79..3f30869ca 100644
--- a/status.xml
+++ b/status.xml
@@ -53,6 +53,11 @@
<changes>
<release version="FOP Trunk" date="TBD">
+ <action context="Layout" dev="LF" type="fix">
+ Fixed an inconsistency in footnote handling that led to unnecessary
+ empty areas in pages whose last normal line contains footnotes
+ when the page bpd is not the same for all pages.
+ </action>
<!-- change reverted, to be added back later
<action context="Renderers" dev="AC" importance="high" type="add">
Added SVG support for AFP (GOCA).
diff --git a/test/layoutengine/standard-testcases/footnote_changing-page-bpd.xml b/test/layoutengine/standard-testcases/footnote_changing-page-bpd.xml
new file mode 100644
index 000000000..672bea7bf
--- /dev/null
+++ b/test/layoutengine/standard-testcases/footnote_changing-page-bpd.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks the positioning of footnotes when the body bpd changes
+ from page to page.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="first"
+ page-height="200pt"
+ page-width="140pt">
+ <fo:region-body background-color="lightgrey"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="other"
+ page-height="200pt"
+ page-width="140pt">
+ <fo:region-body margin-top="20pt"
+ background-color="lightgrey"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="all">
+ <fo:single-page-master-reference master-reference="first"/>
+ <fo:repeatable-page-master-reference master-reference="other"/>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="all">
+ <fo:flow flow-name="xsl-region-body" font-family="Courier">
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 1.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 2.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 3.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 4.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 5.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 6.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 7.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 8.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 9.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 10.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 11.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 12.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 13.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 14.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 15.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 16.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 17.
+ <fo:footnote>
+ <fo:inline font-size="50%" vertical-align="top">1</fo:inline>
+ <fo:footnote-body>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height"><fo:inline font-size="50%" vertical-align="top">1</fo:inline> ftnt line 1/3.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 2/3.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 3/3.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote>
+ </fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 18.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 19.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 20.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="3" xpath="count(//pageViewport)"/>
+ <!-- body height for page 1 -->
+ <eval expected="200000" xpath="//pageViewport[1]/page/regionViewport/@bpd"/>
+ <!-- body height for page 2 -->
+ <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/@bpd"/>
+ <!-- last content line in page 2 -->
+ <eval expected="line 17. " xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[last()]/lineArea/text[1]"/>
+ <!-- last footnote line in page 2 -->
+ <eval expected="ftnt line 2/3." xpath="//pageViewport[2]/page/regionViewport/regionBody/footnote//block[last()]/lineArea/text[1]"/>
+ <!-- body height for page 3 -->
+ <eval expected="180000" xpath="//pageViewport[3]/page/regionViewport/@bpd"/>
+ <!-- first content line in page 3 -->
+ <eval expected="line 18." xpath="//pageViewport[3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea/text[1]"/>
+ <!-- footnote line in page 3 -->
+ <eval expected="ftnt line 3/3." xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote//block[1]/lineArea/text[1]"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/footnote_changing-page-bpd_2.xml b/test/layoutengine/standard-testcases/footnote_changing-page-bpd_2.xml
new file mode 100644
index 000000000..635cb171b
--- /dev/null
+++ b/test/layoutengine/standard-testcases/footnote_changing-page-bpd_2.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks the positioning of footnotes when the body bpd changes
+ from page to page, in particular when footnote pages are created.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="first"
+ page-height="200pt"
+ page-width="140pt">
+ <fo:region-body background-color="lightgrey"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="second"
+ page-height="200pt"
+ page-width="140pt">
+ <fo:region-body margin-top="60pt"
+ background-color="lightgrey"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="other"
+ page-height="200pt"
+ page-width="140pt">
+ <fo:region-body margin-top="20pt"
+ background-color="lightgrey"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="all">
+ <fo:single-page-master-reference master-reference="first"/>
+ <fo:single-page-master-reference master-reference="second"/>
+ <fo:repeatable-page-master-reference master-reference="other"/>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="all">
+ <fo:flow flow-name="xsl-region-body" font-family="Courier">
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 1.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 2.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 3.</fo:block>
+ <fo:block line-height="20pt" line-stacking-strategy="font-height">line 4.
+ <fo:footnote>
+ <fo:inline font-size="50%" vertical-align="top">1</fo:inline>
+ <fo:footnote-body>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height"><fo:inline font-size="50%" vertical-align="top">1</fo:inline> ftnt line 1.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 2.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 3.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 4.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 5.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 6.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 7.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 8.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 9.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 10.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 11.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 12.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 13.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 14.</fo:block>
+ <fo:block background-color="pink" line-height="20pt" line-stacking-strategy="font-height">ftnt line 15.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="3" xpath="count(//pageViewport)"/>
+ <!-- body height for page 1 -->
+ <eval expected="200000" xpath="//pageViewport[1]/page/regionViewport/@bpd"/>
+
+ <!-- body height for page 2 -->
+ <eval expected="140000" xpath="//pageViewport[2]/page/regionViewport/@bpd"/>
+ <!-- first footnote line in page 2 -->
+ <eval expected="ftnt line 7." xpath="//pageViewport[2]/page/regionViewport/regionBody/footnote//block[1]/lineArea/text[1]"/>
+ <!-- last footnote line in page 2 -->
+ <eval expected="ftnt line 13." xpath="//pageViewport[2]/page/regionViewport/regionBody/footnote//block[last()]/lineArea/text[1]"/>
+
+ <!-- body height for page 3 -->
+ <eval expected="180000" xpath="//pageViewport[3]/page/regionViewport/@bpd"/>
+ <!-- first footnote line in page 3 -->
+ <eval expected="ftnt line 14." xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote//block[1]/lineArea/text[1]"/>
+ <!-- last footnote line in page 3 -->
+ <eval expected="ftnt line 15." xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote//block[last()]/lineArea/text[1]"/>
+ </checks>
+</testcase>