From 1da4469e5edd99c4d5c5506ecf6632059f1937d5 Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Sat, 16 Jul 2011 12:36:45 +0000 Subject: [PATCH] a bit more comments (quotes from specifications) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1147419 13f79535-47bb-0310-9956-ffa450edef68 --- .../hwpf/sprm/CharacterSprmUncompressor.java | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java index 52c915f4d2..e40bab3581 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java @@ -95,10 +95,23 @@ public final class CharacterSprmUncompressor extends SprmUncompressor case 0x2: newCHP.setFFldVanish (getFlag (sprm.getOperand())); break; - case 0x3: - newCHP.setFcPic (sprm.getOperand()); - newCHP.setFSpec (true); - break; + case 0x3: + // sprmCPicLocation -- 0x6A03 + /* + * Microsoft Office Word 97-2007 Binary File Format (.doc) + * Specification + * + * Page 75 of 210 + * + * sprmCPicLocation (opcode 0x6A03) is used ONLY IN CHPX FKPs. This + * sprm moves the 4-byte operand of the sprm into the chp.fcPic + * field. It simultaneously sets chp.fSpec to 1. This sprm is also + * used when the chp.lTagObj field that is unioned with chp.fcPic is + * to be set for OLE objects. + */ + newCHP.setFcPic( sprm.getOperand() ); + newCHP.setFSpec( true ); + break; case 0x4: newCHP.setIbstRMark ((short) sprm.getOperand()); break; @@ -475,9 +488,10 @@ public final class CharacterSprmUncompressor extends SprmUncompressor case 0x54: newCHP.setFImprint (getFlag (sprm.getOperand())); break; - case 0x55: - newCHP.setFSpec (getFlag (sprm.getOperand())); - break; + case 0x55: + // sprmCFSpec -- 0x0855 + newCHP.setFSpec( getFlag( sprm.getOperand() ) ); + break; case 0x56: newCHP.setFObj (getFlag (sprm.getOperand())); break; -- 2.39.5