From: Sergey Vladimirov Date: Sun, 24 Jul 2011 18:35:31 +0000 (+0000) Subject: store unknown structures offsets and sizes in FIB X-Git-Tag: REL_3_8_BETA4~90 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1e763754206994f5bc73507990ea1534f026bd35;p=poi.git 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 --- 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; }