From 799ba60152d66b6b7385ec9363f64e8277791938 Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Wed, 21 Sep 2011 15:33:02 +0000 Subject: [PATCH] wanr more if some PAPX sprms were ignored git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1173717 13f79535-47bb-0310-9956-ffa450edef68 --- .../hwpf/sprm/ParagraphSprmUncompressor.java | 53 +++++++------------ 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java index 1d2e0a5c83..bc35bd3e45 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java @@ -229,30 +229,25 @@ public final class ParagraphSprmUncompressor break; // BrcXXX1 is older Version. Brc is used - case 0x1c: + // case 0x1c: + // newPAP.setBrcTop1((short)param); + // break; + // case 0x1d: + // newPAP.setBrcLeft1((short)param); + // break; + // case 0x1e: + // newPAP.setBrcBottom1((short)param); + // break; + // case 0x1f: + // newPAP.setBrcRight1((short)param); + // break; + // case 0x20: + // newPAP.setBrcBetween1((short)param); + // break; + // case 0x21: + // newPAP.setBrcBar1((byte)param); + // break; - //newPAP.setBrcTop1((short)param); - break; - case 0x1d: - - //newPAP.setBrcLeft1((short)param); - break; - case 0x1e: - - //newPAP.setBrcBottom1((short)param); - break; - case 0x1f: - - //newPAP.setBrcRight1((short)param); - break; - case 0x20: - - //newPAP.setBrcBetween1((short)param); - break; - case 0x21: - - //newPAP.setBrcBar1((byte)param); - break; case 0x22: newPAP.setDxaFromText (sprm.getOperand()); break; @@ -302,10 +297,6 @@ public final class ParagraphSprmUncompressor case 0x31: newPAP.setFWidowControl (sprm.getOperand() != 0); break; - case 0x32: - - //undocumented - break; case 0x33: newPAP.setFKinsoku (sprm.getOperand() != 0); break; @@ -331,7 +322,6 @@ public final class ParagraphSprmUncompressor newPAP.setFontAlign ((short) sprm.getOperand()); break; case 0x3b: - //obsolete break; case 0x3e: @@ -345,18 +335,11 @@ public final class ParagraphSprmUncompressor case 0x3f: //don't really need this. spec is confusing regarding this //sprm - try - { byte[] varParam = sprm.getGrpprl(); int offset = sprm.getGrpprlOffset(); newPAP.setFPropRMark (varParam[offset] != 0 ); newPAP.setIbstPropRMark (LittleEndian.getShort (varParam, offset + 1)); newPAP.setDttmPropRMark (new DateAndTime(varParam, offset + 3)); - } - catch (Exception e) - { - e.printStackTrace (); - } break; case 0x40: // This condition commented out, as Word seems to set outline levels even for -- 2.39.5