You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by sp...@apache.org on 2011/01/21 12:36:18 UTC
svn commit: r1061759 [1/3] - in
/xmlgraphics/fop/branches/Temp_ComplexScripts: ./
examples/plan/src/org/apache/fop/plan/ lib/
src/documentation/content/xdocs/trunk/ src/java/org/apache/fop/afp/apps/
src/java/org/apache/fop/afp/parser/ src/java/org/apac...
Author: spepping
Date: Fri Jan 21 11:36:16 2011
New Revision: 1061759
URL: http://svn.apache.org/viewvc?rev=1061759&view=rev
Log:
Merged /xmlgraphics/fop/trunk:r1053043-1061681
Added:
xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/hyphenation-testcases/inline_hyphenation_border.xml
- copied unchanged from r1061681, xmlgraphics/fop/trunk/test/layoutengine/hyphenation-testcases/inline_hyphenation_border.xml
xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/fox_widow-content-limit_bug48380.xml
- copied unchanged from r1061681, xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/fox_widow-content-limit_bug48380.xml
Removed:
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/InlineCharIterator.java
xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/inline_hyphenation_border.xml
Modified:
xmlgraphics/fop/branches/Temp_ComplexScripts/ (props changed)
xmlgraphics/fop/branches/Temp_ComplexScripts/build.xml
xmlgraphics/fop/branches/Temp_ComplexScripts/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/fop.cmd
xmlgraphics/fop/branches/Temp_ComplexScripts/fop.js
xmlgraphics/fop/branches/Temp_ComplexScripts/lib/xmlgraphics-commons-1.5svn.jar
xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/configuration.xml
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/apps/ (props changed)
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/ (props changed)
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactory.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeHandler.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionReference.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/Event.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/EventExceptionManager.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/PropertyExceptionFactory.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/UnsupportedOperationExceptionFactory.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/ValidationExceptionFactory.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ElementMappingRegistry.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/InternalElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/OldExtensionElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/svg/BatikExtensionElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/svg/SVGElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/RDFElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/XMPElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/Declarations.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageProductionException.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageSequence.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/Region.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/RegionAfter.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/RegionBefore.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/RegionBody.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/RegionEnd.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/RegionStart.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/Root.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/SubSequenceSpecifier.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fonts/FontManagerConfigurator.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/ElementListUtils.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/LayoutException.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/AbstractRenderer.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/XMLHandlerRegistry.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/afp/extensions/AFPElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pcl/extensions/PCLElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/pdf/extensions/PDFElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/render/ps/extensions/PSExtensionElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/text/linebreak/LineBreakStatus.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/util/ColorExt.java (props changed)
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/util/ColorUtil.java
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/util/text/AdvancedMessageFormat.java
xmlgraphics/fop/branches/Temp_ComplexScripts/status.xml
xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/fotreetest/ext/TestElementMapping.java
xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java
xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java
xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/traits/BorderPropsTestCase.java
xmlgraphics/fop/branches/Temp_ComplexScripts/test/java/org/apache/fop/util/ColorUtilTestCase.java
xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/inline_keep-together.xml
xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/page-number-citation-last_complex.xml
xmlgraphics/fop/branches/Temp_ComplexScripts/test/test-no-xml-metrics.xconf
Propchange: xmlgraphics/fop/branches/Temp_ComplexScripts/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 21 11:36:16 2011
@@ -1,4 +1,4 @@
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign:603620-746655
/xmlgraphics/fop/branches/fop-0_95:684572,688085,688696
/xmlgraphics/fop/branches/fop-1_0:959975-964707
-/xmlgraphics/fop/trunk:981451-1053042
+/xmlgraphics/fop/trunk:981451-1061681
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/build.xml?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/build.xml (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/build.xml Fri Jan 21 11:36:16 2011
@@ -85,11 +85,11 @@ list of possible build targets.
</patternset>
</fileset>
<patternset id="dist.src.lib.tools">
- <include name="lib/build/asm*"/>
- <include name="lib/build/backport-util-concurrent*"/>
- <include name="lib/build/jaxen*"/>
- <include name="lib/build/pmd*"/>
- <include name="lib/build/qdox*"/>
+ <include name="lib/build/asm*"/>
+ <include name="lib/build/backport-util-concurrent*"/>
+ <include name="lib/build/jaxen*"/>
+ <include name="lib/build/pmd*"/>
+ <include name="lib/build/qdox*"/>
<include name="lib/build/xmlunit*"/>
</patternset>
<fileset dir="${basedir}" id="dist.src">
@@ -98,7 +98,7 @@ list of possible build targets.
<include name="hyph/hyphenation.dtd"/>
<include name="hyph/readme"/>
<patternset refid="dist.lib"/>
- <patternset refid="dist.src.lib.tools"/>
+ <patternset refid="dist.src.lib.tools"/>
<include name="lib/servlet*"/>
<include name="test/**"/>
<include name="examples/**"/>
@@ -207,8 +207,24 @@ list of possible build targets.
<property environment="env"/>
<property name="forrest.home" value="${env.FORREST_HOME}"/>
<import file="${env.FORREST_HOME}/main/forrest.build.xml" optional="true"/>
- -->
-<!-- =================================================================== -->
+-->
+
+ <presetdef name="javac">
+ <javac fork="${javac.fork}"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}"
+ optimize="${javac.optimize}"
+ source="${javac.source}" target="${javac.target}"/>
+ </presetdef>
+
+ <presetdef name="junit">
+ <junit haltonfailure="${junit.haltonfailure}"
+ fork="${junit.fork}"
+ printsummary="${junit.printsummary}"
+ maxmemory="256m"/>
+ </presetdef>
+
+ <!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init" depends="init-avail">
@@ -334,7 +350,7 @@ list of possible build targets.
<target name="compile-java" depends="init, codegen">
<!-- 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}" includeAntRuntime="true">
+ <javac destdir="${build.classes.dir}" includeAntRuntime="true">
<src path="${build.gensrc.dir}"/>
<src path="${src.java.dir}"/>
<patternset includes="**/*.java"/>
@@ -343,7 +359,7 @@ list of possible build targets.
<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}" includeAntRuntime="true">
+ <javac destdir="${build.sandbox-classes.dir}" includeAntRuntime="true">
<src path="${src.sandbox.dir}"/>
<patternset includes="**/*.java"/>
<patternset refid="exclude-jai"/>
@@ -355,7 +371,7 @@ list of possible build targets.
</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}" includeAntRuntime="true">
+ <javac destdir="${build.codegen-classes.dir}" includeAntRuntime="true">
<src path="${src.codegen.dir}/java"/>
<patternset includes="**/*.java"/>
<classpath>
@@ -419,21 +435,21 @@ list of possible build targets.
<!-- (src/java/org/apache/fop/hyphenation/classes.xml). -->
<!-- =================================================================== -->
<target name="codegen-hyphenation-classes">
- <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}">
<src path="${src.codegen.dir}/unicode/java"/>
</javac>
- <java classname="org.apache.fop.hyphenation.UnicodeClasses" resultproperty="classes.result" classpath="${build.codegen-classes.dir}">
+ <java classname="org.apache.fop.hyphenation.UnicodeClasses" resultproperty="classes.result" classpath="${build.codegen-classes.dir}">
<arg value="${src.dir}/java/org/apache/fop/hyphenation/classes.xml"/>
- </java>
- <condition property="classes.result.message" value="Generation of classes successful">
- <not>
- <isfailure code="${classes.result}"/>
- </not>
- </condition>
- <condition property="classes.result.message" value="Generation of classes failed">
- <isfailure code="${classes.result}"/>
- </condition>
- <echo message="${classes.result.message}"/>
+ </java>
+ <condition property="classes.result.message" value="Generation of classes successful">
+ <not>
+ <isfailure code="${classes.result}"/>
+ </not>
+ </condition>
+ <condition property="classes.result.message" value="Generation of classes failed">
+ <isfailure code="${classes.result}"/>
+ </condition>
+ <echo message="${classes.result.message}"/>
</target>
<!-- =================================================================== -->
<!-- compiles hyphenation patterns -->
@@ -444,20 +460,20 @@ list of possible build targets.
<pathelement location="${build.classes.dir}"/>
</path>
<mkdir dir="${build.classes.dir}/hyph"/>
- <java classname="org.apache.fop.hyphenation.SerializeHyphPattern" fork="true" resultproperty="hyph.result" classpathref="hyph-classpath">
- <arg value="${user.hyph.dir}"/>
- <arg value="${build.classes.dir}/hyph"/>
- <jvmarg value="-Xss${hyph.stacksize}"/>
- </java>
- <condition property="hyph.result.message" value="Hyphenation successful">
- <not>
- <isfailure code="${hyph.result}"/>
- </not>
- </condition>
- <condition property="hyph.result.message" value="Hyphenation failed">
- <isfailure code="${hyph.result}"/>
- </condition>
- <echo message="${hyph.result.message}"/>
+ <java classname="org.apache.fop.hyphenation.SerializeHyphPattern" fork="true" resultproperty="hyph.result" classpathref="hyph-classpath">
+ <arg value="${user.hyph.dir}"/>
+ <arg value="${build.classes.dir}/hyph"/>
+ <jvmarg value="-Xss${hyph.stacksize}"/>
+ </java>
+ <condition property="hyph.result.message" value="Hyphenation successful">
+ <not>
+ <isfailure code="${hyph.result}"/>
+ </not>
+ </condition>
+ <condition property="hyph.result.message" value="Hyphenation failed">
+ <isfailure code="${hyph.result}"/>
+ </condition>
+ <echo message="${hyph.result.message}"/>
</target>
<target name="uptodate-jar-hyphenation" depends="compile-hyphenation">
<uptodate property="jar.hyphenation.uptodate" targetfile="${build.dir}/fop-hyph.jar">
@@ -704,7 +720,7 @@ list of possible build targets.
<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}" includeAntRuntime="true">
+ <javac destdir="${build.dir}/test-classes" includeAntRuntime="true">
<src path="${test.dir}/java"/>
<patternset refid="test-sources"/>
<classpath>
@@ -740,8 +756,7 @@ list of possible build targets.
<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}" printsummary="${junit.printsummary}">
- <jvmarg value="-Xmx1024m"/>
+ <junit dir="${basedir}">
<sysproperty key="basedir" value="${basedir}"/>
<sysproperty key="jawa.awt.headless" value="true"/>
<formatter type="brief" usefile="false" if="junit.formatter.brief.use"/>
@@ -763,7 +778,7 @@ list of possible build targets.
previous test block succeeded it indicates that the packaging of the allinone
JAR needs to be updated.
-->
- <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure" printsummary="${junit.printsummary}">
+ <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
<sysproperty key="basedir" value="${basedir}"/>
<sysproperty key="jawa.awt.headless" value="true"/>
<formatter type="brief" usefile="false" if="junit.formatter.brief.use"/>
@@ -786,8 +801,7 @@ list of possible build targets.
</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" printsummary="${junit.printsummary}">
- <jvmarg value="-Xmx1024m"/>
+ <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
<sysproperty key="basedir" value="${basedir}"/>
<sysproperty key="jawa.awt.headless" value="true"/>
<sysproperty key="fop.layoutengine.disabled" value="${layoutengine.disabled}"/>
@@ -804,7 +818,7 @@ list of possible build targets.
</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" printsummary="${junit.printsummary}">
+ <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
<sysproperty key="basedir" value="${basedir}"/>
<sysproperty key="jawa.awt.headless" value="true"/>
<formatter type="brief" usefile="false" if="junit.formatter.brief.use"/>
@@ -840,7 +854,7 @@ list of possible build targets.
</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" printsummary="${junit.printsummary}">
+ <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
<sysproperty key="basedir" value="${basedir}"/>
<sysproperty key="jawa.awt.headless" value="true"/>
<sysproperty key="fop.layoutengine.disabled" value="${layoutengine.disabled}"/>
@@ -857,7 +871,7 @@ list of possible build targets.
</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" printsummary="${junit.printsummary}">
+ <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
<sysproperty key="basedir" value="${basedir}"/>
<sysproperty key="jawa.awt.headless" value="true"/>
<sysproperty key="fop.layoutengine.disabled" value="${layoutengine.disabled}"/>
@@ -875,7 +889,7 @@ list of possible build targets.
<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" printsummary="${junit.printsummary}">
+ <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
<sysproperty key="basedir" value="${basedir}"/>
<sysproperty key="jawa.awt.headless" value="true"/>
<sysproperty key="fop.layoutengine.disabled" value="${fotree.disabled}"/>
@@ -899,7 +913,7 @@ list of possible build targets.
<attribute name="outfile"/>
<sequential>
<echo message="Running @{title} tests..."/>
- <junit dir="${basedir}" haltonfailure="${junit.haltonfailure}" fork="${junit.fork}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure" printsummary="${junit.printsummary}">
+ <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
<sysproperty key="basedir" value="${basedir}/@{basedir}"/>
<sysproperty key="jawa.awt.headless" value="true"/>
<sysproperty key="fop.layoutengine.disabled" value="${layoutengine.disabled}"/>
@@ -936,7 +950,7 @@ list of possible build targets.
</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" printsummary="${junit.printsummary}">
+ <junit dir="${basedir}" errorproperty="fop.junit.error" failureproperty="fop.junit.failure">
<sysproperty key="basedir" value="${basedir}"/>
<sysproperty key="jawa.awt.headless" value="true"/>
<formatter type="brief" usefile="false" if="junit.formatter.brief.use"/>
@@ -1104,7 +1118,7 @@ NOTE:
<!-- =================================================================== -->
<property name="checkstyle.noframes.xslt" value="${basedir}/checkstyle-noframes.xsl" />
<condition property="checkstyle.avail">
- <and>
+ <and>
<available classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
<classpath>
<path refid="libs-tools-build-classpath"/>
@@ -1339,11 +1353,11 @@ NOTE:
<!-- Nightly builds -->
<!-- =================================================================== -->
<target name="junit-nightly-build" depends="junit-userconfig,junit-text-linebreak,junit-fotree">
- <fail>
- <condition>
- <or>
- <isset property="fop.junit.error"/>
- <isset property="fop.junit.failure"/>
+ <fail>
+ <condition>
+ <or>
+ <isset property="fop.junit.error"/>
+ <isset property="fop.junit.failure"/>
</or>
</condition>
NOTE:
@@ -1425,7 +1439,7 @@ NOTE:
<!-- =================================================================== -->
<target name="codegen-unicode" 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}">
<src path="${src.codegen.dir}/unicode/java"/>
<classpath>
<path refid="libs-build-classpath"/>
@@ -1456,7 +1470,7 @@ NOTE:
<delete>
<fileset dir="${basedir}" includes="${name}-*.tar.gz"/>
<fileset dir="${basedir}" includes="${name}-*.zip"/>
- <fileset dir="${basedir}" includes="${name}-bundle.jar"/>
+ <fileset dir="${basedir}" includes="${name}-bundle.jar"/>
</delete>
</target>
<target name="validate-xdocs" description="Validate the xdocs. Point schemas.dir to Forrest's 'schemas' directory.">
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java Fri Jan 21 11:36:16 2011
@@ -45,7 +45,7 @@ public class PlanElementMapping extends
/** {@inheritDoc} */
protected void initialize() {
if (foObjs == null) {
- foObjs = new java.util.HashMap();
+ foObjs = new java.util.HashMap<String, Maker>();
foObjs.put("plan", new PE());
foObjs.put(DEFAULT, new PlanMaker());
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/fop.cmd
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/fop.cmd?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/fop.cmd (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/fop.cmd Fri Jan 21 11:36:16 2011
@@ -19,7 +19,7 @@ SETLOCAL ENABLEDELAYEDEXPANSION
rem %~dp0 is the expanded pathname of the current script under NT
set LOCAL_FOP_HOME=
-if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME=%~dp0
+if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME="%~dp0"
rem Code from Apache Ant project
rem Slurp the command line arguments. This loop allows for an unlimited number
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/fop.js
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/fop.js?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/fop.js (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/fop.js Fri Jan 21 11:36:16 2011
@@ -223,7 +223,7 @@ function fop_exec() {
+ (config.Exists("JAVA_OPTS")?config.Item("JAVA_OPTS") + " ":"")
+ (config.Exists("LOGCHOICE")?config.Item("LOGCHOICE") + " ":"")
+ (config.Exists("LOGLEVEL")?config.Item("LOGLEVEL") + " ":"")
- "-classpath \"" + local_classpath + "\" "
+ + "-classpath \"" + local_classpath + "\" "
+ (config.Exists("FOP_OPTS")?config.Item("FOP_OPTS"):"")
+ "org.apache.fop.cli.Main " + fop_exec_args;
if (debug || fop_exec_debug) {
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/lib/xmlgraphics-commons-1.5svn.jar
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/lib/xmlgraphics-commons-1.5svn.jar?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
Binary files - no diff available.
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/configuration.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/configuration.xml?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/configuration.xml (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/documentation/content/xdocs/trunk/configuration.xml Fri Jan 21 11:36:16 2011
@@ -90,6 +90,9 @@
<td>disabled</td>
</tr>
<tr>
+ <td colspan="4">Relative URIs for the above three properties are evaluated relative to the base URI of the configuration file. If the configuration is provided programmatically, the base URI can be set with <code>FopFactory.setUserConfigBaseURI</code>; default is the current working directory.</td>
+ </tr>
+ <tr>
<td>hyphenation-pattern</td>
<td>String, attribute lang, attribute country (optional)</td>
<td>Register a file name for the hyphenation pattern for the mentioned language and country. Language ll and country CC must both consist of two letters.</td>
Propchange: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/apps/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 21 11:36:16 2011
@@ -2,4 +2,4 @@
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/apps:603620-746655
/xmlgraphics/fop/branches/fop-0_95/src/java/org/apache/fop/afp/apps:684572,688085,688696
/xmlgraphics/fop/branches/fop-1_0/src/java/org/apache/fop/afp/apps:959975-964707
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps:981451-1053042
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps:981451-1061681
Propchange: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 21 11:36:16 2011
@@ -2,4 +2,4 @@
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/parser:603620-746655
/xmlgraphics/fop/branches/fop-0_95/src/java/org/apache/fop/afp/parser:684572,688085,688696
/xmlgraphics/fop/branches/fop-1_0/src/java/org/apache/fop/afp/parser:959975-964707
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/parser:981451-1053042
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/parser:981451-1061681
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactory.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactory.java Fri Jan 21 11:36:16 2011
@@ -24,6 +24,7 @@ import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.net.MalformedURLException;
+import java.net.URI;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -701,6 +702,15 @@ public class FopFactory implements Image
}
/**
+ * Set the base URI for the user configuration
+ * Useful for programmatic configurations
+ * @param baseURI the base URI
+ */
+ public void setUserConfigBaseURI(URI baseURI) {
+ config.setBaseURI(baseURI);
+ }
+
+ /**
* Get the user configuration.
* @return the user configuration
*/
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/apps/FopFactoryConfigurator.java Fri Jan 21 11:36:16 2011
@@ -22,6 +22,8 @@ package org.apache.fop.apps;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;
@@ -78,6 +80,9 @@ public class FopFactoryConfigurator {
/** Fop factory configuration */
private Configuration cfg = null;
+ /** The base URI of the configuration file **/
+ private URI baseURI = null;
+
/**
* Default constructor
* @param factory fop factory
@@ -130,17 +135,23 @@ public class FopFactoryConfigurator {
// base definitions for relative path resolution
if (cfg.getChild("base", false) != null) {
+ String path = cfg.getChild("base").getValue(null);
+ if (baseURI != null) {
+ path = baseURI.resolve(path).normalize().toString();
+ }
try {
- factory.setBaseURL(
- cfg.getChild("base").getValue(null));
+ factory.setBaseURL(path);
} catch (MalformedURLException mfue) {
LogUtil.handleException(log, mfue, strict);
}
}
if (cfg.getChild("hyphenation-base", false) != null) {
+ String path = cfg.getChild("hyphenation-base").getValue(null);
+ if (baseURI != null) {
+ path = baseURI.resolve(path).normalize().toString();
+ }
try {
- factory.setHyphenBaseURL(
- cfg.getChild("hyphenation-base").getValue(null));
+ factory.setHyphenBaseURL(path);
} catch (MalformedURLException mfue) {
LogUtil.handleException(log, mfue, strict);
}
@@ -259,7 +270,7 @@ public class FopFactoryConfigurator {
}
// configure font manager
- new FontManagerConfigurator(cfg).configure(factory.getFontManager(), strict);
+ new FontManagerConfigurator(cfg, baseURI).configure(factory.getFontManager(), strict);
// configure image loader framework
configureImageLoading(cfg.getChild("image-loading", false), strict);
@@ -339,6 +350,7 @@ public class FopFactoryConfigurator {
*/
public void setUserConfig(Configuration cfg) throws FOPException {
this.cfg = cfg;
+ setBaseURI();
configure(this.factory);
}
@@ -349,4 +361,34 @@ public class FopFactoryConfigurator {
public Configuration getUserConfig() {
return this.cfg;
}
+
+ /**
+ * @return the baseURI
+ */
+ public URI getBaseURI() {
+ return baseURI;
+ }
+
+ /**
+ * @param baseURI the baseURI to set
+ */
+ public void setBaseURI(URI baseURI) {
+ this.baseURI = baseURI;
+ }
+
+ private void setBaseURI() throws FOPException {
+ String loc = cfg.getLocation();
+ try {
+ if (loc != null && loc.startsWith("file:")) {
+ baseURI = new URI(loc);
+ baseURI = baseURI.resolve(".").normalize();
+ }
+ if (baseURI == null) {
+ baseURI = new File(System.getProperty("user.dir")).toURI();
+ }
+ } catch (URISyntaxException e) {
+ throw new FOPException(e);
+ }
+ }
+
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeHandler.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/AreaTreeHandler.java Fri Jan 21 11:36:16 2011
@@ -305,6 +305,7 @@ public class AreaTreeHandler extends FOE
model.handleOffDocumentItem(data);
}
}
+ idTracker.signalIDProcessed(rootFObj.getId());
}
model.endDocument();
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Block.java Fri Jan 21 11:36:16 2011
@@ -129,7 +129,7 @@ public class Block extends BlockParent {
*/
public int getStartIndent() {
Integer startIndent = (Integer)getTrait(Trait.START_INDENT);
- return (startIndent != null ? startIndent.intValue() : 0);
+ return (startIndent != null ? startIndent : 0);
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Page.java Fri Jan 21 11:36:16 2011
@@ -123,7 +123,7 @@ public class Page extends AreaTreeObject
for (Iterator regenum = spm.getRegions().values().iterator();
regenum.hasNext();) {
Region r = (Region)regenum.next();
- RegionViewport rvp = makeRegionViewport(r, reldims, pageCTM, spm);
+ RegionViewport rvp = makeRegionViewport(r, reldims, pageCTM);
if (r.getNameId() == Constants.FO_REGION_BODY) {
rr = new BodyRegion((RegionBody) r, rvp);
} else {
@@ -138,7 +138,7 @@ public class Page extends AreaTreeObject
setRegionReferencePosition(rr, r, rvp.getViewArea());
rvp.setRegionReference(rr);
setRegionViewport(r.getNameId(), rvp);
- }
+ }
}
/**
@@ -153,12 +153,10 @@ public class Page extends AreaTreeObject
* @param r the region the viewport is to be created for
* @param reldims relative dimensions
* @param pageCTM page coordinate transformation matrix
- * @param spm the simple-page-master for this page
* @return the new region viewport
*/
- private RegionViewport makeRegionViewport(Region r, FODimension reldims, CTM pageCTM,
- SimplePageMaster spm) {
- Rectangle2D relRegionRect = r.getViewportRectangle(reldims, spm);
+ private RegionViewport makeRegionViewport(Region r, FODimension reldims, CTM pageCTM) {
+ Rectangle2D relRegionRect = r.getViewportRectangle(reldims);
Rectangle2D absRegionRect = pageCTM.transform(relRegionRect);
// Get the region viewport rectangle in absolute coords by
// transforming it using the page CTM
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionReference.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionReference.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionReference.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/RegionReference.java Fri Jan 21 11:36:16 2011
@@ -33,8 +33,6 @@ public class RegionReference extends Are
private static final long serialVersionUID = -298980963268244238L;
- /** Reference to the region FO. */
- //protected Region regionFO;
private int regionClass;
private String regionName;
private CTM ctm;
@@ -42,7 +40,7 @@ public class RegionReference extends Are
// the list of block areas from the static flow
private ArrayList blocks = new ArrayList();
- /** the parent RegionViewport for this object */
+ /** the parent {@link RegionViewport} for this object */
protected RegionViewport regionViewport;
/**
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/Trait.java Fri Jan 21 11:36:16 2011
@@ -43,167 +43,114 @@ public final class Trait implements Seri
private Trait() {
}
- /**
- * Id reference line, not resolved.
- * not sure if this is needed.
- */
+ /** Id reference line, not resolved. (not sure if this is needed.) */
//public static final Integer ID_LINK = new Integer(0);
/**
* Internal link trait.
* Contains the PageViewport key and the PROD_ID of the target area
*/
- public static final Integer INTERNAL_LINK = new Integer(1);
+ public static final Integer INTERNAL_LINK = 1;
- /**
- * External link. A URL link to an external resource.
- */
- public static final Integer EXTERNAL_LINK = new Integer(2);
+ /** * External link. A URL link to an external resource. */
+ public static final Integer EXTERNAL_LINK = 2;
- /**
- * The font triplet for the current font.
- */
- public static final Integer FONT = new Integer(3);
+ /** The font triplet for the current font. */
+ public static final Integer FONT = 3;
- /**
- * Font size for the current font.
- */
- public static final Integer FONT_SIZE = new Integer(4);
+ /** Font size for the current font. */
+ public static final Integer FONT_SIZE = 4;
- /**
- * The current color.
- */
- public static final Integer COLOR = new Integer(7);
+ /** The current color. */
+ public static final Integer COLOR = 7;
- /**
- * The ID of the FO that produced an area.
- */
- public static final Integer PROD_ID = new Integer(8);
+ /** The ID of the FO that produced an area. */
+ public static final Integer PROD_ID = 8;
- /**
- * Background trait for an area.
- */
- public static final Integer BACKGROUND = new Integer(9);
+ /** Background trait for an area. */
+ public static final Integer BACKGROUND = 9;
- /**
- * Underline trait used when rendering inline parent.
- */
- public static final Integer UNDERLINE = new Integer(10);
+ /** Underline trait used when rendering inline parent. */
+ public static final Integer UNDERLINE = 10;
- /**
- * Overline trait used when rendering inline parent.
- */
- public static final Integer OVERLINE = new Integer(11);
+ /** Overline trait used when rendering inline parent. */
+ public static final Integer OVERLINE = 11;
- /**
- * Linethrough trait used when rendering inline parent.
- */
- public static final Integer LINETHROUGH = new Integer(12);
+ /** Linethrough trait used when rendering inline parent. */
+ public static final Integer LINETHROUGH = 12;
- /**
- * Shadow offset.
- */
+ /** Shadow offset. */
//public static final Integer OFFSET = new Integer(13);
- /**
- * The shadow for text.
- */
+ /** The shadow for text. */
//public static final Integer SHADOW = new Integer(14);
- /**
- * The border start.
- */
- public static final Integer BORDER_START = new Integer(15);
+ /** The border start. */
+ public static final Integer BORDER_START = 15;
- /**
- * The border end.
- */
- public static final Integer BORDER_END = new Integer(16);
+ /** The border end. */
+ public static final Integer BORDER_END = 16;
- /**
- * The border before.
- */
- public static final Integer BORDER_BEFORE = new Integer(17);
+ /** The border before. */
+ public static final Integer BORDER_BEFORE = 17;
- /**
- * The border after.
- */
- public static final Integer BORDER_AFTER = new Integer(18);
+ /** The border after. */
+ public static final Integer BORDER_AFTER = 18;
- /**
- * The padding start.
- */
- public static final Integer PADDING_START = new Integer(19);
+ /** The padding start. */
+ public static final Integer PADDING_START = 19;
- /**
- * The padding end.
- */
- public static final Integer PADDING_END = new Integer(20);
+ /** The padding end. */
+ public static final Integer PADDING_END = 20;
- /**
- * The padding before.
- */
- public static final Integer PADDING_BEFORE = new Integer(21);
+ /** The padding before. */
+ public static final Integer PADDING_BEFORE = 21;
- /**
- * The padding after.
- */
- public static final Integer PADDING_AFTER = new Integer(22);
+ /** The padding after. */
+ public static final Integer PADDING_AFTER = 22;
- /**
- * The space start.
- */
- public static final Integer SPACE_START = new Integer(23);
+ /** The space start. */
+ public static final Integer SPACE_START = 23;
- /**
- * The space end.
- */
- public static final Integer SPACE_END = new Integer(24);
+ /** The space end. */
+ public static final Integer SPACE_END = 24;
- /**
- * break before
- */
+ /** break before */
//public static final Integer BREAK_BEFORE = new Integer(25);
- /**
- * break after
- */
+ /** break after */
//public static final Integer BREAK_AFTER = new Integer(26);
- /**
- * The start-indent trait.
- */
- public static final Integer START_INDENT = new Integer(27);
+ /** The start-indent trait. */
+ public static final Integer START_INDENT = 27;
- /**
- * The end-indent trait.
- */
- public static final Integer END_INDENT = new Integer(28);
+ /** The end-indent trait. */
+ public static final Integer END_INDENT = 28;
/** The space-before trait. */
- public static final Integer SPACE_BEFORE = new Integer(29);
+ public static final Integer SPACE_BEFORE = 29;
/** The space-after trait. */
- public static final Integer SPACE_AFTER = new Integer(30);
+ public static final Integer SPACE_AFTER = 30;
/** The is-reference-area trait. */
- public static final Integer IS_REFERENCE_AREA = new Integer(31);
+ public static final Integer IS_REFERENCE_AREA = 31;
/** The is-viewport-area trait. */
- public static final Integer IS_VIEWPORT_AREA = new Integer(32);
+ public static final Integer IS_VIEWPORT_AREA = 32;
/** Blinking trait used when rendering inline parent. */
- public static final Integer BLINK = new Integer(33);
+ public static final Integer BLINK = 33;
/** Trait for color of underline decorations when rendering inline parent. */
- public static final Integer UNDERLINE_COLOR = new Integer(34);
+ public static final Integer UNDERLINE_COLOR = 34;
/** Trait for color of overline decorations when rendering inline parent. */
- public static final Integer OVERLINE_COLOR = new Integer(35);
+ public static final Integer OVERLINE_COLOR = 35;
/** Trait for color of linethrough decorations when rendering inline parent. */
- public static final Integer LINETHROUGH_COLOR = new Integer(36);
+ public static final Integer LINETHROUGH_COLOR = 36;
/** The ptr trait. Used for accessibility */
- public static final Integer PTR = new Integer(37);
+ public static final Integer PTR = 37;
/** writing mode trait */
public static final Integer WRITING_MODE = new Integer(38);
@@ -238,65 +185,47 @@ public final class Trait implements Seri
}
private static void put(Integer key, TraitInfo info) {
- TRAIT_INFO[key.intValue()] = info;
+ TRAIT_INFO[key] = info;
}
static {
// Create a hashmap mapping trait code to name for external representation
//put(ID_LINK, new TraitInfo("id-link", String.class));
- put(PTR, new TraitInfo("ptr", String.class));
- put(INTERNAL_LINK, new TraitInfo("internal-link", InternalLink.class));
- put(EXTERNAL_LINK, new TraitInfo("external-link", ExternalLink.class));
- put(FONT, new TraitInfo("font", FontTriplet.class));
- put(FONT_SIZE, new TraitInfo("font-size", Integer.class));
- put(COLOR, new TraitInfo("color", Color.class));
- put(PROD_ID, new TraitInfo("prod-id", String.class));
- put(BACKGROUND, new TraitInfo("background", Background.class));
- put(UNDERLINE, new TraitInfo("underline-score", Boolean.class));
+ put(PTR, new TraitInfo("ptr", String.class));
+ put(INTERNAL_LINK, new TraitInfo("internal-link", InternalLink.class));
+ put(EXTERNAL_LINK, new TraitInfo("external-link", ExternalLink.class));
+ put(FONT, new TraitInfo("font", FontTriplet.class));
+ put(FONT_SIZE, new TraitInfo("font-size", Integer.class));
+ put(COLOR, new TraitInfo("color", Color.class));
+ put(PROD_ID, new TraitInfo("prod-id", String.class));
+ put(BACKGROUND, new TraitInfo("background", Background.class));
+ put(UNDERLINE, new TraitInfo("underline-score", Boolean.class));
put(UNDERLINE_COLOR, new TraitInfo("underline-score-color", Color.class));
- put(OVERLINE, new TraitInfo("overline-score", Boolean.class));
+ put(OVERLINE, new TraitInfo("overline-score", Boolean.class));
put(OVERLINE_COLOR, new TraitInfo("overline-score-color", Color.class));
- put(LINETHROUGH, new TraitInfo("through-score", Boolean.class));
+ put(LINETHROUGH, new TraitInfo("through-score", Boolean.class));
put(LINETHROUGH_COLOR, new TraitInfo("through-score-color", Color.class));
- put(BLINK, new TraitInfo("blink", Boolean.class));
- //put(OFFSET, new TraitInfo("offset", Integer.class));
- //put(SHADOW, new TraitInfo("shadow", Integer.class));
- put(BORDER_START,
- new TraitInfo("border-start", BorderProps.class));
- put(BORDER_END,
- new TraitInfo("border-end", BorderProps.class));
- put(BORDER_BEFORE,
- new TraitInfo("border-before", BorderProps.class));
- put(BORDER_AFTER,
- new TraitInfo("border-after", BorderProps.class));
- put(PADDING_START,
- new TraitInfo("padding-start", Integer.class));
- put(PADDING_END,
- new TraitInfo("padding-end", Integer.class));
- put(PADDING_BEFORE,
- new TraitInfo("padding-before", Integer.class));
- put(PADDING_AFTER,
- new TraitInfo("padding-after", Integer.class));
- put(SPACE_START,
- new TraitInfo("space-start", Integer.class));
- put(SPACE_END,
- new TraitInfo("space-end", Integer.class));
- //put(BREAK_BEFORE,
- // new TraitInfo("break-before", Integer.class));
- //put(BREAK_AFTER,
- // new TraitInfo("break-after", Integer.class));
- put(START_INDENT,
- new TraitInfo("start-indent", Integer.class));
- put(END_INDENT,
- new TraitInfo("end-indent", Integer.class));
- put(SPACE_BEFORE,
- new TraitInfo("space-before", Integer.class));
- put(SPACE_AFTER,
- new TraitInfo("space-after", Integer.class));
- put(IS_REFERENCE_AREA,
- new TraitInfo("is-reference-area", Boolean.class));
- put(IS_VIEWPORT_AREA,
- new TraitInfo("is-viewport-area", Boolean.class));
+ put(BLINK, new TraitInfo("blink", Boolean.class));
+ //put(OFFSET, new TraitInfo("offset", Integer.class));
+ //put(SHADOW, new TraitInfo("shadow", Integer.class));
+ put(BORDER_START, new TraitInfo("border-start", BorderProps.class));
+ put(BORDER_END, new TraitInfo("border-end", BorderProps.class));
+ put(BORDER_BEFORE, new TraitInfo("border-before", BorderProps.class));
+ put(BORDER_AFTER, new TraitInfo("border-after", BorderProps.class));
+ put(PADDING_START, new TraitInfo("padding-start", Integer.class));
+ put(PADDING_END, new TraitInfo("padding-end", Integer.class));
+ put(PADDING_BEFORE, new TraitInfo("padding-before", Integer.class));
+ put(PADDING_AFTER, new TraitInfo("padding-after", Integer.class));
+ put(SPACE_START, new TraitInfo("space-start", Integer.class));
+ put(SPACE_END, new TraitInfo("space-end", Integer.class));
+ //put(BREAK_BEFORE, new TraitInfo("break-before", Integer.class));
+ //put(BREAK_AFTER, new TraitInfo("break-after", Integer.class));
+ put(START_INDENT, new TraitInfo("start-indent", Integer.class));
+ put(END_INDENT, new TraitInfo("end-indent", Integer.class));
+ put(SPACE_BEFORE, new TraitInfo("space-before", Integer.class));
+ put(SPACE_AFTER, new TraitInfo("space-after", Integer.class));
+ put(IS_REFERENCE_AREA, new TraitInfo("is-reference-area", Boolean.class));
+ put(IS_VIEWPORT_AREA, new TraitInfo("is-viewport-area", Boolean.class));
put(WRITING_MODE,
new TraitInfo("writing-mode", WritingMode.class));
put(INLINE_PROGRESSION_DIRECTION,
@@ -315,7 +244,7 @@ public final class Trait implements Seri
* @return the trait name
*/
public static String getTraitName(Object traitCode) {
- return TRAIT_INFO[((Integer)traitCode).intValue()].getName();
+ return TRAIT_INFO[(Integer)traitCode].getName();
}
/**
@@ -325,7 +254,7 @@ public final class Trait implements Seri
* @return the class type for the trait
*/
public static Class getTraitClass(Object traitCode) {
- return TRAIT_INFO[((Integer)traitCode).intValue()].getClazz();
+ return TRAIT_INFO[(Integer)traitCode].getClazz();
}
/**
@@ -501,7 +430,7 @@ public final class Trait implements Seri
if (v.startsWith("dest=")) {
dest = v.substring(5);
} else if (v.startsWith("newWindow=")) {
- newWindow = Boolean.valueOf(v.substring(10)).booleanValue();
+ newWindow = Boolean.valueOf(v.substring(10));
} else {
throw new IllegalArgumentException(
"Malformed trait value for Trait.ExternalLink: " + traitValue);
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java Fri Jan 21 11:36:16 2011
@@ -87,18 +87,18 @@ public class InlineParent extends Inline
@Override
public boolean applyVariationFactor(double variationFactor,
int lineStretch, int lineShrink) {
- boolean bUnresolvedAreasPresent = false;
+ boolean hasUnresolvedAreas = false;
int cumulativeIPD = 0;
// recursively apply variation factor to descendant areas
for (int i = 0, len = inlines.size(); i < len; i++) {
InlineArea inline = inlines.get(i);
- bUnresolvedAreasPresent |= inline.applyVariationFactor(
+ hasUnresolvedAreas |= inline.applyVariationFactor(
variationFactor, lineStretch, lineShrink);
cumulativeIPD += inline.getIPD(); //Update this area's IPD based on changes to children
}
setIPD(cumulativeIPD);
- return bUnresolvedAreasPresent;
+ return hasUnresolvedAreas;
}
/**
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/SpaceArea.java Fri Jan 21 11:36:16 2011
@@ -29,7 +29,7 @@ public class SpaceArea extends InlineAre
/**
* The space for this space area
*/
- protected String space;
+ protected char space;
/**
* Is this space adjustable?
@@ -45,7 +45,7 @@ public class SpaceArea extends InlineAre
*/
public SpaceArea(int blockProgressionOffset, int bidiLevel, char space, boolean adjustable) {
super ( blockProgressionOffset, bidiLevel );
- this.space = new String ( new char[] {space} );
+ this.space = space;
this.isAdjustable = adjustable;
}
@@ -53,7 +53,7 @@ public class SpaceArea extends InlineAre
* @return Returns the space.
*/
public String getSpace() {
- return space;
+ return String.valueOf(space);
}
/** @return true if the space is adjustable (WRT word-space processing) */
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/Event.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/Event.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/Event.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/Event.java Fri Jan 21 11:36:16 2011
@@ -38,7 +38,7 @@ public class Event extends EventObject {
private String eventKey;
private EventSeverity severity;
- private Map params;
+ private Map<String, Object> params;
/**
* Creates a new Event.
@@ -47,7 +47,8 @@ public class Event extends EventObject {
* @param severity the severity level
* @param params the event parameters (a map of name/value pairs)
*/
- public Event(Object source, String eventID, EventSeverity severity, Map params) {
+ public Event(Object source, String eventID, EventSeverity severity, Map<String, Object> params)
+ {
super(source);
int pos = eventID.lastIndexOf('.');
if (pos < 0 || pos == eventID.length() - 1) {
@@ -122,7 +123,7 @@ public class Event extends EventObject {
* Returns an unmodifiable {@link java.util.Map} with all event parameters.
* @return the parameter map
*/
- public Map getParams() {
+ public Map<String, Object> getParams() {
return Collections.unmodifiableMap(this.params);
}
@@ -138,7 +139,7 @@ public class Event extends EventObject {
* This class is a fluent builder class for building up the parameter map.
*/
public static class ParamsBuilder {
- private Map params;
+ private Map<String, Object> params;
/**
* Adds a new parameter (a name/value pair).
@@ -148,7 +149,7 @@ public class Event extends EventObject {
*/
public ParamsBuilder param(String name, Object value) {
if (this.params == null) {
- this.params = new java.util.HashMap();
+ this.params = new java.util.HashMap<String, Object>();
}
this.params.put(name, value);
return this;
@@ -158,7 +159,7 @@ public class Event extends EventObject {
* Returns the accumulated parameter map.
* @return the accumulated parameter map
*/
- public Map build() {
+ public Map<String, Object> build() {
return this.params;
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/EventExceptionManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/EventExceptionManager.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/EventExceptionManager.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/EventExceptionManager.java Fri Jan 21 11:36:16 2011
@@ -32,11 +32,12 @@ public final class EventExceptionManager
private EventExceptionManager() {
}
- private static final Map EXCEPTION_FACTORIES = new java.util.HashMap();
+ private static final Map<String, ExceptionFactory> EXCEPTION_FACTORIES
+ = new java.util.HashMap<String, ExceptionFactory>();
static {
- Iterator iter;
- iter = Service.providers(ExceptionFactory.class, true);
+ Iterator<Object> iter;
+ iter = Service.providers(ExceptionFactory.class);
while (iter.hasNext()) {
ExceptionFactory factory = (ExceptionFactory)iter.next();
EXCEPTION_FACTORIES.put(factory.getExceptionClass().getName(), factory);
@@ -63,7 +64,7 @@ public final class EventExceptionManager
String msg = EventFormatter.format(event);
//Get original exception as cause if it is given as one of the parameters
Throwable t = null;
- Iterator iter = event.getParams().values().iterator();
+ Iterator<Object> iter = event.getParams().values().iterator();
while (iter.hasNext()) {
Object o = iter.next();
if (o instanceof Throwable) {
@@ -96,6 +97,6 @@ public final class EventExceptionManager
* Returns the {@link Exception} class created by this factory.
* @return the exception class
*/
- Class getExceptionClass();
+ Class<? extends Exception> getExceptionClass();
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/PropertyExceptionFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/PropertyExceptionFactory.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/PropertyExceptionFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/PropertyExceptionFactory.java Fri Jan 21 11:36:16 2011
@@ -40,7 +40,7 @@ public class PropertyExceptionFactory im
}
/** {@inheritDoc} */
- public Class getExceptionClass() {
+ public Class<PropertyException> getExceptionClass() {
return PropertyException.class;
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/UnsupportedOperationExceptionFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/UnsupportedOperationExceptionFactory.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/UnsupportedOperationExceptionFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/UnsupportedOperationExceptionFactory.java Fri Jan 21 11:36:16 2011
@@ -36,7 +36,7 @@ public class UnsupportedOperationExcepti
}
/** {@inheritDoc} */
- public Class getExceptionClass() {
+ public Class<UnsupportedOperationException> getExceptionClass() {
return UnsupportedOperationException.class;
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/ValidationExceptionFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/ValidationExceptionFactory.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/ValidationExceptionFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/events/ValidationExceptionFactory.java Fri Jan 21 11:36:16 2011
@@ -43,7 +43,7 @@ public class ValidationExceptionFactory
}
/** {@inheritDoc} */
- public Class getExceptionClass() {
+ public Class<ValidationException> getExceptionClass() {
return ValidationException.class;
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ElementMapping.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ElementMapping.java Fri Jan 21 11:36:16 2011
@@ -30,7 +30,7 @@ import org.apache.xmlgraphics.util.QName
/**
* Abstract base class for Element Mappings (including FO Element Mappings)
- * which provide the framework of valid elements and attibutes for a given
+ * which provide the framework of valid elements and attributes for a given
* namespace.
*/
public abstract class ElementMapping {
@@ -38,7 +38,7 @@ public abstract class ElementMapping {
public static final String DEFAULT = "<default>";
/** The HashMap table of formatting objects defined by the ElementMapping */
- protected HashMap foObjs = null;
+ protected HashMap<String, Maker> foObjs = null;
//Please don't change that to java.util.Map as that can break extensions.
/** The namespace for the ElementMapping */
@@ -49,7 +49,7 @@ public abstract class ElementMapping {
*
* @return Table of Maker objects for this ElementMapping
*/
- public HashMap getTable() {
+ public HashMap<String, Maker> getTable() {
if (foObjs == null) {
initialize();
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ElementMappingRegistry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ElementMappingRegistry.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ElementMappingRegistry.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/ElementMappingRegistry.java Fri Jan 21 11:36:16 2011
@@ -48,12 +48,14 @@ public class ElementMappingRegistry {
* Table mapping element names to the makers of objects
* representing formatting objects.
*/
- protected Map fobjTable = new java.util.HashMap();
+ protected Map<String, Map<String, Maker>> fobjTable
+ = new java.util.HashMap<String, Map<String, Maker>>();
/**
* Map of mapped namespaces and their associated ElementMapping instances.
*/
- protected Map namespaces = new java.util.HashMap();
+ protected Map<String, ElementMapping> namespaces
+ = new java.util.HashMap<String, ElementMapping>();
/**
* Main constructor. Adds all default element mapping as well as detects ElementMapping
@@ -70,10 +72,10 @@ public class ElementMappingRegistry {
*/
private void setupDefaultMappings() {
// add mappings from available services
- Iterator providers = Service.providers(ElementMapping.class, false);
+ Iterator<String> providers = Service.providerNames(ElementMapping.class);
if (providers != null) {
while (providers.hasNext()) {
- String mapping = (String)providers.next();
+ String mapping = providers.next();
try {
addElementMapping(mapping);
} catch (IllegalArgumentException e) {
@@ -129,13 +131,13 @@ public class ElementMappingRegistry {
*/
public Maker findFOMaker(String namespaceURI, String localName, Locator locator)
throws FOPException {
- Map table = (Map)fobjTable.get(namespaceURI);
+ Map<String, Maker> table = fobjTable.get(namespaceURI);
Maker fobjMaker = null;
if (table != null) {
- fobjMaker = (Maker)table.get(localName);
+ fobjMaker = table.get(localName);
// try default
if (fobjMaker == null) {
- fobjMaker = (Maker)table.get(ElementMapping.DEFAULT);
+ fobjMaker = table.get(ElementMapping.DEFAULT);
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOElementMapping.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/FOElementMapping.java Fri Jan 21 11:36:16 2011
@@ -44,7 +44,7 @@ public class FOElementMapping extends El
*/
protected void initialize() {
if (foObjs == null) {
- foObjs = new HashMap();
+ foObjs = new HashMap<String, Maker>();
// Declarations and Pagination and Layout Formatting Objects
foObjs.put("root", new RootMaker());
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java Fri Jan 21 11:36:16 2011
@@ -37,8 +37,8 @@ public class ExtensionElementMapping ext
/** The FOP extension namespace URI */
public static final String URI = "http://xmlgraphics.apache.org/fop/extensions";
- private static final Set PROPERTY_ATTRIBUTES
- = new java.util.HashSet();
+ private static final Set<String> PROPERTY_ATTRIBUTES
+ = new java.util.HashSet<String>();
static {
//These are FOP's standard extension properties (fox:*)
@@ -63,7 +63,7 @@ public class ExtensionElementMapping ext
*/
protected void initialize() {
if (foObjs == null) {
- foObjs = new HashMap();
+ foObjs = new HashMap<String, Maker>();
foObjs.put("outline", new UnknownXMLObj.Maker(URI));
foObjs.put("label", new UnknownXMLObj.Maker(URI));
foObjs.put("destination", new DestinationMaker());
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/InternalElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/InternalElementMapping.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/InternalElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/InternalElementMapping.java Fri Jan 21 11:36:16 2011
@@ -34,7 +34,7 @@ public class InternalElementMapping exte
/** The FOP extension namespace URI */
public static final String URI = "http://xmlgraphics.apache.org/fop/internal";
- private static final Set PROPERTY_ATTRIBUTES = new java.util.HashSet();
+ private static final Set<String> PROPERTY_ATTRIBUTES = new java.util.HashSet<String>();
static {
//These are FOP's extension properties for accessibility
@@ -53,7 +53,7 @@ public class InternalElementMapping exte
*/
protected void initialize() {
if (foObjs == null) {
- foObjs = new HashMap();
+ foObjs = new HashMap<String, Maker>();
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/OldExtensionElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/OldExtensionElementMapping.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/OldExtensionElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/OldExtensionElementMapping.java Fri Jan 21 11:36:16 2011
@@ -44,7 +44,7 @@ public class OldExtensionElementMapping
*/
protected void initialize() {
if (foObjs == null) {
- foObjs = new HashMap();
+ foObjs = new HashMap<String, Maker>();
foObjs.put("outline", new UnknownXMLObj.Maker(URI));
foObjs.put("label", new UnknownXMLObj.Maker(URI));
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/svg/BatikExtensionElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/svg/BatikExtensionElementMapping.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/svg/BatikExtensionElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/svg/BatikExtensionElementMapping.java Fri Jan 21 11:36:16 2011
@@ -73,7 +73,7 @@ public class BatikExtensionElementMappin
XMLResourceDescriptor.setXMLParserClassName(
getAParserClassName());
- foObjs = new HashMap();
+ foObjs = new HashMap<String, Maker>();
foObjs.put("batik", new SE());
foObjs.put(DEFAULT, new SVGMaker());
} catch (Throwable t) {
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/svg/SVGElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/svg/SVGElementMapping.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/svg/SVGElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/svg/SVGElementMapping.java Fri Jan 21 11:36:16 2011
@@ -80,7 +80,7 @@ public class SVGElementMapping extends E
XMLResourceDescriptor.setXMLParserClassName(
getAParserClassName());
- foObjs = new HashMap();
+ foObjs = new HashMap<String, Maker>();
foObjs.put("svg", new SE());
foObjs.put(DEFAULT, new SVGMaker());
} catch (Throwable t) {
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/RDFElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/RDFElementMapping.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/RDFElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/RDFElementMapping.java Fri Jan 21 11:36:16 2011
@@ -45,7 +45,7 @@ public class RDFElementMapping extends E
/** {@inheritDoc} */
protected void initialize() {
if (foObjs == null) {
- foObjs = new HashMap();
+ foObjs = new HashMap<String, Maker>();
foObjs.put("RDF", new RDFElementMaker());
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/XMPElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/XMPElementMapping.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/XMPElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/extensions/xmp/XMPElementMapping.java Fri Jan 21 11:36:16 2011
@@ -45,7 +45,7 @@ public class XMPElementMapping extends E
/** {@inheritDoc} */
protected void initialize() {
if (foObjs == null) {
- foObjs = new HashMap();
+ foObjs = new HashMap<String, Maker>();
foObjs.put("xmpmeta", new XMPMetaElementMaker());
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/Declarations.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/Declarations.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/Declarations.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/Declarations.java Fri Jan 21 11:36:16 2011
@@ -41,7 +41,7 @@ import org.apache.fop.fo.ValidationExcep
*/
public class Declarations extends FObj {
- private Map colorProfiles = null;
+ private Map<String, ColorProfile> colorProfiles = null;
/**
* @param parent FONode that is the parent of this object
@@ -98,7 +98,7 @@ public class Declarations extends FObj {
private void addColorProfile(ColorProfile cp) {
if (colorProfiles == null) {
- colorProfiles = new java.util.HashMap();
+ colorProfiles = new java.util.HashMap<String, ColorProfile>();
}
if (colorProfiles.get(cp.getColorProfileName()) != null) {
// duplicate names
@@ -132,7 +132,7 @@ public class Declarations extends FObj {
public ColorProfile getColorProfile(String cpName) {
ColorProfile profile = null;
if (this.colorProfiles != null) {
- profile = (ColorProfile)this.colorProfiles.get(cpName);
+ profile = this.colorProfiles.get(cpName);
}
return profile;
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java Fri Jan 21 11:36:16 2011
@@ -44,8 +44,8 @@ import org.apache.fop.fo.ValidationExcep
*/
public class LayoutMasterSet extends FObj {
- private Map simplePageMasters;
- private Map pageSequenceMasters;
+ private Map<String, SimplePageMaster> simplePageMasters;
+ private Map<String, PageSequenceMaster> pageSequenceMasters;
/**
* Create a LayoutMasterSet instance that is a child of the given
@@ -65,8 +65,8 @@ public class LayoutMasterSet extends FOb
/** {@inheritDoc} */
protected void startOfNode() throws FOPException {
getRoot().setLayoutMasterSet(this);
- simplePageMasters = new java.util.HashMap();
- pageSequenceMasters = new java.util.HashMap();
+ simplePageMasters = new java.util.HashMap<String, SimplePageMaster>();
+ pageSequenceMasters = new java.util.HashMap<String, PageSequenceMaster>();
}
/** {@inheritDoc} */
@@ -98,18 +98,13 @@ public class LayoutMasterSet extends FOb
*/
private void checkRegionNames() throws ValidationException {
// (user-entered) region-name to default region map.
- Map allRegions = new java.util.HashMap();
- for (Iterator spm = simplePageMasters.values().iterator();
- spm.hasNext();) {
- SimplePageMaster simplePageMaster
- = (SimplePageMaster)spm.next();
- Map spmRegions = simplePageMaster.getRegions();
- for (Iterator e = spmRegions.values().iterator();
- e.hasNext();) {
- Region region = (Region) e.next();
+ Map<String, String> allRegions = new java.util.HashMap<String, String>();
+ for (SimplePageMaster simplePageMaster : simplePageMasters.values()) {
+ Map<String, Region> spmRegions = simplePageMaster.getRegions();
+ for (Region region : spmRegions.values()) {
if (allRegions.containsKey(region.getRegionName())) {
String defaultRegionName
- = (String) allRegions.get(region.getRegionName());
+ = allRegions.get(region.getRegionName());
if (!defaultRegionName.equals(region.getDefaultRegionName())) {
getFOValidationEventProducer().regionNameMappedToMultipleRegionClasses(this,
region.getRegionName(),
@@ -118,7 +113,7 @@ public class LayoutMasterSet extends FOb
}
}
allRegions.put(region.getRegionName(),
- region.getDefaultRegionName());
+ region.getDefaultRegionName());
}
}
}
@@ -155,7 +150,7 @@ public class LayoutMasterSet extends FOb
* @return the requested simple-page-master
*/
public SimplePageMaster getSimplePageMaster(String masterName) {
- return (SimplePageMaster)this.simplePageMasters.get(masterName);
+ return this.simplePageMasters.get(masterName);
}
/**
@@ -185,7 +180,7 @@ public class LayoutMasterSet extends FOb
* @return the requested PageSequenceMaster instance
*/
public PageSequenceMaster getPageSequenceMaster(String masterName) {
- return (PageSequenceMaster)this.pageSequenceMasters.get(masterName);
+ return this.pageSequenceMasters.get(masterName);
}
/**
@@ -194,9 +189,8 @@ public class LayoutMasterSet extends FOb
* @return true when the region name specified has a region in this LayoutMasterSet
*/
public boolean regionNameExists(String regionName) {
- for (Iterator e = simplePageMasters.values().iterator();
- e.hasNext();) {
- if (((SimplePageMaster)e.next()).regionNameExists(regionName)) {
+ for (SimplePageMaster spm : simplePageMasters.values()) {
+ if (spm.regionNameExists(regionName)) {
return true;
}
}
Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageProductionException.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageProductionException.java?rev=1061759&r1=1061758&r2=1061759&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageProductionException.java (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/fo/pagination/PageProductionException.java Fri Jan 21 11:36:16 2011
@@ -98,7 +98,7 @@ public class PageProductionException ext
}
/** {@inheritDoc} */
- public Class getExceptionClass() {
+ public Class<PageProductionException> getExceptionClass() {
return PageProductionException.class;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org