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 ac...@apache.org on 2008/06/09 16:11:18 UTC

svn commit: r665697 - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources: ./ lib/ src/documentation/content/xdocs/ src/java/org/apache/fop/fonts/ src/java/org/apache/fop/fonts/autodetect/ src/java/org/apache/fop/layoutmgr/table/ src/java/org/apache/fop...

Author: acumiskey
Date: Mon Jun  9 07:11:16 2008
New Revision: 665697

URL: http://svn.apache.org/viewvc?rev=665697&view=rev
Log:
Merged revisions 665691 via svnmerge from 
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk

................
  r665691 | jeremias | 2008-06-09 15:01:53 +0100 (Mon, 09 Jun 2008) | 82 lines
  
  Merged revisions 636407-637074,637076-637118,637120-637790,637792-637856,637858-637992,637994-638047,638049-638307,638309-638315,638318-664698 via svnmerge from 
  https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
  
  ........
    r638937 | jeremias | 2008-03-19 18:08:57 +0100 (Mi, 19 Mrz 2008) | 1 line
    
    A nit.
  ........
    r640889 | vhennebert | 2008-03-25 17:43:55 +0100 (Di, 25 Mrz 2008) | 2 lines
    
    Set the final release date and added a news item about the 0.95beta release (the change was made before updating the website)
  ........
    r642906 | jeremias | 2008-03-31 09:12:40 +0200 (Mo, 31 Mrz 2008) | 3 lines
    
    Added version number to xml-apis-ext (as suggested by Karel Vervaeke).
    Moved xml-apis to same version as xml-apis-ext.
    Added missing licensing info about xml-apis-ext.
  ........
    r647403 | jeremias | 2008-04-12 11:02:01 +0200 (Sa, 12 Apr 2008) | 1 line
    
    Fixed NullPointerException when loading a TrueType font using XML font metric files.
  ........
    r647537 | jeremias | 2008-04-13 09:36:00 +0200 (So, 13 Apr 2008) | 1 line
    
    Performance improvement when encoding images: Fixed an important hotspot by extending CloseBlocker from ProxyOutputStream instead of FilterOutputStream as the latter routes all write(byte[]) calls through write(int).
  ........
    r648984 | jeremias | 2008-04-17 09:00:22 +0200 (Do, 17 Apr 2008) | 1 line
    
    HeadURL was missing in the properties.
  ........
    r649006 | jeremias | 2008-04-17 10:42:52 +0200 (Do, 17 Apr 2008) | 1 line
    
    Fixed text extraction problem with ZapfDingbats and Symbol font in PDF output. These fonts are symbolic and must not use an Encoding value in PDF. Applies to the built-in base 14 variant and to the case where these fonts are explicitely embedded.
  ........
    r649014 | jeremias | 2008-04-17 11:10:15 +0200 (Do, 17 Apr 2008) | 1 line
    
    Added missing change information.
  ........
    r650550 | vhennebert | 2008-04-22 17:22:31 +0200 (Di, 22 Apr 2008) | 4 lines
    
    Bugzilla 41621:
    - length of the penalty now correctly computed;
    - AssertionError fixed.
  ........
    r651302 | jeremias | 2008-04-24 18:08:53 +0200 (Do, 24 Apr 2008) | 3 lines
    
    Fixed regression causing bad positioning of block-containers if used as descendant of a table-cell. This was not caught because of the lack of a test case that would have shown the problem in visual testing with BatchDiffer.
    See also: http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200804.mbox/%3c20080424164128.973A.DEV@jeremias-maerki.ch%3e
  ........
    r653537 | vhennebert | 2008-05-05 19:47:28 +0200 (Mo, 05 Mai 2008) | 2 lines
    
    Bugfix: the before border of cells below a column-spanning cell had their value taken from the leading case, instead of the normal one.
  ........
    r654453 | jeremias | 2008-05-08 11:14:04 +0200 (Do, 08 Mai 2008) | 2 lines
    
    Added /usr/local/share/fonts as additional possible location for fonts on Unixes.
  ........
    r656286 | jeremias | 2008-05-14 16:16:49 +0200 (Mi, 14 Mai 2008) | 1 line
    
    Restored plug-in API compatibility with FOP 0.94. Fixes a NoSuchMethodError when Barcode4J is run.
  ........
    r656524 | jeremias | 2008-05-15 09:07:18 +0200 (Do, 15 Mai 2008) | 1 line
    
    Fixed rendering of fixed block-containers in AFP output. The break-out was actually never implemented which is necessary for supporting fixed positioned viewports.
  ........
    r657520 | maxberger | 2008-05-18 11:38:45 +0200 (So, 18 Mai 2008) | 1 line
    
    Updated as per suggestions in bug 45019
  ........
    r661580 | maxberger | 2008-05-30 08:42:17 +0200 (Fr, 30 Mai 2008) | 1 line
    
    added my key to KEYS, it is used for signing mvn artifacts
  ........
    r663482 | jeremias | 2008-06-05 09:06:37 +0200 (Do, 05 Jun 2008) | 1 line
    
    Fixed positioning of absolutely positioned block-containers in multi-column documents.
  ........
    r664692 | jeremias | 2008-06-09 14:49:45 +0200 (Mo, 09 Jun 2008) | 1 line
    
    Restored PSImageUtils. I had deleted it prematurely. Extensions like Barcode4J rely on this class.
  ........
................

