diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java index 8b1219ed9..0e6c028ba 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java +++ b/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java @@ -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; + } }