Bug fix for writing out the mask for BitMask properties

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@393549 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2006-04-12 17:59:03 +00:00
parent 9e06090a6e
commit 03a9571272

View File

@ -447,7 +447,7 @@ public class StyleTextPropAtom extends RecordAtom
int mask = 0; int mask = 0;
for(int i=0; i<textPropList.size(); i++) { for(int i=0; i<textPropList.size(); i++) {
TextProp textProp = (TextProp)textPropList.get(i); TextProp textProp = (TextProp)textPropList.get(i);
mask += textProp.getMask(); mask += textProp.getWriteMask();
} }
writeLittleEndian(mask,o); writeLittleEndian(mask,o);
@ -504,6 +504,11 @@ public class StyleTextPropAtom extends RecordAtom
* that indicates that this text property is present. * that indicates that this text property is present.
*/ */
public int getMask() { return maskInHeader; } public int getMask() { return maskInHeader; }
/**
* Get the mask that's used at write time. Only differs from
* the result of getMask() for the mask based properties
*/
public int getWriteMask() { return getMask(); }
/** /**
* Fetch the value of the text property (meaning is specific to * Fetch the value of the text property (meaning is specific to
@ -554,6 +559,14 @@ public class StyleTextPropAtom extends RecordAtom
subPropMatches = new boolean[subPropNames.length]; subPropMatches = new boolean[subPropNames.length];
} }
/**
* As we're purely mask based, just set flags for stuff
* that is set
*/
public int getWriteMask() {
return dataValue;
}
/** /**
* Set the value of the text property, and recompute the sub * Set the value of the text property, and recompute the sub
* properties based on it * properties based on it