mirror of https://github.com/apache/poi.git
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:
parent
66d1f0d1e2
commit
ba0c404d40
|
@ -447,7 +447,7 @@ public class StyleTextPropAtom extends RecordAtom
|
|||
int mask = 0;
|
||||
for(int i=0; i<textPropList.size(); i++) {
|
||||
TextProp textProp = (TextProp)textPropList.get(i);
|
||||
mask += textProp.getMask();
|
||||
mask += textProp.getWriteMask();
|
||||
}
|
||||
writeLittleEndian(mask,o);
|
||||
|
||||
|
@ -504,6 +504,11 @@ public class StyleTextPropAtom extends RecordAtom
|
|||
* that indicates that this text property is present.
|
||||
*/
|
||||
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
|
||||
|
@ -554,6 +559,14 @@ public class StyleTextPropAtom extends RecordAtom
|
|||
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
|
||||
* properties based on it
|
||||
|
|
Loading…
Reference in New Issue