Added:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xml-apis-1.3.04.jar
      - copied unchanged from r665691, xmlgraphics/fop/trunk/lib/xml-apis-1.3.04.jar
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xml-apis-ext-1.3.04.jar
      - copied unchanged from r665691, xmlgraphics/fop/trunk/lib/xml-apis-ext-1.3.04.jar
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xml-apis-ext.LICENSE.dom-documentation.txt
      - copied unchanged from r665691, xmlgraphics/fop/trunk/lib/xml-apis-ext.LICENSE.dom-documentation.txt
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xml-apis-ext.LICENSE.dom-software.txt
      - copied unchanged from r665691, xmlgraphics/fop/trunk/lib/xml-apis-ext.LICENSE.dom-software.txt
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xml-apis-ext.LICENSE.sac.html
      - copied unchanged from r665691, xmlgraphics/fop/trunk/lib/xml-apis-ext.LICENSE.sac.html
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xml-apis-ext.LICENSE.txt
      - copied unchanged from r665691, xmlgraphics/fop/trunk/lib/xml-apis-ext.LICENSE.txt
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xml-apis-ext.NOTICE.txt
      - copied unchanged from r665691, xmlgraphics/fop/trunk/lib/xml-apis-ext.NOTICE.txt
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xml-apis-ext.README.dom.txt
      - copied unchanged from r665691, xmlgraphics/fop/trunk/lib/xml-apis-ext.README.dom.txt
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/ps/PSImageUtils.java
      - copied unchanged from r665691, xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSImageUtils.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/fonts/
      - copied from r665691, xmlgraphics/fop/trunk/test/java/org/apache/fop/fonts/
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/fonts/TrueTypeAnsiTestCase.java
      - copied unchanged from r665691, xmlgraphics/fop/trunk/test/java/org/apache/fop/fonts/TrueTypeAnsiTestCase.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/fonts/fonttest.xsl
      - copied unchanged from r665691, xmlgraphics/fop/trunk/test/java/org/apache/fop/fonts/fonttest.xsl
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/block-container_absolute-position_multi-column.xml
      - copied unchanged from r665691, xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block-container_absolute-position_multi-column.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/table-cell_bc-child.xml
      - copied unchanged from r665691, xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/table-cell_bc-child.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/table_border-collapse_collapse_spans_3.xml
      - copied unchanged from r665691, xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/table_border-collapse_collapse_spans_3.xml
Removed:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xml-apis-1.3.02.jar
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/lib/xml-apis-ext.jar
Modified:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/   (props changed)
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/NOTICE
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/build.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/fop.bat
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/news.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/CustomFont.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/FontDescriptor.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/FontReader.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/LazyFont.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/autodetect/UnixFontDirFinder.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowPainter.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFFactory.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFFont.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFResources.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractRenderer.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/Graphics2DAdapter.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/xml/XMLRenderer.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/CloseBlockerOutputStream.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/StandardTestSuite.java
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/table_bug44621.xml

