poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1173157 [3/3] - in /poi/trunk/src: java/org/apache/poi/util/ scratchpad/src/org/apache/poi/hwpf/model/ scratchpad/src/org/apache/poi/hwpf/model/types/ scratchpad/src/org/apache/poi/hwpf/sprm/ scratchpad/src/org/apache/poi/hwpf/usermodel/ t...
Date Tue, 20 Sep 2011 14:12:45 GMT
Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java?rev=1173157&r1=1173156&r2=1173157&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java Tue
Sep 20 14:12:44 2011
@@ -254,11 +254,6 @@ public final class ParagraphSprmCompress
       // sprmPDcs 
       size += SprmUtils.addSprm((short)0x442C, newPAP.getDcs().toShort(), null, sprmList);
     }
-    if (newPAP.getShd() != null && !newPAP.getShd().equals(oldPAP.getShd()))
-    {
-      // sprmPShd80 
-      size += SprmUtils.addSprm((short)0x442D, newPAP.getShd().toShort(), null, sprmList);
-    }
     if (newPAP.getDyaFromText() != oldPAP.getDyaFromText())
     {
       // sprmPDyaFromText
@@ -375,6 +370,13 @@ public final class ParagraphSprmCompress
       size += SprmUtils.addSprm((short)0x244c, newPAP.getFTtpEmbedded(), sprmList);
     }
 
+    if (newPAP.getShd() != null && !newPAP.getShd().equals(oldPAP.getShd()))
+    {
+        // size += SprmUtils.addSprm((short)0x442D, newPAP.getShd().toShort(), null, sprmList);
+        // sprmPShd  -- 0xc64d 
+        size += SprmUtils.addSprm( (short) 0xc64d, 0, newPAP.getShd().serialize(), sprmList
);
+    }
+
     // Page 55 of public specification begins
     if (newPAP.getItap() != oldPAP.getItap())
     {
@@ -382,6 +384,14 @@ public final class ParagraphSprmCompress
       size += SprmUtils.addSprm((short)0x6649, newPAP.getItap(), null, sprmList);
     }
 
+        if ( newPAP.getRsid() != oldPAP.getRsid() )
+        {
+            // sprmPRsid
+            byte[] value = new byte[4];
+            LittleEndian.putUInt( value, newPAP.getRsid() );
+            size += SprmUtils.addSprm( (short) 0x6467, 0, value, sprmList );
+        }
+
     return SprmUtils.getGrpprl(sprmList, size);
 
   }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java?rev=1173157&r1=1173156&r2=1173157&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java Tue
Sep 20 14:12:44 2011
@@ -23,12 +23,14 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.poi.hwpf.model.TabDescriptor;
 import org.apache.poi.hwpf.usermodel.BorderCode;
 import org.apache.poi.hwpf.usermodel.DateAndTime;
 import org.apache.poi.hwpf.usermodel.DropCapSpecifier;
 import org.apache.poi.hwpf.usermodel.LineSpacingDescriptor;
 import org.apache.poi.hwpf.usermodel.ParagraphProperties;
 import org.apache.poi.hwpf.usermodel.ShadingDescriptor;
+import org.apache.poi.hwpf.usermodel.ShadingDescriptor80;
 import org.apache.poi.util.Internal;
 import org.apache.poi.util.LittleEndian;
 import org.apache.poi.util.POILogFactory;
@@ -284,9 +286,10 @@ public final class ParagraphSprmUncompre
       case 0x2c:
         newPAP.setDcs (new DropCapSpecifier((short)sprm.getOperand()));
         break;
-      case 0x2d:
-        newPAP.setShd (new ShadingDescriptor((short)sprm.getOperand()));
-        break;
+        case 0x2d:
+            newPAP.setShd( new ShadingDescriptor80( (short) sprm.getOperand() )
+                    .toShadingDescriptor() );
+            break;
       case 0x2e:
         newPAP.setDyaFromText (sprm.getOperand());
         break;
@@ -412,6 +415,20 @@ public final class ParagraphSprmUncompre
             // sprmPFInnerTtp -- 0x244c
             newPAP.setFTtpEmbedded( sprm.getOperand()  != 0);
             break;
+        case 0x4d:
+            // sprmPShd -- 0xc64d
+            ShadingDescriptor shadingDescriptor = new ShadingDescriptor(
+                    sprm.getGrpprl(), 3 );
+            newPAP.setShading( shadingDescriptor );
+            break;
+        case 0x5d:
+            // sprmPDxaRight -- 0x845d
+            newPAP.setDxaRight( sprm.getOperand() );
+            break;
+        case 0x5e:
+            // sprmPDxaLeft -- 0x845e
+            newPAP.setDxaLeft( sprm.getOperand() );
+            break;
         case 0x60:
             // sprmPDxaLeft1 -- 0x8460
             newPAP.setDxaLeft1( sprm.getOperand() );
