From c0eac52cd975da4a404f501fdbb6e8fc13930570 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sun, 4 Sep 2005 19:25:02 +0000 Subject: [PATCH] Handle internal representation duplication correctly git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353781 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hslf/record/StyleTextPropAtom.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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; + } }