Propchange: xmlgraphics/fop/branches/Temp_AFPGOCAResources/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jun  9 07:11:16 2008
@@ -1 +1 @@
-/xmlgraphics/fop/trunk:1-664679
+/xmlgraphics/fop/trunk:1-665691

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/NOTICE
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/NOTICE?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/NOTICE (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/NOTICE Mon Jun  9 07:11:16 2008
@@ -1,5 +1,5 @@
 Apache FOP
-Copyright 1999-2006 The Apache Software Foundation
+Copyright 1999-2008 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/build.xml?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/build.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/build.xml Mon Jun  9 07:11:16 2008
@@ -808,6 +808,11 @@
         </fileset>
       </classpath>
     </javac>
+    <copy todir="${build.dir}/test-classes">
+      <fileset dir="${basedir}/test/java">
+        <include name="**/*.xsl"/>
+      </fileset>
+    </copy>
   </target>
 
   <target name="junit-compile-copy-resources" if="junit.present">

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/fop.bat
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/fop.bat?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/fop.bat (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/fop.bat Mon Jun  9 07:11:16 2008
@@ -55,8 +55,8 @@
 set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LOCAL_FOP_HOME%build\fop-sandbox.jar
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LOCAL_FOP_HOME%build\fop-hyph.jar
-set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis-1.3.02.jar
-set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis-ext.jar
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis-1.3.04.jar
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis-ext-1.3.04.jar
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.7.1.jar
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.7.0.jar
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\serializer-2.7.0.jar

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/news.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/news.xml?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/news.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/documentation/content/xdocs/news.xml Mon Jun  9 07:11:16 2008
@@ -24,6 +24,14 @@
   </header>
   <body>
     <section>
+      <title>26th March 2007 - Apache FOP 0.95beta Released</title>
+      <p>The Apache FOP team is delighted to present you a beta version of the
+        next production grade release of the new FOP codebase. This release
+        contains many bug fixes and new features. See the <a
+          href="0.95/releaseNotes_0.95beta.html">Release Notes</a> for a list of
+        the most important changes.</p>
+    </section>
+    <section>
       <title>30 October 2007 - New Committer</title>
       <p>Welcome Max Berger!</p>
     </section>

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/CustomFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/CustomFont.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/CustomFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/CustomFont.java Mon Jun  9 07:11:16 2008
@@ -190,12 +190,17 @@
         return fontBBox;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
     public int getFlags() {
         return flags;
     }
+    
+    /** {@inheritDoc} */
+    public boolean isSymbolicFont() {
+        return ((getFlags() & 4) != 0) || "ZapfDingbatsEncoding".equals(getEncodingName());
+        //Note: The check for ZapfDingbats is necessary as the PFM does not reliably indicate
+        //if a font is symbolic.
+    }
 
     /**
      * Returns the font weight (100, 200...800, 900). This value may be different from the

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/FontDescriptor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/FontDescriptor.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/FontDescriptor.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/FontDescriptor.java Mon Jun  9 07:11:16 2008
@@ -53,7 +53,11 @@
      */
     int getFlags();
 
-
+    /**
+     * Indicates whether the font is a symbolic font.
+     * @return true if the font is a symbolic font (i.e. Symbol or ZapfDingbats)
+     */
+    boolean isSymbolicFont();
     /**
      * Returns the font's bounding box.
      * @return the bounding box

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/FontReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/FontReader.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/FontReader.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/FontReader.java Mon Jun  9 07:11:16 2008
@@ -27,8 +27,6 @@
 
 import javax.xml.parsers.SAXParserFactory;
 
-import org.apache.fop.apps.FOPException;
-import org.apache.fop.fonts.apps.TTFReader;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
 import org.xml.sax.Locator;
@@ -36,6 +34,9 @@
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.DefaultHandler;
 
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.fonts.apps.TTFReader;
+
 /**
  * Class for reading a metric.xml file and creating a font object.
  * Typical usage:
@@ -228,11 +229,11 @@
         if ("font-name".equals(localName)) {
             returnFont.setFontName(content);
         } else if ("full-name".equals(localName)) {
-            multiFont.setFullName(content);
+            returnFont.setFullName(content);
         } else if ("family-name".equals(localName)) {
             Set s = new java.util.HashSet();
             s.add(content);
-            multiFont.setFamilyNames(s);
+            returnFont.setFamilyNames(s);
         } else if ("ttc-name".equals(localName) && isCID) {
             multiFont.setTTCName(content);
         } else if ("encoding".equals(localName)) {

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/LazyFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/LazyFont.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/LazyFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/LazyFont.java Mon Jun  9 07:11:16 2008
@@ -321,14 +321,18 @@
         return realFontDescriptor.getAscender();
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
     public int getFlags() {
         load(true);
         return realFontDescriptor.getFlags();
     }
 
+    /** {@inheritDoc} */
+    public boolean isSymbolicFont() {
+        load(true);
+        return realFontDescriptor.isSymbolicFont();
+    }
+
     /**
      * {@inheritDoc}
      */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/autodetect/UnixFontDirFinder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/autodetect/UnixFontDirFinder.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/autodetect/UnixFontDirFinder.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/fonts/autodetect/UnixFontDirFinder.java Mon Jun  9 07:11:16 2008
@@ -32,6 +32,7 @@
         return new String[] {
             System.getProperty("user.home") + "/.fonts", // user
             "/usr/local/fonts", // local
+            "/usr/local/share/fonts", // local shared
             "/usr/share/fonts", // system
             "/usr/X11R6/lib/X11/fonts" // X
         };

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowPainter.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/RowPainter.java Mon Jun  9 07:11:16 2008
@@ -229,8 +229,12 @@
 
         // Then add areas for cells finishing on the current row
         for (int i = 0; i < colCount; i++) {
-            GridUnit currentGU = currentRow.getGridUnit(i);            
-            if (!currentGU.isEmpty() && currentGU.getColSpanIndex() == 0
+            GridUnit currentGU = currentRow.getGridUnit(i);
+            if (currentGU.isEmpty()) {
+                // TODO remove once missing cells are properly implemented (i.e., replaced
+                // by an fo:table-cell element containing an empty fo:block)
+                firstCellOnPage[i] = false;
+            } else if (currentGU.getColSpanIndex() == 0
                     && (lastInPart || currentGU.isLastGridUnitRowSpan())
                     && firstCellParts[i] != null) {
                 assert firstCellParts[i].pgu == currentGU.getPrimary();
@@ -260,7 +264,8 @@
                         actualRowHeight, borderBeforeWhich, borderAfterWhich,
                         lastOnPage);
                 firstCellParts[i] = null;
-                firstCellOnPage[i] = false;
+                Arrays.fill(firstCellOnPage, i, i + currentGU.getCell().getNumberColumnsSpanned(),
+                        false);
             }
         }
         currentRowOffset += actualRowHeight;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java Mon Jun  9 07:11:16 2008
@@ -23,6 +23,7 @@
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.ListIterator;
 import java.util.Map;
 
 import org.apache.commons.logging.Log;
@@ -41,6 +42,7 @@
 import org.apache.fop.layoutmgr.KeepUtil;
 import org.apache.fop.layoutmgr.KnuthBox;
 import org.apache.fop.layoutmgr.KnuthElement;
+import org.apache.fop.layoutmgr.KnuthGlue;
 import org.apache.fop.layoutmgr.KnuthPossPosIter;
 import org.apache.fop.layoutmgr.LayoutContext;
 import org.apache.fop.layoutmgr.ListElement;
@@ -232,6 +234,17 @@
                 
                 //Get elements for next row group
                 nextRowGroupElems = rowGroupLM.getNextKnuthElements(context, alignment, bodyType);
+                /*
+                 * The last break element produced by TableStepper (for the previous row
+                 * group) may be used to represent the break between the two row groups.
+                 * Its penalty value and break class must just be overridden by the
+                 * characteristics of the keep or break between the two.
+                 * 
+                 * However, we mustn't forget that if the after border of the last row of
+                 * the row group is thicker in the normal case than in the trailing case,
+                 * an additional glue will be appended to the element list. So we may have
+                 * to go two steps backwards in the list.
+                 */
                 
                 //Determine keep constraints
                 int penaltyStrength = BlockLevelLayoutManager.KEEP_AUTO;
@@ -246,24 +259,35 @@
                 if (breakBetween != Constants.EN_AUTO) {
                     penaltyValue = -KnuthElement.INFINITE;
                 }
-                TableHFPenaltyPosition penaltyPos = new TableHFPenaltyPosition(getTableLM());
-                int penaltyLen = 0;
-                if (bodyType == TableRowIterator.BODY) {
-                    if (!getTableLM().getTable().omitHeaderAtBreak()) {
-                        penaltyLen += getHeaderNetHeight();
-                        penaltyPos.headerElements = getHeaderElements();
-                    }
-                    if (!getTableLM().getTable().omitFooterAtBreak()) {
-                        penaltyLen += getFooterNetHeight();
-                        penaltyPos.footerElements = getFooterElements();
-                    }
+                BreakElement breakElement;
+                ListIterator elemIter = returnList.listIterator(returnList.size());
+                ListElement elem = (ListElement) elemIter.previous();
+                if (elem instanceof KnuthGlue) {
+                    breakElement = (BreakElement) elemIter.previous();
+                } else {
+                    breakElement = (BreakElement) elem;
                 }
-                returnList.add(new BreakElement(penaltyPos, 
-                        penaltyLen, penaltyValue, breakBetween, context));
+                breakElement.setPenaltyValue(penaltyValue);
+                breakElement.setBreakClass(breakBetween);
                 returnList.addAll(nextRowGroupElems);
                 breakBetween = context.getBreakAfter();
             }
         }
+        /*
+         * The last break produced for the last row-group of this table part must be
+         * removed, because the breaking after the table will be handled by TableLM.
+         * Unless the element list ends with a glue, which must be kept to accurately
+         * represent the content. In such a case the break is simply disabled by setting
+         * its penalty to infinite.
+         */
+        ListIterator elemIter = returnList.listIterator(returnList.size());
+        ListElement elem = (ListElement) elemIter.previous();
+        if (elem instanceof KnuthGlue) {
+            BreakElement breakElement = (BreakElement) elemIter.previous();
+            breakElement.setPenaltyValue(KnuthElement.INFINITE);
+        } else {
+            elemIter.remove();
+        }
         context.updateKeepWithPreviousPending(keepWithPrevious);
         context.setBreakBefore(breakBefore);
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableStepper.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableStepper.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/table/TableStepper.java Mon Jun  9 07:11:16 2008
@@ -282,13 +282,8 @@
             laststep = step;
             step = getNextStep();
         } while (step >= 0);
