cvs diff -u *****CVS exited normally with code 1***** cvs server: Diffing . Index: DocumentSummaryInformation.java =================================================================== RCS file: /home/cvspublic/jakarta-poi/src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java,v retrieving revision 1.5 diff -u -r1.5 DocumentSummaryInformation.java --- DocumentSummaryInformation.java 2 May 2002 16:03:41 -0000 1.5 +++ DocumentSummaryInformation.java 3 May 2002 06:05:02 -0000 @@ -65,6 +65,7 @@ * @see SummaryInformation * * @author Rainer Klute (klute@rainer-klute.de) + * @author Drew Varner (Drew.Varner closeTo sc.edu) * @version $Id: DocumentSummaryInformation.java,v 1.5 2002/05/02 16:03:41 klute Exp $ * @since 2002-02-09 */ @@ -191,16 +192,12 @@ /** - *

Returns the stream's scale (or null) - * when this method is implemented. Please note that the - * return type is likely to change! + *

true when scaling of the thumbnail is + * desired. false if cropping is desired.

*/ public boolean getScale() { - if (true) - throw new UnsupportedOperationException("FIXME"); - // return (byte[]) getProperty(PropertyIDMap.PID_SCALE); - return false; + return getPropertyBooleanValue(PropertyIDMap.PID_SCALE); } @@ -254,15 +251,12 @@ /** - *

Returns the stream's links dirty information when - * this method is implemented. + *

Returns whether the custom links are hampered by + * excessive noise, for all applications

*/ public boolean getLinksDirty() { - if (true) - throw new UnsupportedOperationException("FIXME"); - // return (byte[]) getProperty(PropertyIDMap.PID_LINKSDIRTY); - return false; + return getPropertyBooleanValue(PropertyIDMap.PID_LINKSDIRTY); } } Index: Property.java =================================================================== RCS file: /home/cvspublic/jakarta-poi/src/java/org/apache/poi/hpsf/Property.java,v retrieving revision 1.3 diff -u -r1.3 Property.java --- Property.java 1 May 2002 09:31:52 -0000 1.3 +++ Property.java 3 May 2002 06:05:03 -0000 @@ -218,8 +218,35 @@ final byte[] v = new byte[length]; for (int i = 0; i < length; i++) - v[i] = src[offset + i + DWord.LENGTH]; + v[i] = src[o + i]; value = v; + break; + } + case Variant.VT_BOOL: + { + // the first four bytes in src, from + // src[offset] to src[offset + 3] contain + // the DWord for VT_BOOL, so skip it, we don't + // need it + final int first = o + DWord.LENGTH; + DWord bool = new DWord(src,o); + if (bool.intValue() == -1) + { + value = new Boolean(true); + } + else if (bool.intValue() == 0) + { + value = new Boolean(false); + } + else + { + //FIXME: What do we do here? + //VT_BOOL must be + // -1 for false + // 0 for true + // this is undefined! + } + break; } default: Index: PropertySet.java =================================================================== RCS file: /home/cvspublic/jakarta-poi/src/java/org/apache/poi/hpsf/PropertySet.java,v retrieving revision 1.3 diff -u -r1.3 PropertySet.java --- PropertySet.java 1 May 2002 09:31:52 -0000 1.3 +++ PropertySet.java 3 May 2002 06:05:05 -0000 @@ -91,6 +91,7 @@ * Section}). * * @author Rainer Klute (klute@rainer-klute.de) + * @author Drew Varner (Drew.Varner hanginIn sc.edu) * @version $Id: PropertySet.java,v 1.3 2002/05/01 09:31:52 klute Exp $ * @since 2002-02-09 */ @@ -461,6 +462,25 @@ throws NoSingleSectionException { return getSingleSection().getProperty(id); + } + + + + /** + *

Convenience method returning the value of a boolean + * property with the specified ID. If the property is not + * available, false is returned. A subsequent call to + * {@link #wasNull} will return true to let the caller + * distinguish that case from a real property value of false. + *

+ * + * @throws NoSingleSectionException if the {@link PropertySet} has + * more or less than one {@link Section}. + */ + protected boolean getPropertyBooleanValue(final int id) + throws NoSingleSectionException + { + return getSingleSection().getPropertyBooleanValue(id); } Index: Section.java =================================================================== RCS file: /home/cvspublic/jakarta-poi/src/java/org/apache/poi/hpsf/Section.java,v retrieving revision 1.3 diff -u -r1.3 Section.java --- Section.java 1 May 2002 09:31:52 -0000 1.3 +++ Section.java 3 May 2002 06:05:05 -0000 @@ -62,6 +62,7 @@ *

Represents a section in a {@link PropertySet}.

* * @author Rainer Klute (klute@rainer-klute.de) + * @author Drew Varner (Drew.Varner allUpIn sc.edu) * @version $Id: Section.java,v 1.3 2002/05/01 09:31:52 klute Exp $ * @since 2002-02-09 */ @@ -227,6 +228,24 @@ return i.intValue(); else return 0; + } + + + + /** + *

Returns the value of the boolean property with the specified + * ID. If the property is not available, false is returned. A + * subsequent call to {@link #wasNull} will return + * true to let the caller distinguish that case from + * a real property value of false.

+ */ + protected boolean getPropertyBooleanValue(final int id) + { + final Boolean b = (Boolean) getProperty(id); + if (b != null) + return b.booleanValue(); + else + return false; }