@@ -420,6 +437,10 @@ public final class ParagraphSprmUncompre
         // sprmPJc 
         newPAP.setJustificationLogical((byte) sprm.getOperand());
         break;
+      case 0x67:
+          // sprmPRsid -- 0x6467 
+          newPAP.setRsid( sprm.getOperand() );
+          break;
         default:
             logger.log( POILogger.DEBUG, "Unknown PAP sprm ignored: " + sprm );
             break;
@@ -432,12 +453,12 @@ public final class ParagraphSprmUncompre
     int offset = sprm.getGrpprlOffset();
     int delSize = grpprl[offset++];
     int[] tabPositions = pap.getRgdxaTab();
-    byte[] tabDescriptors = pap.getRgtbd();
+    TabDescriptor[] tabDescriptors = pap.getRgtbd();
 
-    Map<Integer, Byte> tabMap = new HashMap<Integer, Byte>();
+    Map<Integer, TabDescriptor> tabMap = new HashMap<Integer, TabDescriptor>();
     for (int x = 0; x < tabPositions.length; x++)
     {
-      tabMap.put(Integer.valueOf(tabPositions[x]), Byte.valueOf(tabDescriptors[x]));
+      tabMap.put(Integer.valueOf(tabPositions[x]), tabDescriptors[x]);
     }
 
     for (int x = 0; x < delSize; x++)
@@ -451,13 +472,13 @@ public final class ParagraphSprmUncompre
     for (int x = 0; x < addSize; x++)
     {
       Integer key = Integer.valueOf(LittleEndian.getShort(grpprl, offset));
-      Byte val = Byte.valueOf(grpprl[start + ((LittleEndian.SHORT_SIZE * addSize) + x)]);
+      TabDescriptor val = new TabDescriptor( grpprl, start + ((TabDescriptor.getSize() *
addSize) + x) );
       tabMap.put(key, val);
       offset += LittleEndian.SHORT_SIZE;
     }
 
     tabPositions = new int[tabMap.size()];
-    tabDescriptors = new byte[tabPositions.length];
+    tabDescriptors = new TabDescriptor[tabPositions.length];
     
     List<Integer> list = new ArrayList<Integer>(tabMap.keySet());
     Collections.sort(list);
@@ -466,7 +487,10 @@ public final class ParagraphSprmUncompre
     {
       Integer key = list.get(x);
       tabPositions[x] = key.intValue();
-      tabDescriptors[x] = tabMap.get(key).byteValue();
+      if (tabMap.containsKey( key ))
+          tabDescriptors[x] = tabMap.get(key);
+      else
+          tabDescriptors[x] = new TabDescriptor();
     }
 
     pap.setRgdxaTab(tabPositions);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java?rev=1173157&r1=1173156&r2=1173157&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java Tue Sep 20 14:12:44
2011
@@ -55,7 +55,8 @@ public class Paragraph extends Range imp
   public final static short SPRM_FNOAUTOHYPH = 0x242A;
   public final static short SPRM_WHEIGHTABS = 0x442B;
   public final static short SPRM_DCS = 0x442C;
-  public final static short SPRM_SHD = 0x442D;
+  public final static short SPRM_SHD80 = 0x442D;
+  public final static short SPRM_SHD = (short)0xC64D;
   public final static short SPRM_DYAFROMTEXT = (short)0x842E;
   public final static short SPRM_DXAFROMTEXT = (short)0x842F;
   public final static short SPRM_FLOCKED = 0x2430;
@@ -422,7 +423,8 @@ public class Paragraph extends Range imp
   public void setShading(ShadingDescriptor shd)
   {
     _props.setShd(shd);
-    _papx.updateSprm(SPRM_SHD, shd.toShort());
+    //TODO: remove old one
+    _papx.addSprm( SPRM_SHD, shd.serialize() );
   }
 
   public DropCapSpecifier getDropCap()
@@ -478,6 +480,28 @@ public class Paragraph extends Range imp
     _papx.updateSprm(SPRM_FTTP, val);
   }
 