-        if (!returnList.isEmpty()) {
-            lastTCPos.setFlag(TableContentPosition.LAST_IN_ROWGROUP, true);
-            // It's not up to TableStepper to decide whether there can/must be a break
-            // after the row group or not, but to ancestor stacking elements
-            assert returnList.getLast() instanceof BreakElement;
-            returnList.removeLast();
-        }
+        assert !returnList.isEmpty();
+        lastTCPos.setFlag(TableContentPosition.LAST_IN_ROWGROUP, true);
         return returnList;
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFFactory.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFFactory.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFFactory.java Mon Jun  9 07:11:16 2008
@@ -1203,10 +1203,11 @@
             PDFFontDescriptor pdfdesc = makeFontDescriptor(descriptor);
 
             PDFFont font = null;
-            font = PDFFont.createFont(fontname, fonttype, basefont, encoding);
+            font = PDFFont.createFont(fontname, fonttype, basefont, null);
             getDocument().registerObject(font);
 
             if (fonttype == FontType.TYPE0) {
+                font.setEncoding(encoding);
                 CIDFont cidMetrics;
                 if (metrics instanceof LazyFont) {
                     cidMetrics = (CIDFont)((LazyFont) metrics).getRealFont();
@@ -1252,7 +1253,9 @@
                 
                 //Handle encoding
                 SingleByteEncoding mapping = singleByteFont.getEncoding();
-                if (PDFEncoding.isPredefinedEncoding(mapping.getName())) {
+                if (singleByteFont.isSymbolicFont()) {
+                    //no encoding, use the font's encoding
+                } else if (PDFEncoding.isPredefinedEncoding(mapping.getName())) {
                     font.setEncoding(mapping.getName());
                 } else {
                     Object pdfEncoding = createPDFEncoding(mapping,

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFFont.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFFont.java Mon Jun  9 07:11:16 2008
@@ -62,8 +62,6 @@
             setEncoding((PDFEncoding)encoding);
         } else if (encoding instanceof String) {
             setEncoding((String)encoding);
-        } else {
-            throw new IllegalArgumentException("Illegal value for encoding");
         }
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFResources.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFResources.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFResources.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFResources.java Mon Jun  9 07:11:16 2008
@@ -28,6 +28,8 @@
 import org.apache.fop.fonts.FontDescriptor;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.fonts.Typeface;
+import org.apache.fop.fonts.base14.Symbol;
+import org.apache.fop.fonts.base14.ZapfDingbats;
 import org.apache.fop.util.ColorProfileUtil;
 
 /**
@@ -109,8 +111,12 @@
                 if (font instanceof FontDescriptor) {
                     desc = (FontDescriptor)font;
                 }
+                String encoding = font.getEncodingName();
+                if (font instanceof Symbol || font instanceof ZapfDingbats) {
+                    encoding = null; //Symbolic fonts shouldn't specify an encoding value in PDF
+                }
                 addFont(doc.getFactory().makeFont(
-                    f, font.getEmbedFontName(), font.getEncodingName(), font, desc));
+                    f, font.getEmbedFontName(), encoding, font, desc));
             }
         }
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java Mon Jun  9 07:11:16 2008
@@ -32,12 +32,13 @@
 import java.awt.image.DataBuffer;
 import java.awt.image.Raster;
 import java.awt.image.WritableRaster;
+import java.io.IOException;
 
 import org.apache.fop.render.RendererContext.RendererContextWrapper;
 import org.apache.fop.util.UnitConv;
 
 /**
- * Graphics2DAdapter implementation for PCL and HP GL/2.
+ * Abstract base class for Graphics2DAdapter implementations.
  */
 public abstract class AbstractGraphics2DAdapter implements Graphics2DAdapter {
 
@@ -134,4 +135,12 @@
         g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, 
             RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
     }
+    /** {@inheritDoc} */
+    public void paintImage(Graphics2DImagePainter painter, 
+            RendererContext context,
+            int x, int y, int width, int height) throws IOException {
+        paintImage((org.apache.xmlgraphics.java2d.Graphics2DImagePainter)painter,
+                context, x, y, width, height);
+    }
+    
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java Mon Jun  9 07:11:16 2008
@@ -37,6 +37,7 @@
 import org.apache.fop.area.Block;
 import org.apache.fop.area.BlockViewport;
 import org.apache.fop.area.CTM;
+import org.apache.fop.area.NormalFlow;
 import org.apache.fop.area.RegionViewport;
 import org.apache.fop.area.Trait;
 import org.apache.fop.area.inline.ForeignObject;
@@ -520,6 +521,69 @@
         }
     }
 
+    /** {@inheritDoc} */
+    protected void renderReferenceArea(Block block) {
+        // save position and offset
+        int saveIP = currentIPPosition;
+        int saveBP = currentBPPosition;
+
+        //Establish a new coordinate system
+        AffineTransform at = new AffineTransform();
+        at.translate(currentIPPosition, currentBPPosition);
+        at.translate(block.getXOffset(), block.getYOffset());
+        at.translate(0, block.getSpaceBefore());
+        
+        if (!at.isIdentity()) {
+            saveGraphicsState();
+            concatenateTransformationMatrix(mptToPt(at));
+        }
+
+        currentIPPosition = 0;
+        currentBPPosition = 0;
+        handleBlockTraits(block);
+
+        List children = block.getChildAreas();
+        if (children != null) {
+            renderBlocks(block, children);
+        }
+
+        if (!at.isIdentity()) {
+            restoreGraphicsState();
+        }
+        
+        // stacked and relative blocks effect stacking
+        currentIPPosition = saveIP;
+        currentBPPosition = saveBP;
+    }
+    
+    /** {@inheritDoc} */
+    protected void renderFlow(NormalFlow flow) {
+        // save position and offset
+        int saveIP = currentIPPosition;
+        int saveBP = currentBPPosition;
+
+        //Establish a new coordinate system
+        AffineTransform at = new AffineTransform();
+        at.translate(currentIPPosition, currentBPPosition);
+        
+        if (!at.isIdentity()) {
+            saveGraphicsState();
+            concatenateTransformationMatrix(mptToPt(at));
+        }
+
+        currentIPPosition = 0;
+        currentBPPosition = 0;
+        super.renderFlow(flow);
+        
+        if (!at.isIdentity()) {
+            restoreGraphicsState();
+        }
+        
+        // stacked and relative blocks effect stacking
+        currentIPPosition = saveIP;
+        currentBPPosition = saveBP;
+    }
+    
     /**
      * Concatenates the current transformation matrix with the given one, therefore establishing
      * a new coordinate system.

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractRenderer.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/AbstractRenderer.java Mon Jun  9 07:11:16 2008
@@ -484,6 +484,13 @@
     }
 
     /**
+     * Renders a block area that represents a reference area. The reference area establishes
+     * a new coordinate system.
+     * @param block the block area
+     */
+    protected abstract void renderReferenceArea(Block block);
+    
+    /**
      * Renders a list of block areas.
      *
      * @param parent  the parent block if the parent is a block, otherwise
@@ -551,6 +558,8 @@
                 // simply move position
                 currentBPPosition += block.getAllocBPD();
             }
+        } else if (Boolean.TRUE.equals(block.getTrait(Trait.IS_REFERENCE_AREA))) {
+            renderReferenceArea(block);
         } else {
             // save position and offset
             int saveIP = currentIPPosition;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/Graphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/Graphics2DAdapter.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/Graphics2DAdapter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/Graphics2DAdapter.java Mon Jun  9 07:11:16 2008
@@ -47,4 +47,23 @@
             RendererContext context,
             int x, int y, int width, int height) throws IOException;
     
+    /**
+     * Paints an arbitrary images on a given Graphics2D instance. The renderer
+     * providing this functionality must set up a Graphics2D instance so that
+     * the image with the given extents (in mpt) can be painted by the painter
+     * passed to this method. The Graphics2DImagePainter is then passed this
+     * Graphics2D instance so the image can be painted.
+     * @param painter the painter which will paint the actual image
+     * @param context the renderer context for the current renderer
+     * @param x X position of the image
+     * @param y Y position of the image
+     * @param width width of the image
+     * @param height height of the image
+     * @throws IOException In case of an I/O error while writing the output format
+     * @deprecated Use the variant with the Graphics2DImagePainter from XML Graphics Commons instead
+     */
+    void paintImage(Graphics2DImagePainter painter, 
+            RendererContext context,
+            int x, int y, int width, int height) throws IOException;
+    
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java Mon Jun  9 07:11:16 2008
@@ -57,6 +57,7 @@
 import org.apache.fop.area.BodyRegion;
 import org.apache.fop.area.CTM;
 import org.apache.fop.area.LineArea;
+import org.apache.fop.area.NormalFlow;
 import org.apache.fop.area.OffDocumentItem;
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.area.RegionReference;
@@ -488,45 +489,7 @@
         }
     }
 
