Handle internal representation duplication correctly

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353781 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2005-09-04 19:25:02 +00:00
parent 152c6312d2
commit c3e3e1b394
1 changed files with 11 additions and 1 deletions

View File

@ -475,7 +475,7 @@ public class StyleTextPropAtom extends RecordAtom
* of the property is itself a mask, encoding several different * of the property is itself a mask, encoding several different
* (but related) properties * (but related) properties
*/ */
public static class BitMaskTextProp extends TextProp { public static class BitMaskTextProp extends TextProp implements Cloneable {
private String[] subPropNames; private String[] subPropNames;
private int[] subPropMasks; private int[] subPropMasks;
private boolean[] subPropMatches; private boolean[] subPropMatches;
@ -527,6 +527,16 @@ public class StyleTextPropAtom extends RecordAtom
dataValue -= subPropMasks[idx]; 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;
}
} }