nick 2005/09/04 12:25:02
Modified: src/scratchpad/src/org/apache/poi/hslf/record
StyleTextPropAtom.java
Log:
Handle internal representation duplication correctly
Revision Changes Path
1.6 +11 -1
jakarta-poi/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
Index: StyleTextPropAtom.java
===================================================================
RCS file:
/home/cvs/jakarta-poi/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- StyleTextPropAtom.java 14 Aug 2005 19:26:48 -0000 1.5
+++ StyleTextPropAtom.java 4 Sep 2005 19:25:02 -0000 1.6
@@ -475,7 +475,7 @@
* 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 @@
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;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/