klute       2004/08/15 08:20:08

  Modified:    src/java/org/apache/poi/hpsf DocumentSummaryInformation.java
                        MutableSection.java SummaryInformation.java
               src/java/org/apache/poi/hpsf/wellknown PropertyIDMap.java
               src/testcases/org/apache/poi/hpsf/basic TestWrite.java
  Log:
  Some code and documentation cleanup.
  
  Revision  Changes    Path
  1.14      +2 -6      
jakarta-poi/src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java
  
  Index: DocumentSummaryInformation.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-poi/src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DocumentSummaryInformation.java   9 Apr 2004 13:05:16 -0000       1.13
  +++ DocumentSummaryInformation.java   15 Aug 2004 15:20:07 -0000      1.14
  @@ -255,11 +255,7 @@
   
   
       /**
  -     * <p>Returns <code>true</code> if the custom links are hampered
  -     * by excessive noise, for all applications.</p> <p>
  -     *
  -     * <strong>FIXME (3):</strong> Explain this some more! I (Rainer)
  -     * don't understand it.</p>
  +     * <p>Returns <code>true</code> if the custom links are dirty.</p> <p>
        *
        * @return The linksDirty value
        */
  
  
  
  1.12      +4 -5      jakarta-poi/src/java/org/apache/poi/hpsf/MutableSection.java
  
  Index: MutableSection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hpsf/MutableSection.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- MutableSection.java       13 Aug 2004 22:38:52 -0000      1.11
  +++ MutableSection.java       15 Aug 2004 15:20:07 -0000      1.12
  @@ -506,7 +506,7 @@
   
   
       /**
  -     * <p>Returns this section's properties.</p>
  +     * <p>Gets this section's properties.</p>
        * 
        * @return this section's properties.
        */
  @@ -521,14 +521,13 @@
       /**
        * <p>Gets a property.</p>
        * 
  -     * <p><strong>FIXME (2):</strong> This method ensures that properties and
  -     * preprops are in sync. Cleanup this awful stuff!</p>
  -     * 
        * @param id The ID of the property to get
        * @return The property or <code>null</code> if there is no such property
        */
       public Object getProperty(final long id)
       {
  +        /* Calling getProperties() ensures that properties and preprops are in
  +         * sync.</p> */
           getProperties();
           return super.getProperty(id);
       }
  
  
  
  1.16      +4 -5      jakarta-poi/src/java/org/apache/poi/hpsf/SummaryInformation.java
  
  Index: SummaryInformation.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-poi/src/java/org/apache/poi/hpsf/SummaryInformation.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- SummaryInformation.java   9 Apr 2004 13:05:16 -0000       1.15
  +++ SummaryInformation.java   15 Aug 2004 15:20:07 -0000      1.16
  @@ -264,10 +264,9 @@
        * <strong>when this method is implemented. Please note that the
        * return type is likely to change!</strong></p>
        *
  -     * <p><strong>FIXME (3) / Hint to developers:</strong> Drew Varner
  -     * &lt;Drew.Varner -at- sc.edu&gt; said that this is an image in
  -     * WMF or Clipboard (BMP?) format. He also provided two links that
  -     * might be helpful: <a
  +     * <p><strong>Hint to developers:</strong> Drew Varner &lt;Drew.Varner -at-
  +     * sc.edu&gt; said that this is an image in WMF or Clipboard (BMP?) format.
  +     * He also provided two links that might be helpful: <a
        * 
href="http://www.csn.ul.ie/~caolan/publink/file/OLE2SummaryAgainst_file-3.27.patch";
        * 
target="_blank">http://www.csn.ul.ie/~caolan/publink/file/OLE2SummaryAgainst_file-3.27.patch</a>
        * and <a
  
  
  
  1.14      +46 -10    
