]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Make sure sub bridge contexts also have our bridges.
authorJeremias Maerki <jeremias@apache.org>
Tue, 18 Jan 2011 16:47:46 +0000 (16:47 +0000)
committerJeremias Maerki <jeremias@apache.org>
Tue, 18 Jan 2011 16:47:46 +0000 (16:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Color@1060464 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/svg/PDFBridgeContext.java

index a38465ed46535176f8d38200bf811e3d4bc30dce..4a6e6e27583d569347054aaa30ded4d2a455172b 100644 (file)
@@ -25,6 +25,7 @@ import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.DocumentLoader;
 import org.apache.batik.bridge.SVGTextElementBridge;
 import org.apache.batik.bridge.UserAgent;
+import org.apache.batik.dom.svg.SVGOMDocument;
 import org.apache.batik.gvt.TextPainter;
 
 import org.apache.xmlgraphics.image.loader.ImageManager;
@@ -86,6 +87,7 @@ public class PDFBridgeContext extends AbstractFOPBridgeContext {
     }
 
     /** {@inheritDoc} */
+    @Override
     public void registerSVGBridges() {
         super.registerSVGBridges();
 
@@ -123,10 +125,17 @@ public class PDFBridgeContext extends AbstractFOPBridgeContext {
         putBridge(new PDFImageElementBridge());
     }
 
-    // Make sure any 'sub bridge contexts' also have our bridges.
-    //TODO There's no matching method in the super-class here
-    /** @return the new bridge context */
+    /** {@inheritDoc} */
+    @Override
     public BridgeContext createBridgeContext() {
+        //Retained for pre-Batik-1.7 compatibility
+        return createBridgeContext(null);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public BridgeContext createBridgeContext(SVGOMDocument doc) {
+        // Make sure any 'sub bridge contexts' also have our bridges.
         return new PDFBridgeContext(getUserAgent(), getDocumentLoader(),
                                     fontInfo,
                                     getImageManager(),