-//    /**
-//     * {@inheritDoc}
-//     */
-//    protected void drawBackAndBorders(Area area, float startx, float starty,
-//            float width, float height) {
-//        super.drawBackAndBorders(area, startx, starty, width, height);
-//        Trait.Background back = (Trait.Background) area
-//                .getTrait(Trait.BACKGROUND);
-//
-//        // the current block has a background so its contents are placed inside
-//        // an overlay
-//        // after drawing the background and borders
-//        if (back != null) {
-//            int x = pts2units(startx);
-//            int y = pts2units(starty);
-//            int w = mpts2units(width);
-//            int h = mpts2units(height);
-//            int res = getResolution();
-//            final int rotation = 0;
-//            getAFPDataStream().startOverlay(x, y, w, h, res, res, rotation);
-////            Color col = back.getColor();
-////            getAFPDataStream().createShading(x, y, w, h, col);
-//        }
-//    }
-//
-////    /**
-////     * {@inheritDoc}
-////     */
-//    protected void renderBlock(Block block) {
-////        // new block so start page segment
-//////        getAFPDataStream().startPageSegment();
-//        super.renderBlock(block);
-//        getAFPDataStream().endOverlay();
-//////        getAFPDataStream().endPageSegment();
-//    }
-
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
     protected void renderBlockViewport(BlockViewport bv, List children) {
         // clip and position viewport if necessary
 
@@ -659,6 +622,76 @@
     }
 
     /** {@inheritDoc} */
