]> source.dussan.org Git - poi.git/commitdiff
Handle internal representation duplication correctly
authorNick Burch <nick@apache.org>
Sun, 4 Sep 2005 19:25:02 +0000 (19:25 +0000)
committerNick Burch <nick@apache.org>
Sun, 4 Sep 2005 19:25:02 +0000 (19:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353781 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java

index 8b1219ed92b359c049eaea029ec0ce4fdb95898a..0e6c028ba0343ec26c774897e3c7bf76003bc21c 100644 (file)
@@ -475,7 +475,7 @@ public class StyleTextPropAtom extends RecordAtom
         *  of the property is itself a mask, encoding several different
         *  (but related) properties
         */
-       public static class BitMaskTextProp extends TextProp {
+       public static class BitMaskTextProp extends TextProp implements Cloneable {
                private String[] subPropNames;
                private int[] subPropMasks;
                private boolean[] subPropMatches;
@@ -527,6 +527,16 @@ public class StyleTextPropAtom extends RecordAtom
                                dataValue -= subPropMasks[idx];
                        }
                }
+               
+               public Object clone(){
+                       BitMaskTextProp newObj = (BitMaskTextProp)super.clone();
+                       
+                       // Don't carry over matches, but keep everything 
+                       //  else as it was
+                       newObj.subPropMatches = new boolean[subPropMatches.length];
+                       
+                       return newObj;
+               }
        }