]> source.dussan.org Git - poi.git/commitdiff
replace FIBShortHandler with FibRgW97
authorSergey Vladimirov <sergey@apache.org>
Sat, 1 Oct 2011 15:46:26 +0000 (15:46 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sat, 1 Oct 2011 15:46:26 +0000 (15:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1178030 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/model/FIBShortHandler.java [deleted file]
src/scratchpad/src/org/apache/poi/hwpf/model/FibRgW97.java [new file with mode: 0644]
src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java
src/scratchpad/src/org/apache/poi/hwpf/model/types/FibRgW97AbstractType.java [new file with mode: 0644]
src/types/definitions/FibRgW97_type.xml [new file with mode: 0644]

diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/FIBShortHandler.java b/src/scratchpad/src/org/apache/poi/hwpf/model/FIBShortHandler.java
deleted file mode 100644 (file)
index ce1731e..0000000
+++ /dev/null
@@ -1,77 +0,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.
-==================================================================== */
-
-package org.apache.poi.hwpf.model;
-
-import org.apache.poi.util.Internal;
-import org.apache.poi.util.LittleEndian;
-
-/**
- * Handles the fibRgW / FibRgW97 part of
- *  the FIB (File Information Block)
- */
-@Internal
-public final class FIBShortHandler {
-  public final static int MAGICCREATED = 0;
-  public final static int MAGICREVISED = 1;
-  public final static int MAGICCREATEDPRIVATE = 2;
-  public final static int MAGICREVISEDPRIVATE = 3;
-  public final static int LIDFE = 13;
-
-  final static int START = 0x20;
-
-  short[] _shorts;
-
-  public FIBShortHandler(byte[] mainStream)
-  {
-    int offset = START;
-    int shortCount = LittleEndian.getShort(mainStream, offset);
-    offset += LittleEndian.SHORT_SIZE;
-    _shorts = new short[shortCount];
-
-    for (int x = 0; x < shortCount; x++)
-    {
-      _shorts[x] = LittleEndian.getShort(mainStream, offset);
-      offset += LittleEndian.SHORT_SIZE;
-    }
-  }
-
-  public short getShort(int shortCode)
-  {
-    return _shorts[shortCode];
-  }
-
-  int sizeInBytes()
-  {
-    return (_shorts.length * LittleEndian.SHORT_SIZE) + LittleEndian.SHORT_SIZE;
-  }
-
-  void serialize(byte[] mainStream) {
-    int offset = START;
-    LittleEndian.putShort(mainStream, offset, (short)_shorts.length);
-    offset += LittleEndian.SHORT_SIZE;
-    //mainStream.write(holder);
-
-    for (int x = 0; x < _shorts.length; x++)
-    {
-      LittleEndian.putShort(mainStream, offset, _shorts[x]);
-      offset += LittleEndian.SHORT_SIZE;
-    }
-  }
-
-
-}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/FibRgW97.java b/src/scratchpad/src/org/apache/poi/hwpf/model/FibRgW97.java
new file mode 100644 (file)
index 0000000..ec15c8e
--- /dev/null
@@ -0,0 +1,110 @@
+/* ====================================================================
+   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.
+==================================================================== */
+package org.apache.poi.hwpf.model;
+
+import org.apache.poi.hwpf.model.types.FibRgW97AbstractType;
+import org.apache.poi.util.Internal;
+
+/**
+ * The FibRgW97 structure is a variable-length portion of the Fib.
+ * <p>
+ * Class and fields descriptions are quoted from Microsoft Office Word 97-2007
+ * Binary File Format and [MS-DOC] - v20110608 Word (.doc) Binary File Format.
+ * 
+ * @author Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary
+ *         File Format Specification [*.doc] and [MS-DOC] - v20110608 Word
+ *         (.doc) Binary File Format
+ */
+@Internal
+class FibRgW97 extends FibRgW97AbstractType
+{
+
+    public FibRgW97()
+    {
+    }
+
+    public FibRgW97( byte[] std, int offset )
+    {
+        fillFields( std, offset );
+    }
+
+    @Override
+    @SuppressWarnings( "deprecation" )
+    public boolean equals( Object obj )
+    {
+        if ( this == obj )
+            return true;
+        if ( obj == null )
+            return false;
+        if ( getClass() != obj.getClass() )
+            return false;
+        FibRgW97 other = (FibRgW97) obj;
+        if ( field_10_reserved10 != other.field_10_reserved10 )
+            return false;
+        if ( field_11_reserved11 != other.field_11_reserved11 )
+            return false;
+        if ( field_12_reserved12 != other.field_12_reserved12 )
+            return false;
+        if ( field_13_reserved13 != other.field_13_reserved13 )
+            return false;
+        if ( field_14_lidFE != other.field_14_lidFE )
+            return false;
+        if ( field_1_reserved1 != other.field_1_reserved1 )
+            return false;
+        if ( field_2_reserved2 != other.field_2_reserved2 )
+            return false;
+        if ( field_3_reserved3 != other.field_3_reserved3 )
+            return false;
+        if ( field_4_reserved4 != other.field_4_reserved4 )
+            return false;
+        if ( field_5_reserved5 != other.field_5_reserved5 )
+            return false;
+        if ( field_6_reserved6 != other.field_6_reserved6 )
+            return false;
+        if ( field_7_reserved7 != other.field_7_reserved7 )
+            return false;
+        if ( field_8_reserved8 != other.field_8_reserved8 )
+            return false;
+        if ( field_9_reserved9 != other.field_9_reserved9 )
+            return false;
+        return true;
+    }
+
+    @Override
+    @SuppressWarnings( "deprecation" )
+    public int hashCode()
+    {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + field_10_reserved10;
+        result = prime * result + field_11_reserved11;
+        result = prime * result + field_12_reserved12;
+        result = prime * result + field_13_reserved13;
+        result = prime * result + field_14_lidFE;
+        result = prime * result + field_1_reserved1;
+        result = prime * result + field_2_reserved2;
+        result = prime * result + field_3_reserved3;
+        result = prime * result + field_4_reserved4;
+        result = prime * result + field_5_reserved5;
+        result = prime * result + field_6_reserved6;
+        result = prime * result + field_7_reserved7;
+        result = prime * result + field_8_reserved8;
+        result = prime * result + field_9_reserved9;
+        return result;
+    }
+
+}
index f07f791fcedc49cb7cc7d088ee9a9f81ea6064ee..fcec36f795cc6204e22ddd63ca94b835a867cce0 100644 (file)
@@ -24,14 +24,15 @@ import java.util.HashSet;
 
 import org.apache.poi.hwpf.model.io.HWPFOutputStream;
 import org.apache.poi.util.Internal;
+import org.apache.poi.util.LittleEndian;
 
 /**
  * The File Information Block (FIB). Holds pointers
  *  to various bits of the file, and lots of flags which
  *  specify properties of the document.
  *
- * The parent class, {@link FIBAbstractType}, holds the
- *  first 32 bytes, which make up the FibBase.
+ * The {@link FibBase} class, holds the
+ *  first 32 bytes.
  * The next part, the fibRgW / FibRgW97, is handled
  *  by {@link FIBShortHandler}.
  * The next part, the fibRgLw / The FibRgLw97, is
@@ -42,26 +43,37 @@ import org.apache.poi.util.Internal;
  * @author  andy
  */
 @Internal
-public final class FileInformationBlock  implements Cloneable
+public final class FileInformationBlock implements Cloneable
 {
 
     private FibBase _fibBase;
-    
+    private int _csw;
+    private FibRgW97 _fibRgW97;
+
     FIBLongHandler _longHandler;
-    FIBShortHandler _shortHandler;
     FIBFieldHandler _fieldHandler;
 
     /** Creates a new instance of FileInformationBlock */
-    public FileInformationBlock(byte[] mainDocument)
+    public FileInformationBlock( byte[] mainDocument )
     {
-        _fibBase = new FibBase(mainDocument, 0);
+        int offset = 0;
+
+        _fibBase = new FibBase( mainDocument, offset );
+        offset = FibBase.getSize();
+        assert offset == 32;
+
+        _csw = LittleEndian.getUShort( mainDocument, offset );
+        offset += 2;
+        assert offset == 34;
+
+        _fibRgW97 = new FibRgW97( mainDocument, 34 );
+        offset += FibRgW97.getSize();
+        assert offset == 62;
     }
 
     public void fillVariableFields( byte[] mainDocument, byte[] tableStream )
     {
-        _shortHandler = new FIBShortHandler( mainDocument );
-        _longHandler = new FIBLongHandler( mainDocument, FIBShortHandler.START
-                + _shortHandler.sizeInBytes() );
+        _longHandler = new FIBLongHandler( mainDocument, 62 );
 
         /*
          * Listed fields won't be treat as UnhandledDataStructure. For all other
@@ -102,9 +114,8 @@ public final class FileInformationBlock  implements Cloneable
         knownFieldSet.add( Integer.valueOf( FIBFieldHandler.MODIFIED ) );
 
         _fieldHandler = new FIBFieldHandler( mainDocument,
-                FIBShortHandler.START + _shortHandler.sizeInBytes()
-                        + _longHandler.sizeInBytes(), tableStream,
-                knownFieldSet, true );
+                62 + _longHandler.sizeInBytes(), tableStream, knownFieldSet,
+                true );
     }
 
     @Override
@@ -964,8 +975,11 @@ public final class FileInformationBlock  implements Cloneable
         _fibBase.serialize( mainStream, 0 );
         int offset = FibBase.getSize();
 
-        _shortHandler.serialize( mainStream );
-        offset += _shortHandler.sizeInBytes();
+        LittleEndian.putUShort( mainStream, offset, _csw );
+        offset += 2;
+        
+        _fibRgW97.serialize( mainStream, offset );
+        offset += FibRgW97.getSize();
 
         _longHandler.serialize( mainStream, offset );
         offset += _longHandler.sizeInBytes();
@@ -975,7 +989,7 @@ public final class FileInformationBlock  implements Cloneable
 
     public int getSize()
     {
-        return FibBase.getSize() + _shortHandler.sizeInBytes()
+        return FibBase.getSize() + 2 + FibRgW97.getSize()
                 + _longHandler.sizeInBytes() + _fieldHandler.sizeInBytes();
     }
 
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/FibRgW97AbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/FibRgW97AbstractType.java
new file mode 100644 (file)
index 0000000..6dbc944
--- /dev/null
@@ -0,0 +1,415 @@
+/* ====================================================================\r
+   Licensed to the Apache Software Foundation (ASF) under one or more\r
+   contributor license agreements.  See the NOTICE file distributed with\r
+   this work for additional information regarding copyright ownership.\r
+   The ASF licenses this file to You under the Apache License, Version 2.0\r
+   (the "License"); you may not use this file except in compliance with\r
+   the License.  You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+==================================================================== */\r
+package org.apache.poi.hwpf.model.types;\r
+\r
+\r
+import org.apache.poi.util.Internal;\r
+import org.apache.poi.util.LittleEndian;\r
+\r
+/**\r
+ * The FibRgW97 structure is a variable-length portion of the Fib. <p>Class and\r
+        fields descriptions are quoted from Microsoft Office Word 97-2007 Binary File Format and\r
+        [MS-DOC] - v20110608 Word (.doc) Binary File Format\r
+    \r
+ * <p>\r
+ * NOTE: This source is automatically generated please do not modify this file.  Either subclass or\r
+ *       remove the record in src/types/definitions.\r
+ * <p>\r
+ * This class is internal. It content or properties may change without notice \r
+ * due to changes in our knowledge of internal Microsoft Word binary structures.\r
+\r
+ * @author Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format\r
+        Specification [*.doc] and [MS-DOC] - v20110608 Word (.doc) Binary File Format\r
+    \r
+ */\r
+@Internal\r
+public abstract class FibRgW97AbstractType\r
+{\r
+\r
+    @Deprecated\r
+    protected short field_1_reserved1;\r
+    @Deprecated\r
+    protected short field_2_reserved2;\r
+    @Deprecated\r
+    protected short field_3_reserved3;\r
+    @Deprecated\r
+    protected short field_4_reserved4;\r
+    @Deprecated\r
+    protected short field_5_reserved5;\r
+    @Deprecated\r
+    protected short field_6_reserved6;\r
+    @Deprecated\r
+    protected short field_7_reserved7;\r
+    @Deprecated\r
+    protected short field_8_reserved8;\r
+    @Deprecated\r
+    protected short field_9_reserved9;\r
+    @Deprecated\r
+    protected short field_10_reserved10;\r
+    @Deprecated\r
+    protected short field_11_reserved11;\r
+    @Deprecated\r
+    protected short field_12_reserved12;\r
+    @Deprecated\r
+    protected short field_13_reserved13;\r
+    protected short field_14_lidFE;\r
+\r
+    protected FibRgW97AbstractType()\r
+    {\r
+    }\r
+\r
+    protected void fillFields( byte[] data, int offset )\r
+    {\r
+        field_1_reserved1              = LittleEndian.getShort( data, 0x0 + offset );\r
+        field_2_reserved2              = LittleEndian.getShort( data, 0x2 + offset );\r
+        field_3_reserved3              = LittleEndian.getShort( data, 0x4 + offset );\r
+        field_4_reserved4              = LittleEndian.getShort( data, 0x6 + offset );\r
+        field_5_reserved5              = LittleEndian.getShort( data, 0x8 + offset );\r
+        field_6_reserved6              = LittleEndian.getShort( data, 0xa + offset );\r
+        field_7_reserved7              = LittleEndian.getShort( data, 0xc + offset );\r
+        field_8_reserved8              = LittleEndian.getShort( data, 0xe + offset );\r
+        field_9_reserved9              = LittleEndian.getShort( data, 0x10 + offset );\r
+        field_10_reserved10            = LittleEndian.getShort( data, 0x12 + offset );\r
+        field_11_reserved11            = LittleEndian.getShort( data, 0x14 + offset );\r
+        field_12_reserved12            = LittleEndian.getShort( data, 0x16 + offset );\r
+        field_13_reserved13            = LittleEndian.getShort( data, 0x18 + offset );\r
+        field_14_lidFE                 = LittleEndian.getShort( data, 0x1a + offset );\r
+    }\r
+\r
+    public void serialize( byte[] data, int offset )\r
+    {\r
+        LittleEndian.putShort( data, 0x0 + offset, field_1_reserved1 );\r
+        LittleEndian.putShort( data, 0x2 + offset, field_2_reserved2 );\r
+        LittleEndian.putShort( data, 0x4 + offset, field_3_reserved3 );\r
+        LittleEndian.putShort( data, 0x6 + offset, field_4_reserved4 );\r
+        LittleEndian.putShort( data, 0x8 + offset, field_5_reserved5 );\r
+        LittleEndian.putShort( data, 0xa + offset, field_6_reserved6 );\r
+        LittleEndian.putShort( data, 0xc + offset, field_7_reserved7 );\r
+        LittleEndian.putShort( data, 0xe + offset, field_8_reserved8 );\r
+        LittleEndian.putShort( data, 0x10 + offset, field_9_reserved9 );\r
+        LittleEndian.putShort( data, 0x12 + offset, field_10_reserved10 );\r
+        LittleEndian.putShort( data, 0x14 + offset, field_11_reserved11 );\r
+        LittleEndian.putShort( data, 0x16 + offset, field_12_reserved12 );\r
+        LittleEndian.putShort( data, 0x18 + offset, field_13_reserved13 );\r
+        LittleEndian.putShort( data, 0x1a + offset, field_14_lidFE );\r
+    }\r
+\r
+    public byte[] serialize()\r
+    {\r
+        final byte[] result = new byte[ getSize() ];\r
+        serialize( result, 0 );\r
+        return result;\r
+    }\r
+\r
+    /**\r
+     * Size of record\r
+     */\r
+    public static int getSize()\r
+    {\r
+        return 0 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2;\r
+    }\r
+\r
+    public String toString()\r
+    {\r
+        StringBuilder builder = new StringBuilder();\r
+        builder.append("[FibRgW97]\n");\r
+        builder.append("    .reserved1            = ");\r
+        builder.append(" (").append(getReserved1()).append(" )\n");\r
+        builder.append("    .reserved2            = ");\r
+        builder.append(" (").append(getReserved2()).append(" )\n");\r
+        builder.append("    .reserved3            = ");\r
+        builder.append(" (").append(getReserved3()).append(" )\n");\r
+        builder.append("    .reserved4            = ");\r
+        builder.append(" (").append(getReserved4()).append(" )\n");\r
+        builder.append("    .reserved5            = ");\r
+        builder.append(" (").append(getReserved5()).append(" )\n");\r
+        builder.append("    .reserved6            = ");\r
+        builder.append(" (").append(getReserved6()).append(" )\n");\r
+        builder.append("    .reserved7            = ");\r
+        builder.append(" (").append(getReserved7()).append(" )\n");\r
+        builder.append("    .reserved8            = ");\r
+        builder.append(" (").append(getReserved8()).append(" )\n");\r
+        builder.append("    .reserved9            = ");\r
+        builder.append(" (").append(getReserved9()).append(" )\n");\r
+        builder.append("    .reserved10           = ");\r
+        builder.append(" (").append(getReserved10()).append(" )\n");\r
+        builder.append("    .reserved11           = ");\r
+        builder.append(" (").append(getReserved11()).append(" )\n");\r
+        builder.append("    .reserved12           = ");\r
+        builder.append(" (").append(getReserved12()).append(" )\n");\r
+        builder.append("    .reserved13           = ");\r
+        builder.append(" (").append(getReserved13()).append(" )\n");\r
+        builder.append("    .lidFE                = ");\r
+        builder.append(" (").append(getLidFE()).append(" )\n");\r
+\r
+        builder.append("[/FibRgW97]\n");\r
+        return builder.toString();\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved1()\r
+    {\r
+        return field_1_reserved1;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved1( short field_1_reserved1 )\r
+    {\r
+        this.field_1_reserved1 = field_1_reserved1;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved2()\r
+    {\r
+        return field_2_reserved2;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved2( short field_2_reserved2 )\r
+    {\r
+        this.field_2_reserved2 = field_2_reserved2;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved3()\r
+    {\r
+        return field_3_reserved3;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved3( short field_3_reserved3 )\r
+    {\r
+        this.field_3_reserved3 = field_3_reserved3;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved4()\r
+    {\r
+        return field_4_reserved4;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved4( short field_4_reserved4 )\r
+    {\r
+        this.field_4_reserved4 = field_4_reserved4;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved5()\r
+    {\r
+        return field_5_reserved5;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved5( short field_5_reserved5 )\r
+    {\r
+        this.field_5_reserved5 = field_5_reserved5;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved6()\r
+    {\r
+        return field_6_reserved6;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved6( short field_6_reserved6 )\r
+    {\r
+        this.field_6_reserved6 = field_6_reserved6;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved7()\r
+    {\r
+        return field_7_reserved7;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved7( short field_7_reserved7 )\r
+    {\r
+        this.field_7_reserved7 = field_7_reserved7;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved8()\r
+    {\r
+        return field_8_reserved8;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved8( short field_8_reserved8 )\r
+    {\r
+        this.field_8_reserved8 = field_8_reserved8;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved9()\r
+    {\r
+        return field_9_reserved9;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved9( short field_9_reserved9 )\r
+    {\r
+        this.field_9_reserved9 = field_9_reserved9;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved10()\r
+    {\r
+        return field_10_reserved10;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved10( short field_10_reserved10 )\r
+    {\r
+        this.field_10_reserved10 = field_10_reserved10;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved11()\r
+    {\r
+        return field_11_reserved11;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved11( short field_11_reserved11 )\r
+    {\r
+        this.field_11_reserved11 = field_11_reserved11;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved12()\r
+    {\r
+        return field_12_reserved12;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved12( short field_12_reserved12 )\r
+    {\r
+        this.field_12_reserved12 = field_12_reserved12;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public short getReserved13()\r
+    {\r
+        return field_13_reserved13;\r
+    }\r
+\r
+    /**\r
+     * This value is undefined and MUST be ignored.\r
+     */\r
+    @Internal\r
+    public void setReserved13( short field_13_reserved13 )\r
+    {\r
+        this.field_13_reserved13 = field_13_reserved13;\r
+    }\r
+\r
+    /**\r
+     * A LID whose meaning depends on the nFib value.\r
+     */\r
+    @Internal\r
+    public short getLidFE()\r
+    {\r
+        return field_14_lidFE;\r
+    }\r
+\r
+    /**\r
+     * A LID whose meaning depends on the nFib value.\r
+     */\r
+    @Internal\r
+    public void setLidFE( short field_14_lidFE )\r
+    {\r
+        this.field_14_lidFE = field_14_lidFE;\r
+    }\r
+\r
+}  // END OF CLASS\r
diff --git a/src/types/definitions/FibRgW97_type.xml b/src/types/definitions/FibRgW97_type.xml
new file mode 100644 (file)
index 0000000..f0782db
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>\r
+<!--\r
+    ====================================================================\r
+    Licensed to the Apache Software Foundation (ASF) under one or more\r
+    contributor license agreements. See the NOTICE file distributed with\r
+    this work for additional information regarding copyright ownership.\r
+    The ASF licenses this file to You under the Apache License, Version 2.0\r
+    (the "License"); you may not use this file except in compliance with\r
+    the License. You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+    ====================================================================\r
+-->\r
+<record fromfile="true" name="FibRgW97" package="org.apache.poi.hwpf.model.types">\r
+    <suffix>AbstractType</suffix>\r
+    <description>The FibRgW97 structure is a variable-length portion of the Fib. &lt;p&gt;Class and\r
+        fields descriptions are quoted from Microsoft Office Word 97-2007 Binary File Format and\r
+        [MS-DOC] - v20110608 Word (.doc) Binary File Format\r
+    </description>\r
+    <author>Sergey Vladimirov; according to Microsoft Office Word 97-2007 Binary File Format\r
+        Specification [*.doc] and [MS-DOC] - v20110608 Word (.doc) Binary File Format\r
+    </author>\r
+    <fields>\r
+        <field type="short" size="2" name="reserved1" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved2" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved3" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved4" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved5" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved6" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved7" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved8" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved9" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved10" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved11" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved12" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="reserved13" deprecated="true"\r
+            description="This value is undefined and MUST be ignored"/>\r
+        <field type="short" size="2" name="lidFE" description="A LID whose meaning depends on the nFib value"/>\r
+    </fields>\r
+</record>\r