You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2009/02/03 17:28:24 UTC

svn commit: r740340 [1/2] - in /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign: ./ examples/mathml/ examples/mathml/docs/ examples/mathml/lib/ examples/mathml/resources/ examples/mathml/src/ lib/ lib/build/ src/documentation/content/ src/documentation...

Author: jeremias
Date: Tue Feb  3 16:28:21 2009
New Revision: 740340

URL: http://svn.apache.org/viewvc?rev=740340&view=rev
Log:
Merge from Trunk revisions 735029 - 740275.

Added:
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/lib/build/xmlunit-1.2.jar
      - copied unchanged from r740275, xmlgraphics/fop/trunk/lib/build/xmlunit-1.2.jar
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/lib/build/xmlunit.LICENSE.txt
      - copied unchanged from r740275, xmlgraphics/fop/trunk/lib/build/xmlunit.LICENSE.txt
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/locationmap.xml
      - copied unchanged from r740275, xmlgraphics/fop/trunk/src/documentation/content/locationmap.xml
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/MapImageObject.java
      - copied unchanged from r740275, xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/MapImageObject.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/MapPageSegment.java
      - copied unchanged from r740275, xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/MapPageSegment.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/util/bitmap/
      - copied from r740275, xmlgraphics/fop/trunk/src/java/org/apache/fop/util/bitmap/
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/util/bitmap/BitmapImageUtil.java
      - copied unchanged from r740275, xmlgraphics/fop/trunk/src/java/org/apache/fop/util/bitmap/BitmapImageUtil.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/util/bitmap/DefaultMonochromeBitmapConverter.java
      - copied unchanged from r740275, xmlgraphics/fop/trunk/src/java/org/apache/fop/util/bitmap/DefaultMonochromeBitmapConverter.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/util/bitmap/JAIMonochromeBitmapConverter.java
      - copied unchanged from r740275, xmlgraphics/fop/trunk/src/java/org/apache/fop/util/bitmap/JAIMonochromeBitmapConverter.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/util/bitmap/MonochromeBitmapConverter.java
      - copied unchanged from r740275, xmlgraphics/fop/trunk/src/java/org/apache/fop/util/bitmap/MonochromeBitmapConverter.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/fotree/testcases/table-row-marker_bug46567.fo
      - copied unchanged from r740275, xmlgraphics/fop/trunk/test/fotree/testcases/table-row-marker_bug46567.fo
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/layoutengine/standard-testcases/fox_disable-column-balancing.xml
      - copied unchanged from r740275, xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/fox_disable-column-balancing.xml
Removed:
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/mathml/build.xml
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/mathml/docs/
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/mathml/lib/
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/mathml/resources/
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/mathml/src/
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/DefaultMonochromeBitmapConverter.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/JAIMonochromeBitmapConverter.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/MonochromeBitmapConverter.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/util/BitmapImageUtil.java
Modified:
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/build.xml
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/mathml/README
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/lib/README.txt
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/compliance.ihtml
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/index.xml
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/resources.xml
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/team.xml
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPDataObjectInfo.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPResourceInfo.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPResourceManager.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/DataStream.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/goca/GraphicsData.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/ioca/ImageContent.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/ioca/ImageSegment.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractDataObject.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractEnvironmentGroup.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractPageObject.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ActiveEnvironmentGroup.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ImageObject.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectAreaDescriptor.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/Constants.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/FOPropertyMapping.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/Block.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/BlockContainer.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/table/TableRow.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/LayoutContext.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/PageBreaker.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFContentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFPainter.java   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFRenderer.java   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationExtensionConstants.java   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLDocumentHandlerMaker.java   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pcl/PCLGenerator.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGDocumentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java   (props changed)
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/status.xml
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/test/java/org/apache/fop/config/BaseUserConfigTestCase.java

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  3 16:28:21 2009
@@ -1,3 +1,3 @@
 /xmlgraphics/fop/branches/Temp_AFPGOCAResources:630874-721418
 /xmlgraphics/fop/branches/fop-0_95:684572,688085,688696
