aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad
diff options
context:
space:
mode:
authorSergey Vladimirov <sergey@apache.org>2011-07-24 18:35:31 +0000
committerSergey Vladimirov <sergey@apache.org>2011-07-24 18:35:31 +0000
commit1e763754206994f5bc73507990ea1534f026bd35 (patch)
tree0231c800de9a5c1aa449f66df368773060f512bb /src/scratchpad
parent64e32435981423d2e00dee39745f2e847d66b101 (diff)
downloadpoi-1e763754206994f5bc73507990ea1534f026bd35.tar.gz
poi-1e763754206994f5bc73507990ea1534f026bd35.zip
store unknown structures offsets and sizes in FIB
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1150457 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad')
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java b/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java
index d5613a6948..69232d9dd1 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java
@@ -41,7 +41,9 @@ public final class FIBFieldHandler
public static final int PLCFPAD = 7;
public static final int PLCFPHE = 8;
public static final int STTBGLSY = 9;
+ // 234 == 0x00EA; 238 == 0x00EE
public static final int PLCFGLSY = 10;
+ // 242 == 0200F2; 246 == 0x00F6
public static final int PLCFHDD = 11;
public static final int PLCFBTECHPX = 12;
public static final int PLCFBTEPAPX = 13;
@@ -53,7 +55,9 @@ public final class FIBFieldHandler
public static final int PLCFFLDFTN = 18;
// 306 == 0x132; 310 == 0x0136
public static final int PLCFFLDATN = 19;
+ // 314 == 0x013A; 318 == 0x013E
public static final int PLCFFLDMCR = 20;
+ // 322 == 0x0142; 326 == 0x0146
public static final int STTBFBKMK = 21;
// 330 == 0x014A; 334 == 0x014E
public static final int PLCFBKF = 22;
@@ -220,10 +224,14 @@ public final class FIBFieldHandler
UnhandledDataStructure ds = _unknownMap.get(Integer.valueOf(x));
if (ds != null)
{
+ _fields[x * 2] = tableStream.getOffset();
LittleEndian.putInt(mainStream, offset, tableStream.getOffset());
offset += LittleEndian.INT_SIZE;
+
byte[] buf = ds.getBuf();
tableStream.write(buf);
+
+ _fields[(x * 2) + 1] = buf.length;
LittleEndian.putInt(mainStream, offset, buf.length);
offset += LittleEndian.INT_SIZE;
}