+    /**
+     * Returns number of tabs stops defined for paragraph. Must be >= 0 and <=
+     * 64.
+     * 
+     * @return number of tabs stops defined for paragraph. Must be >= 0 and <=
+     *         64
+     */
+    public int getTabStopsNumber()
+    {
+        return _props.getItbdMac();
+    }
+
+    /**
+     * Returns array of positions of itbdMac tab stops
+     * 
+     * @return array of positions of itbdMac tab stops
+     */
+    public int[] getTabStopsPositions()
+    {
+        return _props.getRgdxaTab();
+    }
+
   /**
    * clone the ParagraphProperties object associated with this Paragraph so
    * that you can apply the same properties to another paragraph.

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java?rev=1173157&r1=1173156&r2=1173157&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java Tue
Sep 20 14:12:44 2011
@@ -17,53 +17,42 @@
 
 package org.apache.poi.hwpf.usermodel;
 
-import org.apache.poi.util.BitField;
-import org.apache.poi.util.BitFieldFactory;
-import org.apache.poi.util.LittleEndian;
+import org.apache.poi.hwpf.model.types.SHDAbstractType;
 
-public final class ShadingDescriptor
-  implements Cloneable
+/**
+ * The SHD is a substructure of the CHP, PAP, and TC for Word 2000.
+ * 
+ * @author vlsergey
+ */
+public final class ShadingDescriptor extends SHDAbstractType implements
+        Cloneable
 {
-  public static final int SIZE = 2;
 
-  private short _info;
-    private final static BitField _icoFore = BitFieldFactory.getInstance(0x1f);
-    private final static BitField _icoBack = BitFieldFactory.getInstance(0x3e0);
-    private final static BitField _ipat = BitFieldFactory.getInstance(0xfc00);
-
-  public ShadingDescriptor()
-  {
-  }
-
-  public ShadingDescriptor(byte[] buf, int offset)
-  {
-    this(LittleEndian.getShort(buf, offset));
-  }
-
-  public ShadingDescriptor(short info)
-  {
-    _info = info;
-  }
-
-  public short toShort()
-  {
-    return _info;
-  }
-
-  public void serialize(byte[] buf, int offset)
-  {
-    LittleEndian.putShort(buf, offset, _info);
-  }
-
-  public Object clone()
-    throws CloneNotSupportedException
-  {
-    return super.clone();
-  }
+    public ShadingDescriptor()
+    {
+    }
+
+    public ShadingDescriptor( byte[] buf, int offset )
+    {
+        super();
+        fillFields( buf, offset );
+    }
+
+    public ShadingDescriptor clone() throws CloneNotSupportedException
+    {
+        return (ShadingDescriptor) super.clone();
+    }
 
     public boolean isEmpty()
     {
-        return _info == 0;
+        return field_3_ipat == 0;
+    }
+
+    public byte[] serialize()
+    {
+        byte[] result = new byte[getSize()];
+        serialize( result, 0 );
+        return result;
     }
 
     @Override
@@ -72,8 +61,8 @@ public final class ShadingDescriptor
         if ( isEmpty() )
             return "[SHD] EMPTY";
 
-        return "[SHD] (cvFore: " + _icoFore.getShortValue( _info )
-                + "; cvBack: " + _icoBack.getShortValue( _info ) + "; iPat: "
-                + _ipat.getShortValue( _info ) + ")";
+        return "[SHD] (cvFore: " + getCvFore() + "; cvBack: " + getCvBack()
+                + "; iPat: " + getIpat() + ")";
     }
+
 }

Copied: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor80.java
(from r1173127, poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java)
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor80.java?p2=poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor80.java&p1=poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java&r1=1173127&r2=1173157&rev=1173157&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/ShadingDescriptor80.java Tue
Sep 20 14:12:44 2011
@@ -17,63 +17,67 @@
 
 package org.apache.poi.hwpf.usermodel;
 
-import org.apache.poi.util.BitField;
-import org.apache.poi.util.BitFieldFactory;
-import org.apache.poi.util.LittleEndian;
+import org.apache.poi.hwpf.model.Colorref;
 
