From: Keiron Liddle Date: Thu, 3 Jan 2002 08:29:01 +0000 (+0000) Subject: fixed thread prob as with trunk X-Git-Tag: fop-0_20_5rc~235 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=03037f233afedafcec7e42e6ca14e5867c1fda8b;p=xmlgraphics-fop.git fixed thread prob as with trunk git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@194613 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/extensions/ExtensionElementMapping.java b/src/org/apache/fop/extensions/ExtensionElementMapping.java index c6c8ae402..8f33af6b9 100644 --- a/src/org/apache/fop/extensions/ExtensionElementMapping.java +++ b/src/org/apache/fop/extensions/ExtensionElementMapping.java @@ -21,12 +21,16 @@ public class ExtensionElementMapping implements ElementMapping { private static HashMap foObjs = null; - public synchronized void addToBuilder(TreeBuilder builder) { + private static synchronized void setupExt() { if(foObjs == null) { foObjs = new HashMap(); foObjs.put("outline", Outline.maker()); foObjs.put("label", Label.maker()); } + } + + public void addToBuilder(TreeBuilder builder) { + setupExt(); builder.addMapping(URI, foObjs); diff --git a/src/org/apache/fop/fo/StandardElementMapping.java b/src/org/apache/fop/fo/StandardElementMapping.java index 5938bf0fd..784604062 100644 --- a/src/org/apache/fop/fo/StandardElementMapping.java +++ b/src/org/apache/fop/fo/StandardElementMapping.java @@ -18,7 +18,7 @@ import org.apache.fop.fo.pagination.*; public class StandardElementMapping implements ElementMapping { private static HashMap foObjs = null; - public synchronized void addToBuilder(TreeBuilder builder) { + private static synchronized void setupFO() { if(foObjs == null) { foObjs = new HashMap(); @@ -107,7 +107,10 @@ public class StandardElementMapping implements ElementMapping { foObjs.put("marker", Marker.maker()); foObjs.put("retrieve-marker", RetrieveMarker.maker()); } + } + public void addToBuilder(TreeBuilder builder) { + setupFO(); String uri = "http://www.w3.org/1999/XSL/Format"; builder.addMapping(uri, foObjs); @@ -119,7 +122,6 @@ public class StandardElementMapping implements ElementMapping { builder.addElementPropertyList(uri, elem, FOPropertyMapping.getElementMapping(elem)); } - } - } + diff --git a/src/org/apache/fop/svg/SVGElementMapping.java b/src/org/apache/fop/svg/SVGElementMapping.java index 012cd9b89..cabf3667f 100644 --- a/src/org/apache/fop/svg/SVGElementMapping.java +++ b/src/org/apache/fop/svg/SVGElementMapping.java @@ -22,7 +22,7 @@ public class SVGElementMapping implements ElementMapping { private static HashMap foObjs = null; - public synchronized void addToBuilder(TreeBuilder builder) { + private static synchronized void setupSVG() { if(foObjs == null) { // this sets the parser that will be used @@ -84,11 +84,14 @@ public class SVGElementMapping implements ElementMapping { foObjs.put("feMerge", SVGObj.maker("feMerge")); foObjs.put("feMergeNode", SVGObj.maker("feMergeNode")); } + } + public void addToBuilder(TreeBuilder builder) { + setupSVG(); String uri = "http://www.w3.org/2000/svg"; builder.addMapping(uri, foObjs); builder.addPropertyListBuilder(uri, new DirectPropertyListBuilder()); } - } +