jakarta-poi/src/java/org/apache/poi/hpsf/wellknown/PropertyIDMap.java
  
  Index: PropertyIDMap.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-poi/src/java/org/apache/poi/hpsf/wellknown/PropertyIDMap.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PropertyIDMap.java        9 Apr 2004 13:05:16 -0000       1.13
  +++ PropertyIDMap.java        15 Aug 2004 15:20:08 -0000      1.14
  @@ -17,7 +17,9 @@
           
   package org.apache.poi.hpsf.wellknown;
   
  +import java.util.Collections;
   import java.util.HashMap;
  +import java.util.Map;
   
   /**
    * <p>This is a dictionary which maps property ID values to property
  @@ -29,12 +31,8 @@
    * should treat them as unmodifiable, copy them and modifiy the
    * copies.</p>
    *
  - * <p><strong>FIXME (3):</strong> Make the singletons unmodifiable. However, 
  - * since this requires to use a [EMAIL PROTECTED] HashMap} delegate instead of
  - * extending [EMAIL PROTECTED] HashMap} and thus requires a lot of stupid typing, I 
won't
  - * do that for the time being.</p>
  - *
  - * @author Rainer Klute ([EMAIL PROTECTED])
  + * @author Rainer Klute <a
  + * href="mailto:[EMAIL PROTECTED]">&lt;[EMAIL PROTECTED]&gt;</a>
    * @version $Id$
    * @since 2002-02-09
    */
  @@ -104,7 +102,31 @@
        * document</p> */
       public static final int PID_APPNAME = 18;
   
  -    /** <p>FIXME (2): ID of the property that denotes...</p> */
  +    /** <p>ID of the property that denotes whether read/write access to the
  +     * document is allowed or whether is should be opened as read-only. It can
  +     * have the following values:</p>
  +     * 
  +     * <table>
  +     *  <tbody>
  +     *   <tr>
  +     *    <th><p>Value</p></th>
  +     *    <th><p>Description</p></th>
  +     *   </tr>
  +     *   <tr>
  +     *    <th><p>0</p></th>
  +     *    <th><p>No restriction</p></th>
  +     *   </tr>
  +     *   <tr>
  +     *    <th><p>2</p></th>
  +     *    <th><p>Read-only recommended</p></th>
  +     *   </tr>
  +     *   <tr>
  +     *    <th><p>4</p></th>
  +     *    <th><p>Read-only enforced</p></th>
  +     *   </tr>
  +     *  </tbody>
  +     * </table>
  +     */
       public static final int PID_SECURITY = 19;
   
   
  @@ -243,6 +265,18 @@
   
   
       /**
  +     * <p>Creates a [EMAIL PROTECTED] PropertyIDMap} backed by another map.</p>
  +     * 
  +     * @param map The instance to be created is backed by this map.
  +     */
  +    public PropertyIDMap(final Map map)
  +    {
  +        super(map);
  +    }
  +
  +
  +
  +    /**
        * <p>Puts a ID string for an ID into the [EMAIL PROTECTED]
        * PropertyIDMap}.</p>
        *
  @@ -300,7 +334,8 @@
               m.put(PID_THUMBNAIL, "PID_THUMBNAIL");
               m.put(PID_APPNAME, "PID_APPNAME");
               m.put(PID_SECURITY, "PID_SECURITY");
  -            summaryInformationProperties = m;
  +            summaryInformationProperties =
  +                new PropertyIDMap(Collections.unmodifiableMap(m));
           }
           return summaryInformationProperties;
       }
  @@ -335,7 +370,8 @@
               m.put(PID_MANAGER, "PID_MANAGER");
               m.put(PID_COMPANY, "PID_COMPANY");
               m.put(PID_LINKSDIRTY, "PID_LINKSDIRTY");
  -            documentSummaryInformationProperties = m;
  +            documentSummaryInformationProperties =
  +                new PropertyIDMap(Collections.unmodifiableMap(m));
           }
           return documentSummaryInformationProperties;
       }
  
  
  
  1.18      +1 -2      
jakarta-poi/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java
  
  Index: TestWrite.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-poi/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- TestWrite.java    15 Aug 2004 13:40:22 -0000      1.17
  +++ TestWrite.java    15 Aug 2004 15:20:08 -0000      1.18
  @@ -29,7 +29,6 @@
   import java.io.PrintWriter;
   import java.io.StringWriter;
   import java.io.UnsupportedEncodingException;
  -import java.util.Arrays;
   import java.util.Date;
   import java.util.HashMap;
   import java.util.Map;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to