-public final class ShadingDescriptor
-  implements Cloneable
+import org.apache.poi.hwpf.model.types.SHD80AbstractType;
+
+/**
+ * The SHD80 is a substructure of the CHP and PAP, and TC for Word 97.
+ */
+public final class ShadingDescriptor80 extends SHD80AbstractType implements
+        Cloneable
 {
-  public static final int SIZE = 2;
 
-  private short _info;
-    private final static BitField _icoFore = BitFieldFactory.getInstance(0x1f);
-    private final static BitField _icoBack = BitFieldFactory.getInstance(0x3e0);
-    private final static BitField _ipat = BitFieldFactory.getInstance(0xfc00);
-
-  public ShadingDescriptor()
-  {
-  }
-
-  public ShadingDescriptor(byte[] buf, int offset)
-  {
-    this(LittleEndian.getShort(buf, offset));
-  }
-
-  public ShadingDescriptor(short info)
-  {
-    _info = info;
-  }
-
-  public short toShort()
-  {
-    return _info;
-  }
-
-  public void serialize(byte[] buf, int offset)
-  {
-    LittleEndian.putShort(buf, offset, _info);
-  }
-
-  public Object clone()
-    throws CloneNotSupportedException
-  {
-    return super.clone();
-  }
+    public ShadingDescriptor80()
+    {
+    }
+
+    public ShadingDescriptor80( byte[] buf, int offset )
+    {
+        super();
+        fillFields( buf, offset );
+    }
+
+    public ShadingDescriptor80( short value )
+    {
+        super();
+        field_1_value = value;
+    }
+
+    public ShadingDescriptor80 clone() throws CloneNotSupportedException
+    {
+        return (ShadingDescriptor80) super.clone();
+    }
 
     public boolean isEmpty()
     {
-        return _info == 0;
+        return field_1_value == 0;
+    }
+
+    public byte[] serialize()
+    {
+        byte[] result = new byte[getSize()];
+        serialize( result, 0 );
+        return result;
+    }
+
+    public ShadingDescriptor toShadingDescriptor()
+    {
+        ShadingDescriptor result = new ShadingDescriptor();
+        result.setCvFore( Colorref.valueOfIco( getIcoFore() ) );
+        result.setCvBack( Colorref.valueOfIco( getIcoBack() ) );
+        result.setIpat( getIpat() );
+        return result;
     }
 
     @Override
     public String toString()
     {
         if ( isEmpty() )
-            return "[SHD] EMPTY";
+            return "[SHD80] EMPTY";
 
-        return "[SHD] (cvFore: " + _icoFore.getShortValue( _info )
-                + "; cvBack: " + _icoBack.getShortValue( _info ) + "; iPat: "
-                + _ipat.getShortValue( _info ) + ")";
+        return "[SHD80] (icoFore: " + getIcoFore() + "; icoBack: "
+                + getIcoBack() + "; iPat: " + getIpat() + ")";
     }
+
 }

Modified: poi/trunk/src/types/definitions/pap_type.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/types/definitions/pap_type.xml?rev=1173157&r1=1173156&r2=1173157&view=diff
==============================================================================
--- poi/trunk/src/types/definitions/pap_type.xml (original)
+++ poi/trunk/src/types/definitions/pap_type.xml Tue Sep 20 14:12:44 2011
@@ -132,8 +132,6 @@
 
         <field type="byte" size="1" name="jc"/>
 
-        <field type="boolean" size="1" name="fNoAllowOverlap"/>
-
         <field type="BorderCode" size="4" name="brcTop"/>
         <field type="BorderCode" size="4" name="brcLeft"/>
         <field type="BorderCode" size="4" name="brcBottom"/>
@@ -141,17 +139,22 @@
         <field type="BorderCode" size="4" name="brcBetween"/>
         <field type="BorderCode" size="4" name="brcBar"/>
 
-        <field type="ShadingDescriptor" size="2" name="shd"/>
+        <field type="ShadingDescriptor" size="10" name="shd"/>
         <field type="byte[]" size="84" name="anld"/>
         <field type="byte[]" size="12" name="phe"/>
         <field type="boolean" size="1" name="fPropRMark"/>
         <field type="int" size="2" name="ibstPropRMark"/>
         <field type="DateAndTime" size="4" name="dttmPropRMark"/>
 
-        <field type="int" size="2" name="itbdMac"/>
-        <field type="int[]" size="128" name="rgdxaTab"/>
-        <field type="byte[]" size="128" name="rgtbd"/>
+        <field type="int" size="2" name="itbdMac" description="Number of tabs stops defined
for paragraph. Must be &gt;= 0 and &lt;= 64."/>
+        <field type="int[]" size="128" name="rgdxaTab" description="Array of positions
of itbdMac tab stops. itbdMax==64"/>
+        <field type="TabDescriptor[]" size="64" name="rgtbd" description="Array of itbdMac
tab descriptors"/>
+
         <field type="byte[]" size="128" name="numrm"/>
         <field type="byte[]" size="4" name="ptap"/>
