You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2008/08/15 16:17:52 UTC

svn commit: r686227 - in /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg: AbstractSVGPainter.java SVGPainter.java

Author: jeremias
Date: Fri Aug 15 07:17:52 2008
New Revision: 686227

URL: http://svn.apache.org/viewvc?rev=686227&view=rev
Log:
Some fixes for SVG along the way:
Fix for group nesting.
Fix for reused content (metadata etc.) cause exceptions.

Modified:
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java
    xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPainter.java

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java?rev=686227&r1=686226&r2=686227&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java Fri Aug 15 07:17:52 2008
@@ -193,6 +193,7 @@
     /** {@inheritDoc} */
     public void endGroup() throws IFException {
         try {
+            establish(MODE_NORMAL);
             endElement("g");
         } catch (SAXException e) {
             throw new IFException("SAX error in endGroup()", e);

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPainter.java?rev=686227&r1=686226&r2=686227&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg/SVGPainter.java Fri Aug 15 07:17:52 2008
@@ -109,6 +109,9 @@
             TransformerHandler toDOMHandler = tFactory.newTransformerHandler();
             toDOMHandler.setResult(new DOMResult(this.reusedParts));
             this.handler = toDOMHandler;
+            this.handler.startDocument();
+        } catch (SAXException se) {
+            throw new IFException("SAX error in startDocument()", se);
         } catch (TransformerConfigurationException e) {
             throw new IFException(
                     "Error while setting up a TransformerHandler for SVG generation", e);
@@ -121,6 +124,18 @@
     }
 
     /** {@inheritDoc} */
+    public void endDocumentHeader() throws IFException {
+        super.endDocumentHeader();
+        try {
+            //Stop recording parts reused for each page
+            this.handler.endDocument();
+            this.handler = null;
+        } catch (SAXException e) {
+            throw new IFException("SAX error in endDocumentHeader()", e);
+        }
+    }
+
+    /** {@inheritDoc} */
     public void startPageSequence(String id) throws IFException {
         //nop
     }



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