xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r686227 - in /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/sandbox/org/apache/fop/render/svg: AbstractSVGPainter.java SVGPainter.java
Date Fri, 15 Aug 2008 14:17:52 GMT
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


Mime
View raw message