+
+        <field type="boolean" size="1" name="fNoAllowOverlap" description="When 1, absolutely
positioned paragraph cannot overlap with another paragraph"/>
+        <field type="long" size="4" name="ipgp" description="HTML DIV ID for this paragraph"/>
+        <field type="long" size="4" name="rsid" description="Save ID for last time this
PAP was revised"/>
     </fields>
 </record>

Added: poi/trunk/src/types/definitions/shd80_type.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/types/definitions/shd80_type.xml?rev=1173157&view=auto
==============================================================================
--- poi/trunk/src/types/definitions/shd80_type.xml (added)
+++ poi/trunk/src/types/definitions/shd80_type.xml Tue Sep 20 14:12:44 2011
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!--
+    ====================================================================
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+    ====================================================================
+-->
+<record fromfile="true" name="SHD80" package="org.apache.poi.hwpf.model.types">
+    <suffix>AbstractType</suffix>
+    <description>The SHD80 is a substructure of the CHP and PAP, and TC for Word 97.
&lt;p&gt;Class
+        and fields descriptions are quoted from
+        Microsoft Office Word 97-2007 Binary File Format
+    </description>
+    <author>Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File
Format
+        Specification [*.doc]
+    </author>
+    <fields>
+        <field type="short" size="2" name="value">
+            <bit number="1" mask="0x001F" name="icoFore" description="Foreground color"
/>
+            <bit number="2" mask="0x03E0" name="icoBack" description="Background color"
/>
+            <bit number="3" mask="0xFC00" name="ipat" description="Shading pattern"/>
+        </field>
+    </fields>
+</record>

Added: poi/trunk/src/types/definitions/shd_type.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/types/definitions/shd_type.xml?rev=1173157&view=auto
==============================================================================
--- poi/trunk/src/types/definitions/shd_type.xml (added)
+++ poi/trunk/src/types/definitions/shd_type.xml Tue Sep 20 14:12:44 2011
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+    ====================================================================
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+    ====================================================================
+-->
+<record fromfile="true" name="SHD" package="org.apache.poi.hwpf.model.types">
+    <suffix>AbstractType</suffix>
+    <description>The SHD is a substructure of the CHP, PAP, and TC for Word 2000. &lt;p&gt;Class
+        and
+        fields descriptions are quoted from Microsoft Office Word 97-2007 Binary File Format
+    </description>
+    <author>Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File
Format
+        Specification [*.doc]
+    </author>
+    <fields>
+        <field type="Colorref" size="4" name="cvFore" description="24-bit foreground color"/>
+        <field type="Colorref" size="4" name="cvBack" description="24-bit background color"/>
+        <field type="int" size="2" name="ipat" description="Shading pattern"/>
+    </fields>
+</record>

Added: poi/trunk/src/types/definitions/tbd_type.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/types/definitions/tbd_type.xml?rev=1173157&view=auto
==============================================================================
--- poi/trunk/src/types/definitions/tbd_type.xml (added)
+++ poi/trunk/src/types/definitions/tbd_type.xml Tue Sep 20 14:12:44 2011
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+    ====================================================================
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License. You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+    ====================================================================
+-->
+<record fromfile="true" name="TBD" package="org.apache.poi.hwpf.model.types">
+    <suffix>AbstractType</suffix>
+    <description>The TBD is a substructure of the PAP. &lt;p&gt;Class and fields
descriptions are quoted from
+        Microsoft Office Word 97-2007 Binary File Format
+    </description>
+    <author>Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File
Format
+        Specification [*.doc]
+    </author>
+    <fields>
+        <field type="byte" size="1" name="value" >
+            <bit number="0" mask="0x07" name="jc" description="Justification code">
+                <const type="byte" value="0" name="LEFT"/>
+                <const type="byte" value="1" name="CENTERED"/>
+                <const type="byte" value="2" name="RIGHT"/>
+                <const type="byte" value="3" name="DECIMAL"/>
+                <const type="byte" value="4" name="BAR"/>
+            </bit>
+            <bit number="0" mask="0x38" name="tlc" description="Tab leader code">
+                <const type="byte" value="0" name="NONE"/>
+                <const type="byte" value="1" name="DOTTED"/>
+                <const type="byte" value="2" name="HYPENATED"/>
+                <const type="byte" value="3" name="SINGLELINE"/>
+                <const type="byte" value="4" name="HEAVYLINE"/>
+                <const type="byte" value="5" name="MIDDLEDOT"/>
+            </bit>
+            <bit number="3" mask="0xc0" name="reserved" />
+        </field>
+    </fields>
+</record>



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


Mime
View raw message