You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by ni...@apache.org on 2006/04/12 19:59:03 UTC
svn commit: r393549 -
/jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
Author: nick
Date: Wed Apr 12 10:59:03 2006
New Revision: 393549
URL: http://svn.apache.org/viewcvs?rev=393549&view=rev
Log:
Bug fix for writing out the mask for BitMask properties
Modified:
jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
Modified: jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
URL: http://svn.apache.org/viewcvs/jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java?rev=393549&r1=393548&r2=393549&view=diff
==============================================================================
--- jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java (original)
+++ jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java Wed Apr 12 10:59:03 2006
@@ -447,7 +447,7 @@
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 @@
* 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
@@ -553,7 +558,15 @@
subPropMasks = new int[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
* properties based on it
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/