poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject svn commit: r643670 - in /poi/trunk/src: documentation/content/xdocs/ java/org/apache/poi/hpsf/ testcases/org/apache/poi/hpsf/data/
Date Wed, 02 Apr 2008 00:50:48 GMT
Author: klute
Date: Tue Apr  1 17:50:45 2008
New Revision: 643670

URL: http://svn.apache.org/viewvc?rev=643670&view=rev
Log:
44694 - HPSF: Support for property sets without sections

Added:
    poi/trunk/src/testcases/org/apache/poi/hpsf/data/Test_Humor-Generation.ppt   (with props)
Modified:
    poi/trunk/src/documentation/content/xdocs/changes.xml
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/java/org/apache/poi/hpsf/MutablePropertySet.java
    poi/trunk/src/java/org/apache/poi/hpsf/PropertySet.java

Modified: poi/trunk/src/documentation/content/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/changes.xml?rev=643670&r1=643669&r2=643670&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/changes.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/changes.xml Tue Apr  1 17:50:45 2008
@@ -37,7 +37,7 @@
 
 		<!-- Don't forget to update status.xml too! -->
         <release version="3.0.3-beta1" date="2008-04-??">
-           <action dev="POI-DEVELOPERS" type="add">Implement Sheet.removeShape(Shape
shape) in HSLF</action>
+           <action dev="RK" type="add">44694 - HPSF: Support for property sets without
sections</action>
            <action dev="POI-DEVELOPERS" type="add">Various fixes: Recognising var-arg
built-in functions #44675, ExternalNameRecord serialisation bug #44695, PMT() bug #44691</action>
            <action dev="POI-DEVELOPERS" type="add">30311 - More work on Conditional
Formatting</action>
            <action dev="POI-DEVELOPERS" type="add">Move the Formula Evaluator code
out of scratchpad</action>

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=643670&r1=643669&r2=643670&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Tue Apr  1 17:50:45 2008
@@ -34,6 +34,7 @@
 	<!-- Don't forget to update changes.xml too! -->
     <changes>
         <release version="3.0.3-beta1" date="2008-04-??">
+           <action dev="RK" type="add">44694 - HPSF: Support for property sets without
sections</action>
            <action dev="POI-DEVELOPERS" type="add">Implement Sheet.removeShape(Shape
shape) in HSLF</action>
            <action dev="POI-DEVELOPERS" type="add">Various fixes: Recognising var-arg
built-in functions #44675, ExternalNameRecord serialisation bug #44695, PMT() bug #44691</action>
            <action dev="POI-DEVELOPERS" type="add">30311 - More work on Conditional
Formatting</action>

Modified: poi/trunk/src/java/org/apache/poi/hpsf/MutablePropertySet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/MutablePropertySet.java?rev=643670&r1=643669&r2=643670&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/MutablePropertySet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/MutablePropertySet.java Tue Apr  1 17:50:45 2008
@@ -92,6 +92,8 @@
         osVersion = ps.getOSVersion();
         setClassID(ps.getClassID());
         clearSections();
+        if (sections == null)
+            sections = new LinkedList();
         for (final Iterator i = ps.getSections().iterator(); i.hasNext();)
         {
             final MutableSection s = new MutableSection((Section) (i.next()));

Modified: poi/trunk/src/java/org/apache/poi/hpsf/PropertySet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/PropertySet.java?rev=643670&r1=643669&r2=643670&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/PropertySet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/PropertySet.java Tue Apr  1 17:50:45 2008
@@ -387,7 +387,7 @@
         o += ClassID.LENGTH;
         final long sectionCount = LittleEndian.getUInt(src, o);
         o += LittleEndian.INT_SIZE;
-        if (sectionCount < 1)
+        if (sectionCount < 0)
             return false;
         return true;
     }
@@ -426,9 +426,9 @@
         o += ClassID.LENGTH;
         final int sectionCount = LittleEndian.getInt(src, o);
         o += LittleEndian.INT_SIZE;
-        if (sectionCount <= 0)
+        if (sectionCount < 0)
             throw new HPSFRuntimeException("Section count " + sectionCount +
-                                           " must be greater than 0.");
+                                           " is negative.");
 
         /*
          * Read the sections, which are following the header. They
@@ -468,6 +468,8 @@
      */
     public boolean isSummaryInformation()
     {
+        if (sections.size() <= 0)
+            return false;
         return Util.equal(((Section) sections.get(0)).getFormatID().getBytes(),
                           SectionIDMap.SUMMARY_INFORMATION_ID);
     }
@@ -483,6 +485,8 @@
      */
     public boolean isDocumentSummaryInformation()
     {
+        if (sections.size() <= 0)
+            return false;
         return Util.equal(((Section) sections.get(0)).getFormatID().getBytes(),
                           SectionIDMap.DOCUMENT_SUMMARY_INFORMATION_ID[0]);
     }

Added: poi/trunk/src/testcases/org/apache/poi/hpsf/data/Test_Humor-Generation.ppt
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hpsf/data/Test_Humor-Generation.ppt?rev=643670&view=auto
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/src/testcases/org/apache/poi/hpsf/data/Test_Humor-Generation.ppt
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message