poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gl...@apache.org
Subject cvs commit: jakarta-poi/src/java/org/apache/poi/ddf DefaultEscherRecordFactory.java
Date Thu, 05 May 2005 13:06:06 GMT
glens       2005/05/05 06:06:06

  Modified:    src/java/org/apache/poi/ddf DefaultEscherRecordFactory.java
  Log:
  Patch from Nick.  Bug 34744 Fix for ddf.DefaultRecordFactory never creating EscherTextboxRecord
  
  Revision  Changes    Path
  1.5       +9 -2      jakarta-poi/src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java
  
  Index: DefaultEscherRecordFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultEscherRecordFactory.java	1 May 2005 11:26:17 -0000	1.4
  +++ DefaultEscherRecordFactory.java	5 May 2005 13:06:06 -0000	1.5
  @@ -27,6 +27,8 @@
    * Generates escher records when provided the byte array containing those records.
    *
    * @author Glen Stampoultzis
  + * @author Nick Burch   (nick at torchbox . com)
  + *
    * @see EscherRecordFactory
    */
   public class DefaultEscherRecordFactory
  @@ -57,8 +59,13 @@
       public EscherRecord createRecord( byte[] data, int offset )
       {
           EscherRecord.EscherRecordHeader header = EscherRecord.EscherRecordHeader.readHeader(
data, offset );
  -        if ( ( header.getOptions() & (short) 0x000F ) == (short) 0x000F )
  -        {
  +
  +		// Options of 0x000F means container record
  +		// However, EscherTextboxRecord are containers of records for the
  +		//  host application, not of other Escher records, so treat them
  +		//  differently
  +        if ( ( header.getOptions() & (short) 0x000F ) == (short) 0x000F
  +             && header.getRecordId() != EscherTextboxRecord.RECORD_ID ) {
               EscherContainerRecord r = new EscherContainerRecord();
               r.setRecordId( header.getRecordId() );
               r.setOptions( header.getOptions() );
  
  
  

---------------------------------------------------------------------
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/


Mime
View raw message