From: Jeremias Maerki Date: Tue, 18 Jan 2011 16:47:46 +0000 (+0000) Subject: Make sure sub bridge contexts also have our bridges. X-Git-Tag: fop-1_1rc1old~290^2~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c5d004d4737611fd161d29c60cd386788fe8fc96;p=xmlgraphics-fop.git Make sure sub bridge contexts also have our bridges. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Color@1060464 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/svg/PDFBridgeContext.java b/src/java/org/apache/fop/svg/PDFBridgeContext.java index a38465ed4..4a6e6e275 100644 --- a/src/java/org/apache/fop/svg/PDFBridgeContext.java +++ b/src/java/org/apache/fop/svg/PDFBridgeContext.java @@ -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(),