-/xmlgraphics/fop/trunk:603620-735028
+/xmlgraphics/fop/trunk:603620-740275

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/build.xml?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/build.xml (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/build.xml Tue Feb  3 16:28:21 2009
@@ -124,8 +124,7 @@
     </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"/>
+    <exclude name="org/apache/fop/util/bitmap/JAIMonochromeBitmapConverter.java" unless="jai.present"/>
   </patternset>
   <patternset id="exclude-jce-dependencies">
     <exclude name="org/apache/fop/pdf/PDFEncryptionJCE.java" unless="jce.present"/>
@@ -218,7 +217,7 @@
     <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-tools-classpath"/>
     <condition property="junit.message" value="JUnit Support PRESENT">
       <equals arg1="${junit.present}" arg2="true"/>
     </condition>
@@ -230,7 +229,7 @@
     <echo message="${junit.message}"/>
     <condition property="xmlunit.present">
       <and>
-        <available classname="org.custommonkey.xmlunit.XMLTestCase" classpathref="libs-build-classpath"/>
+        <available classname="org.custommonkey.xmlunit.XMLTestCase" classpathref="libs-build-tools-classpath"/>
         <isset property="junit.present"/>
       </and>
     </condition>

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/mathml/README
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/mathml/README?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/mathml/README (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/examples/mathml/README Tue Feb  3 16:28:21 2009
@@ -1,21 +1,10 @@
 FOP MathML Readme
 
-This directory contains an extension for MathML that can be used with FOP.
+The MathML extension is now maintained by the JEuclid project:
 
-This extension works with JEuclid which is available from:
-http://sourceforge.net/projects/jeuclid/
-
-This simply uses JEuclid to convert the MathML CML into SVG.
-The SVG is then handled as normal.
+http://jeuclid.sourceforge.net/jeuclid-fop/
 
-Building the MathML extension:
-To build the MathML extension, please download JEuclid using the link above.
-Put the jeuclid.jar into the lib directory and run the Ant build script in
-this directory.
+Further information:
 
-Usage:
-When you've built the MathML extension, add jeuclid.jar and 
-build/mathml-fop.jar to the classpath used when running FOP. You can then
-simply use MathML directly in fo:instream-foreign-object elements or 
-reference a MathML file in fo:external-graphic elements as shown in 
-the demo file: docs/mathml.fo
\ No newline at end of file
+http://jeuclid.sourceforge.net/
+http://sourceforge.net/projects/jeuclid/

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/lib/README.txt
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/lib/README.txt?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/lib/README.txt (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/lib/README.txt Tue Feb  3 16:28:21 2009
@@ -145,7 +145,7 @@
     Note: This is not the same as JAI! Only the ImageIO-compatible codecs
     are packaged as "Image I/O Tools". The name may be misleading.
 
- - JAI (Java Advanced Imaging API) 
+- JAI (Java Advanced Imaging API) 
 
     http://java.sun.com/products/java-media/jai 	 
     Java Research License and Java Distribution License (Check which one applies to you!)
@@ -186,8 +186,58 @@
     http://www.junit.org
     Common Public License V1.0
 
-- XMLUnit (optional)
+- XMLUnit
 
-    (not bundled, to be added to your Apache Ant installation)
+    lib/build/xmlunit-*.jar
+    (based on JUnit, used for testing)
     http://xmlunit.sourceforge.net/
     BSD style license
+
+- QDox
+
+    lib/build/qdox-*.jar
+    (used by the processing feedback mechanism, not needed at runtime)
+    http://qdox.codehaus.org/
+    Apache License V2.0
+
+
+
+Additional build-time dependencies
+-------------------------------------------
+
+These libraries are needed during the build only and
+not at runtime.
+
+- PMD
+
+    lib/build/pmd14-*.jar
+    (used for a code quality report)
+    http://pmd.sourceforge.net/
+    BSD style license
+
+- Jaxen
+
+    lib/build/jaxen-*.jar
+    (required by PMD)
+    http://jaxen.codehaus.org/
+    BSD style license
+
+- Retroweaver
+
+    (currently used only to verify Java 1.4 compatibility)
+    http://retroweaver.sourceforge.net
+    BSD style license
+    
+- ASM
+
+    lib/build/asm-*.jar
+    (required by Retroweaver)
+    http://asm.objectweb.org
+    BSD style license
+    
+- backport-util-concurrent
+
+    lib/build/backport-util-concurrent-*.jar
+    (required by Retroweaver)
+    http://backport-jsr166.sourceforge.net/
+    in public domain
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/compliance.ihtml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/compliance.ihtml?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/compliance.ihtml (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/compliance.ihtml Tue Feb  3 16:28:21 2009
@@ -1786,7 +1786,7 @@
 
       <th align="center">0.94 (stable)</th>
 
-      <th align="center">0.95 (beta)</th>
+      <th align="center">0.95 (stable)</th>
 
       <th align="center">develop- ment</th>
     </tr>
@@ -7127,7 +7127,7 @@
 
       <th align="center">0.94 (stable)</th>
 
-      <th align="center">0.95 (beta)</th>
+      <th align="center">0.95 (stable)</th>
 
       <th align="center">develop- ment</th>
     </tr>

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/index.xml?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/index.xml (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/index.xml Tue Feb  3 16:28:21 2009
@@ -35,9 +35,9 @@
       </p>
         <figure width="480" height="260" src="images/document.jpg" alt="Render Diagram" />
     <p>
-      A beta release of the latest version of FOP (<link href="0.95/">0.95</link>) is now
-      available. After a short testing period it will become the third
-      stable release after the large redesign effort and will implement a large subset of the
+      A stable release of the latest version of FOP (<link href="0.95/">0.95</link>) is
+      available. It's the third
+      stable release after the large redesign effort and implements a large subset of the
       <link href="http://www.w3.org/TR/xsl11/">XSL-FO Version 1.1 W3C
         Recommendation</link>.
     </p>
@@ -53,7 +53,7 @@
     <title>Demonstration</title>
         <figure width="480" height="260" src="images/layout.jpg" alt="Formatting Diagram" />
 <p>
-This image is a demonstration of a real two page document. The xml data on the left
+This image is a demonstration of a real two page document. The XML data on the left
 is formatted into the two pages on the right. The document contains static areas that appear on every page, an external graphic, a footnote on the first page, and a table that goes across both pages.
 </p>
 <p>

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/resources.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/resources.xml?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/resources.xml (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/resources.xml Tue Feb  3 16:28:21 2009
@@ -194,33 +194,33 @@
         <title>FOP add-ons</title>
         <ul>
           <li>[software] TIFFRenderer is a renderer for outputting multi-page TIFF: <jump href="http://www.tkachenko.com/fop/tiffrenderer.html">http://www.tkachenko.com/fop/tiffrenderer.html</jump> (MPL)</li>
-          <li>[software] AFP Renderer / Batch Assembler for FOP: <jump href="http://mypage.bluewin.ch/huanderegg/">http://mypage.bluewin.ch/huanderegg/</jump> (open source, license unclear)</li>
           <li>[software] The <jump href="http://mogwai.sourceforge.net">Mogwai Project</jump> includes a renderer for FOP that generates output for Okidata dot matrix printers (GPL).</li>
           <li>[software] <jump href="http://barcode4j.sourceforge.net">Barcode4J</jump> (formerly Krysalis Barcode) is a barcode generator which can be used with FOP (Apache license v2.0).</li>
           <li>[software] <jump href="http://jeuclid.sourceforge.net">JEuclid</jump> is a MathML implementation which can be used with FOP (Apache license v2.0).</li>
-          <li>[software] <jump href="http://afp-renderer.sourceforge.net/">AFP Renderer</jump> renders formatted objects to AFP or (MO:DCA).</li>
+          <li>[software] <jump href="http://afp-renderer.sourceforge.net/">AFP Renderer</jump> renders formatted objects to AFP or (MO:DCA). (Has been integrated in FOP)</li>
           <li>[software &amp; tools] <jump href="http://offo.sourceforge.net/">Objects For Formatting Objects</jump> hosts hyphenation patterns and (eventually) files other accessory data files &amp; scripts.</li>
         </ul>        
       </section>
       <section id="products-pdf">
         <title>PDF post-processors</title>
         <ul>
+          <li>[software] <jump href="http://incubator.apache.org/pdfbox">Apache PDFBox</jump> (Incubating, Apache License V2.0)</li>
           <li>[software] <jump href="http://www.lowagie.com/iText">iText</jump> (MPL and LGPL)</li>
           <li>[software] <jump href="http://www.etymon.com/pjc">PJ Classic</jump> by Etymon (GPL)</li>
           <li>[software] <jump href="http://www.etymon.com/pjx">PJ Professional</jump> by Etymon (commercial)</li>
           <li>[software] <jump href="http://www.accesspdf.com/pdftk/">pdftk</jump> the pdf toolkit</li>
-          <li>[software] <jump href="http://www.pdfbox.org">PDFBox</jump> (BSD)</li>
         </ul>
       </section>
       <section id="products-editors">
         <title>XSL-FO editors</title>
         <ul>
           <li>[software] <jump href="http://foa.sourceforge.net/">FOA (Formatting Objects Authoring)</jump> (MPL)</li>
-          <li>[software] <jump href="http://www.scruffyware.com/products/foeditor/">FOEditor</jump> by Scruffy Software (Shareware)</li>
+          <!--infected website
+            <li>[software] <jump href="http://www.scruffyware.com/products/foeditor/">FOEditor</jump> by Scruffy Software (Shareware)</li>
+          -->
           <li>[software] <jump href="http://www.scriptura-xsl.com">Scriptura</jump> by Inventive Designers (commercial)</li>
           <li>[software] <jump href="http://www.xslfast.com">XSLfast</jump> by jCatalog Software AG (commercial)</li>
           <li>[software] <jump href="http://www.digiforms.com/">DIGIFORMS Document Designer</jump> by Metafocus (commercial)</li>
-          <li>[software] <jump href="http://web.assentis.com/products/products.php?navi=Products&amp;product_id=7">Assentis:DocDesign</jump> by Assentis Technologies (commercial)</li>
         </ul>
       </section>
       <section id="products-other">
@@ -228,6 +228,7 @@
         <ul>
           <li>[software] <jump href="http://foray.sourceforge.net/">FOray</jump> a renderer for converting XML files to PDF via XSL Formatting Object elements (FOP fork)</li>
           <li>[software] <jump href="http://defoe.sourceforge.net/folio">Folio</jump> a renderer for XML files containing Formatting Object elements (aka FOP Alt.Design)</li>
+          <li>[software] <jump href="http://xmlroff.org/">xmlroff</jump> an open source XSL-FO implementation written in C (BSD-style license)</li>
 
           <li>[commercial software developer] <jump href="http://antennahouse.com/product.htm">Antenna House</jump> - XSL Formatter, WordMLToFo, XML Editor...</li>
           <li>[commercial software developer] <jump href="http://www.renderx.net/">RenderX</jump> XEP, EnMasse, Docbench...</li>
@@ -242,10 +243,6 @@
           is the most obvious language it would be used for. The tool has a number of
           page-related extensions. It also comes with an API in the form of an XML
           filter (OSI-Approved Open Source - Public Domain).</li>
-          <li> [software] <jump href="http://www.vbxml.com/xpathvisualizer">The XPath Visualizer</jump>.
-Web site says: "This is a full blown Visual XPath Interpreter for the evaluation of any XPath expression and visual presentation of the resulting nodeset or scalar value."
-Requires Internet Explorer 5+.
-(freeware)</li>
           <li>
             [software] <jump href="http://www.ahmadsoft.org/fopbridge.html">FOP Bridge</jump> is an Eclipse plug-in
             that allows to convert FO documents using Apache FOP directly inside the Eclipse workbench (LGPL).

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/team.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/team.xml?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/team.xml (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/documentation/content/xdocs/team.xml Tue Feb  3 16:28:21 2009
@@ -78,11 +78,6 @@
             from the TeX/LaTeX world. See his <fork href="http://www.leverkruid.eu">home
             page</fork> for some of his private projects.</li>
         <li id="jp"><link href="mailto:pietsch@apache.org">J&#x00F6;rg Pietschmann</link> (JP)</li>
-        <li id="mb"><link href="mailto:max AT berger DOT name">Max Berger</link> (MB) is currently a
-          PostDoc pursuing an academic career in computer science. His main interest in FOP is to
-          improve the DocBook to PDF tool-chain to produce high quality output, while still
-          conforming to given style-guides. See his <link href="http://max.berger.name">home
-            page</link> for more information.</li>
       </ul>
     </section>
     <section id="contribute-active">

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  3 16:28:21 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler:699793-735028
+/xmlgraphics/fop/trunk/src/java/META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler:699793-740275

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPDataObjectInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPDataObjectInfo.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPDataObjectInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPDataObjectInfo.java Tue Feb  3 16:28:21 2009
@@ -21,6 +21,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.afp.modca.Registry;
 
 /**
@@ -53,6 +54,9 @@
     /** the object data width resolution */
     private int dataWidthRes;
 
+    /** controls whether to create a page segment or a simple object */
+    private boolean createPageSegment;
+
     /**
      * Default constructor
      */
@@ -233,6 +237,22 @@
         return this.data;
     }
 
+    /**
+     * Controls whether to create a page segment or a normal object.
+     * @param value true for page segments, false for objects
+     */
+    public void setCreatePageSegment(boolean value) {
+        this.createPageSegment = value;
+    }
+
+    /**
+     * Indicates whether a page segment or a normal object shall be created.
+     * @return true for page segments, false for objects
+     */
+    public boolean isCreatePageSegment() {
+        return this.createPageSegment;
+    }
+
     /** {@inheritDoc} */
     public String toString() {
         return "AFPDataObjectInfo{"

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPResourceInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPResourceInfo.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPResourceInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPResourceInfo.java Tue Feb  3 16:28:21 2009
@@ -19,6 +19,8 @@
 
 package org.apache.fop.afp;
 
+import java.awt.Dimension;
+
 
 /**
  * The level at which a resource is to reside in the AFP output
@@ -30,6 +32,12 @@
     /** the uri of this resource */
     private String uri = null;
 
+    /**
+     * the image dimension in page coordinates (non-null only when page segments are
+     * generated because the cannot be scaled for painting).
+     */
+    private Dimension imageDimension = null;
+
     /** the reference name of this resource */
     private String name = null;
 
@@ -58,6 +66,26 @@
     }
 
     /**
+     * Sets an optional image dimension (in page coordinates). This is only used if
+     * a page segment is created for this resource as page segments cannot be rescaled
+     * for painting.
+     * @param dim the image dimension (in page coordinates)
+     */
+    public void setImageDimension(Dimension dim) {
+        this.imageDimension = dim;
+    }
+
+    /**
+     * Returns an optional image dimension (in page coordinates). This is only used if
+     * a page segment is created for this resource as page segments cannot be rescaled
+     * for painting.
+     * @return the image dimension (or null if not applicable)
+     */
+    public Dimension getImageDimension() {
+        return this.imageDimension;
+    }
+
+    /**
      * Sets the resource reference name
      *
      * @param resourceName the resource reference name
@@ -109,6 +137,8 @@
     /** {@inheritDoc} */
     public String toString() {
         return "AFPResourceInfo{uri=" + uri
+            + (imageDimension != null
+                    ? ", " + imageDimension.width + "x" + imageDimension.height : "")
             + (name != null ? ", name=" + name : "")
             + (level != null ? ", level=" + level : "")
             + "}";
@@ -126,6 +156,8 @@
 
         AFPResourceInfo ri = (AFPResourceInfo)obj;
         return (uri == ri.uri || uri != null && uri.equals(ri.uri))
+            && (imageDimension == ri.imageDimension
+                    || (imageDimension != null && imageDimension.equals(ri.imageDimension)))
             && (name == ri.name || name != null && name.equals(ri.name))
             && (level == ri.level || level != null && level.equals(ri.level));
     }
@@ -134,6 +166,7 @@
     public int hashCode() {
         int hash = 7;
         hash = 31 * hash + (null == uri ? 0 : uri.hashCode());
+        hash = 31 * hash + (null == imageDimension ? 0 : imageDimension.hashCode());
         hash = 31 * hash + (null == name ? 0 : name.hashCode());
         hash = 31 * hash + (null == level ? 0 : level.hashCode());
         return hash;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPResourceManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPResourceManager.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPResourceManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/AFPResourceManager.java Tue Feb  3 16:28:21 2009
@@ -24,7 +24,9 @@
 import java.util.Map;
 
 import org.apache.fop.afp.modca.AbstractNamedAFPObject;
+import org.apache.fop.afp.modca.AbstractPageObject;
 import org.apache.fop.afp.modca.IncludeObject;
+import org.apache.fop.afp.modca.PageSegment;
 import org.apache.fop.afp.modca.Registry;
 import org.apache.fop.afp.modca.ResourceGroup;
 
@@ -45,10 +47,12 @@
     /** Maintain a reference count of instream objects for referencing purposes */
     private int instreamObjectCount = 0;
 
-    /** a mapping of resourceInfo --> include name */
-    private final Map/*<AFPResourceInfo,String>*/ includeNameMap
+    /** a mapping of resourceInfo --> names of includable objects */
+    private final Map/*<AFPResourceInfo,String>*/ includableObjectsMap
         = new java.util.HashMap()/*<AFPResourceInfo,String>*/;
 
+    private Map pageSegmentMap = new java.util.HashMap();
+
     /**
      * Main constructor
      */
@@ -112,68 +116,106 @@
         AbstractNamedAFPObject namedObj = null;
 
         AFPResourceInfo resourceInfo = dataObjectInfo.getResourceInfo();
-        String uri = resourceInfo.getUri();
-        if (uri == null) {
-            uri = "/";
+        updateResourceInfoUri(resourceInfo);
+
+        String objectName = (String)includableObjectsMap.get(resourceInfo);
+        if (objectName != null) {
+            // an existing data resource so reference it by adding an include to the current page
+            includeObject(dataObjectInfo, objectName);
+            return;
         }
-        // if this is an instream data object adjust the uri to ensure that its unique
-        if (uri.endsWith("/")) {
-            uri += "#" + (++instreamObjectCount);
-            resourceInfo.setUri(uri);
+
+        objectName = (String)pageSegmentMap.get(resourceInfo);
+        if (objectName != null) {
+            // an existing data resource so reference it by adding an include to the current page
+            includePageSegment(dataObjectInfo, objectName);
+            return;
         }
 
-        String objectName = (String)includeNameMap.get(resourceInfo);
-        if (objectName == null) {
-            boolean useInclude = true;
-            Registry.ObjectType objectType = null;
-
-            // new resource so create
-            if (dataObjectInfo instanceof AFPImageObjectInfo) {
-                AFPImageObjectInfo imageObjectInfo = (AFPImageObjectInfo)dataObjectInfo;
-                namedObj = dataObjectFactory.createImage(imageObjectInfo);
-            } else if (dataObjectInfo instanceof AFPGraphicsObjectInfo) {
-                AFPGraphicsObjectInfo graphicsObjectInfo = (AFPGraphicsObjectInfo)dataObjectInfo;
-                namedObj = dataObjectFactory.createGraphic(graphicsObjectInfo);
-            } else {
-                // natively embedded data object
-                namedObj = dataObjectFactory.createObjectContainer(dataObjectInfo);
-                objectType = dataObjectInfo.getObjectType();
-                useInclude = objectType != null && objectType.isIncludable();
-            }
+        boolean useInclude = true;
+        Registry.ObjectType objectType = null;
 
-            AFPResourceLevel resourceLevel = resourceInfo.getLevel();
-            ResourceGroup resourceGroup = streamer.getResourceGroup(resourceLevel);
-            useInclude &= resourceGroup != null;
-            if (useInclude) {
-                // if it is to reside within a resource group at print-file or external level
-                if (resourceLevel.isPrintFile() || resourceLevel.isExternal()) {
-                    // wrap newly created data object in a resource object
-                    namedObj = dataObjectFactory.createResource(namedObj, resourceInfo, objectType);
-                }
+        // new resource so create
+        if (dataObjectInfo instanceof AFPImageObjectInfo) {
+            AFPImageObjectInfo imageObjectInfo = (AFPImageObjectInfo)dataObjectInfo;
+            namedObj = dataObjectFactory.createImage(imageObjectInfo);
+        } else if (dataObjectInfo instanceof AFPGraphicsObjectInfo) {
+            AFPGraphicsObjectInfo graphicsObjectInfo = (AFPGraphicsObjectInfo)dataObjectInfo;
+            namedObj = dataObjectFactory.createGraphic(graphicsObjectInfo);
+        } else {
+            // natively embedded data object
+            namedObj = dataObjectFactory.createObjectContainer(dataObjectInfo);
+            objectType = dataObjectInfo.getObjectType();
+            useInclude = objectType != null && objectType.isIncludable();
+        }
 
-                // add data object into its resource group destination
-                resourceGroup.addObject(namedObj);
+        AFPResourceLevel resourceLevel = resourceInfo.getLevel();
+        ResourceGroup resourceGroup = streamer.getResourceGroup(resourceLevel);
+        useInclude &= resourceGroup != null;
+        if (useInclude) {
+
+            boolean usePageSegment = dataObjectInfo.isCreatePageSegment();
+
+            // if it is to reside within a resource group at print-file or external level
+            if (resourceLevel.isPrintFile() || resourceLevel.isExternal()) {
+                if (usePageSegment) {
+                    String pageSegmentName = "S10" + namedObj.getName().substring(3);
+                    namedObj.setName(pageSegmentName);
+                    PageSegment seg = new PageSegment(pageSegmentName);
+                    seg.addObject(namedObj);
+                    namedObj = seg;
+                }
 
-                // create the include object
-                objectName = namedObj.getName();
-                IncludeObject includeObject
-                    = dataObjectFactory.createInclude(objectName, dataObjectInfo);
+                // wrap newly created data object in a resource object
+                namedObj = dataObjectFactory.createResource(namedObj, resourceInfo, objectType);
+            }
 
-                // add an include to the current page
-                dataStream.getCurrentPage().addObject(includeObject);
+            // add data object into its resource group destination
+            resourceGroup.addObject(namedObj);
 
-                // record mapping of resource info to data object resource name
-                includeNameMap.put(resourceInfo, objectName);
+            // create the include object
+            objectName = namedObj.getName();
+            if (usePageSegment) {
+                includePageSegment(dataObjectInfo, objectName);
+                pageSegmentMap.put(resourceInfo, objectName);
             } else {
-                // not to be included so inline data object directly into the current page
-                dataStream.getCurrentPage().addObject(namedObj);
+                includeObject(dataObjectInfo, objectName);
+                // record mapping of resource info to data object resource name
+                includableObjectsMap.put(resourceInfo, objectName);
             }
+
         } else {
-            // an existing data resource so reference it by adding an include to the current page
-            IncludeObject includeObject
-                = dataObjectFactory.createInclude(objectName, dataObjectInfo);
-            dataStream.getCurrentPage().addObject(includeObject);
+            // not to be included so inline data object directly into the current page
+            dataStream.getCurrentPage().addObject(namedObj);
+        }
+    }
+
+    private void updateResourceInfoUri(AFPResourceInfo resourceInfo) {
+        String uri = resourceInfo.getUri();
+        if (uri == null) {
+            uri = "/";
         }
+        // if this is an instream data object adjust the uri to ensure that its unique
+        if (uri.endsWith("/")) {
+            uri += "#" + (++instreamObjectCount);
+            resourceInfo.setUri(uri);
+        }
+    }
+
+    private void includeObject(AFPDataObjectInfo dataObjectInfo,
+            String objectName) {
+        IncludeObject includeObject
+            = dataObjectFactory.createInclude(objectName, dataObjectInfo);
+        dataStream.getCurrentPage().addObject(includeObject);
+    }
+
+    private void includePageSegment(AFPDataObjectInfo dataObjectInfo,
+            String pageSegmentName) {
+        int x = dataObjectInfo.getObjectAreaInfo().getX();
+        int y = dataObjectInfo.getObjectAreaInfo().getY();
+        AbstractPageObject currentPage = dataStream.getCurrentPage();
+        boolean createHardPageSegments = true;
+        currentPage.createIncludePageSegment(pageSegmentName, x, y, createHardPageSegments);
     }
 
 }
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/DataStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/DataStream.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/DataStream.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/DataStream.java Tue Feb  3 16:28:21 2009
@@ -445,7 +445,8 @@
             yOrigin = y;
             break;
         }
-        currentPage.createIncludePageSegment(name, xOrigin, yOrigin);
+        boolean createHardPageSegments = true;
+        currentPage.createIncludePageSegment(name, xOrigin, yOrigin, createHardPageSegments);
     }
 
     /**

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/goca/GraphicsData.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/goca/GraphicsData.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/goca/GraphicsData.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/goca/GraphicsData.java Tue Feb  3 16:28:21 2009
@@ -32,7 +32,7 @@
 public final class GraphicsData extends AbstractGraphicsDrawingOrderContainer {
 
     /** the maximum graphics data length */
-    public static final int MAX_DATA_LEN = 32767;
+    public static final int MAX_DATA_LEN = 8192;
 
     /** the graphics segment */
     private GraphicsChainedSegment currentSegment = null;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/ioca/ImageContent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/ioca/ImageContent.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/ioca/ImageContent.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/ioca/ImageContent.java Tue Feb  3 16:28:21 2009
@@ -155,9 +155,12 @@
 
         os.write(getImageIDESizeParameter());
 
-        os.write(getIDEStructureParameter());
+        boolean useFS10 = (this.size == 1);
+        if (!useFS10) {
+            os.write(getIDEStructureParameter());
 
-        os.write(getExternalAlgorithmParameter());
+            os.write(getExternalAlgorithmParameter());
+        }
 
         final byte[] dataHeader = new byte[] {
                 (byte)0xFE, // ID
@@ -240,12 +243,15 @@
      * @return byte[] The data stream.
      */
     private byte[] getImageIDESizeParameter() {
-        final byte[] ideSizeData = new byte[] {
-            (byte)0x96, // ID
-            0x01, // Length
-            size,
-        };
-        return ideSizeData;
+        if (size != 1) {
+            final byte[] ideSizeData = new byte[] {
+                    (byte)0x96, // ID
+                    0x01, // Length
+                    size};
+            return ideSizeData;
+        } else {
+            return new byte[0];
+        }
     }
 
     /**
@@ -264,7 +270,6 @@
                 (byte)0x9B, // ID
                 0x00, // Length
                 flags, // FLAGS
-                0x00, // Reserved
                 colorModel, // COLOR MODEL
                 0x00, // Reserved
                 0x00, // Reserved
@@ -280,12 +285,11 @@
                     (byte)0x9B, // ID
                     0x00, // Length
                     flags, // FLAGS
-                    0x00, // Reserved
                     colorModel, // COLOR MODEL
                     0x00, // Reserved
                     0x00, // Reserved
                     0x00, // Reserved
-                    1
+                    0x01
                 };
                 ideStructData[1] = (byte)(ideStructData.length - 2);
                 return ideStructData;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/ioca/ImageSegment.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/ioca/ImageSegment.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/ioca/ImageSegment.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/ioca/ImageSegment.java Tue Feb  3 16:28:21 2009
@@ -146,14 +146,17 @@
 
     /** {@inheritDoc} */
     protected void writeStart(OutputStream os) throws IOException {
-        byte[] nameBytes = getNameBytes();
+        //Name disabled, it's optional and not referenced by our code
+        //byte[] nameBytes = getNameBytes();
         byte[] data = new byte[] {
             0x70, // ID
-            0x04, // Length
+            0x00, // Length
+            /*
             nameBytes[0], // Name byte 1
             nameBytes[1], // Name byte 2
             nameBytes[2], // Name byte 3
             nameBytes[3], // Name byte 4
+            */
         };
         os.write(data);
     }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractDataObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractDataObject.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractDataObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractDataObject.java Tue Feb  3 16:28:21 2009
@@ -90,6 +90,8 @@
             // positional values are specified in the oaOffset of the include object
             objectAreaPosition = factory.createObjectAreaPosition(0, 0, 0);
         }
+        objectAreaPosition.setReferenceCoordinateSystem(
+                ObjectAreaPosition.REFCSYS_PAGE_SEGMENT_RELATIVE);
         getObjectEnvironmentGroup().setObjectAreaPosition(objectAreaPosition);
     }
 

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractEnvironmentGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractEnvironmentGroup.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractEnvironmentGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractEnvironmentGroup.java Tue Feb  3 16:28:21 2009
@@ -5,9 +5,9 @@
  * 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.
@@ -29,14 +29,15 @@
  */
 public abstract class AbstractEnvironmentGroup extends AbstractNamedAFPObject {
 
-    /**
-     * The collection of MapPageOverlay objects
-     */
+    /** the collection of MapDataResource objects */
+    protected final List mapDataResources = null;
+
+    /** the collection of MapPageOverlay objects */
     protected List mapPageOverlays = null;
 
     /**
      * Main constructor
-     * 
+     *
      * @param name the object name
      */
     public AbstractEnvironmentGroup(String name) {
@@ -53,7 +54,7 @@
     /**
      * Actually creates the MPO object.
      * Also creates the supporting object (an IPO)
-     * 
+     *
      * @param name the name of the overlay to be used
      */
     public void createOverlay(String name) {
@@ -80,12 +81,16 @@
     /**
      * Getter method for the most recent MapPageOverlay added to the
      * Active Environment Group (returns null if no MapPageOverlay exist)
-     * 
+     *
      * @return the most recent Map Coded Font
      */
     private MapPageOverlay getCurrentMapPageOverlay() {
-        if (mapPageOverlays != null && mapPageOverlays.size() > 0) {
-            return (MapPageOverlay) mapPageOverlays.get(mapPageOverlays.size() - 1);
+        return (MapPageOverlay)getLastElement(this.mapPageOverlays);
+    }
+
+    protected Object getLastElement(List list) {
+        if (list != null && list.size() > 0) {
+            return list.get(list.size() - 1);
         } else {
             return null;
         }
@@ -94,8 +99,5 @@
     /** {@inheritDoc} */
     protected void writeContent(OutputStream os) throws IOException {
         super.writeContent(os);
-        if (mapPageOverlays != null) {
-            writeObjects(mapPageOverlays, os);
-        }
     }
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractPageObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractPageObject.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractPageObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/AbstractPageObject.java Tue Feb  3 16:28:21 2009
@@ -248,9 +248,14 @@
      * @param y
      *            the y coordinate of the page segment.
      */
-    public void createIncludePageSegment(String name, int x, int y) {
+    public void createIncludePageSegment(String name, int x, int y, boolean hard) {
         IncludePageSegment ips = factory.createIncludePageSegment(name, x, y);
         addObject(ips);
+        if (hard) {
+            //For performance reasons, page segments can be turned into hard page segments
+            //using the Map Page Segment (MPS) structured field.
+            getActiveEnvironmentGroup().addMapPageSegment(name);
+        }
     }
 
     /**

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ActiveEnvironmentGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ActiveEnvironmentGroup.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ActiveEnvironmentGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ActiveEnvironmentGroup.java Tue Feb  3 16:28:21 2009
@@ -45,8 +45,8 @@
     private final List/*<MapCodedFonts>*/ mapCodedFonts
         = new java.util.ArrayList/*<MapCodedFonts>*/();
 
-    /** the collection of MapDataResource objects */
-    private final List mapDataResources = null;
+    /** the collection of MapPageSegments objects */
+    private List mapPageSegments = null;
 
     /** the Object Area Descriptor for the active environment group */
     private ObjectAreaDescriptor objectAreaDescriptor = null;
@@ -132,6 +132,7 @@
         writeObjects(mapCodedFonts, os);
         writeObjects(mapDataResources, os);
         writeObjects(mapPageOverlays, os);
+        writeObjects(mapPageSegments, os);
 
         if (pageDescriptor != null) {
             pageDescriptor.writeToStream(os);
@@ -204,18 +205,29 @@
         }
     }
 
-//  private List getMapDataResources() {
-//  if (mapDataResources == null) {
-//      mapDataResources = new java.util.ArrayList();
-//  }
-//  return mapDataResources;
-//}
-
-//    /**
-//     * Method to create a map data resource object
-//     * @param dataObjectAccessor a data object accessor
-//     */
-//    protected void createMapDataResource(DataObjectAccessor dataObjectAccessor) {
-//        getMapDataResources().add(new MapDataResource(dataObjectAccessor));
-//    }
+    public void addMapPageSegment(String name) {
+        try {
+            needMapPageSegment().addPageSegment(name);
+        } catch (MaximumSizeExceededException e) {
+            //Should not happen, handled internally
+            throw new IllegalStateException("Internal error: " + e.getMessage());
+        }
+    }
+
+    private MapPageSegment getCurrentMapPageSegment() {
+        return (MapPageSegment)getLastElement(this.mapPageSegments);
+    }
+
+    private MapPageSegment needMapPageSegment() {
+        if (this.mapPageSegments == null) {
+            this.mapPageSegments = new java.util.ArrayList();
+        }
+        MapPageSegment seg = getCurrentMapPageSegment();
+        if (seg == null || seg.isFull()) {
+            seg = new MapPageSegment();
+            this.mapPageSegments.add(seg);
+        }
+        return seg;
+    }
+
 }
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java Tue Feb  3 16:28:21 2009
@@ -29,6 +29,11 @@
  */
 public class ImageDataDescriptor extends AbstractDescriptor {
 
+    public static final byte FUNCTION_SET_FS10 = 0x0A;
+    public static final byte FUNCTION_SET_FS11 = 0x0B;
+
+    private byte functionSet = FUNCTION_SET_FS11; // FCNSET = IOCA FS 11
+
     /**
      * Constructor for a ImageDataDescriptor for the specified
      * resolution, width and height.
@@ -42,6 +47,14 @@
         super(width, height, widthRes, heightRes);
     }
 
+    /**
+     * Sets the IOCA function set to be used.
+     * @param functionSet the function set (0x0A for FS 10, 0x0B for FS 11, etc.)
+     */
+    public void setFunctionSet(byte functionSet) {
+        this.functionSet = functionSet;
+    }
+
     /** {@inheritDoc} */
     public void writeToStream(OutputStream os) throws IOException {
         byte[] data = new byte[22];
@@ -68,10 +81,11 @@
         data[16] = h[0];
         data[17] = h[1];
 
+        //IOCA Function Set Field
         data[18] = (byte)0xF7; // ID = Set IOCA Function Set
         data[19] = 0x02; // Length
         data[20] = 0x01; // Category = Function set identifier
-        data[21] = 0x0B; // FCNSET = IOCA FS 11
+        data[21] = functionSet;
 
         os.write(data);
     }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ImageObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ImageObject.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ImageObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ImageObject.java Tue Feb  3 16:28:21 2009
@@ -28,13 +28,14 @@
 import org.apache.fop.afp.AFPImageObjectInfo;
 import org.apache.fop.afp.Factory;
 import org.apache.fop.afp.ioca.ImageSegment;
+import org.apache.fop.afp.modca.triplets.MappingOptionTriplet;
 
 /**
  * An IOCA Image Data Object
  */
 public class ImageObject extends AbstractDataObject {
 
-    private static final int MAX_DATA_LEN = 32759;
+    private static final int MAX_DATA_LEN = 8192;
 
     /** the image segment */
     private ImageSegment imageSegment = null;
@@ -73,7 +74,12 @@
         int dataHeightRes = imageObjectInfo.getDataWidthRes();
         ImageDataDescriptor imageDataDescriptor
             = factory.createImageDataDescriptor(dataWidth, dataHeight, dataWidthRes, dataHeightRes);
+        if (imageObjectInfo.getBitsPerPixel() == 1) {
+            imageDataDescriptor.setFunctionSet(ImageDataDescriptor.FUNCTION_SET_FS10);
+        }
         getObjectEnvironmentGroup().setDataDescriptor(imageDataDescriptor);
+        getObjectEnvironmentGroup().setMapImageObject(
+                new MapImageObject(MappingOptionTriplet.SCALE_TO_FILL));
 
         getImageSegment().setImageSize(dataWidth, dataHeight, dataWidthRes, dataHeightRes);
     }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectAreaDescriptor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectAreaDescriptor.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectAreaDescriptor.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectAreaDescriptor.java Tue Feb  3 16:28:21 2009
@@ -25,7 +25,6 @@
 import org.apache.fop.afp.modca.triplets.DescriptorPositionTriplet;
 import org.apache.fop.afp.modca.triplets.MeasurementUnitsTriplet;
 import org.apache.fop.afp.modca.triplets.ObjectAreaSizeTriplet;
-import org.apache.fop.afp.modca.triplets.PresentationSpaceResetMixingTriplet;
 import org.apache.fop.afp.util.BinaryUtils;
 
 /**
@@ -57,8 +56,10 @@
         addTriplet(new DescriptorPositionTriplet(OBJECT_AREA_POSITION_ID));
         addTriplet(new MeasurementUnitsTriplet(widthRes, heightRes));
         addTriplet(new ObjectAreaSizeTriplet(width, height));
+        /* not allowed in Presentation Interchange Set 1
         addTriplet(new PresentationSpaceResetMixingTriplet(
                 PresentationSpaceResetMixingTriplet.NOT_RESET));
+        */
 
         int tripletDataLength = getTripletDataLength();
         byte[] len = BinaryUtils.convert(data.length + tripletDataLength - 1, 2);

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java Tue Feb  3 16:28:21 2009
@@ -31,11 +31,20 @@
  */
 public class ObjectAreaPosition extends AbstractAFPObject {
 
+    /**
+     * Object areas will be positioned with respect to a point that is define by the
+     * Include Page Segment (IPS) structured field.
+     */
+    public static final byte REFCSYS_PAGE_SEGMENT_RELATIVE = 0x00;
+    /** Object areas will be positioned with respect to the standard origin */
+    public static final byte REFCSYS_PAGE_RELATIVE = 0x01;
+
     private final int x;
     private final int y;
     private final int rotation;
     private int xOffset;
     private int yOffset;
+    private byte refCSys = 0x01; //Page or overlay coordinate system
 
     /**
      * Construct an object area position for the specified object y, y position.
@@ -45,9 +54,30 @@
      * @param rotation The coordinate system rotation (must be 0, 90, 180, 270).
      */
     public ObjectAreaPosition(int x, int y, int rotation) {
+        this(x, y, rotation, REFCSYS_PAGE_RELATIVE);
+    }
+
+    /**
+     * Construct an object area position for the specified object y, y position.
+     *
+     * @param x The x coordinate.
+     * @param y The y coordinate.
+     * @param rotation The coordinate system rotation (must be 0, 90, 180, 270).
+     * @param refCSys the reference coordinate system (normally 0x01)
+     */
+    public ObjectAreaPosition(int x, int y, int rotation, byte refCSys) {
         this.x = x;
         this.y = y;
         this.rotation = rotation;
+        setReferenceCoordinateSystem(refCSys);
+    }
+
+    /**
+     * Sets the reference coordinate system.
+     * @param refCSys the reference coordinate system (normally 0x01)
+     */
+    public void setReferenceCoordinateSystem(byte refCSys) {
+        this.refCSys = refCSys;
     }
 
     /** {@inheritDoc} */
@@ -94,7 +124,7 @@
         data[30] = 0x2D; // YocaOrent
         data[31] = 0x00;
 
-        data[32] = 0x01; // RefCSys
+        data[32] = this.refCSys; // RefCSys
 
         os.write(data);
     }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java Tue Feb  3 16:28:21 2009
@@ -46,6 +46,9 @@
     /** the ObjectAreaPosition for the object environment group */
     private ObjectAreaPosition objectAreaPosition;
 
+    /** the MapImageObject for the object environment group (optional) */
+    private MapImageObject mapImageObject;
+
     /** the DataDescriptor for the object environment group */
     private AbstractDescriptor dataDescriptor;
 
@@ -83,6 +86,15 @@
         this.objectAreaPosition = objectAreaPosition;
     }
 
+    /**
+     * Sets the Map Image Object (MIO).
+     *
+     * @param mapImageObject the MIO structured field
+     */
+    public void setMapImageObject(MapImageObject mapImageObject) {
+        this.mapImageObject = mapImageObject;
+    }
+
     /** {@inheritDoc} */
     protected void writeStart(OutputStream os) throws IOException {
         byte[] data = new byte[17];
@@ -115,6 +127,10 @@
             objectAreaPosition.writeToStream(os);
         }
 
+        if (mapImageObject != null) {
+            mapImageObject.writeToStream(os);
+        }
+
         if (mapContainerData != null) {
             mapContainerData.writeToStream(os);
         }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java Tue Feb  3 16:28:21 2009
@@ -34,12 +34,6 @@
     /** default name for the resource group */
     private static final String DEFAULT_NAME = "REG00001";
 
-    /** the maps data resources contained in this resource environment group */
-    private List/*<MapDataResource>*/ mapDataResources = null;
-
-    /** the maps page overlays contained in this resource environment group */
-    private List mapPageOverlays = null;
-
     /** the pre-process presentation objects contained in this resource environment group */
     private List/*<PreprocessPresentationObject>*/ preProcessPresentationObjects = null;
 
@@ -53,20 +47,6 @@
         this(DEFAULT_NAME);
     }
 
-    private List/*<MapDataResource>*/ getMapDataResources() {
-        if (mapDataResources == null) {
-            this.mapDataResources = new java.util.ArrayList/*<MapDataResource>*/();
-        }
-        return this.mapDataResources;
-    }
-
-    private List getMapPageOverlays() {
-        if (mapPageOverlays == null) {
-            this.mapPageOverlays = new java.util.ArrayList();
-        }
-        return this.mapPageOverlays;
-    }
-
     private List/*<PreprocessPresentationObject>*/ getPreprocessPresentationObjects() {
         if (preProcessPresentationObjects == null) {
             this.preProcessPresentationObjects

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/Constants.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/Constants.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/Constants.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/Constants.java Tue Feb  3 16:28:21 2009
@@ -766,8 +766,13 @@
     int PR_X_WIDOW_CONTENT_LIMIT = 271;
     /** Property constant - FOP proprietary: limit for orphan content in lists and tables */
     int PR_X_ORPHAN_CONTENT_LIMIT = 272;
+    /**
+     * Property constant - FOP proprietary: disable balancing of columns in
+     * multi-column layouts.
+     */
+    int PR_X_DISABLE_COLUMN_BALANCING = 273;
     /** Number of property constants defined */
-    int PROPERTY_COUNT = 272;
+    int PROPERTY_COUNT = 273;
 
     // compound property constants
 

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/FOPropertyMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/FOPropertyMapping.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/FOPropertyMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/FOPropertyMapping.java Tue Feb  3 16:28:21 2009
@@ -1895,6 +1895,13 @@
         m.addEnum("all", getEnumProperty(EN_ALL, "ALL"));
         m.setDefault("none");
         addPropertyMaker("span", m);
+
+        // fox:disable-column-balancing
+        m  = new EnumProperty.Maker(PR_X_DISABLE_COLUMN_BALANCING);
+        m.useGeneric(genericBoolean);
+        m.setInherited(true);
+        m.setDefault("false");
+        addPropertyMaker("fox:disable-column-balancing", m);
     }
 
     private void createLeaderAndRuleProperties() {

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java Tue Feb  3 16:28:21 2009
@@ -45,6 +45,7 @@
         propertyAttributes.add("widow-content-limit");
         propertyAttributes.add("orphan-content-limit");
         propertyAttributes.add("internal-destination");
+        propertyAttributes.add("disable-column-balancing");
     }
 
     /**

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/Block.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/Block.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/Block.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/Block.java Tue Feb  3 16:28:21 2009
@@ -21,8 +21,6 @@
 
 import java.awt.Color;
 
-import org.xml.sax.Locator;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.datatypes.Length;
 import org.apache.fop.datatypes.Numeric;
@@ -40,6 +38,7 @@
 import org.apache.fop.fo.properties.CommonRelativePosition;
 import org.apache.fop.fo.properties.KeepProperty;
 import org.apache.fop.fo.properties.SpaceProperty;
+import org.xml.sax.Locator;
 
  /**
   * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_block">
@@ -80,6 +79,7 @@
     private int whiteSpaceCollapse;
     private Numeric widows;
     private int wrapOption;
+    private int disableColumnBalancing;
     // Unused but valid items, commented out for performance:
     //     private CommonAccessibility commonAccessibility;
     //     private CommonAural commonAural;
@@ -130,6 +130,7 @@
         whiteSpaceCollapse = pList.get(PR_WHITE_SPACE_COLLAPSE).getEnum();
         widows = pList.get(PR_WIDOWS).getNumeric();
         wrapOption = pList.get(PR_WRAP_OPTION).getEnum();
+        disableColumnBalancing = pList.get(PR_X_DISABLE_COLUMN_BALANCING).getEnum();
     }
 
     /** {@inheritDoc} */
@@ -318,6 +319,15 @@
         return this.lineHeightShiftAdjustment;
     }
 
+     /**
+     * @return the "fox:disable-column-balancing" property, one of
+     * {@link Constants#EN_TRUE}, {@link Constants#EN_FALSE}
+     */
+     public int getDisableColumnBalancing() {
+         return disableColumnBalancing;
+     }
+
+
     /** {@inheritDoc} */
     public CharIterator charIterator() {
         return NullCharIterator.getInstance();

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/BlockContainer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/BlockContainer.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/BlockContainer.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/BlockContainer.java Tue Feb  3 16:28:21 2009
@@ -19,10 +19,7 @@
 
 package org.apache.fop.fo.flow;
 
-import org.xml.sax.Locator;
-
 import org.apache.fop.apps.FOPException;
-import org.apache.fop.datatypes.Length;
 import org.apache.fop.datatypes.Numeric;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
@@ -34,6 +31,7 @@
 import org.apache.fop.fo.properties.CommonMarginBlock;
 import org.apache.fop.fo.properties.KeepProperty;
 import org.apache.fop.fo.properties.LengthRangeProperty;
+import org.xml.sax.Locator;
 
 /**
  * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_block-container">
@@ -56,6 +54,7 @@
     private int overflow;
     private Numeric referenceOrientation;
     private int span;
+    private int disableColumnBalancing;
     private int writingMode;
     // Unused but valid items, commented out for performance:
     //     private int intrusionDisplace;
@@ -94,6 +93,7 @@
         referenceOrientation = pList.get(PR_REFERENCE_ORIENTATION).getNumeric();
         span = pList.get(PR_SPAN).getEnum();
         writingMode = pList.get(PR_WRITING_MODE).getEnum();
+        disableColumnBalancing = pList.get(PR_X_DISABLE_COLUMN_BALANCING).getEnum();
     }
 
     /** {@inheritDoc} */
@@ -217,6 +217,15 @@
         return this.span;
     }
 
+    /**
+     * @return the "fox:disable-column-balancing" property, one of
+     * {@link Constants#EN_TRUE}, {@link Constants#EN_FALSE}
+     */
+    public int getDisableColumnBalancing() {
+        return disableColumnBalancing;
+    }
+
+
     /** @return the "writing-mode" property */
     public int getWritingMode() {
         return writingMode;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/table/TableRow.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/table/TableRow.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/table/TableRow.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fo/flow/table/TableRow.java Tue Feb  3 16:28:21 2009
@@ -128,7 +128,12 @@
                                      String localName)
                 throws ValidationException {
         if (FO_URI.equals(nsURI)) {
-            if (!localName.equals("table-cell")) {
+            if ("marker".equals(localName)) {
+                if (this.firstChild != null) {
+                    //a table-cell has already been added to this row
+                    nodesOutOfOrderError(loc, "fo:marker", "(table-cell+)");
+                }
+            } else if (!"table-cell".equals(localName)) {
                 invalidChildError(loc, nsURI, localName);
             }
         }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java Tue Feb  3 16:28:21 2009
@@ -25,7 +25,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.area.Area;
 import org.apache.fop.area.BlockParent;
 import org.apache.fop.fo.pagination.Flow;
@@ -82,14 +81,22 @@
             }
 
             int span = EN_NONE;
+            int disableColumnBalancing = EN_FALSE;
             if (curLM instanceof BlockLayoutManager) {
                 span = ((BlockLayoutManager)curLM).getBlockFO().getSpan();
+                disableColumnBalancing = ((BlockLayoutManager) curLM).getBlockFO()
+                        .getDisableColumnBalancing();
             } else if (curLM instanceof BlockContainerLayoutManager) {
                 span = ((BlockContainerLayoutManager)curLM).getBlockContainerFO().getSpan();
+                disableColumnBalancing = ((BlockContainerLayoutManager) curLM)
+                        .getBlockContainerFO().getDisableColumnBalancing();
             }
 
             int currentSpan = context.getCurrentSpan();
             if (currentSpan != span) {
+                if (span == EN_ALL) {
+                    context.setDisableColumnBalancing(disableColumnBalancing);
+                }
                 log.debug("span change from " + currentSpan + " to " + span);
                 context.signalSpanChange(span);
                 SpaceResolver.resolveElementList(returnList);

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/LayoutContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/LayoutContext.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/LayoutContext.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/LayoutContext.java Tue Feb  3 16:28:21 2009
@@ -148,6 +148,8 @@
     private int pendingKeepWithNext = BlockLevelLayoutManager.KEEP_AUTO;
     private int pendingKeepWithPrevious = BlockLevelLayoutManager.KEEP_AUTO;
 
+    private int disableColumnBalancing;
+
     /**
      * Copy constructor for creating child layout contexts.
      * @param parentLC the parent layout context to copy from
@@ -170,6 +172,7 @@
         this.pendingKeepWithNext = parentLC.pendingKeepWithNext;
         this.pendingKeepWithPrevious = parentLC.pendingKeepWithPrevious;
         // Copy other fields as necessary.
+        this.disableColumnBalancing = parentLC.disableColumnBalancing;
     }
 
     /**
@@ -412,7 +415,7 @@
 
     /**
      * Sets (Copies) the stack limits in both directions from another layout context.
-     * @param context the layout context to taje the values from
+     * @param context the layout context to take the values from
      */
     public void setStackLimitsFrom(LayoutContext context) {
         setStackLimitBP(context.getStackLimitBP());
@@ -681,5 +684,23 @@
         + (breakAfter != Constants.EN_AUTO ? "break-after" : "") + "]";
     }
 
+    /**
+     * Returns whether the column balancer should be disabled before a spanning block
+     *
+     * @return one of {@link Constants#EN_TRUE}, {@link Constants#EN_FALSE}
+     */
+    public int getDisableColumnBalancing() {
+        return disableColumnBalancing;
+    }
+
+    /**
+     * Sets whether the column balancer should be disabled before a spanning block
+     *
+     * @param disableColumnBalancing the value of the fox:disable-column-balancing property
+     * @see #getDisableColumnBalancing()
+     */
+    public void setDisableColumnBalancing(int disableColumnBalancing) {
+        this.disableColumnBalancing = disableColumnBalancing;
+    }
 }
 

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java Tue Feb  3 16:28:21 2009
@@ -103,15 +103,13 @@
      * @return the requested MinOptMax instance
      */
     public static MinOptMax toMinOptMax(LengthRangeProperty prop, PercentBaseContext context) {
-        MinOptMax mom = new MinOptMax(
-                (prop.getMinimum(context).isAuto()
-                        ? 0 : prop.getMinimum(context).getLength().getValue(context)),
-                (prop.getOptimum(context).isAuto()
-                        ? 0 : prop.getOptimum(context).getLength().getValue(context)),
-                (prop.getMaximum(context).isAuto()
-                        ? Integer.MAX_VALUE
-                        : prop.getMaximum(context).getLength().getValue(context)));
-        return mom;
+        int min = prop.getMinimum(context).isAuto() ? 0
+                : prop.getMinimum(context).getLength().getValue(context);
+        int opt = prop.getOptimum(context).isAuto() ? min
+                : prop.getOptimum(context).getLength().getValue(context);
+        int max = prop.getMaximum(context).isAuto() ? Integer.MAX_VALUE
+                : prop.getMaximum(context).getLength().getValue(context);
+        return new MinOptMax(min, opt, max);
     }
 
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/PageBreaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/PageBreaker.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/PageBreaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/layoutmgr/PageBreaker.java Tue Feb  3 16:28:21 2009
@@ -108,7 +108,9 @@
         if (childLC.getNextSpan() != Constants.NOT_SET) {
             //Next block list will have a different span.
             nextSequenceStartsOn = childLC.getNextSpan();
-            needColumnBalancing = (childLC.getNextSpan() == Constants.EN_ALL);
+            needColumnBalancing = childLC.getNextSpan() == Constants.EN_ALL
+                    && childLC.getDisableColumnBalancing() == Constants.EN_FALSE;
+
         }
         if (needColumnBalancing) {
             AbstractBreaker.log.debug(

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java?rev=740340&r1=740339&r2=740340&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java Tue Feb  3 16:28:21 2009
@@ -19,6 +19,7 @@
 
 package org.apache.fop.render.afp;
 
+import java.awt.Dimension;
 import java.awt.Rectangle;
 import java.awt.image.ColorModel;
 import java.awt.image.RenderedImage;
@@ -30,9 +31,12 @@
 
 import org.apache.xmlgraphics.image.loader.Image;
 import org.apache.xmlgraphics.image.loader.ImageFlavor;
+import org.apache.xmlgraphics.image.loader.ImageInfo;
+import org.apache.xmlgraphics.image.loader.ImageSize;
 import org.apache.xmlgraphics.image.loader.impl.ImageRendered;
 import org.apache.xmlgraphics.ps.ImageEncodingHelper;
 import org.apache.xmlgraphics.util.MimeConstants;
+import org.apache.xmlgraphics.util.UnitConv;
 
 import org.apache.fop.afp.AFPDataObjectInfo;
 import org.apache.fop.afp.AFPImageObjectInfo;
@@ -40,7 +44,7 @@
 import org.apache.fop.afp.AFPPaintingState;
 import org.apache.fop.render.ImageHandler;
 import org.apache.fop.render.RenderingContext;
-import org.apache.fop.util.BitmapImageUtil;
+import org.apache.fop.util.bitmap.BitmapImageUtil;
 
 /**
  * PDFImageHandler implementation which handles RenderedImage instances.
@@ -66,22 +70,64 @@
         AFPInfo afpInfo = rendererContext.getInfo();
         AFPPaintingState paintingState = afpInfo.getPaintingState();
         ImageRendered imageRendered = (ImageRendered) rendererImageInfo.img;
+        Dimension targetSize = new Dimension(afpInfo.getWidth(), afpInfo.getHeight());
 
-        updateDataObjectInfo(imageObjectInfo, paintingState, imageRendered);
+        updateDataObjectInfo(imageObjectInfo, paintingState, imageRendered, targetSize);
         return imageObjectInfo;
     }
 
     private AFPDataObjectInfo updateDataObjectInfo(AFPImageObjectInfo imageObjectInfo,
-            AFPPaintingState paintingState, ImageRendered imageRendered)
+            AFPPaintingState paintingState, ImageRendered imageRendered, Dimension targetSize)
             throws IOException {
 
         int resolution = paintingState.getResolution();
+        int maxPixelSize = paintingState.getBitsPerPixel();
+        if (paintingState.isColorImages()) {
+            maxPixelSize *= 3; //RGB only at the moment
+        }
+        RenderedImage renderedImage = imageRendered.getRenderedImage();
 
-        imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS45);
-        imageObjectInfo.setDataHeightRes(resolution);
-        imageObjectInfo.setDataWidthRes(resolution);
+        ImageInfo imageInfo = imageRendered.getInfo();
+        ImageSize intrinsicSize = imageInfo.getSize();
 
-        RenderedImage renderedImage = imageRendered.getRenderedImage();
+        boolean useFS10 = (maxPixelSize == 1) || BitmapImageUtil.isMonochromeImage(renderedImage);
+        boolean usePageSegments = useFS10
+                    && !imageObjectInfo.getResourceInfo().getLevel().isInline();
+
+        ImageSize effIntrinsicSize = intrinsicSize;
+        if (usePageSegments) {
+            //Resize, optionally resample and convert image
+            Dimension resampledDim = new Dimension(
+                    (int)Math.ceil(UnitConv.mpt2px(targetSize.getWidth(), resolution)),
+                    (int)Math.ceil(UnitConv.mpt2px(targetSize.getHeight(), resolution)));
+
+            imageObjectInfo.setCreatePageSegment(true);
+            imageObjectInfo.getResourceInfo().setImageDimension(resampledDim);
+
+            //Only resample/downsample if image is smaller than its intrinsic size
+            //to make print file smaller
+            boolean resample = resampledDim.width < renderedImage.getWidth()
+                && resampledDim.height < renderedImage.getHeight();
+            if (resample) {
+                if (log.isDebugEnabled()) {
+                    log.debug("Resample from " + intrinsicSize.getDimensionPx()
+                            + " to " + resampledDim);
+                }
+                renderedImage = BitmapImageUtil.convertToMonochrome(renderedImage, resampledDim);
+                effIntrinsicSize = new ImageSize(
+                        resampledDim.width, resampledDim.height, resolution);
+            }
+        }
+        if (useFS10) {
+            imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS10);
+        } else {
+            imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS11);
+        }
+
+        imageObjectInfo.setDataHeightRes((int)Math.round(
+                effIntrinsicSize.getDpiHorizontal() * 10));
+        imageObjectInfo.setDataWidthRes((int)Math.round(
+                effIntrinsicSize.getDpiVertical() * 10));
 
         int dataHeight = renderedImage.getHeight();
         imageObjectInfo.setDataHeight(dataHeight);
@@ -91,12 +137,6 @@
 
         //TODO To reduce AFP file size, investigate using a compression scheme.
         //Currently, all image data is uncompressed.
-
-        int maxPixelSize = paintingState.getBitsPerPixel();
-        if (paintingState.isColorImages()) {
-            maxPixelSize *= 3; //RGB only at the moment
-        }
-
         ColorModel cm = renderedImage.getColorModel();
         if (log.isTraceEnabled()) {
             log.trace("ColorModel: " + cm);
@@ -121,11 +161,16 @@
             if (BitmapImageUtil.getColorIndexSize(renderedImage) > 2) {
                 directEncode = false; //Lookup tables are not implemented, yet
             }
+            if (useFS10
+                    && BitmapImageUtil.isMonochromeImage(renderedImage)
+                    && BitmapImageUtil.isZeroBlack(renderedImage)) {
+                directEncode = false;
+            }
             if (directEncode) {
                 log.debug("Encoding image directly...");
                 imageObjectInfo.setBitsPerPixel(encodedColorModel.getPixelSize());
                 if (BitmapImageUtil.isMonochromeImage(renderedImage)
-                        && !BitmapImageUtil.isZeroBlack(renderedImage)) {
+                        && BitmapImageUtil.isZeroBlack(renderedImage)) {
                     log.trace("set subtractive mode");
                     imageObjectInfo.setSubtractive(true);
                 }
@@ -136,6 +181,7 @@
         }
         if (imageData == null) {
             log.debug("Encoding image via RGB...");
+
             //Convert image to 24bit RGB
             ImageEncodingHelper.encodeRenderedImageAsRGB(renderedImage, baos);
             imageData = baos.toByteArray();
@@ -204,10 +250,11 @@
 
         // Positioning
         imageObjectInfo.setObjectAreaInfo(createObjectAreaInfo(afpContext.getPaintingState(), pos));
+        Dimension targetSize = pos.getSize();
 
         // Image content
         ImageRendered imageRend = (ImageRendered)image;
-        updateDataObjectInfo(imageObjectInfo, afpContext.getPaintingState(), imageRend);
+        updateDataObjectInfo(imageObjectInfo, afpContext.getPaintingState(), imageRend, targetSize);
 
         // Create image
         afpContext.getResourceManager().createObject(imageObjectInfo);

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  3 16:28:21 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java:699793-735028
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java:699793-740275

Propchange: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/intermediate/IFContentHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  3 16:28:21 2009
@@ -1 +1 @@
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContentHandler.java:680381-735028
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContentHandler.java:680381-740275



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org