You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by sa...@apache.org on 2003/11/10 12:58:27 UTC

cvs commit: jakarta-poi/src/types/styles hdftype.xsl

sackley     2003/11/10 03:58:27

  Modified:    src/types/styles hdftype.xsl
  Log:
  latest changes...still not working though!
  
  Revision  Changes    Path
  1.11      +4 -5      jakarta-poi/src/types/styles/hdftype.xsl
  
  Index: hdftype.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/types/styles/hdftype.xsl,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- hdftype.xsl	24 Jun 2003 11:01:39 -0000	1.10
  +++ hdftype.xsl	10 Nov 2003 11:58:27 -0000	1.11
  @@ -69,6 +69,7 @@
   import org.apache.poi.util.StringUtil;
   import org.apache.poi.util.HexDump;
   import org.apache.poi.hdf.model.hdftypes.HDFType;
  +import org.apache.poi.hwpf.usermodel.*;
   
   /**
    * <xsl:value-of select="/record/description"/>
  @@ -80,7 +81,7 @@
       implements HDFType
   {
   
  -<xsl:for-each select="//fields/field">    private  <xsl:value-of select="@type"/><xsl:text> field_</xsl:text><xsl:value-of select="position()"/>_<xsl:value-of select="@name"/>;
  +<xsl:for-each select="//fields/field">    protected  <xsl:value-of select="@type"/><xsl:text> field_</xsl:text><xsl:value-of select="position()"/>_<xsl:value-of select="@name"/>;
   <xsl:apply-templates select="./bit|./const"/>
   </xsl:for-each>
   
  @@ -92,7 +93,7 @@
   </xsl:if></xsl:for-each>
       }
   <xsl:if test='//@fromfile="true"'>
  -    protected void fillFields(byte [] data, short size, int offset)
  +    protected void fillFields(byte [] data, int offset)
       {
   <xsl:variable name="fieldIterator" select="field:new()"/>
   <xsl:for-each select="//fields/field">
  @@ -200,9 +201,7 @@
   </xsl:template>
   
   <xsl:template match="field" mode="tostring">
  -        buffer.append("    .<xsl:value-of select="recutil:getFieldName(@name,20)"/> = ");<xsl:choose><xsl:when test="@type != 'string' and @type != 'float' and @size != 'varword'">
  -        buffer.append("0x");
  -        buffer.append(HexDump.toHex((<xsl:value-of select="@type"/>)get<xsl:value-of select="recutil:getFieldName1stCap(@name,0)"/>()));</xsl:when></xsl:choose>
  +        buffer.append("    .<xsl:value-of select="recutil:getFieldName(@name,20)"/> = ");
           buffer.append(" (").append(get<xsl:value-of select="recutil:getFieldName1stCap(@name,0)"/>()).append(" )\n");
   <xsl:apply-templates select="bit" mode="bittostring"/>
   </xsl:template>
  
  
  

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