+    protected void renderReferenceArea(Block block) {
+        //TODO Remove this method once concatenateTransformationMatrix() is implemented 
+        
+        // save position and offset
+        int saveIP = currentIPPosition;
+        int saveBP = currentBPPosition;
+
+        //Establish a new coordinate system
+        AffineTransform at = new AffineTransform();
+        at.translate(currentIPPosition, currentBPPosition);
+        at.translate(block.getXOffset(), block.getYOffset());
+        at.translate(0, block.getSpaceBefore());
+        
+        if (!at.isIdentity()) {
+            Rectangle2D contentRect
+                = new Rectangle2D.Double(at.getTranslateX(), at.getTranslateY(),
+                        block.getAllocIPD(), block.getAllocBPD());
+            pushViewPortPos(new ViewPortPos(contentRect, new CTM(at)));
+        }
+
+        currentIPPosition = 0;
+        currentBPPosition = 0;
+        handleBlockTraits(block);
+
+        List children = block.getChildAreas();
+        if (children != null) {
+            renderBlocks(block, children);
+        }
+
+        if (!at.isIdentity()) {
+            popViewPortPos();
+        }
+        
+        // stacked and relative blocks effect stacking
+        currentIPPosition = saveIP;
+        currentBPPosition = saveBP;
+    }
+    
+    /** {@inheritDoc} */
+    protected void renderFlow(NormalFlow flow) {
+        // save position and offset
+        int saveIP = currentIPPosition;
+        int saveBP = currentBPPosition;
+
+        //Establish a new coordinate system
+        AffineTransform at = new AffineTransform();
+        at.translate(currentIPPosition, currentBPPosition);
+        
+        if (!at.isIdentity()) {
+            Rectangle2D contentRect
+                = new Rectangle2D.Double(at.getTranslateX(), at.getTranslateY(),
+                        flow.getAllocIPD(), flow.getAllocBPD());
+            pushViewPortPos(new ViewPortPos(contentRect, new CTM(at)));
+        }
+
+        currentIPPosition = 0;
+        currentBPPosition = 0;
+        super.renderFlow(flow);
+        
+        if (!at.isIdentity()) {
+            popViewPortPos();
+        }
+        
+        // stacked and relative blocks effect stacking
+        currentIPPosition = saveIP;
+        currentBPPosition = saveBP;
+    }
+    
+    
+    /** {@inheritDoc} */
     protected void concatenateTransformationMatrix(AffineTransform at) {
         // Not used here since AFPRenderer defines its own renderBlockViewport()
         // method.
@@ -1104,23 +1137,24 @@
         }
     }
 
