From: Simon Pepping Date: Thu, 27 Jan 2011 15:46:47 +0000 (+0000) Subject: Merged some fixes from trunk X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=551f1f2bb3e322ca37ef34a939b85fc7f01a90c3;p=xmlgraphics-fop.git Merged some fixes from trunk git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ComplexScripts@1064162 13f79535-47bb-0310-9956-ffa450edef68 --- 551f1f2bb3e322ca37ef34a939b85fc7f01a90c3 diff --cc src/java/org/apache/fop/area/Area.java index 92132772c,1f14ed740..fb844e886 --- a/src/java/org/apache/fop/area/Area.java +++ b/src/java/org/apache/fop/area/Area.java @@@ -387,24 -378,11 +387,24 @@@ public class Area extends AreaTreeObjec * @param traitCode the trait key * @param prop the value of the trait */ - public void addTrait(Object traitCode, Object prop) { + public void addTrait(Integer traitCode, Object prop) { - if (props == null) { - props = new java.util.HashMap(20); + if (traits == null) { + traits = new java.util.HashMap(20); + } - traits.put((Integer) traitCode, prop); ++ traits.put(traitCode, prop); + } + + /** + * Set traits on this area, copying from an existing traits map. + * + * @param traits the map of traits + */ + public void setTraits ( Map traits ) { + if ( traits != null ) { + this.traits = new java.util.HashMap ( traits ); + } else { + this.traits = null; } - props.put(traitCode, prop); } /**