-    /**
-     * Restores the state stack after a break out.
-     * 
-     * @param breakOutList
-     *            the state stack to restore.
-     */
-    public void restoreStateStackAfterBreakOut(List breakOutList) {
-
+    /** {@inheritDoc} */
+    public List breakOutOfStateStack() {
+        log.debug("Block.FIXED --> break out");
+        List breakOutList = new java.util.ArrayList();
+        //Don't pop the last ViewPortPos (created by renderPage())
+        while (this.viewPortPositions.size() > 1) {
+            breakOutList.add(0, popViewPortPos());
+        }
+        return breakOutList;
     }
 
-    /**
-     * Breaks out of the state stack to handle fixed block-containers.
-     * 
-     * @return the saved state stack to recreate later
-     */
-    public List breakOutOfStateStack() {
-        return null;
+    /** {@inheritDoc} */
+    public void restoreStateStackAfterBreakOut(List breakOutList) {
+        log.debug("Block.FIXED --> restoring context after break-out");
+        for (int i = 0, c = breakOutList.size(); i < c; i++) {
+            ViewPortPos vps = (ViewPortPos)breakOutList.get(i);
+            pushViewPortPos(vps);
+        }
     }
 
     /** Saves the graphics state of the rendering engine. */
@@ -1609,13 +1643,14 @@
         getAFPDataStream().setOffsets(vpp.x, vpp.y, vpp.rot);
     }
 
-    private void popViewPortPos() {
-        viewPortPositions.remove(viewPortPositions.size() - 1);
+    private ViewPortPos popViewPortPos() {
+        ViewPortPos current = (ViewPortPos)viewPortPositions.remove(viewPortPositions.size() - 1);
         if (viewPortPositions.size() > 0) {
             ViewPortPos vpp = (ViewPortPos) viewPortPositions
                     .get(viewPortPositions.size() - 1);
             getAFPDataStream().setOffsets(vpp.x, vpp.y, vpp.rot);
         }
+        return current;
     }
 
     /**

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pcl/PCLRenderer.java Mon Jun  9 07:11:16 2008
@@ -66,6 +66,7 @@
 import org.apache.fop.area.Block;
 import org.apache.fop.area.BlockViewport;
 import org.apache.fop.area.CTM;
+import org.apache.fop.area.NormalFlow;
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.area.RegionViewport;
 import org.apache.fop.area.Trait;
@@ -1028,6 +1029,79 @@
         //currentFontName = saveFontName;
     }
 
+    /** {@inheritDoc} */
+    protected void renderReferenceArea(Block block) {
+        //TODO This is the same code as in AbstractPathOrientedRenderer
+        //So there's some optimization potential but not otherwise PCLRenderer is a little
+        //difficult to derive from AbstractPathOrientedRenderer. Maybe an additional layer
+        //between PrintRenderer and AbstractPathOrientedRenderer is necessary.
+        
+        // save position and offset
+        int saveIP = currentIPPosition;
+        int saveBP = currentBPPosition;
+
+        //Establish a new coordinate system
+        AffineTransform at = new AffineTransform();
+        at.translate(currentIPPosition, currentBPPosition);
+        at.translate(block.getXOffset(), block.getYOffset());
+        at.translate(0, block.getSpaceBefore());
+        
+        if (!at.isIdentity()) {
+            saveGraphicsState();
+            concatenateTransformationMatrix(mptToPt(at));
+        }
+
+        currentIPPosition = 0;
+        currentBPPosition = 0;
+        handleBlockTraits(block);
+
+        List children = block.getChildAreas();
+        if (children != null) {
+            renderBlocks(block, children);
+        }
+
+        if (!at.isIdentity()) {
+            restoreGraphicsState();
+        }
+        
+        // stacked and relative blocks effect stacking
+        currentIPPosition = saveIP;
+        currentBPPosition = saveBP;
+    }
+    
+    /** {@inheritDoc} */
+    protected void renderFlow(NormalFlow flow) {
+        //TODO This is the same code as in AbstractPathOrientedRenderer
+        //So there's some optimization potential but not otherwise PCLRenderer is a little
+        //difficult to derive from AbstractPathOrientedRenderer. Maybe an additional layer
+        //between PrintRenderer and AbstractPathOrientedRenderer is necessary.
+
+        // save position and offset
+        int saveIP = currentIPPosition;
+        int saveBP = currentBPPosition;
+
+        //Establish a new coordinate system
+        AffineTransform at = new AffineTransform();
+        at.translate(currentIPPosition, currentBPPosition);
+        
+        if (!at.isIdentity()) {
+            saveGraphicsState();
+            concatenateTransformationMatrix(mptToPt(at));
+        }
+
+        currentIPPosition = 0;
+        currentBPPosition = 0;
+        super.renderFlow(flow);
+        
+        if (!at.isIdentity()) {
+            restoreGraphicsState();
+        }
+        
+        // stacked and relative blocks effect stacking
+        currentIPPosition = saveIP;
+        currentBPPosition = saveBP;
+    }
+    
     /**
      * Concatenates the current transformation matrix with the given one, therefore establishing
      * a new coordinate system.

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/xml/XMLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/xml/XMLRenderer.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/xml/XMLRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/xml/XMLRenderer.java Mon Jun  9 07:11:16 2008
@@ -754,9 +754,17 @@
         endElement("flow");
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
+    protected void renderReferenceArea(Block block) {
+        handleBlockTraits(block);
+
+        List children = block.getChildAreas();
+        if (children != null) {
+            renderBlocks(block, children);
+        }
+    }
+    
+    /** {@inheritDoc} */
     protected void renderBlock(Block block) {
         atts.clear();
         addAreaAttributes(block);

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/CloseBlockerOutputStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/CloseBlockerOutputStream.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/CloseBlockerOutputStream.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/CloseBlockerOutputStream.java Mon Jun  9 07:11:16 2008
@@ -19,25 +19,25 @@
  
 package org.apache.fop.util;
 
-import java.io.FilterOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 
+import org.apache.commons.io.output.ProxyOutputStream;
+
 /**
  * This is a decorator to block calls to close() to the underlying stream.
  */
-public class CloseBlockerOutputStream extends FilterOutputStream {
+public class CloseBlockerOutputStream extends ProxyOutputStream {
 
     /**
-     * @see java.io.FilterOutputStream#FilterOutputStream(OutputStream)
+     * Main constructor.
+     * @param out the underlying stream
      */
     public CloseBlockerOutputStream(OutputStream out) {
         super(out);
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    /** {@inheritDoc} */
     public void close() throws IOException {
         try {
             flush();

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/status.xml Mon Jun  9 07:11:16 2008
@@ -147,7 +147,28 @@
         in the font's primary encoding.
       </action>
     </release>
-    <release version="0.95beta" date="22 March 2008">
+    <release version="0.95" date="TBD">
+      <action context="Renderers" dev="JM" type="fix">
+        Fixed positioning of absolutely positioned block-containers in multi-column documents.
+      </action>
+      <action context="Renderers" dev="JM" type="fix">
+        Fixed rendering of fixed block-containers in AFP output.
+      </action>
+      <action context="Renderers" dev="JM" type="fix">
+        Fixed regression causing bad positioning of block-containers if used as descendant
+        of a table-cell.
+      </action>
+      <action context="Fonts" dev="JM" type="fix">
+        Fixed text extraction problem with ZapfDingbats and Symbol font in PDF output.
+      </action>
+      <action context="Images" dev="JM" type="fix">
+        Fixed a performance problem concerning image serialization.
+      </action>
+      <action context="Fonts" dev="JM" type="fix">
+        Fixed NullPointerException when loading a TrueType font using XML font metric files.
+      </action>
+    </release>
+    <release version="0.95beta" date="26 March 2008">
       <notes>
         <section>
           <title>Notes</title>

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/StandardTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/StandardTestSuite.java?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/StandardTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/java/org/apache/fop/StandardTestSuite.java Mon Jun  9 07:11:16 2008
@@ -22,6 +22,7 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.apache.fop.fonts.TrueTypeAnsiTestCase;
 import org.apache.fop.render.pdf.PDFAConformanceTestCase;
 import org.apache.fop.render.pdf.PDFCMapTestCase;
 import org.apache.fop.render.pdf.PDFEncodingTestCase;
@@ -47,6 +48,7 @@
         suite.addTest(new TestSuite(PDFEncodingTestCase.class));
         suite.addTest(new TestSuite(PDFCMapTestCase.class));
         suite.addTest(new TestSuite(PDFsRGBSettingsTestCase.class));
+        suite.addTest(new TestSuite(TrueTypeAnsiTestCase.class));
         suite.addTest(RichTextFormatTestSuite.suite());
         //$JUnit-END$
         return suite;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/table_bug44621.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/table_bug44621.xml?rev=665697&r1=665696&r2=665697&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/table_bug44621.xml (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/test/layoutengine/standard-testcases/table_bug44621.xml Mon Jun  9 07:11:16 2008
@@ -66,12 +66,32 @@
               </fo:table-row>
             </fo:table-body>
           </fo:table>
+
+          <fo:block space-before="20pt" space-after="10pt">The after border of cell 1, in the normal
+            case, is thicker than in the trailing case.</fo:block>
+          <fo:table width="100%" table-layout="fixed"
+            font-size="8pt" line-height="10pt">
+            <fo:table-body>
+              <fo:table-row>
+                <fo:table-cell border="1pt solid black">
+                  <fo:block>Cell 1</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+              <fo:table-row>
+                <fo:table-cell border="2pt solid black">
+                  <fo:block>Cell 2</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+            </fo:table-body>
+          </fo:table>
+
         </fo:flow>
       </fo:page-sequence>
     </fo:root>
   </fo>
   <checks>
 
+    <!-- table 1 -->
     <eval expected="39000" xpath="//pageViewport//flow/block[2]/@bpd"/>
     <eval expected="39000" xpath="//pageViewport//flow/block[2]/@bpda"/>
     <!-- cell 1.1 -->
@@ -93,12 +113,27 @@
     <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[6]/@bpd"/>
     <eval expected="18000" xpath="//pageViewport//flow/block[2]/block[6]/@bpda"/>
 
+    <!-- table 2 -->
+    <eval expected="23500" xpath="//pageViewport//flow/block[4]/@bpd"/>
+    <eval expected="23500" xpath="//pageViewport//flow/block[4]/@bpda"/>
+    <!-- cell 1 -->
+    <eval expected="10000" xpath="//pageViewport//flow/block[4]/block[1]/@bpd"/>
+    <eval expected="13000" xpath="//pageViewport//flow/block[4]/block[1]/@bpda"/>
+    <!-- cell 2 -->
+    <eval expected="10000" xpath="//pageViewport//flow/block[4]/block[2]/@bpd"/>
+    <eval expected="14000" xpath="//pageViewport//flow/block[4]/block[2]/@bpda"/>
+
     <element-list category="breaker">
       <skip>4</skip>
       <box w="12000"/>
-      <penalty w="14000" p="0"/><!-- should be 15000 -->
+      <penalty w="15000" p="0"/>
       <box w="13000"/>
       <box w="14000"/>
+      <skip>6</skip>
+      <box w="11000"/>
+      <penalty w="0" p="0"/>
+      <glue w="500"/>
+      <box w="12000"/>
       <skip>3</skip>
     </element-list>
   </checks>



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